[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[xml] xmlversion.h.in.awn.threads.1.patch
- From: "Andrew W. Nosenko" <andrew w nosenko gmail com>
- To: xml gnome org
- Subject: [xml] xmlversion.h.in.awn.threads.1.patch
- Date: Thu, 25 Aug 2005 11:58:30 +0300
Attached patch removes extra checks for _REENTRANT, __MT__ and
_POSIX_C_SOURCE before defining LIBXML_THREAD_ENABLED macro.
Now, only one requirement for have LIBXML_THREAD_ENABLED macro defined,
is compiling the libxml2 library with multithread support enabled.
Rationale:
1. 'gcc -pthread' doesn't define any _REENTRANT, __MT__ or
_POSIX_C_SOURCE
2. I may be wrong, but it seems to be dangerous to have library
compiled with one library-wide set of defines (with
LIBXML_THREAD_ENABLED in this case, because internal libxml2
configure/Makefiles defines _REENTRANT macro) and
application-user-of-library with another (without
LIBXML_THREAD_ENABLED, because _REENTRANT macro is not defined by
anyone).
--
Andrew W. Nosenko <andrew w nosenko gmail com>
2005-08-23 Andrew W. Nosenko <andrew nosenko toatech com>
* include/libxml/xmlversion.h.in:
(LIBXML_THREAD_ENABLED): Defined always if libxml2 library
configured with multithread support enabled.
Index: include/libxml/xmlversion.h.in
===================================================================
RCS file: /cvs/gnome/libxml2/include/libxml/xmlversion.h.in,v
retrieving revision 1.57
diff -u -p -r1.57 xmlversion.h.in
--- include/libxml/xmlversion.h.in 22 Aug 2005 21:22:26 -0000 1.57
+++ include/libxml/xmlversion.h.in 23 Aug 2005 17:09:28 -0000
@@ -91,10 +91,8 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(i
* Whether the thread support is configured in
*/
#if @WITH_THREADS@
-#if defined(_REENTRANT) || defined(__MT__) || (_POSIX_C_SOURCE - 0 >= 199506L)
#define LIBXML_THREAD_ENABLED
#endif
-#endif
/**
* LIBXML_TREE_ENABLED:
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]