Bug #54407 [NEW]: Incorrectly defined NTDDI_VERSION macro
From:
Operating system: Windows Server 2008
PHP version: 5.3.6
Package: Compile Failure
Bug Type: Bug
Bug description:Incorrectly defined NTDDI_VERSION macro
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 bug report at http://bugs.php.net/bug.php?id=54407&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54407&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54407&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54407&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54407&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54407&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54407&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54407&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54407&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54407&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54407&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54407&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54407&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54407&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54407&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54407&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54407&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54407&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54407&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54407&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54407&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54407&r=mysqlcfg
Thread (2 messages)
- pvasilevich at parallels dot com