Index: dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch |
diff --git a/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch b/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0121e045c9d1905be22a2981af601cc05aba3378 |
--- /dev/null |
+++ b/dev-libs/libxml2/files/libxml2-2.7.2-winnt.patch |
@@ -0,0 +1,72 @@ |
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/dict.c libxml2-2.7.2/dict.c |
+--- libxml2-2.7.2.orig/dict.c 2008-11-20 11:16:34 +0100 |
++++ libxml2-2.7.2/dict.c 2008-11-20 09:50:19 +0100 |
+@@ -25,7 +25,7 @@ |
+ #else |
+ #ifdef HAVE_INTTYPES_H |
+ #include <inttypes.h> |
+-#elif defined(WIN32) |
++#elif defined(WIN32) || defined (__PARITY__) |
+ typedef unsigned __int32 uint32_t; |
+ #endif |
+ #endif |
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/include/wsockcompat.h libxml2-2.7.2/include/wsockcompat.h |
+--- libxml2-2.7.2.orig/include/wsockcompat.h 2008-11-20 11:16:34 +0100 |
++++ libxml2-2.7.2/include/wsockcompat.h 2008-11-20 09:50:19 +0100 |
+@@ -26,7 +26,7 @@ |
+ #endif |
+ #endif |
+ |
+-#ifdef __MINGW32__ |
++#if defined(__MINGW32__) || defined(__PARITY__) |
+ /* Include <errno.h> here to ensure that it doesn't get included later |
+ * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */ |
+ #include <errno.h> |
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/nanohttp.c libxml2-2.7.2/nanohttp.c |
+--- libxml2-2.7.2.orig/nanohttp.c 2008-11-20 11:16:34 +0100 |
++++ libxml2-2.7.2/nanohttp.c 2008-11-20 09:50:19 +0100 |
+@@ -82,6 +82,9 @@ |
+ #define XML_SOCKLEN_T unsigned int |
+ #endif |
+ |
++#ifdef __PARITY__ |
++# include <wsockcompat.h> |
++#endif |
+ |
+ #include <libxml/globals.h> |
+ #include <libxml/xmlerror.h> |
+diff -ru -x '*.Po' -x '*.Plo' libxml2-2.7.2.orig/xmlIO.c libxml2-2.7.2/xmlIO.c |
+--- libxml2-2.7.2.orig/xmlIO.c 2008-11-20 10:11:21 +0100 |
++++ libxml2-2.7.2/xmlIO.c 2008-11-20 10:54:34 +0100 |
+@@ -44,6 +44,7 @@ |
+ #include <winnls.h> /* for CP_UTF8 */ |
+ #endif |
+ |
++#ifndef __PARITY__ |
+ /* Figure a portable way to know if a file is a directory. */ |
+ #ifndef HAVE_STAT |
+ # ifdef HAVE__STAT |
+@@ -79,6 +80,7 @@ |
+ # endif |
+ # endif |
+ #endif |
++#endif /* __PARITY__ */ |
+ |
+ #include <libxml/xmlmemory.h> |
+ #include <libxml/parser.h> |
+@@ -626,6 +628,7 @@ |
+ { |
+ #ifdef HAVE_STAT |
+ int retval = -1; |
++#ifndef __PARITY__ |
+ wchar_t *wPath; |
+ |
+ wPath = __xmlIOWin32UTF8ToWChar(path); |
+@@ -634,6 +637,7 @@ |
+ retval = _wstat(wPath,info); |
+ xmlFree(wPath); |
+ } |
++#endif |
+ /* maybe path in native encoding */ |
+ if(retval < 0) |
+ retval = stat(path,info); |