Applied patch from Mikhail Grushinskiy for mingw compiler on Windows.

* Makefile.am configure.in example/Makefile.am libxml.h nanoftp.c
  nanohttp.c xmllint.c: Applied patch from Mikhail Grushinskiy for
  mingw compiler on Windows.
Daniel
This commit is contained in:
Daniel Veillard 2003-08-14 01:23:25 +00:00
parent b19ba83f07
commit 1638a47a88
8 changed files with 56 additions and 3 deletions

View File

@ -1,3 +1,9 @@
Thu Aug 14 03:19:08 CEST 2003 Daniel Veillard <daniel@veillard.com>
* Makefile.am configure.in example/Makefile.am libxml.h nanoftp.c
nanohttp.c xmllint.c: Applied patch from Mikhail Grushinskiy for
mingw compiler on Windows.
Thu Aug 14 02:28:36 CEST 2003 Daniel Veillard <daniel@veillard.com>
* parser.c: fixed the serious CPU usage problem reported by

View File

@ -39,7 +39,8 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
endif
DEPS = $(top_builddir)/libxml2.la
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@
man_MANS = xml2-config.1 libxml.3

View File

@ -714,6 +714,22 @@ else
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)

View File

@ -7,5 +7,6 @@ INCLUDES = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include -I@srcdir@
LDADD = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm
LDADD = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm @WIN32_EXTRA_LIBADD@

View File

@ -18,7 +18,7 @@
#endif
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#include "win32config.h"
#elif defined(macintosh)
#include "config-mac.h"

View File

@ -76,6 +76,16 @@
#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
*/

View File

@ -73,6 +73,16 @@
#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>

View File

@ -31,6 +31,15 @@
#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