Re: [xml] Windows CE port for current stable libxml2



the patch looks fine, it's all clearly affecting only when compiling under wince, so I applied it to SVN, thanks a lot.
The only thing I will point out is that it touches some of the trio
files so maybe this need to be reflected by the upstream trio project
(if still alive :-)

Good Idea. I didn't thought about that.

I'm not too fond of adding one file per Windows version honnestly
Can't this really be merged considering there is ways to sort it
out at the preprocessor level ?

Yes, this is the right approach. I merged it into win32config.h

The patch attached includes win32config.h instead of config.h on
Windows CE platforms and some minor modifications. The patch is
against the currend SVN head.

I've tested it again successful.

Cheers,

Andy

--
FELA Management AG, http://www.fela.ch/

Index: include/win32config.h
===================================================================
--- include/win32config.h       (revision 1068)
+++ include/win32config.h       (working copy)
@@ -6,7 +6,7 @@
 #define HAVE_MALLOC_H
 #define HAVE_ERRNO_H
 
-#ifdef _WIN32_WCE
+#if defined(_WIN32_WCE)
 #undef HAVE_ERRNO_H
 #include <windows.h>
 #include "wincecompat.h"
@@ -27,6 +27,11 @@
 #include <wsockcompat.h>
 #endif
 
+/*
+ * Windows platforms may define except 
+ */
+#undef except
+
 #define HAVE_ISINF
 #define HAVE_ISNAN
 #include <math.h>
@@ -95,7 +100,7 @@
 /* Threading API to use should be specified here for compatibility reasons.
    This is however best specified on the compiler's command-line. */
 #if defined(LIBXML_THREAD_ENABLED)
-#if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS)
+#if !defined(HAVE_PTHREAD_H) && !defined(HAVE_WIN32_THREADS) && !defined(_WIN32_WCE)
 #define HAVE_WIN32_THREADS
 #endif
 #endif
Index: libxml.h
===================================================================
--- libxml.h    (revision 1068)
+++ libxml.h    (working copy)
@@ -20,6 +20,14 @@
 
 #if defined(macintosh)
 #include "config-mac.h"
+#elif defined(_WIN32_WCE)
+/*
+ * Windows CE compatibility definitions and functions
+ * This is needed to compile libxml2 for Windows CE.
+ * At least I tested it with WinCE 5.0 for Emulator and WinCE 4.2/SH4 target
+ */
+#include <win32config.h>
+#include <libxml/xmlversion.h>
 #else
 #include "config.h"
 #include <libxml/xmlversion.h>
@@ -32,15 +40,6 @@
 int vfprintf(FILE *, const char *, va_list);
 #endif
 
-/*
- * Windows CE compatibility definitions and functions
- * This is needed to compile libxml2 for Windows CE.
- * At least I tested it with WinCE 4.2 for Emulator and SH4 target
- */
-#if defined(_WIN32_WCE)
-#include <wincecompat.h>
-#endif
-
 #ifndef WITH_TRIO
 #include <stdio.h>
 #else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]