new patch from Andreas Stricke to better integrate support for Windows CE

* include/win32config.h libxml.h: new patch from Andreas Stricke to
  better integrate support for Windows CE
Daniel

svn path=/trunk/; revision=3602
diff --git a/ChangeLog b/ChangeLog
index 44bfd1f..79d5b28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 18 09:52:25 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+	* include/win32config.h libxml.h: new patch from Andreas Stricke to
+	  better integrate support for Windows CE
+
 Tue Apr 17 16:50:12 CEST 2007 Daniel Veillard <daniel@veillard.com>
 
 	* doc/* configure.in NEWS: release of libxml2 2.6.28
diff --git a/include/win32config.h b/include/win32config.h
index c61dfa9..6e9b33b 100644
--- a/include/win32config.h
+++ b/include/win32config.h
@@ -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
diff --git a/libxml.h b/libxml.h
index 478d3e3..f5c6394 100644
--- a/libxml.h
+++ b/libxml.h
@@ -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