php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23052 AOLServer.c won't compile on win32 in vc++ 6 environment
Submitted: 2003-04-04 07:40 UTC Modified: 2003-04-09 06:38 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: mstaylor at gmu dot edu Assigned:
Status: No Feedback Package: Other web server
PHP Version: 4.3.1 OS: win32
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mstaylor at gmu dot edu
New email:
PHP Version: OS:

 

 [2003-04-04 07:40 UTC] mstaylor at gmu dot edu
I am using the php4ts.dsw workspace to build php from source on the windows platform.  Everything compiles except phpAOLServer.  The following errors are reported:

--------------------Configuration: php4aolserver - Win32 Release_TS--------------------
Compiling...
aolserver.c
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(134) : warning C4005: 'FD_SET' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(83) : see previous definition of 'FD_SET'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(219) : error C2011: 'servent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(226) : error C2011: 'protoent' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(310) : error C2011: 'in_addr' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(368) : error C2011: 'sockaddr_in' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(378) : error C2011: 'WSAData' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(430) : warning C4005: 'SO_DONTLINGER' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(391) : see previous definition of 'SO_DONTLINGER'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(483) : warning C4005: 'AF_IPX' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(449) : see previous definition of 'AF_IPX'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(506) : warning C4005: 'AF_MAX' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(468) : see previous definition of 'AF_MAX'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(512) : error C2011: 'sockaddr' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(521) : error C2011: 'sockproto' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(560) : error C2011: 'linger' : 'struct' type redefinition
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(573) : warning C4005: 'SOMAXCONN' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(533) : see previous definition of 'SOMAXCONN'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(598) : warning C4005: 'FD_READ' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(551) : see previous definition of 'FD_READ'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(601) : warning C4005: 'FD_WRITE' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(552) : see previous definition of 'FD_WRITE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(604) : warning C4005: 'FD_OOB' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(553) : see previous definition of 'FD_OOB'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(607) : warning C4005: 'FD_ACCEPT' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(554) : see previous definition of 'FD_ACCEPT'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(610) : warning C4005: 'FD_CONNECT' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(555) : see previous definition of 'FD_CONNECT'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(613) : warning C4005: 'FD_CLOSE' : macro redefinition
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(556) : see previous definition of 'FD_CLOSE'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1427) : error C2375: 'accept' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(707) : see declaration of 'accept'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1448) : error C2375: 'bind' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(710) : see declaration of 'bind'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1467) : error C2375: 'closesocket' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(712) : see declaration of 'closesocket'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1486) : error C2375: 'connect' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(714) : see declaration of 'connect'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1507) : error C2375: 'ioctlsocket' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(716) : see declaration of 'ioctlsocket'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1528) : error C2375: 'getpeername' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(718) : see declaration of 'getpeername'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1549) : error C2375: 'getsockname' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(721) : see declaration of 'getsockname'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1572) : error C2375: 'getsockopt' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(724) : see declaration of 'getsockopt'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1593) : error C2375: 'htonl' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(727) : see declaration of 'htonl'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1610) : error C2375: 'htons' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(729) : see declaration of 'htons'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1627) : error C2375: 'inet_addr' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(731) : see declaration of 'inet_addr'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1644) : error C2375: 'inet_ntoa' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(733) : see declaration of 'inet_ntoa'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1662) : error C2375: 'listen' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(735) : see declaration of 'listen'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1680) : error C2375: 'ntohl' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(737) : see declaration of 'ntohl'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1697) : error C2375: 'ntohs' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(739) : see declaration of 'ntohs'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1717) : error C2375: 'recv' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(741) : see declaration of 'recv'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1742) : error C2375: 'recvfrom' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(743) : see declaration of 'recvfrom'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1768) : error C2375: 'select' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(746) : see declaration of 'select'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1792) : error C2375: 'send' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(749) : see declaration of 'send'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1817) : error C2375: 'sendto' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(751) : see declaration of 'sendto'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1843) : error C2375: 'setsockopt' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(754) : see declaration of 'setsockopt'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1865) : error C2375: 'shutdown' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(757) : see declaration of 'shutdown'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1885) : error C2375: 'socket' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(759) : see declaration of 'socket'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1908) : error C2375: 'gethostbyaddr' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(763) : see declaration of 'gethostbyaddr'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1927) : error C2375: 'gethostbyname' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(766) : see declaration of 'gethostbyname'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1945) : error C2375: 'gethostname' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(768) : see declaration of 'gethostname'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1964) : error C2375: 'getservbyport' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(770) : see declaration of 'getservbyport'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(1983) : error C2375: 'getservbyname' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(772) : see declaration of 'getservbyname'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2001) : error C2375: 'getprotobynumber' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(775) : see declaration of 'getprotobynumber'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2018) : error C2375: 'getprotobyname' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(777) : see declaration of 'getprotobyname'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2038) : error C2375: 'WSAStartup' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(781) : see declaration of 'WSAStartup'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2056) : error C2375: 'WSACleanup' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(783) : see declaration of 'WSACleanup'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2073) : error C2375: 'WSASetLastError' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(785) : see declaration of 'WSASetLastError'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2090) : error C2375: 'WSAGetLastError' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(787) : see declaration of 'WSAGetLastError'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2107) : error C2375: 'WSAIsBlocking' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(789) : see declaration of 'WSAIsBlocking'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2124) : error C2375: 'WSAUnhookBlockingHook' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(791) : see declaration of 'WSAUnhookBlockingHook'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2141) : error C2375: 'WSASetBlockingHook' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(793) : see declaration of 'WSASetBlockingHook'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2158) : error C2375: 'WSACancelBlockingCall' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(795) : see declaration of 'WSACancelBlockingCall'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2180) : error C2375: 'WSAAsyncGetServByName' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(797) : see declaration of 'WSAAsyncGetServByName'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2207) : error C2375: 'WSAAsyncGetServByPort' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(802) : see declaration of 'WSAAsyncGetServByPort'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2233) : error C2375: 'WSAAsyncGetProtoByName' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(806) : see declaration of 'WSAAsyncGetProtoByName'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2258) : error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(810) : see declaration of 'WSAAsyncGetProtoByNumber'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2283) : error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(814) : see declaration of 'WSAAsyncGetHostByName'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2310) : error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(818) : see declaration of 'WSAAsyncGetHostByAddr'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2333) : error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(822) : see declaration of 'WSACancelAsyncRequest'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock2.h(2353) : error C2375: 'WSAAsyncSelect' : redefinition; different linkage
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winsock.h(824) : see declaration of 'WSAAsyncSelect'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\nsthread.h(101) : error C2040: 'DIR' : 'struct DIR_ *' differs in levels of indirection from 'struct DIR '
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\nsthread.h(102) : error C2011: 'dirent' : 'struct' type redefinition
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\nsthread.h(105) : warning C4028: formal parameter 1 different from declaration
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\nsthread.h(105) : error C2375: 'opendir' : redefinition; different linkage
        ..\..\tsrm\readdir.h(37) : see declaration of 'opendir'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\nsthread.h(106) : error C2375: 'readdir' : redefinition; different linkage
        ..\..\tsrm\readdir.h(38) : see declaration of 'readdir'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\nsthread.h(107) : error C2375: 'closedir' : redefinition; different linkage
        ..\..\tsrm\readdir.h(40) : see declaration of 'closedir'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\ns.h(120) : error C2371: 'mode_t' : redefinition; different basic types
        ..\..\tsrm\tsrm_virtual_cwd.h(48) : see declaration of 'mode_t'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\ns.h(176) : warning C4005: 'strcasecmp' : macro redefinition
        ..\..\main\win95nt.h(34) : see previous definition of 'strcasecmp'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\ns.h(177) : warning C4005: 'strncasecmp' : macro redefinition
        ..\..\main\win95nt.h(35) : see previous definition of 'strncasecmp'
C:\AOLSERVER\AOLSERVER-4.0-BETA4-SRC\INCLUDE\ns.h(179) : warning C4005: 'mkdir' : macro redefinition
        ..\..\main\win95nt.h(25) : see previous definition of 'mkdir'
Error executing cl.exe.

aolserver.obj - 64 error(s), 15 warning(s)

Note:  I am using AOLServer4.0-beta4.

It seems to be a winsock2 issue...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-04 10:45 UTC] sniper@php.net
Just guessing..but try this patch:

diff -u -r1.72.2.1 aolserver.c
--- aolserver.c 31 Dec 2002 16:26:41 -0000      1.72.2.1
+++ aolserver.c 4 Apr 2003 16:44:36 -0000
@@ -29,6 +29,11 @@
 #include "php.h"
 #undef Debug
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 #ifdef HAVE_AOLSERVER
 
 #ifndef ZTS

 [2003-04-09 06:38 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 11 19:01:29 2024 UTC