Hi,

this is the followup patch proposal to
https://mail.gnome.org/archives/xml/2018-September/msg00002.html

Thanks!
/haubi/
>From 4a20b30b4dbab22854fd9c2c64c01219889559fa Mon Sep 17 00:00:00 2001
From: Michael Haubenwallner <michael.haubenwall...@ssi-schaefer.com>
Date: Wed, 27 Feb 2019 15:00:14 +0100
Subject: [PATCH] always define LIBXML_THREAD_ENABLED when enabled

When libxml2 is compiled with threads enabled, have the header file
define LIBXML_THREAD_ENABLED even if the subsequent application by
itself does not enable threads.  Otherwise, the application would see
the unthreaded API functions, but these are not exported (where it does
make a difference, like on Win32 based platforms).
---
 include/libxml/xmlversion.h.in | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in
index d10f9754..5ba64f23 100644
--- a/include/libxml/xmlversion.h.in
+++ b/include/libxml/xmlversion.h.in
@@ -91,11 +91,8 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
  * Whether the thread support is configured in
  */
 #if @WITH_THREADS@
-#if defined(_REENTRANT) || defined(__MT__) || \
-    (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
 #define LIBXML_THREAD_ENABLED
 #endif
-#endif
 
 /**
  * LIBXML_THREAD_ALLOC_ENABLED:
-- 
2.19.2

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to