[Python-checkins] bpo-37731: Squish another _POSIX_C_SOURCE redefinition problem in expat. (GH-17077)

Benjamin Peterson webhook-mailer at python.org
Thu Nov 7 00:29:53 EST 2019


https://github.com/python/cpython/commit/089e5f52a34377193a9e6c03088114b14c8507af
commit: 089e5f52a34377193a9e6c03088114b14c8507af
branch: 2.7
author: Benjamin Peterson <benjamin at python.org>
committer: GitHub <noreply at github.com>
date: 2019-11-06T21:29:43-08:00
summary:

bpo-37731: Squish another _POSIX_C_SOURCE redefinition problem in expat. (GH-17077)

files:
M Modules/expat/xmlparse.c

diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c
index e740f0e19c7d4..09ccacb5aae59 100644
--- a/Modules/expat/xmlparse.c
+++ b/Modules/expat/xmlparse.c
@@ -39,6 +39,12 @@
 #  define _CRT_RAND_S
 #endif
 
+#ifdef _WIN32
+#  include "winconfig.h"
+#elif defined(HAVE_EXPAT_CONFIG_H)
+#  include <expat_config.h>
+#endif /* ndef _WIN32 */
+
 #include <stddef.h>
 #include <string.h> /* memset(), memcpy() */
 #include <assert.h>
@@ -58,12 +64,6 @@
 
 #define XML_BUILDING_EXPAT 1
 
-#ifdef _WIN32
-#  include "winconfig.h"
-#elif defined(HAVE_EXPAT_CONFIG_H)
-#  include <expat_config.h>
-#endif /* ndef _WIN32 */
-
 #include "ascii.h"
 #include "expat.h"
 #include "siphash.h"



More information about the Python-checkins mailing list