[Python-checkins] bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)

Pablo Galindo webhook-mailer at python.org
Sat Oct 12 15:14:14 EDT 2019


https://github.com/python/cpython/commit/8177404d520e81f16324a900f093adf3856d33f8
commit: 8177404d520e81f16324a900f093adf3856d33f8
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-10-12T20:14:11+01:00
summary:

bpo-37731: Reorder includes in xmltok.c to avoid redefinition of _POSIX_C_SOURCE (GH-16733)

files:
M Modules/expat/xmltok.c

diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c
index 11e9d1ccdad42..54cfedb85c28c 100644
--- a/Modules/expat/xmltok.c
+++ b/Modules/expat/xmltok.c
@@ -30,6 +30,14 @@
    USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 
+#ifdef _WIN32
+#  include "winconfig.h"
+#else
+#  ifdef HAVE_EXPAT_CONFIG_H
+#    include <expat_config.h>
+#  endif
+#endif /* ndef _WIN32 */
+
 #include <stddef.h>
 #include <string.h> /* memcpy */
 
@@ -42,14 +50,6 @@
 #  include <stdbool.h>
 #endif
 
-#ifdef _WIN32
-#  include "winconfig.h"
-#else
-#  ifdef HAVE_EXPAT_CONFIG_H
-#    include <expat_config.h>
-#  endif
-#endif /* ndef _WIN32 */
-
 #include "expat_external.h"
 #include "internal.h"
 #include "xmltok.h"



More information about the Python-checkins mailing list