[xml] libxml2-2.5.9 mingw patch



Here is a patch which should allow 2.5.9 compilation on MinGw with MSYS.

The following files are modified

XML/Makefile.am
XML/configure.in
XML/example/Makefile.am
XML/libxml.h
XML/nanoftp.c
XML/nanohttp.c
XML/xmllint.c

Use --enable-ipv6=no when compiling with MSYS.

--Thanks

--- XML/Makefile.am     2003-08-12 13:49:31.000000000 -0400
+++ libxml2-2.5.9-orig/Makefile.am      2003-06-05 06:05:48.000000000 -0400
@@ -39,8 +39,7 @@
 endif
 
 DEPS = $(top_builddir)/libxml2.la
-LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ 
$(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
-
+LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ 
$(ICONV_LIBS) -lm
 
 man_MANS = xml2-config.1 libxml.3
 
--- XML/configure.in    2003-08-12 13:48:57.000000000 -0400
+++ libxml2-2.5.9-orig/configure.in     2003-08-09 17:29:25.000000000 -0400
@@ -711,22 +711,6 @@
 fi
 AC_SUBST(WITH_MEM_DEBUG)
 
-
-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
-AC_SUBST(WIN32_EXTRA_LIBADD)
-AC_SUBST(WIN32_EXTRA_LDFLAGS)
-
-
 AC_SUBST(CFLAGS)
 AC_SUBST(XML_CFLAGS)
 
--- XML/example/Makefile.am     2003-08-12 13:55:26.000000000 -0400
+++ libxml2-2.5.9-orig/example/Makefile.am      2002-03-03 22:16:50.000000000 -
0500
@@ -7,6 +7,5 @@
        -I$(top_builddir)/include               \
        -I$(top_srcdir)/include -I srcdir@
 
-LDADD = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm 
@WIN32_EXTRA_LIBADD@
-
+LDADD = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm
 
--- XML/libxml.h        2003-08-12 13:50:57.000000000 -0400
+++ libxml2-2.5.9-orig/libxml.h 2003-04-21 15:16:46.000000000 -0400
@@ -18,7 +18,7 @@
 #endif
 #endif
 
-#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
 #include "win32config.h"
 #elif defined(macintosh)
 #include "config-mac.h"
--- XML/nanoftp.c       2003-08-12 13:54:30.000000000 -0400
+++ libxml2-2.5.9-orig/nanoftp.c        2003-08-02 12:23:52.000000000 -0400
@@ -76,16 +76,6 @@
 #endif
 #endif
 
-
-#ifdef __MINGW32__
-#define _WINSOCKAPI_
-#include <wsockcompat.h>
-#include <winsock2.h>
-#undef SOCKLEN_T
-#define SOCKLEN_T unsigned int
-#endif
-
-
 /**
  * A couple portability macros
  */
--- XML/nanohttp.c      2003-08-12 13:53:39.000000000 -0400
+++ libxml2-2.5.9-orig/nanohttp.c       2003-08-02 12:23:52.000000000 -0400
@@ -73,16 +73,6 @@
 #define SOCKET int
 #endif
 
-
-#ifdef __MINGW32__
-#define _WINSOCKAPI_
-#include <wsockcompat.h>
-#include <winsock2.h>
-#undef SOCKLEN_T
-#define SOCKLEN_T unsigned int
-#endif
-
-
 #include <libxml/globals.h>
 #include <libxml/xmlerror.h>
 #include <libxml/xmlmemory.h>
--- XML/xmllint.c       2003-08-12 14:29:05.000000000 -0400
+++ libxml2-2.5.9-orig/xmllint.c        2003-08-08 07:29:07.000000000 -0400
@@ -31,15 +31,6 @@
 #endif
 #endif /* _WIN32 */
 
-#ifdef __MINGW32__
-#define _WINSOCKAPI_
-#include <wsockcompat.h>
-#include <winsock2.h>
-#undef SOCKLEN_T
-#define SOCKLEN_T unsigned int
-#endif
-
-
 #ifdef HAVE_SYS_TIMEB_H
 #include <sys/timeb.h>
 #endif

Attachment: libxml2-2.5.9-mingw.patch
Description: Binary data



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