Kristján,

I started to investigate the WINVER warnings that are scattered throughout the VS 2005 build. This patch eliminates them but I may have overlooked the intentions of the #include ordering. If this invalid, please let me know.

Patch attached.

Joseph Armbruster


Kristján Valur Jónsson wrote:

-----Original Message-----
From: [EMAIL PROTECTED]
The PCbuild8 solution needs to be corrected.  A patch is attached.

Thanks, I'll apply it.

In addition, I noticed that under C++/Advanced Properties, all the
configurations appear to be set to "Compile as C++ Code" with the /TP
argument.  Should these be set to "Compile as C Code" with the /TC
argument?

Interesting. I hadn't noticed.  I investigated, and this is the default
value for all projects.  However, if you click a single .c file and
check its properties, you will find that it gets the /TC flag in its
advanced settings.  So each file will be correctly compiled. (you can
confirm this by checking the command line).  Removing the /TP flag from
the project settings also results in the disappearance of the per-file
/TC setting.
Very curious.  In end effect, the C files are compiled as such and there
is no need for panic.

Cheers,
Kristján


Index: PC/_winreg.c
===================================================================
--- PC/_winreg.c        (revision 55600)
+++ PC/_winreg.c        (working copy)
@@ -11,9 +11,8 @@
     basic Unicode support added.
 
 */
-
-#include "windows.h"
 #include "Python.h"
+#include "windows.h"
 #include "structmember.h"
 #include "malloc.h" /* for alloca */
 
Index: PC/dl_nt.c
===================================================================
--- PC/dl_nt.c  (revision 55600)
+++ PC/dl_nt.c  (working copy)
@@ -7,12 +7,12 @@
 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
 
 // Python Globals
Index: Python/dynload_win.c
===================================================================
--- Python/dynload_win.c        (revision 55600)
+++ Python/dynload_win.c        (working copy)
@@ -1,13 +1,12 @@
 
 /* Support for dynamic loading of extension modules */
-
+#include "Python.h"
 #include <windows.h>
 #ifdef HAVE_DIRECT_H
 #include <direct.h>
 #endif
 #include <ctype.h>
 
-#include "Python.h"
 #include "importdl.h"
 
 const struct filedescr _PyImport_DynLoadFiletab[] = {
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to