standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS)
Garrett Wollman
wollman at bimajority.org
Tue Mar 11 18:20:02 UTC 2014
The following reply was made to PR standards/187378; it has been noted by GNATS.
From: Garrett Wollman <wollman at bimajority.org>
To: Roman Bogorodskiy <novel at FreeBSD.org>
Cc: bug-followup at freebsd.org
Subject: Re: standards/187378: stdlib.h doesn't define W* macros (e.g.
WEXITSTATUS)
Date: Tue, 11 Mar 2014 14:15:41 -0400
<<On Tue, 11 Mar 2014 20:52:34 +0400, Roman Bogorodskiy <novel at FreeBSD.org> said:
> Peter Pentchev wrote:
>> > stdlib.h should define W* macros like WEXITSTATUS etc. However, it doesn't.
>>
>> FWIW, this is even documented in FreeBSD's stdlib.h :)
>>
>> /* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */
>>
>> Yes, I know this doesn't help you much; I'm just trying to point out
>> that, well, this is not an accidental omission, but a deliberate design
>> decision. For the reasons for it you'll have to ask the people who did
>> it - this particular text seems to have been added by Garrett Wollman
>> back in 2002, but I think that he was just documenting the status quo
>> rather than making a decision right there and then.
In IEEE Std.1003.1-2001 (SUSv6), those macros were marked as XSI
extensions. FreeBSD does not claim to implement XSI (which mostly
memorializes old System V mistakes that the vendors who control The
Open Group were unwilling to give up on). In IEEE Std.1003.1-2008
(SUSv7), they are marked CX (mandatory C extensions) instead. The
change history is unhelpful; I've sent a query to the Austin Group
list asking if anyone can recall why this change was made.
-GAWollman
More information about the freebsd-standards
mailing list