Has anyone successfully installed and ran Apache::Icon-0.02 or FileMan-0.6d
with mod_perl on any Win32 platforms?
My setup:
Win2K, Apache-1.3.20, mod_perl-1.26, ActivePerl-5.6.1 build 626
Problem:
I was trying to install Apache::Icon-0.02 (required both by FileMan and
Apache::AutoIndex) but encountered compilation errors of this sort:
D:\MSVS\VC98\INCLUDE\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type
redefinition
D:\MSVS\VC98\INCLUDE\winsock2.h(134) : warning C4005: 'FD_SET' : macro
redefinition
D:\MSVS\VC98\INCLUDE\winsock.h(83) : see previous definition of 'FD_SET'
D:\MSVS\VC98\INCLUDE\winsock2.h(143) : error C2011: 'timeval' : 'struct'
type redefinition
D:\MSVS\VC98\INCLUDE\winsock2.h(199) : error C2011: 'hostent' : 'struct'
type redefinition
D:\MSVS\VC98\INCLUDE\winsock2.h(212) : error C2011: 'netent' : 'struct'
type redefinition
...etc...
After some code inspection, I found out that both Apache-1.3.20 (os.h) and
mod_perl-1.26 (mod_perl.h) include <winsock2.h> BUT Perl-5.6.1
(/usr/perl/lib/CORE/sys/socket.h) includes <winsock.h>
As the result, compilation failed because of these 2 conflicting header file
inclusion. The include hierachy looks something like this:
Icon.h -> mod_perl.h -> winsock2.h and perl.h
perl.h -> sys/socket.h (in /perl/lib/CORE) -> winsock.h!!
In general, any mod_perl Apache modules (eg: Apache::Icon and FileMan) with C
code would fail to compile due to the exact reason.
Any suggestions on how to get around this?
Thanks!
--
Danny Siu