From: Kristján Valur Jónsson Date: Sat, 26 May 2007 19:31:39 +0000 (+0000) Subject: Include after python.h, so that WINNT is properly set before windows... X-Git-Tag: v2.6a1~1687 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=629ec26f637844f912d8f5aa6e21bae5d59f559f;p=python Include after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds. --- diff --git a/PC/WinMain.c b/PC/WinMain.c index 00dc18d484..2cdd0cb695 100644 --- a/PC/WinMain.c +++ b/PC/WinMain.c @@ -1,10 +1,10 @@ /* Minimal main program -- everything is loaded from the library. */ +#include "Python.h" + #define WIN32_LEAN_AND_MEAN #include -#include "Python.h" - int WINAPI WinMain( HINSTANCE hInstance, /* handle to current instance */ HINSTANCE hPrevInstance, /* handle to previous instance */ diff --git a/PC/_winreg.c b/PC/_winreg.c index 782761b654..920e1d1b55 100644 --- a/PC/_winreg.c +++ b/PC/_winreg.c @@ -12,10 +12,10 @@ */ -#include "windows.h" #include "Python.h" #include "structmember.h" #include "malloc.h" /* for alloca */ +#include "windows.h" static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); static PyObject *PyHKEY_FromHKEY(HKEY h); diff --git a/PC/dl_nt.c b/PC/dl_nt.c index 2608f7e7aa..a87b523818 100644 --- a/PC/dl_nt.c +++ b/PC/dl_nt.c @@ -7,11 +7,9 @@ be called, removing that burden (and possible source of frustration if forgotten) from the programmer. */ -#include "windows.h" -/* NT and Python share these */ -#include "pyconfig.h" #include "Python.h" +#include "windows.h" char dllVersionBuffer[16] = ""; // a private buffer diff --git a/PC/winsound.c b/PC/winsound.c index 4e94230405..9ff3b7e881 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -35,9 +35,9 @@ winsound.PlaySound(None, 0) */ +#include #include #include -#include #ifdef HAVE_CONIO_H #include /* port functions on Win9x */ #endif diff --git a/Python/dynload_win.c b/Python/dynload_win.c index 1c3b3ab0c8..fc641b9ff9 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -1,7 +1,6 @@ /* Support for dynamic loading of extension modules */ -#include #ifdef HAVE_DIRECT_H #include #endif @@ -9,6 +8,7 @@ #include "Python.h" #include "importdl.h" +#include const struct filedescr _PyImport_DynLoadFiletab[] = { #ifdef _DEBUG