| From 168e20836fe9614dd2dd4b42006c17a783f11c48 Mon Sep 17 00:00:00 2001 |
| From: Markus Duft <mduft@gentoo.org> |
| Date: Thu, 20 Nov 2008 11:04:33 -0500 |
| Subject: [PATCH] Fix for ~x86-winnt |
| |
| [Alexandre Rostovtsev <tetromino@gentoo.org>: port to 2.8.0-rc1] |
| --- |
| dict.c | 2 +- |
| include/wsockcompat.h | 2 +- |
| nanohttp.c | 2 +- |
| xmlIO.c | 4 ++++ |
| 4 files changed, 7 insertions(+), 3 deletions(-) |
| |
| diff --git a/dict.c b/dict.c |
| index 3579f64..71e7bc6 100644 |
| --- a/dict.c |
| +++ b/dict.c |
| @@ -47,7 +47,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 --git a/include/wsockcompat.h b/include/wsockcompat.h |
| index c762a64..1ed822b 100644 |
| --- a/include/wsockcompat.h |
| +++ b/include/wsockcompat.h |
| @@ -27,7 +27,7 @@ |
| #endif |
| #endif |
| |
| -#if defined( __MINGW32__ ) || defined( _MSC_VER ) |
| +#if defined( __MINGW32__ ) || defined( _MSC_VER ) || 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 --git a/nanohttp.c b/nanohttp.c |
| index 2437fed..dbe97a7 100644 |
| --- a/nanohttp.c |
| +++ b/nanohttp.c |
| @@ -74,7 +74,7 @@ |
| #define XML_SOCKLEN_T unsigned int |
| #endif |
| |
| -#if defined(__MINGW32__) || defined(_WIN32_WCE) |
| +#if defined(__MINGW32__) || defined(_WIN32_WCE) || defined(__PARITY__) |
| #ifndef _WINSOCKAPI_ |
| #define _WINSOCKAPI_ |
| #endif |
| diff --git a/xmlIO.c b/xmlIO.c |
| index 73a995d..99562f6 100644 |
| --- a/xmlIO.c |
| +++ b/xmlIO.c |
| @@ -47,6 +47,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 |
| @@ -82,6 +83,7 @@ |
| # endif |
| # endif |
| #endif |
| +#endif /* __PARITY__ */ |
| |
| #include <libxml/xmlmemory.h> |
| #include <libxml/parser.h> |
| @@ -657,6 +659,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info) |
| { |
| #ifdef HAVE_STAT |
| int retval = -1; |
| +#ifndef __PARITY__ |
| wchar_t *wPath; |
| |
| wPath = __xmlIOWin32UTF8ToWChar(path); |
| @@ -665,6 +668,7 @@ xmlWrapStatUtf8(const char *path,struct stat *info) |
| retval = _wstat(wPath,info); |
| xmlFree(wPath); |
| } |
| +#endif |
| /* maybe path in native encoding */ |
| if(retval < 0) |
| retval = stat(path,info); |
| -- |
| 1.7.8.6 |
| |