Bug 72175 - #include <fcntl.h> // doesn't get me F_SETSIG anymore
Summary: #include <fcntl.h> // doesn't get me F_SETSIG anymore
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-21 18:03 UTC by Olen
Modified: 2007-04-18 16:45 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2002-08-21 18:04:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Olen 2002-08-21 18:03:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.79 [en] (Windows NT 5.0; U)

Description of problem:
I wrote a sample program to raise a single when data was ready on a file descriptor.   The signal must be set to get information to the signal 
handler.   The F_SETSIG symbol/macro/define wasn't in the include file.   I did a recursive grep in the include directory, and found its value should 
be 10, so I used that, and the program works.   The man page for fcntl only has me including fcntl.h but this didn't get F_SETSIG defined for me.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Write a program that includes fcntl.h, and used the F_SETSIG symbol.
2.compile program
3. program won't compile due to an undefined symbol
	

Actual Results:  The program won't compile.

Expected Results:  I think the fcntl.h should include enough other files, so that this gets defined.

Additional info:

It is defined in  a subdiretories file.   The other fcntl  command arguements are defined, or atleast the other I have used.
I am pretty sure I didn't misspell the symbol name though.  I found it with a recursive grep, and just use the numerical value,
but that isn't very portable.

Comment 1 Jakub Jelinek 2002-08-21 18:07:55 UTC
F_SETSIG is a GNU extension, so you need to -D_GNU_SOURCE when compiling
file using it to get its definition. See info libc on feature set macros.


Note You need to log in before you can comment on or make changes to this bug.