From 08f7417a98a7269cd48ba73856a96e0008fa295b Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Mon, 27 Jun 2005 21:14:15 +0000 Subject: [PATCH] Eliminate dependency on UNICODE macro. --- crypto/dso/dso_win32.c | 21 ++++++++++++++++++++- ssl/kssl.c | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index 3fa90eb27c..cc4ac68696 100644 --- a/crypto/dso/dso_win32.c +++ b/crypto/dso/dso_win32.c @@ -68,6 +68,25 @@ DSO_METHOD *DSO_METHOD_win32(void) } #else +#ifdef _WIN32_WCE +# if _WIN32_WCE < 300 +static FARPROC GetProcAddressA(HMODULE hModule,LPCSTR lpProcName) + { + WCHAR lpProcNameW[64]; + int i; + + for (i=0;lpProcName[i] && i<64;i++) + lpProcNameW[i] = (WCHAR)lpProcName[i]; + if (i==64) return NULL; + lpProcNameW[i] = 0; + + return GetProcAddressW(hModule,lpProcNameW); + } +# endif +# undef GetProcAddress +# define GetProcAddress GetProcAddressA +#endif + /* Part of the hack in "win32_load" ... */ #define DSO_MAX_TRANSLATED_SIZE 256 @@ -122,7 +141,7 @@ static int win32_load(DSO *dso) DSOerr(DSO_F_WIN32_LOAD,DSO_R_NO_FILENAME); goto err; } - h = LoadLibrary(filename); + h = LoadLibraryA(filename); if(h == NULL) { DSOerr(DSO_F_WIN32_LOAD,DSO_R_LOAD_FAILED); diff --git a/ssl/kssl.c b/ssl/kssl.c index 1477935d94..9a41769e75 100644 --- a/ssl/kssl.c +++ b/ssl/kssl.c @@ -297,7 +297,7 @@ load_krb5_dll(void) HANDLE hKRB5_32; krb5_loaded++; - hKRB5_32 = LoadLibrary("KRB5_32"); + hKRB5_32 = LoadLibrary(TEXT("KRB5_32")); if (!hKRB5_32) return; -- 2.25.1