From f05af837bb21ec2244d42c1e6ffb8ea174292f03 Mon Sep 17 00:00:00 2001 From: "J. Peter Mugaas" Date: Sat, 21 Oct 2017 14:09:16 +0200 Subject: [PATCH] Add declaration for DllMain Fixes a compiler warning. --- threads.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/threads.c b/threads.c index 36b56adf6..bca49546d 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)