On Fri, Jan 24, 2003 at 06:24:36PM +0100, slavomir katuscak wrote: > i found this problem (maybe bug) in freebsd 4.7 stable > i have two programs uses sys/select.h and sys/types.h: > > example 1: > #include <sys/select.h> > #include <sys/types.h> > > int main(void) { > } > > example 2: > #include <sys/types.h> > #include <sys/select.h> > > int main(void) { > } > > first example returns this error messages: > > In file included from /usr/include/sys/select.h:40, > from test.c:1: > /usr/include/sys/event.h:52: syntax error before `uintptr_t' > /usr/include/sys/event.h:54: syntax error before `u_short' > In file included from pokus.c:1: > /usr/include/sys/select.h:47: syntax error before `pid_t' > > but second is ok. > > i don't have tested this in 5.0 release yet.
I don't think that is a bug. I believe it is working as intended. Many header files require other header files to be included first. One common case is that sys/types.h need to be included before some other header file is included. sys/select.h apparently needs this. One might argue that each header file should include all other files it needs, but that is a policy question and the current policy is to not do it that way. -- <Insert your favourite quote here.> Erik Trulsson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message