Commit 1638a47a authored by Daniel Veillard's avatar Daniel Veillard

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
parent b19ba83f
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
......
......@@ -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
......
......@@ -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)
......
......@@ -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@
......@@ -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"
......
......@@ -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
*/
......
......@@ -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>
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment