standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS)

Roman Bogorodskiy novel at FreeBSD.org
Sat Mar 8 17:20:00 UTC 2014


>Number:         187378
>Category:       standards
>Synopsis:       stdlib.h doesn't define W* macros (e.g. WEXITSTATUS)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-standards
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 08 17:20:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 11.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r262685: Sun Mar 2 11:35:38 UTC 2014 peter at freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64


>Description:
As per this document:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html

stdlib.h should define W* macros like WEXITSTATUS etc. However, it doesn't.

On 10-STABLE, I get:

(21:13) novel at kloomba:~ %> cat stdlib_wmacros.c
#include <stdlib.h>

#ifndef WEXITSTATUS
# error WEXITSTATUS not defined
#endif
(21:13) novel at kloomba:~ %> cc -c stdlib_wmacros.c 
stdlib_wmacros.c:4:3: error: WEXITSTATUS not defined
# error WEXITSTATUS not defined
  ^
1 error generated.
(21:13) novel at kloomba:~ %>

The same test on Fedora 18:

(12:17) novel at localhost:~ %> cat stdlib_wmacros.c
#include <stdlib.h>

#ifndef WEXITSTATUS
# error WEXITSTATUS not defined
#endif
(12:17) novel at localhost:~ %> gcc -c stdlib_wmacros.c
(12:18) novel at localhost:~ %>

>How-To-Repeat:
>Fix:



>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-standards mailing list