From 2632df4c3f48f23af85a60bffc61030d52e83ee2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 10 Dec 2018 16:01:03 +0100 Subject: [2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078) Include ealier in Modules/expat/xmlparse.c to define properly _POSIX_C_SOURCE and _XOPEN_SOURCE. --- Modules/expat/xmlparse.c | 3 +++ Modules/expat/xmltok.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c index c4f3ffc..2a76345 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 +#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 fa35de7..6371a35 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -30,7 +30,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include +#if !defined(_WIN32) && defined(HAVE_EXPAT_CONFIG_H) +# include +#endif #include #include /* memcpy */ -- cgit v0.12