kfw: use _WIN64 names where appropriate
authorTom Yu <tlyu@mit.edu>
Mon, 12 Dec 2011 20:46:27 +0000 (20:46 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 12 Dec 2011 20:46:27 +0000 (20:46 +0000)
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7050

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25571 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/init_os_ctx.c
src/util/wshelper/res_init.c

index bba1883fa09333cedf3d1f68305b65d8e3e166e0..f7dc429944d7c042c4a3609e5a6d2ea5a10cd5fc 100644 (file)
@@ -72,7 +72,11 @@ get_from_module_dir(
     if (!name)
         return ENOMEM;
 
+#ifdef _WIN64
+    if (!GetModuleFileName(GetModuleHandle("krb5_64"), name, size))
+#else
     if (!GetModuleFileName(GetModuleHandle("krb5_32"), name, size))
+#endif
         goto cleanup;
 
     p = name + strlen(name);
index bf3d97b5099b3ef42f3f3559fd25aff72162dbae..743b0c7922e3ae8e25bddd753d9a2811342312f4 100644 (file)
@@ -759,10 +759,10 @@ this_module()
     if (!hModWSHelp)
     {
         // Note: these must match the DEF file entries
-#if defined (_WIN32)
-        hModWSHelp = GetModuleHandle("WSHELP32");
+#if defined(_WIN64)
+        hModWSHelp = GetModuleHandle( "WSHELP64" );
 #else
-        hModWSHelp = GetModuleHandle("WSHELPER");
+        hModWSHelp = GetModuleHandle( "WSHELP32" );
 #endif
     }
     return hModWSHelp;