This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++-v3 PATCH/RFA] Protect use of optional POSIX features
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: libstdc++ at gcc dot gnu dot org, thorpej at wasabisystems dot com
- Date: Mon, 28 Oct 2002 19:07:16 -0500 (EST)
- Subject: Re: [libstdc++-v3 PATCH/RFA] Protect use of optional POSIX features
- References: <20021028154654.C14538@dhcp7.wlan.shagadelic.org>
> Since this question came up wrt. gthr-posix.h, does the inclusion of
> <unistd.h> need to be protected? POSIX systems must provide this
> header for feature testing, and since pthreads is a POSIX feature,
> seems reasonable to assume that the header is there.
GCC itself guarantees that unistd.h exists if you've run the fix*
stuff. (E.g. see tsystem.h which includes unistd.h without guards.)
So if we're talking about target-only library code which is built by
the gcc just bootstrapped, then we don't need any guards for unistd.h.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu