Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14261 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62465 invoked by uid 1010); 2 Jan 2005 10:41:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62446 invoked by uid 1007); 2 Jan 2005 10:41:36 -0000 To: internals@lists.php.net Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Date: Sun, 02 Jan 2005 11:41:32 +0100 Message-ID: User-Agent: Opera M2(BETA1)/8.00 (Win32, build 7401) X-Posted-By: 212.99.202.23 Subject: Critical typedef redefinitions From: kintaroZ@msn.com ("David Strauss") 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 chai= n: 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 defin= ed = 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