Bug #54407 [Asn->Csd]: Incorrectly defined NTDDI_VERSION macro
Edit report at https://bugs.php.net/bug.php?id=54407&edit=1
ID: 54407
Updated by: pajoye@php.net
Reported by: pvasilevich at parallels dot com
Summary: Incorrectly defined NTDDI_VERSION macro
-Status: Assigned
+Status: Closed
Type: Bug
Package: Compile Failure
Operating System: Windows Server 2008
PHP Version: 5.3.6
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2012-03-04 15:23:16] pajoye@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=323866
Log: - fix bug #54407, Incorrectly defined NTDDI_VERSION macro
------------------------------------------------------------------------
[2011-03-28 11:38:15] pvasilevich at parallels dot com
Description:
------------
win32\build\config.w32.h.in file contains the following code:
/* Define the minimum supported version */
#undef _WIN32_WINNT
#undef NTDDI_VERSION
#define _WIN32_WINNT 0x500
#define NTDDI_VERSION _WIN32_WIN2K
Now look at some Windows Platform SDK file, for example ShlObj.h:
#if (NTDDI_VERSION >= NTDDI_WIN2K)
you see that NTDDI_VERSION is compared to NTDDI_WIN2K, but NTDDI_WIN2K is defined in the following
way:
#define NTDDI_WIN2K 0x05000000
So, macro NTDDI_VERSION defined in php config.w32.h equals to 0x500
, but compared to 0x05000000.
This is incorrect behavior and should be fixed.
Test script:
---------------
Schematic script:
#defined _WIN32_WINNT 0x500
#include "zend.h"
#include "ShlObj.h"
...
TCHAR ret[MAX_PATH + 1];
SHGetFolderPath(NULL, CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_CURRENT, ret);
Expected result:
----------------
NTDDI_VERSION is defined like:
#define NTDDI_WIN2K 0x05000000
OR
do not unset _WIN32_WINNT and NTDDI_VERSION if they are defined.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54407&edit=1
Thread (2 messages)