[libstdc++-v3 PATCH/RFA] Protect use of optional POSIX features

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Mon Oct 28 16:07:00 GMT 2002


 > 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



More information about the Libstdc++ mailing list