Eliminate dependency on UNICODE macro.
authorAndy Polyakov <appro@openssl.org>
Mon, 27 Jun 2005 21:27:23 +0000 (21:27 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 27 Jun 2005 21:27:23 +0000 (21:27 +0000)
crypto/dso/dso_win32.c
ssl/kssl.c

index 317606ac5b301719754632a05634e6efdf5f9d9a..c28184099af8af6d5f85f3264a6260d54f802eb1 100644 (file)
@@ -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 <tlhelp32.h>
 #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
index f149a75a246f878372a1e4c13143490df870e5ab..553ec186cb220db8fbc8886a93354c5a28aada0d 100644 (file)
@@ -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;