]> granicus.if.org Git - libexpat/commitdiff
Rename Curl_load_library to _Expat_LoadLibrary
authorSebastian Pipping <sebastian@pipping.org>
Wed, 26 Jul 2017 13:19:45 +0000 (15:19 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Wed, 26 Jul 2017 13:19:45 +0000 (15:19 +0200)
.. to avoid symbol collisions

expat/lib/loadlibrary.c
expat/lib/xmlparse.c

index 4a87ccf4020b883b785102e984a7a2fbd0de1146..31b7f312b090c7171e569827d40f4620158386f9 100644 (file)
@@ -34,7 +34,7 @@
 #include <tchar.h>
 
 
-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;
index 4c470d4e33358a391d1c334faac8f16299b2a881..814f734db522f61e7fc942ed5080a81504014a7b 100644 (file)
@@ -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