summaryrefslogtreecommitdiff
path: root/proto/x11proto/Xosdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/x11proto/Xosdefs.h')
-rw-r--r--proto/x11proto/Xosdefs.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/proto/x11proto/Xosdefs.h b/proto/x11proto/Xosdefs.h
index d6c76826d..ee33a32f8 100644
--- a/proto/x11proto/Xosdefs.h
+++ b/proto/x11proto/Xosdefs.h
@@ -1,7 +1,7 @@
/*
* O/S-dependent (mis)feature macro definitions
*
- * $XdotOrg: proto/X11/Xosdefs.h,v 1.7 2005/11/08 06:33:25 jkj Exp $
+ * $XdotOrg: xc/include/Xosdefs.h,v 1.3 2005/04/28 22:04:12 alanc Exp $
* $Xorg: Xosdefs.h,v 1.5 2001/02/09 02:03:23 xorgcvs Exp $
*
Copyright 1991, 1998 The Open Group
@@ -86,7 +86,7 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif
-#ifdef i386
+#ifdef __i386__
#ifdef SYSV
#if !defined(ISC) && !defined(__SCO__) && !defined(_SEQUENT_) && \
!defined(__UNIXWARE__) && !defined(sun)
@@ -133,8 +133,18 @@ in this Software without prior written authorization from The Open Group.
#define NULL_NOT_ZERO
#endif
-#ifdef __DARWIN__
+#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__
@@ -156,7 +166,7 @@ in this Software without prior written authorization from The Open Group.
#endif
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) \
- || defined(__Darwin__) || defined(__DragonFly__)
+ || defined(__APPLE__) || defined(__DragonFly__)
# ifndef CSRG_BASED
# define CSRG_BASED
# endif