Re: [xml] GetProcAddress and ascii or wide
- From: Rob Richards <rrichards cdatazone org>
- To: veillard redhat com
- Cc: Patrick Gansterer <paroga paroga com>, libxml <xml gnome org>
- Subject: Re: [xml] GetProcAddress and ascii or wide
- Date: Thu, 16 Aug 2012 09:29:49 -0400
On 8/15/12 8:45 AM, Daniel Veillard wrote:
On Wed, Aug 15, 2012 at 08:38:02AM -0400, Earnie Boyd wrote:
On Tue, Aug 14, 2012 at 9:09 PM, Daniel Veillard wrote:
On Wed, Aug 15, 2012 at 01:22:38AM +0300, Roumen Petrov wrote:
Hi ,
After recent commits I count not link build for mingw* host as
GetProcAddressA is missing.
The "uncode" patch change LoadLibrary to ansi version (LoadLibraryA)
and MSDN document availability of both versions.
Function GetProcAddress is described as is, i.e. requirements
chapter lack note for ansi and uncode .
Could we restore GetProcAddress call to old one ?
<grin/>
Looking around a bit it seems you are right:
http://voidnish.wordpress.com/2005/06/14/getprocaddress-in-unicode-builds/
except it was introduced in Windows CE
http://msdn.microsoft.com/en-us/library/ms885634.aspx
I would be tempted to add in the following
Daniel
diff --git a/xmlmodule.c b/xmlmodule.c
index a59a1ec..fc84d96 100644
--- a/xmlmodule.c
+++ b/xmlmodule.c
@@ -334,7 +334,14 @@ xmlModulePlatformClose(void *handle)
static int
xmlModulePlatformSymbol(void *handle, const char *name, void **symbol)
{
+#ifdef _WIN32_WCE
+ /*
+ * GetProcAddressA seems only available on WinCE
+ */
*symbol = GetProcAddressA(handle, name);
+#else
+ *symbol = GetProcAddress(handle, name);
+#endif
return (NULL == *symbol) ? -1 : 0;
}
Or define HAVE_GETPROCADDRESSA in config.h in the event that some
other cousin system has it in the future? It seems the signature in
Well will that future system support auto* . I would not bet on this
and would rather keep this simple.
WinCE for GetProcAddress is different as well LPCWSTR for name instead
of LPCSTR which is why WinCE has GetProcAddressA.
Yes c.f. the thread which led to that patch in the first place !
At this point I'm shooting for the simplest solution which works for
all platforms.
Daniel
Has there been any consensus on the fix for this? IMHO, your ifdef patch
works for me.
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]