[libxml2] Fix preprocessor conditional in threads.h
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix preprocessor conditional in threads.h
- Date: Sat, 21 Oct 2017 13:21:31 +0000 (UTC)
commit 882a165a3f2b275c9679b2a1ef18e0421ec32ef2
Author: J. Peter Mugaas <jpmugaas suddenlink net>
Date: Sat Oct 21 14:04:20 2017 +0200
Fix preprocessor conditional in threads.h
Make sure that the preprocessor conditions and types for xmlDllMain
match exactly in threads.h and threads.c.
include/libxml/threads.h | 9 +++++++--
threads.c | 6 +++---
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/include/libxml/threads.h b/include/libxml/threads.h
index d31f16a..9969ae7 100644
--- a/include/libxml/threads.h
+++ b/include/libxml/threads.h
@@ -72,8 +72,13 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN xmlGlobalStatePtr XMLCALL
xmlGetGlobalState(void);
-#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
-int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
+#ifdef HAVE_PTHREAD_H
+#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) ||
defined(LIBXML_STATIC_FOR_DLL))
+#if defined(LIBXML_STATIC_FOR_DLL)
+int XMLCALL
+xmlDllMain(void *hinstDLL, unsigned long fdwReason,
+ void *lpvReserved);
+#endif
#endif
#ifdef __cplusplus
diff --git a/threads.c b/threads.c
index 191f134..36b56ad 100644
--- a/threads.c
+++ b/threads.c
@@ -981,9 +981,9 @@ xmlOnceInit(void)
#ifdef HAVE_PTHREAD_H
#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) ||
defined(LIBXML_STATIC_FOR_DLL))
#if defined(LIBXML_STATIC_FOR_DLL)
-BOOL XMLCALL
-xmlDllMain(ATTRIBUTE_UNUSED HINSTANCE hinstDLL, DWORD fdwReason,
- ATTRIBUTE_UNUSED LPVOID lpvReserved)
+int XMLCALL
+xmlDllMain(ATTRIBUTE_UNUSED void *hinstDLL, unsigned long fdwReason,
+ ATTRIBUTE_UNUSED void *lpvReserved)
#else
BOOL WINAPI
DllMain(ATTRIBUTE_UNUSED HINSTANCE hinstDLL, DWORD fdwReason,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]