This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: how to handle union wait portably?
- To: msokolov at ivan dot Harhan dot ORG
- Subject: Re: RFA: how to handle union wait portably?
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 29 Dec 2000 17:45:23 -0500 (EST)
- Cc: gcc at gcc dot gnu dot org
> From: msokolov@ivan.Harhan.ORG (Michael Sokolov)
>
> Kaven, you've hit the nail right on the head! "sys/wait.h that is
Glad to have been of help. :-) BTW, its:
Kaveh
----^
> POSIX.1 compatible" means that you can apply WIFEXITED and WIFSIGNALED
> to an int, right? If so, the autoconf test is correct, but... it is
> negative when the compiler is GCC but positive when the compiler is
> PCC! 4.3BSD's <sys/wait.h> defines WIFEXITED and WIFSIGNALED macros
> that apply the dot operator to their argument. This causes
> <sys/wait.h> to be not POSIX-compliant assuming an ISO C compiler that
> doesn't allow applying the dot operator to an int. However, PCC does
> allow applying the dot operator to an int, so when the compiler is
> PCC, 4.3BSD's <sys/wait.h> technically *is* POSIX-compliant!
I'd phrase it differently. 4.3BSD's sys/wait.h is never
POSIX-compliant, even technically speaking. PCC is non-compliant,
period.
> The upshot of all this is that everything works correctly except when
> doing a 3-stage GCC bootstrap with make bootstrap using the native cc
> as the starting compiler. I don't see how the GCC source could be
> changed to avoid this problem.
How about unconditionally doing #undef HAVE_SYS_WAIT_H in the relevant
bsd specific config file? (Do so with lots of explanitory comments.)
I believe the host config file gets included after auto-host.h.
--Kaveh
--
Kaveh R. Ghazi Engagement Manager / Project Services
ghazi@caip.rutgers.edu Qwest Internet Solutions