From: Andy Polyakov Date: Mon, 27 Jun 2005 21:27:23 +0000 (+0000) Subject: Eliminate dependency on UNICODE macro. X-Git-Tag: OpenSSL_0_9_8k^2~1966 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=83e68987b309c4d97888317473f5e18566282b6f;p=oweals%2Fopenssl.git Eliminate dependency on UNICODE macro. --- diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c index 317606ac5b..c28184099a 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 @@ -597,22 +616,6 @@ static const char *openssl_strnchr(const char *string, int c, size_t len) #include #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 # define DLLNAME "TOOLHELP.DLL" #else # ifdef MODULEENTRY32 diff --git a/ssl/kssl.c b/ssl/kssl.c index f149a75a24..553ec186cb 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;