[libxml2] Try to avoid __imp__xmlFree link trouble on msys



commit a194ccb8d19ddde94c2c04ddf197e6a629f7cc9b
Author: Daniel Veillard <veillard redhat com>
Date:   Mon Aug 10 10:08:41 2009 +0200

    Try to avoid __imp__xmlFree link trouble on msys
    
    * include/libxml/xmlexports.h: when compiling with mingw/MSYS or linking
      to an precompiled library this _imp__xmlFree missing at runtime is a
      common problem. Igor and various people faced it and this seems the
      minimal fix for it, should resolve 590302 and 561340

 include/libxml/xmlexports.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/include/libxml/xmlexports.h b/include/libxml/xmlexports.h
index 29a6f54..b90659f 100644
--- a/include/libxml/xmlexports.h
+++ b/include/libxml/xmlexports.h
@@ -108,7 +108,12 @@
   #undef XMLPUBVAR
   #undef XMLCALL
   #undef XMLCDECL
-  #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+  /*
+   * if defined(IN_LIBXML) this raises problems on mingw with msys
+   * _imp__xmlFree listed as missing. Try to workaround the problem
+   * by also making that declaration when compiling client code.
+   */
+  #if !defined(LIBXML_STATIC)
     #define XMLPUBFUN __declspec(dllexport)
     #define XMLPUBVAR __declspec(dllexport)
   #else



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