mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-02 12:01:32 +01:00
common,w32: Use LoadLibraryEx to fix a warning in mingw.
* common/dynload.h (dlopen): Use LoadLibraryEx and remove Windows CE support. -- Mingw's libloadapi.h has no prototype for LoadLibrary. Thus we use LoadLibraryEx which is available Since Windows XP.
This commit is contained in:
parent
4ee2009083
commit
59c481bb86
@ -45,14 +45,9 @@ static inline void *
|
||||
dlopen (const char *name, int flag)
|
||||
{
|
||||
void *hd;
|
||||
#ifdef HAVE_W32CE_SYSTEM
|
||||
wchar_t *wname = utf8_to_wchar (name);
|
||||
hd = wname? LoadLibrary (wname) : NULL;
|
||||
xfree (wname);
|
||||
#else
|
||||
hd = LoadLibrary (name);
|
||||
#endif
|
||||
(void)flag;
|
||||
|
||||
hd = LoadLibraryEx (name, NULL, 0);
|
||||
return hd;
|
||||
}
|
||||
|
||||
@ -61,13 +56,7 @@ dlsym (void *hd, const char *sym)
|
||||
{
|
||||
if (hd && sym)
|
||||
{
|
||||
#ifdef HAVE_W32CE_SYSTEM
|
||||
wchar_t *wsym = utf8_to_wchar (sym);
|
||||
void *fnc = wsym? GetProcAddress (hd, wsym) : NULL;
|
||||
xfree (wsym);
|
||||
#else
|
||||
void *fnc = GetProcAddress (hd, sym);
|
||||
#endif
|
||||
if (!fnc)
|
||||
return NULL;
|
||||
return fnc;
|
||||
|
Loading…
x
Reference in New Issue
Block a user