Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37178 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84876 invoked from network); 22 Apr 2008 16:03:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Apr 2008 16:03:42 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 64.233.170.189 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.170.189 rn-out-0910.google.com Received: from [64.233.170.189] ([64.233.170.189:57216] helo=rn-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/65-59922-B5C0E084 for ; Tue, 22 Apr 2008 12:03:40 -0400 Received: by rn-out-0910.google.com with SMTP id i24so879697rng.0 for ; Tue, 22 Apr 2008 09:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=SSARQrgzAJ9xsKLmuiBU1ewcE41/WQ3e6woSdEH+pPI=; b=rHO2XlzYKKB55qRZR5m+IshOdLvgtWocp+eYtTXHuROJq0xhBdTm+Vm4lGAByTdx/kEsAGF5SR7TY1Up+8ZzhznXM2bMcgn8e3i1DdI05BNLEUxCAiUWSAuna8GVJ2yRPVIeUDS0YMWwo0ovKmEYHR7pOUp+aPyAuwNqjlZ/E80= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=V1X64ec+oT/ICAaBiofJJp6vzypbwItZMn5NYQZFpXTTfbTNss8yPXLAIHxxW3xbmi1mQJq5VC9Ld1YodwIp+A5dydhf21Z5NhnR1QOMyXMfV/BxZGY3Hn0YGeYiT12lbO8J7dYjdMwpB6RujbqhHVh17NyWCG0qOkBVVEA7rN8= Received: by 10.114.133.1 with SMTP id g1mr455943wad.217.1208880217060; Tue, 22 Apr 2008 09:03:37 -0700 (PDT) Received: by 10.114.209.15 with HTTP; Tue, 22 Apr 2008 09:03:37 -0700 (PDT) Message-ID: <10845a340804220903x4fb3cc9x6133b157bdad1302@mail.gmail.com> Date: Tue, 22 Apr 2008 17:03:37 +0100 Reply-To: RQuadling@GoogleMail.com To: "Scott MacVicar" Cc: "PHP Developers Mailing List" In-Reply-To: <480E085D.3070006@macvicar.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <10845a340804220837w4037d72fw1e291f89d2feee19@mail.gmail.com> <480E085D.3070006@macvicar.net> Subject: Re: [PHP-DEV] Recent readdir.h From: rquadling@googlemail.com ("Richard Quadling") On 22/04/2008, Scott MacVicar 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!"