ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#45456 [NEW]: _WIN32_WINNT redefined
by Keisial at gmail dot com other posts by this author
Jul 8 2008 6:46AM messages near this date
Re: [PHP-DEV] [PATCH] RecursiveTreeIterator implementation | #45456 [Asn->Csd]: _WIN32_WINNT redefined
From:             Keisial at gmail dot com
Operating system: Windows
PHP version:      5.3CVS-2008-07-08 (snap)
PHP Bug Type:     Compile Warning
Bug description:  _WIN32_WINNT redefined 

Description:
------------
_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:
main/php.h:405-> TSRM/tsrm_virtual_cwd.h:55->readdir.h

windows.h was already included by:
main/php.h:34-> Zend/zend.h:53->zend_config.w32.h:39
(in fact winsock2.h at zend_config.w32.h:38 is already including it before
the real one)


-- 
Edit bug report at http://bugs.php.net/?id=45456&edit=1
-- 
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45456&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45456&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45456&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45456&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=45456&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45456&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45456&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45456&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45456&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45456&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=45456&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=45456&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45456&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45456&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45456&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45456&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45456&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45456&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45456&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45456&r=mysqlcfg
Thread:
Keisial at gmail dot com
kalle
pajoye
johannes

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved