diff src/os_win32.c @ 14881:35aff6b8a2c7 v8.1.0452

patch 8.1.0452: MS-Windows: not finding intl.dll commit https://github.com/vim/vim/commit/7554c548a493cba50b2d0ea3521cac14f28a1f07 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 6 15:03:15 2018 +0200 patch 8.1.0452: MS-Windows: not finding intl.dll Problem: MS-Windows: not finding intl.dll. Solution: Also find intl.dll next to libintl.dll. (Ken Takata)
author Bram Moolenaar <Bram@vim.org>
date Sat, 06 Oct 2018 15:15:07 +0200
parents ccedb80725c5
children 1c2ba2b0227e
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -573,7 +573,8 @@ get_dll_import_func(HINSTANCE hInst, con
 #if defined(DYNAMIC_GETTEXT) || defined(PROTO)
 # ifndef GETTEXT_DLL
 #  define GETTEXT_DLL "libintl.dll"
-#  define GETTEXT_DLL_ALT "libintl-8.dll"
+#  define GETTEXT_DLL_ALT1 "libintl-8.dll"
+#  define GETTEXT_DLL_ALT2 "intl.dll"
 # endif
 /* Dummy functions */
 static char *null_libintl_gettext(const char *);
@@ -614,14 +615,18 @@ dyn_libintl_init(void)
     };
     HINSTANCE hmsvcrt;
 
-    /* No need to initialize twice. */
-    if (hLibintlDLL)
+    // No need to initialize twice.
+    if (hLibintlDLL != NULL)
 	return 1;
-    /* Load gettext library (libintl.dll) */
+    // Load gettext library (libintl.dll and other names).
     hLibintlDLL = vimLoadLib(GETTEXT_DLL);
-#ifdef GETTEXT_DLL_ALT
+#ifdef GETTEXT_DLL_ALT1
     if (!hLibintlDLL)
-	hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT);
+	hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT1);
+#endif
+#ifdef GETTEXT_DLL_ALT2
+    if (!hLibintlDLL)
+	hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT2);
 #endif
     if (!hLibintlDLL)
     {