diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-12-10 16:01:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-10 16:01:03 +0100 |
commit | 2632df4c3f48f23af85a60bffc61030d52e83ee2 (patch) | |
tree | 31d3f708c3d601d59e97d7205199b7fbb8d11dd8 /Modules | |
parent | 1fd93ff18cf5cc324c743564ea2347bef06c0de0 (diff) | |
download | cpython-git-2632df4c3f48f23af85a60bffc61030d52e83ee2.tar.gz |
[2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078)
Include <pyconfig.h> ealier in Modules/expat/xmlparse.c to define
properly _POSIX_C_SOURCE and _XOPEN_SOURCE.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/expat/xmlparse.c | 3 | ||||
-rw-r--r-- | Modules/expat/xmltok.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c index c4f3ffc215..2a763451a3 100644 --- a/Modules/expat/xmlparse.c +++ b/Modules/expat/xmlparse.c @@ -30,6 +30,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#if !defined(_WIN32) && defined(HAVE_EXPAT_CONFIG_H) +# include <pyconfig.h> +#endif #if !defined(_GNU_SOURCE) # define _GNU_SOURCE 1 /* syscall prototype */ #endif diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c index fa35de7132..6371a350da 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -30,7 +30,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <pyconfig.h> +#if !defined(_WIN32) && defined(HAVE_EXPAT_CONFIG_H) +# include <pyconfig.h> +#endif #include <stddef.h> #include <string.h> /* memcpy */ |