]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078)
authorVictor Stinner <vstinner@redhat.com>
Mon, 10 Dec 2018 15:01:03 +0000 (16:01 +0100)
committerGitHub <noreply@github.com>
Mon, 10 Dec 2018 15:01:03 +0000 (16:01 +0100)
Include <pyconfig.h> ealier in Modules/expat/xmlparse.c to define
properly _POSIX_C_SOURCE and _XOPEN_SOURCE.

Modules/expat/xmlparse.c
Modules/expat/xmltok.c

index c4f3ffc215c9ef9b3f385a9fc6e3199236e99b5a..2a763451a3ecc79b5169e6f846605d4183f42f07 100644 (file)
@@ -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
index fa35de71324cebea13f1cbf309bb8e2931bf3956..6371a350dadf9694d1ba14f70ee14398b3f166f0 100644 (file)
@@ -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 */