]> granicus.if.org Git - vim/commitdiff
patch 7.4.1165 v7.4.1165
authorBram Moolenaar <Bram@vim.org>
Sun, 24 Jan 2016 14:36:03 +0000 (15:36 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 24 Jan 2016 14:36:03 +0000 (15:36 +0100)
Problem:    When defining DYNAMIC_ICONV_DLL in the makefile, the build fails.
Solution:   Add #ifdef's. (Taro Muraoka)  Try the newer version first.

src/mbyte.c
src/os_win32.c
src/version.c

index edca9a709bb0172b363fc4d898ec01de99acaa14..0e4b7e495bbf6b0786ca2e16f95cae039b6ff991 100644 (file)
@@ -4392,21 +4392,21 @@ iconv_string(vcp, str, slen, unconvlenp, resultlenp)
  * Dynamically load the "iconv.dll" on Win32.
  */
 
-#ifndef DYNAMIC_ICONV      /* just generating prototypes */
-# define HINSTANCE int
-#endif
+#   ifndef DYNAMIC_ICONV           /* must be generating prototypes */
+#    define HINSTANCE int
+#   endif
 static HINSTANCE hIconvDLL = 0;
 static HINSTANCE hMsvcrtDLL = 0;
 
-#  ifndef DYNAMIC_ICONV_DLL
-#   define DYNAMIC_ICONV_DLL "iconv.dll"
-#   define DYNAMIC_ICONV_DLL_ALT1 "libiconv.dll"
-#   define DYNAMIC_ICONV_DLL_ALT2 "libiconv2.dll"
-#   define DYNAMIC_ICONV_DLL_ALT3 "libiconv-2.dll"
-#  endif
-#  ifndef DYNAMIC_MSVCRT_DLL
-#   define DYNAMIC_MSVCRT_DLL "msvcrt.dll"
-#  endif
+#   ifndef DYNAMIC_ICONV_DLL
+#    define DYNAMIC_ICONV_DLL "iconv.dll"
+#    define DYNAMIC_ICONV_DLL_ALT1 "libiconv.dll"
+#    define DYNAMIC_ICONV_DLL_ALT2 "libiconv2.dll"
+#    define DYNAMIC_ICONV_DLL_ALT3 "libiconv-2.dll"
+#   endif
+#   ifndef DYNAMIC_MSVCRT_DLL
+#    define DYNAMIC_MSVCRT_DLL "msvcrt.dll"
+#   endif
 
 /*
  * Get the address of 'funcname' which is imported by 'hInst' DLL.
@@ -4459,14 +4459,22 @@ iconv_enabled(verbose)
     if (hIconvDLL != 0 && hMsvcrtDLL != 0)
        return TRUE;
 
-    /* The iconv DLL file goes under different names, try them all. */
-    hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL);
-    if (hIconvDLL == 0)
-       hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT1);
+    /* The iconv DLL file goes under different names, try them all.
+     * Do the "2" version first, it's newer. */
+#ifdef DYNAMIC_ICONV_DLL_ALT2
     if (hIconvDLL == 0)
        hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT2);
+#endif
+#ifdef DYNAMIC_ICONV_DLL_ALT3
     if (hIconvDLL == 0)
        hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT3);
+#endif
+    if (hIconvDLL == 0)
+       hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL);
+#ifdef DYNAMIC_ICONV_DLL_ALT1
+    if (hIconvDLL == 0)
+       hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT1);
+#endif
 
     if (hIconvDLL != 0)
        hMsvcrtDLL = vimLoadLib(DYNAMIC_MSVCRT_DLL);
index da05e6ea3a01d8d10111fee1dba44ce208f9b86e..4c876a05ce780c60b9c5f92884855e931b7965b4 100644 (file)
@@ -500,9 +500,12 @@ dyn_libintl_init()
     if (hLibintlDLL)
        return 1;
     /* Load gettext library (libintl.dll) */
-    hLibintlDLL = vimLoadLib(GETTEXT_DLL);
+#ifdef GETTEXT_DLL_ALT
     if (!hLibintlDLL)
        hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT);
+#endif
+    if (!hLibintlDLL)
+       hLibintlDLL = vimLoadLib(GETTEXT_DLL);
     if (!hLibintlDLL)
     {
        if (p_verbose > 0)
index c41230921b931dd51d3f3c9a7ebffa0756a8ca46..27496b9f30f176671c1455a354a3cfa4f9d4b34a 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1165,
 /**/
     1164,
 /**/