The following reply was made to PR misc/156637; it has been noted by GNATS.
From: Garrett Wollman <woll...@hergotha.csail.mit.edu> To: stream...@streambag.se Cc: freebsd-gnats-sub...@freebsd.org Subject: Re: misc/156637: sys/types.h can't be included when _XOPEN_SOURCE is defined Date: Mon, 25 Apr 2011 13:51:31 -0400 (EDT) >When including <sys/file.h> with _XOPEN_SOURCE defined to 500 or higher, >compila >tion will fail with a message similar to this one (using clang, gcc fails >with a > similar message): Which edition of the standard specifies <sys/file.h>? It's not in my copy of Issue 6 (SUSv3) or Issue 7 (SUSv4). I'd say it's the application code that is in error. It should not be defining _XOPEN_SOURCE and then including (implementation private) header files which are not defined in the relevant standard. Do we seriously need to start writing our headers like: #include <sys/cdefs.h> #ifndef __BSD_VISIBLE #error "This is a non-standard header, but you have specified strict standard compliance." #endif ? This probably goes along with my fix to <sys/cdefs.h> which does: #ifdef __BSD_VISIBLE #error "Application defined preprocessor macro in the implementation namespace." #endif -GAWollman _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"