From: Christian Heimes Date: Fri, 6 Dec 2013 22:43:50 +0000 (+0100) Subject: Load expat_config.h and therefore pyconfig.h before C stdlib headers are loaded. X-Git-Tag: v3.4.0b2~319 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa15276ee9554922919df1eb1a78826a102fb321;p=thirdparty%2FPython%2Fcpython.git Load expat_config.h and therefore pyconfig.h before C stdlib headers are loaded. This silences the pre-processor warning '_POSIX_C_SOURCE redefined'. --- diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c index f35aa36ba8a7..0ac0317b8e14 100644 --- a/Modules/expat/xmlparse.c +++ b/Modules/expat/xmlparse.c @@ -2,12 +2,6 @@ See the file COPYING for copying permission. */ -#include -#include /* memset(), memcpy() */ -#include -#include /* UINT_MAX */ -#include /* time() */ - #define XML_BUILDING_EXPAT 1 #ifdef COMPILED_FROM_DSP @@ -22,6 +16,12 @@ #include #endif /* ndef COMPILED_FROM_DSP */ +#include +#include /* memset(), memcpy() */ +#include +#include /* UINT_MAX */ +#include /* time() */ + #include "ascii.h" #include "expat.h" diff --git a/Modules/expat/xmlrole.c b/Modules/expat/xmlrole.c index 44772e21dd33..9a8f85dd2535 100644 --- a/Modules/expat/xmlrole.c +++ b/Modules/expat/xmlrole.c @@ -2,8 +2,6 @@ See the file COPYING for copying permission. */ -#include - #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(MACOS_CLASSIC) @@ -18,6 +16,8 @@ #endif #endif /* ndef COMPILED_FROM_DSP */ +#include + #include "expat_external.h" #include "internal.h" #include "xmlrole.h" diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c index b9cd7a451300..fd6bf7a3d18d 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -2,8 +2,6 @@ See the file COPYING for copying permission. */ -#include - #ifdef COMPILED_FROM_DSP #include "winconfig.h" #elif defined(MACOS_CLASSIC) @@ -18,6 +16,8 @@ #endif #endif /* ndef COMPILED_FROM_DSP */ +#include + #include "expat_external.h" #include "internal.h" #include "xmltok.h"