Should sys/types.h include sys/sysmacros.h?

Gerald S. Williams gsw@agere.com
Thu May 23 10:29:00 GMT 2002


Corinna Vinschen wrote:
>   if !_POSIX_THREADS || __CYGWIN__
> so it's always included when building under Cygwin.

My mistake. Sorry for the confusion--I missed the "!" in the
following:

 #if defined(_POSIX_THREADS) && !defined(__CYGWIN__)
 ...90 lines deleted...
 #else
 #if defined (__CYGWIN__)
 #include <cygwin/types.h>
 #endif
 #endif /* defined(_POSIX_THREADS) */

Its fine the way it is. Although personally, I'd find it
easier to follow written like this:

 #if defined(_POSIX_THREADS) && !defined(__CYGWIN__)
 ...90 lines deleted...
 #endif /* defined(_POSIX_THREADS) && !defined(__CYGWIN__) */

 #if defined(__CYGWIN__)
 #include <cygwin/types.h>
 #endif

-Jerry



More information about the Cygwin-developers mailing list