To: vim_dev@googlegroups.com Subject: Patch 7.4.1165 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1165 Problem: When defining DYNAMIC_ICONV_DLL in the makefile, the build fails. Solution: Add #ifdef's. (Taro Muraoka) Try the newer version first. Files: src/mbyte.c, src/os_win32.c *** ../vim-7.4.1164/src/mbyte.c 2015-12-12 16:23:24.587346534 +0100 --- src/mbyte.c 2016-01-24 15:31:33.691808817 +0100 *************** *** 4392,4412 **** * Dynamically load the "iconv.dll" on Win32. */ ! #ifndef DYNAMIC_ICONV /* just 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 /* * Get the address of 'funcname' which is imported by 'hInst' DLL. --- 4392,4412 ---- * Dynamically load the "iconv.dll" on Win32. */ ! # 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 /* * Get the address of 'funcname' which is imported by 'hInst' DLL. *************** *** 4459,4472 **** 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); if (hIconvDLL == 0) hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT2); if (hIconvDLL == 0) hIconvDLL = vimLoadLib(DYNAMIC_ICONV_DLL_ALT3); if (hIconvDLL != 0) hMsvcrtDLL = vimLoadLib(DYNAMIC_MSVCRT_DLL); --- 4459,4480 ---- if (hIconvDLL != 0 && hMsvcrtDLL != 0) return TRUE; ! /* 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); *** ../vim-7.4.1164/src/os_win32.c 2016-01-19 13:21:55.833334420 +0100 --- src/os_win32.c 2016-01-24 15:35:15.777520282 +0100 *************** *** 500,508 **** if (hLibintlDLL) return 1; /* Load gettext library (libintl.dll) */ ! hLibintlDLL = vimLoadLib(GETTEXT_DLL); if (!hLibintlDLL) hLibintlDLL = vimLoadLib(GETTEXT_DLL_ALT); if (!hLibintlDLL) { if (p_verbose > 0) --- 500,511 ---- if (hLibintlDLL) return 1; /* Load gettext library (libintl.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) *** ../vim-7.4.1164/src/version.c 2016-01-24 15:05:27.455868305 +0100 --- src/version.c 2016-01-24 15:34:43.605851806 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 1165, /**/ -- "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" "I don't know, I didn't listen!" -- Arthur Dent and Ford Prefect in Douglas Adams' "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///