diff options
author | Keith Packard <keithp@keithp.com> | 2005-07-13 07:23:56 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2005-07-13 07:23:56 +0000 |
commit | ec7a156bcdbe8e4bddf232d4a03f47d426096736 (patch) | |
tree | cad2f15b8abf978be7e2f3ada34055241035e89e /Xos.h | |
parent | 2a0445903d06c332acf70cfd18ba57ddbbeada32 (diff) |
Make some minor source adjustments so that we don not need to use
-D_XOPEN_SOURCE -D_BSD_SOURCE everywhere as this will leak out of the
modular environment and into application build processes, potentially
foulling up their compiles.
Diffstat (limited to 'Xos.h')
-rw-r--r-- | Xos.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* - * $XdotOrg: xc/include/Xos.h,v 1.3 2004/11/15 15:06:53 ago Exp $ + * $XdotOrg: xc/include/Xos.h,v 1.4 2005/01/03 18:03:49 eich Exp $ * $Xorg: Xos.h,v 1.6 2001/02/09 02:03:22 xorgcvs Exp $ * * @@ -57,7 +57,17 @@ in this Software without prior written authorization from The Open Group. #include <sys/types.h> #define _POSIX_SOURCE #else -#include <sys/types.h> +/* + * Make sure _XOPEN_SOURCE is defined before including sys/select.h + * so that we get fds_bits in fd_set instead of __fds_bits + */ +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE +# include <sys/types.h> +# undef _XOPEN_SOURCE +# else +# include <sys/types.h> +# endif #endif #endif /* USG */ |