summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2000-07-05 08:53:18 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2000-07-05 08:53:18 (GMT)
commit82249c83891d86af179d0ff06bfb11d783cbd997 (patch)
tree9cd64bf4ac368d75724888c6e7052c210ee230ad /Include
parentfd9f168bcfea84b39f6bea55f7b57c1a62c162fe (diff)
downloadcpython-82249c83891d86af179d0ff06bfb11d783cbd997.zip
cpython-82249c83891d86af179d0ff06bfb11d783cbd997.tar.gz
cpython-82249c83891d86af179d0ff06bfb11d783cbd997.tar.bz2
Added #defines to enable SUSv2 compatibility where available and
to switch on support for BSD and SysV on platforms which use glibc such as Linux. These #defines are documented in e.g. the file /usr/include/features.h on Linux platforms and the SUSv2 docs.
Diffstat (limited to 'Include')
-rw-r--r--Include/Python.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/Python.h b/Include/Python.h
index b3b07e0..e17abeb 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -12,6 +12,16 @@ See the file "Misc/COPYRIGHT" for information on usage and
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
******************************************************************/
+/* Enable compiler features including SUSv2 compatibility; switching
+ on C lib defines doesn't work here, because the symbols haven't
+ necessarily been defined yet. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+#ifndef _XOPEN_SOURCE
+# define _XOPEN_SOURCE 500
+#endif
+
/* Include nearly all Python header files */
#include "patchlevel.h"