Skip to content

Commit 82249c8

Browse files
committed
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.
1 parent fd9f168 commit 82249c8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Include/Python.h

+10
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ See the file "Misc/COPYRIGHT" for information on usage and
1212
redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1313
******************************************************************/
1414

15+
/* Enable compiler features including SUSv2 compatibility; switching
16+
on C lib defines doesn't work here, because the symbols haven't
17+
necessarily been defined yet. */
18+
#ifndef _GNU_SOURCE
19+
# define _GNU_SOURCE 1
20+
#endif
21+
#ifndef _XOPEN_SOURCE
22+
# define _XOPEN_SOURCE 500
23+
#endif
24+
1525
/* Include nearly all Python header files */
1626

1727
#include "patchlevel.h"

0 commit comments

Comments
 (0)