Re: [xml] compiling libxml v2.4.26 with mingw under win2k



In the 2.4.25-special nanohttp.c, there is this:

#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#include <wsockcompat.h>
#endif

The idea is than ./configure checks for winsock2 and then defines
HAVE_WINSOCK2_H, which pulls in winsock2.h and then wsockcompat.

During configure, _WINSOCKAPI_ is defined but, just now looking at
configure.in, I am suprised there is this problem:

dnl Add in a few Win32 Specific flags
WIN32_EXTRA_LIBADD=
WIN32_EXTRA_LDFLAGS=
case "$host" in
        *-*-mingw*)
                WIN32_EXTRA_LIBADD="-lwsock32"
                WIN32_EXTRA_LDFLAGS="-no-undefined"
                AC_DEFINE([_WINSOCKAPI_],1,[Using the Win32 Socket implementation])
                AC_DEFINE([snprintf],[_snprintf],[Win32 Std C name mangling work-around])
                AC_DEFINE([vsnprintf],[_vsnprintf],[Win32 Std C name mangling work-around])

                ;;
esac

Because *-*-*mingw* should not match with cygwin.

But, anyway, if you go into "config.h" and

#undef _WINSOCKAPI_

it may work because, if cygwin has its own wrapper around Win32 socket
functions, this should cause tho build to not use any native win32
functions/typedef's.

Elizabeth



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]