[xml] LoadLibrary needs to be LoadLibraryA


When I tried to compile libxml on Windows along with my application that is built with 'UNICODE' defined (i.e. as a Unicode application rather than as an "ANSI" application),  I came across a problem in xmlmodule.c.

With UNICODE defined, LoadLibrary is resolved to LoadLibraryW which expects to get 'const wchar_t*' rather than 'const char*'.  To avoid the problem,  we have to use LoadLibraryA explicitly.  

Below is my trivial patch:


--- xmlmodule.c.old
+++ xmlmodule.c 
@@ -300,7 +300,7 @@
 static void *
 xmlModulePlatformOpen(const char *name)
-    return LoadLibraryA(name);
+    return LoadLibrary(name);


Thank you,



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