Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14263 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42135 invoked by uid 1010); 2 Jan 2005 16:29:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42044 invoked from network); 2 Jan 2005 16:29:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2005 16:29:49 -0000 X-Host-Fingerprint: 64.233.184.194 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.194:43757] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id CA/CD-39595-C7128D14 for ; Sun, 02 Jan 2005 11:29:49 -0500 Received: by wproxy.gmail.com with SMTP id 36so293980wri for ; Sun, 02 Jan 2005 08:29:46 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=oLLIzQnGA95fyqE+7yyNVk1iF2N1SZvE6DU4//YTiow7r6b5PDmK6CX4vhs2m0BxP2zpCUTvEtrKSTC9Y5W7/r7jGnV9CBsUbXzEk22JY4iY9COR7sTHMo3T4vuSN0Q/kAd06rdk2MzPqfbibAFcJWXZW2QfTq+u+oYCZ+aiEmM= Received: by 10.54.59.37 with SMTP id h37mr120945wra; Sun, 02 Jan 2005 08:29:46 -0800 (PST) Received: by 10.54.59.28 with HTTP; Sun, 2 Jan 2005 08:29:46 -0800 (PST) Message-ID: <4e89b42605010208293cb1bc5a@mail.gmail.com> Date: Sun, 2 Jan 2005 11:29:46 -0500 Reply-To: Wez Furlong To: David Strauss Cc: internals@lists.php.net In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Subject: Re: [PHP-DEV] Critical typedef redefinitions From: kingwez@gmail.com (Wez Furlong) We only support the MSVC compiler and libc under windows (there are plenty of quirks and assumptions made about it for the win32 build). Changing that typedef is slightly tricky; I left it as it was because there were compilation problems using older versons of MSVC and the platform SDK, and this redefinition is benign. If you can test you proposed change with MSVC 6, VS.Net and your VectorC compiler and make sure that it all still works, then we can commit it. --Wez. On Sun, 02 Jan 2005 11:41:32 +0100, David Strauss wrote: > Hi! > > There is a small problem in cgi_main.c preventing it to be compiled > properly > with some compilers. > > WS2tcpip.h will get included into cgi_main.c by following inclusion chain: > cgi_main.c <- php_standard.h <- fsock.h <- php_network.h <- WS2tcpip.h > > Since php.h is included several lines before, socklen_t is already defined > as: > php.h (151): typedef unsigned int socklen_t; > > Now WS2tcpip.h gets included and tries to redefine socklen_t as: > WS2tcpip.h (593): typedef int socklen_t; > > I successfully tested it with the VectorC compiler, where this lead to a > terminal error. > > - David > > Addendum: > If you take a look into the CVS snapshot build log, you'll probably see > this > warning quite a lot of times (58x according to my editor): > C:\\Program Files\\Microsoft SDK\\Include\\.\ws2tcpip.h(593) : warning > C4142: benign redefinition of type > > Since this occurs throughout the whole build, the easiest solution is > proabably > to just change the lines 150-152 in php.h to something like this: > > #ifndef HAVE_SOCKLEN_T > # ifdef PHP_WIN32 > typedef int socklen_t; > # else > typedef unsigned int socklen_t; > # endif > #endif > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >