[Python-checkins] cpython: Load expat_config.h and therefore pyconfig.h before C stdlib headers are loaded.

christian.heimes python-checkins at python.org
Fri Dec 6 23:44:44 CET 2013


http://hg.python.org/cpython/rev/b04557ae099a
changeset:   87798:b04557ae099a
parent:      87796:07cfe9f5561b
user:        Christian Heimes <christian at cheimes.de>
date:        Fri Dec 06 23:43:50 2013 +0100
summary:
  Load expat_config.h and therefore pyconfig.h before C stdlib headers are loaded.
This silences the pre-processor warning '_POSIX_C_SOURCE redefined'.

files:
  Modules/expat/xmlparse.c |  12 ++++++------
  Modules/expat/xmlrole.c  |   4 ++--
  Modules/expat/xmltok.c   |   4 ++--
  3 files changed, 10 insertions(+), 10 deletions(-)


diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c
--- a/Modules/expat/xmlparse.c
+++ b/Modules/expat/xmlparse.c
@@ -2,12 +2,6 @@
    See the file COPYING for copying permission.
 */
 
-#include <stddef.h>
-#include <string.h>                     /* memset(), memcpy() */
-#include <assert.h>
-#include <limits.h>                     /* UINT_MAX */
-#include <time.h>                       /* time() */
-
 #define XML_BUILDING_EXPAT 1
 
 #ifdef COMPILED_FROM_DSP
@@ -22,6 +16,12 @@
 #include <expat_config.h>
 #endif /* ndef COMPILED_FROM_DSP */
 
+#include <stddef.h>
+#include <string.h>                     /* memset(), memcpy() */
+#include <assert.h>
+#include <limits.h>                     /* UINT_MAX */
+#include <time.h>                       /* time() */
+
 #include "ascii.h"
 #include "expat.h"
 
diff --git a/Modules/expat/xmlrole.c b/Modules/expat/xmlrole.c
--- a/Modules/expat/xmlrole.c
+++ b/Modules/expat/xmlrole.c
@@ -2,8 +2,6 @@
    See the file COPYING for copying permission.
 */
 
-#include <stddef.h>
-
 #ifdef COMPILED_FROM_DSP
 #include "winconfig.h"
 #elif defined(MACOS_CLASSIC)
@@ -18,6 +16,8 @@
 #endif
 #endif /* ndef COMPILED_FROM_DSP */
 
+#include <stddef.h>
+
 #include "expat_external.h"
 #include "internal.h"
 #include "xmlrole.h"
diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c
--- a/Modules/expat/xmltok.c
+++ b/Modules/expat/xmltok.c
@@ -2,8 +2,6 @@
    See the file COPYING for copying permission.
 */
 
-#include <stddef.h>
-
 #ifdef COMPILED_FROM_DSP
 #include "winconfig.h"
 #elif defined(MACOS_CLASSIC)
@@ -18,6 +16,8 @@
 #endif
 #endif /* ndef COMPILED_FROM_DSP */
 
+#include <stddef.h>
+
 #include "expat_external.h"
 #include "internal.h"
 #include "xmltok.h"

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list