summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-05-08 15:02:41 -0700
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-05-08 15:02:41 -0700
commit22878c30d21580146200c00070478f88d969bcaa (patch)
tree315561b6c71bd41782c8d145fe9deb516b6daeaa
parente3035a7e6e56e01eb79478ea5342e032ec67a190 (diff)
Apple: Added a comment to explain _DARWIN_C_SOURCE
-rw-r--r--Xosdefs.h9
1 files changed, 9 insertions, 0 deletions
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