|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45456 _WIN32_WINNT redefined
Submitted: 2008-07-08 13:46 UTC Modified: 2008-08-14 23:30 UTC
From: Keisial at gmail dot com Assigned: pajoye (profile)
Status: Closed Package: Compile Warning
PHP Version: 5.3CVS-2008-07-08 (snap) OS: Windows
Private report: No CVE-ID: None
 [2008-07-08 13:46 UTC] Keisial at gmail dot com
_WIN32_WINNT macro can be defiend before including windows headers to specify the minimun windows nt version to support (usually to unhide prototypes not available on previous versions).

It is used like this on TSRM/readdir.h before including windows.h
So far, so good.

However, due to include order, windows.h is already included before, defining _WIN32_WINNT by itself and thus it doesn't do anything. So the define should either be removed (if it's not needed), or moved before.

Reproduce code:
_WIN32_WINNT is defined on TSRM/readdir.h:10:

windows.h was already included by:
(in fact winsock2.h at zend_config.w32.h:38 is already including it before the real one)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-08 14:40 UTC]
Pierre, you're working on Windows stuff these days, please have a look, thanks.
 [2008-07-13 00:01 UTC]
The patch here:

fixes this problem, should be committed soon.
 [2008-08-14 23:30 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Last _WIN32_WINNT redefs are now gone and is committed to both PHP_5_3 and HEAD
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 02:01:29 2024 UTC