This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: __WAIT_STATUS
Ulrich Drepper writes:
> > Wanted to test the current glibc, but - ouch! - gcc doesn't
> > bootstrap any more. The problem is that <stdlib.h> and <sys/wait.h>
> > are incompatible:
>
> I cannot see what should cause the problems in glibc.
<stdlib.h> and <sys/wait.h> must define the same macros but must take care
of each other.
<stdlib.h> defines them if __USE_XOPEN is defined and <sys/wait.h> has not
already been included.
<sys/wait.h> defines them if <stdlib.h> has not already been included.
Therefore in my sample code
======================
#include <stdlib.h>
#include <sys/wait.h>
======================
they don't get defined in <stdlib.h> because __USE_XOPEN isn't defined,
and they don't get defined in <sys/wait.h> because <stdlib.h> has already
been included. But at the end of <sys/wait.h> there are a few declarations
which need __WAIT_STATUS to be defined. Bumm.
Please try compiling this two-line snippet.
Bruno