From 22878c30d21580146200c00070478f88d969bcaa Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 8 May 2008 15:02:41 -0700 Subject: Apple: Added a comment to explain _DARWIN_C_SOURCE --- Xosdefs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Xosdefs.h b/Xosdefs.h index a0b2e3e..ee33a32 100644 --- a/Xosdefs.h +++ b/Xosdefs.h @@ -135,9 +135,18 @@ in this Software without prior written authorization from The Open Group. #ifdef __APPLE__ #define NULL_NOT_ZERO + +/* Defining any of these will sanitize the namespace to JUST want is defined by + * that particular standard. If that happens, we don't get some expected + * prototypes, typedefs, etc (like fd_mask). We can define _DARWIN_C_SOURCE to + * loosen our belts a tad. + */ +#if defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) #define _DARWIN_C_SOURCE #endif +#endif + #ifdef __GNU__ #ifndef PATH_MAX #define PATH_MAX 4096 -- cgit v1.2.1