The attached code does not compile when compiled with just c99 -c -D_XOPEN_SOURCE=600 but does when you add -D_POSIX_C_SOURCE=200112L, i.e. $ c99 -c -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L ts.c -sh-2.05b$ c99 -c -D_XOPEN_SOURCE=600 ts.c In file included from ts.c:2: /usr/include/pthread.h:651: error: syntax error before "clockid_t" ts.c:28: error: syntax error before "siginfo_t" ts.c: In function `dummy_rt_signal': ts.c:36: error: structure has no member named `sa_sigaction' POSIX 1003.1 volume System Interfaces Section 2.2.1 states: Since this volume of IEEE Std 1003.1-2001 is aligned with the ISO C standard, and since all functionality enabled by _POSIX_C_SOURCE set equal to 200112L is enabled by _XOPEN_SOURCE set equal to 600, there should be no need to define _POSIX_C_SOURCE if _XOPEN_SOURCE is so defined. Therefore, if _XOPEN_SOURCE is set equal to 600 and _POSIX_C_SOURCE is set equal to 200112L, the behavior is the same as if only _XOPEN_SOURCE is defined and set equal to 600. However, should _POSIX_C_SOURCE be set to a value greater than 200112L, the behavior is unspecified
Created attachment 141 [details] Test program
Hi, Andrew, I checked your program and it can be compiled with the latest cvs.
Subject: Bug 284 CVSROOT: /cvs/glibc Module name: libc Changes by: roland@sources.redhat.com 2005-02-17 01:11:00 Modified files: include : features.h Log message: 2004-07-23 Jakub Jelinek <jakub@redhat.com> [BZ #284] * include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/features.h.diff?cvsroot=glibc&r1=1.37&r2=1.38
Subject: Bug 284 CVSROOT: /cvs/glibc Module name: libc Branch: glibc-2_3-branch Changes by: roland@sources.redhat.com 2005-02-18 00:08:58 Modified files: include : features.h Log message: 2004-07-23 Jakub Jelinek <jakub@redhat.com> [BZ #284] * include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/include/features.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.36&r2=1.36.2.1