From 3e63f6c438d6e5faba69881c102aba2cd1cc03fd Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Wed, 26 Jul 2017 15:19:45 +0200 Subject: [PATCH] Rename Curl_load_library to _Expat_LoadLibrary .. to avoid symbol collisions --- expat/lib/loadlibrary.c | 6 +++--- expat/lib/xmlparse.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/expat/lib/loadlibrary.c b/expat/lib/loadlibrary.c index 4a87ccf4..31b7f312 100644 --- a/expat/lib/loadlibrary.c +++ b/expat/lib/loadlibrary.c @@ -34,7 +34,7 @@ #include -HMODULE Curl_load_library(LPCTSTR filename); +HMODULE _Expat_LoadLibrary(LPCTSTR filename); #if !defined(LOAD_WITH_ALTERED_SEARCH_PATH) @@ -61,7 +61,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD); /* - * Curl_load_library() + * _Expat_LoadLibrary() * * This is used to dynamically load DLLs using the most secure method available * for the version of Windows that we are running on. @@ -74,7 +74,7 @@ typedef HMODULE (APIENTRY *LOADLIBRARYEX_FN)(LPCTSTR, HANDLE, DWORD); * * Returns the handle of the module on success; otherwise NULL. */ -HMODULE Curl_load_library(LPCTSTR filename) +HMODULE _Expat_LoadLibrary(LPCTSTR filename) { HMODULE hModule = NULL; LOADLIBRARYEX_FN pLoadLibraryEx = NULL; diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 4c470d4e..814f734d 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -804,7 +804,7 @@ writeRandomBytes_arc4random(void * target, size_t count) { #ifdef _WIN32 typedef BOOLEAN (APIENTRY *RTLGENRANDOM_FUNC)(PVOID, ULONG); -HMODULE Curl_load_library(LPCTSTR filename); /* see loadlibrary.c */ +HMODULE _Expat_LoadLibrary(LPCTSTR filename); /* see loadlibrary.c */ /* Obtain entropy on Windows XP / Windows Server 2003 and later. * Hint on RtlGenRandom and the following article from libsodium. @@ -815,7 +815,7 @@ HMODULE Curl_load_library(LPCTSTR filename); /* see loadlibrary.c */ static int writeRandomBytes_RtlGenRandom(void * target, size_t count) { int success = 0; /* full count bytes written? */ - const HMODULE advapi32 = Curl_load_library(TEXT("ADVAPI32.DLL")); + const HMODULE advapi32 = _Expat_LoadLibrary(TEXT("ADVAPI32.DLL")); if (advapi32) { const RTLGENRANDOM_FUNC RtlGenRandom -- 2.40.0