[libxml2] Add declaration for DllMain



commit f05af837bb21ec2244d42c1e6ffb8ea174292f03
Author: J. Peter Mugaas <jpmugaas suddenlink net>
Date:   Sat Oct 21 14:09:16 2017 +0200

    Add declaration for DllMain
    
    Fixes a compiler warning.

 threads.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/threads.c b/threads.c
index 36b56ad..bca4954 100644
--- a/threads.c
+++ b/threads.c
@@ -985,6 +985,16 @@ int XMLCALL
 xmlDllMain(ATTRIBUTE_UNUSED void *hinstDLL, unsigned long fdwReason,
            ATTRIBUTE_UNUSED void *lpvReserved)
 #else
+/* declare to avoid "no previous prototype for 'DllMain'" warning */
+/* Note that we do NOT want to include this function declaration in
+   a public header because it's meant to be called by Windows itself,
+   not a program that uses this library.  This also has to be exported. */
+
+XMLPUBFUN BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+         DWORD     fdwReason,
+         LPVOID    lpvReserved);
+
 BOOL WINAPI
 DllMain(ATTRIBUTE_UNUSED HINSTANCE hinstDLL, DWORD fdwReason,
         ATTRIBUTE_UNUSED LPVOID lpvReserved)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]