summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ. Peter Mugaas <jpmugaas@suddenlink.net>2017-10-21 14:04:20 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2017-10-21 14:50:44 +0200
commit882a165a3f2b275c9679b2a1ef18e0421ec32ef2 (patch)
tree523bea4cdcd5627ae97908a99f4652b9fbb09908
parent154824ee5ec47a82b3a27f76d4305ba0658d88ef (diff)
downloadlibxml2-882a165a3f2b275c9679b2a1ef18e0421ec32ef2.tar.gz
Fix preprocessor conditional in threads.h
Make sure that the preprocessor conditions and types for xmlDllMain match exactly in threads.h and threads.c.
-rw-r--r--include/libxml/threads.h9
-rw-r--r--threads.c6
2 files changed, 10 insertions, 5 deletions
diff --git a/include/libxml/threads.h b/include/libxml/threads.h
index d31f16ac..9969ae7c 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 191f134f..36b56adf 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,