mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-01-27 05:23:51 +00:00
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:
parent
b19ba83f07
commit
1638a47a88
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
16
configure.in
16
configure.in
@ -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@
|
||||
|
||||
|
||||
|
2
libxml.h
2
libxml.h
@ -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"
|
||||
|
10
nanoftp.c
10
nanoftp.c
@ -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
|
||||
*/
|
||||
|
10
nanohttp.c
10
nanohttp.c
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user