Skip to content

Commit 9d6ca1c

Browse files
committed
patch 7.4.892
Problem: On MS-Windows the iconv DLL may have a different name. Solution: Also try libiconv2.dll and libiconv-2.dll. (Yasuhiro Matsumoto)
1 parent 089af18 commit 9d6ca1c

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/mbyte.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4400,7 +4400,9 @@ static HINSTANCE hMsvcrtDLL = 0;
44004400

44014401
# ifndef DYNAMIC_ICONV_DLL
44024402
# define DYNAMIC_ICONV_DLL "iconv.dll"
4403-
# define DYNAMIC_ICONV_DLL_ALT "libiconv.dll"
4403+
# define DYNAMIC_ICONV_DLL_ALT1 "libiconv.dll"
4404+
# define DYNAMIC_ICONV_DLL_ALT2 "libiconv2.dll"
4405+
# define DYNAMIC_ICONV_DLL_ALT3 "libiconv-2.dll"
44044406
# endif
44054407
# ifndef DYNAMIC_MSVCRT_DLL
44064408
# define DYNAMIC_MSVCRT_DLL "msvcrt.dll"
@@ -4456,9 +4458,16 @@ iconv_enabled(verbose)
44564458
{
44574459
if (hIconvDLL != 0 && hMsvcrtDLL != 0)
44584460
return TRUE;
4461+
4462+
/* The iconv DLL file goes under different names, try them all. */
44594463
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL);
4460-
if (hIconvDLL == 0) /* sometimes it's called libiconv.dll */
4461-
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT);
4464+
if (hIconvDLL == 0)
4465+
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT1);
4466+
if (hIconvDLL == 0)
4467+
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT2);
4468+
if (hIconvDLL == 0)
4469+
hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT3);
4470+
44624471
if (hIconvDLL != 0)
44634472
hMsvcrtDLL = vimLoadLib(DYNAMIC_MSVCRT_DLL);
44644473
if (hIconvDLL == 0 || hMsvcrtDLL == 0)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
892,
744746
/**/
745747
891,
746748
/**/

0 commit comments

Comments
 (0)