This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/284] New: POSIX.1-2001: code not compiling when -D_XOPEN_SOURCE=600 only defined
- From: "a dot josey at opengroup dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 23 Jul 2004 16:28:40 -0000
- Subject: [Bug libc/284] New: POSIX.1-2001: code not compiling when -D_XOPEN_SOURCE=600 only defined
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
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
--
Summary: POSIX.1-2001: code not compiling when -
D_XOPEN_SOURCE=600 only defined
Product: glibc
Version: 2.3.3
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: a dot josey at opengroup dot org
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=284
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.