1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-08 13:57:24 +03:00

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).
This commit is contained in:
Michael Haubenwallner 2019-02-27 15:00:14 +01:00 committed by Nick Wellnhofer
parent 2c8dc7158a
commit cf68fe3d50

View File

@ -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: