[xml] Still problems when using libxml2 on mingw windows (includes patch)



Hi...

A few weeks ago I posted a problem here, that libxml2 when compiled for mingw is not
working on windows because of wrong header definitions.
(see http://mail.gnome.org/archives/xml/2004-January/msg00094.html)

Daniel answered that an equivalent patch to mine already was checked in.
(see http://mail.gnome.org/archives/xml/2004-January/msg00095.html)

Maybe there was some CVS problem or something else, because somehow the
change was backed out, in libxml2 2.6.7 there are still the same problems, the affected
.h file is changed, but not the way I did, it more or less looks like before

At present I cannot use libxml2 on mingw (when compiled dynamically) so lets make a new try... :-) Here is my patch to include/libxml/xmlexports.h that fixes the problem when compiling for mingw.

Hope this time it can make it in....

Thanks,

Roland

PS: Is there a public access to the libxml CVS? (just for looking what is the current state of some files)

--- xmlexports.h        2004-02-09 13:28:17.000000000 +0100
+++ xmlexports.h.new    2004-02-25 17:27:34.000000000 +0100
@@ -89,12 +89,21 @@
 
 /* Windows platform with GNU compiler (Mingw) */
 #if defined(_WIN32) && defined(__MINGW32__)
+  #undef XMLPUBFUN
   #undef XMLPUBVAR
-  #ifdef __cplusplus
-    #define XMLPUBVAR extern
+  #undef XMLCALL
+  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+    #define XMLPUBFUN __declspec(dllexport)
+    #define XMLPUBVAR __declspec(dllexport)
   #else
-    #define XMLPUBVAR
+    #define XMLPUBFUN
+    #if !defined(LIBXML_STATIC)
+      #define XMLPUBVAR __declspec(dllimport) extern
+    #else
+      #define XMLPUBVAR extern
+    #endif
   #endif
+  #define XMLCALL __cdecl
   #if !defined _REENTRANT
     #define _REENTRANT
   #endif


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