On 22/04/2008, Scott MacVicar <[EMAIL PROTECTED]> wrote: > It's working fine here on VC6 and 2005 on XP. > > afaik the code was only there to deal with older versions of Windows that > didn't have _WINNT32_WINNT defined. > > More investigation is needed to see what exactly is broken. We may just > need to rebuild some of the things in zip.zip again. > > Scott > > > Richard Quadling wrote: > > > Hi. > > > > The recent commit to TSRM/readdir.h isn't quite right. > > > > The later versions of the MS VC compiler set _WINNT32_WINNT to 0x600. > > > > This causes problems later on in fopen_wrappers.c > > > > fopen_wrappers.c > > C:\Program Files\Microsoft > SDKs\Windows\v6.1\include\ws2tcpip.h(583) : > > error C2373: 'inet_pton' : redefinition; different type modifiers > > ..\php_build\include\arpa/inet.h(96) : see > declaration of 'inet_pton' > > > > C:\Program Files\Microsoft > SDKs\Windows\v6.1\include\ws2tcpip.h(600) : > > error C2373: 'inet_ntop' : redefinition; different type modifiers > > ..\php_build\include\arpa/inet.h(97) : see > declaration of 'inet_ntop' > > > > Changing readdir.h so that it simply undef _WIN32_WINNT first, > > preserves PHP's value for this constant. > > > > I've attached patches for 5.3 and head (HEAD is untested). > > > > By adding and removing the patches, I can get 5.3 to compile or not. > > > > This will only be a problem when using a MS compiler which supplies a > > _WIN32_WINNT > 0x0400. > > > > And as I'm following the new PHP documentation on compiling PHP for > > windows, I hope this gets in. > > > > Regards, > > > > Richard. > > > > > > > > >
With later releases of the MS compiler, more versions of windows are understood. C:\Program Files\Microsoft SDKs\Windows\v6.1\include\sdkddkver.h, line 186+ has ... #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_) #define _WIN32_WINNT 0x0600 #endif #ifndef NTDDI_VERSION #ifdef _WIN32_WINNT // set NTDDI_VERSION based on _WIN32_WINNT #define NTDDI_VERSION NTDDI_VERSION_FROM_WIN32_WINNT(_WIN32_WINNT) #else #define NTDDI_VERSION 0x06000100 #endif #endif Also on line 35, it has ... #define _WIN32_WINNT_VISTA 0x0600 These 2 things cause the problem. In /php_build/include/arpa/inet.h, the ntop/pton calls are different enough to cause the compilation to bork. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php