On Wed, Dec 31, 2003 at 01:16:06AM +0100, Simone Piccardi wrote: > On Tue, 2003-12-30 at 04:23, Colin Watson wrote: > > This definitely implies to me that you need to define _XOPEN_SOURCE > > (__USE_XOPEN may have the same effect but it's supposed to be set by > > <features.h>, not the user) in order to get this constant. See 'info > > libc "Feature Test Macros"' for information on this kind of thing. > > Sorry, I was not clear. I defined _XOPEN_SOURCE. But still not working. > I'll find the program that do not work in the attachment, and those are > the errors: > gcc -L./ -lgapil -Wall -g -fPIC poll_echod.c -o pechod > poll_echod.c: In function `main': > poll_echod.c:167: error: `POLLRDNORM' undeclared (first use in this > function) > poll_echod.c:167: error: (Each undeclared identifier is reported only > once > poll_echod.c:167: error: for each function it appears in.)
You must #define _XOPEN_SOURCE before anything that #includes <features.h>. Since that covers practically all system headers, it's best to put the #define before any #include lines. When I make this modification to your test case, the error about POLLRDNORM disappears. Cheers, -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]