Bug #43478 config-win.h _WIN32_WINNT macro
Submitted: 8 Mar 2009 0:32 Modified: 6 Oct 2009 15:59
Reporter: Miguel Solorzano Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:all OS:Windows
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: _WIN32_WINNT

[8 Mar 2009 0:32] Miguel Solorzano
In config-win.h you find:

#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */
#define _WIN32_WINNT     0x0500
/* Get NT 4.0 functions */
#define _WIN32_WINNT     0x0400

Our today build procedures not define __WIN2000__ so the VS project uses the older macro for NT 4.0.

According MSDN at:


"Beginning with Visual C++ 2008, Visual C++ does not support targeting Windows 95, Windows 98, Windows ME, or Windows NT. If your WINVER or _WIN32_WINNT macros are assigned to one of these versions of Windows, you will need to modify the macros. When you upgrade a project that was created from a previous version of Visual C++, you may see compilation errors related to the WINVER or _WIN32_WINNT macros if they are assigned to a version of Windows that is no longer supported. "

Please analyze if is time to update that macro or modify cmake procedure to use an updated macro as default.

How to repeat:
see description

Suggested fix:
[6 Oct 2009 15:59] Magnus Blåudd
This problem has been fixed in 5.1.39, just checked config-win.h and it does not have this define anymore. Instead _WINNT_WIN32 is defined to 0x0501 in the cmake files.