Patch 7.4.1383
Problem: GvimExt only loads the old libintl.dll.
Solution: Also try loading libint-8.dll. (Ken Takata, closes #608)
Files: src/GvimExt/gvimext.cpp, src/GvimExt/gvimext.h
*** ../vim-7.4.1382/src/GvimExt/gvimext.cpp 2015-05-04 18:27:29.920714802
+0200
--- src/GvimExt/gvimext.cpp 2016-02-21 20:28:32.561755811 +0100
***************
*** 158,163 ****
--- 158,164 ----
# define VIMPACKAGE "vim"
# ifndef GETTEXT_DLL
# define GETTEXT_DLL "libintl.dll"
+ # define GETTEXT_DLL_ALT "libintl-8.dll"
# endif
// Dummy functions
***************
*** 194,214 ****
{(char *)"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
{NULL, NULL}
};
// No need to initialize twice.
if (hLibintlDLL)
return 1;
! // Load gettext library, first try the Vim runtime directory, then search
! // the path.
! strcat(dir, GETTEXT_DLL);
! hLibintlDLL = LoadLibrary(dir);
! if (!hLibintlDLL)
{
hLibintlDLL = LoadLibrary(GETTEXT_DLL);
if (!hLibintlDLL)
! return 0;
}
// Get the addresses of the functions we need.
for (i = 0; libintl_entry[i].name != NULL
--- 195,230 ----
{(char *)"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain},
{NULL, NULL}
};
+ DWORD len, len2;
+ LPWSTR buf = NULL;
+ LPWSTR buf2 = NULL;
// No need to initialize twice.
if (hLibintlDLL)
return 1;
! // Load gettext library from the Vim runtime directory.
! // Add the directory to $PATH temporarily.
! len = GetEnvironmentVariableW(L"PATH", NULL, 0);
! len2 = MAX_PATH + 1 + len;
! buf = (LPWSTR)malloc(len * sizeof(WCHAR));
! buf2 = (LPWSTR)malloc(len2 * sizeof(WCHAR));
! if (buf != NULL && buf2 != NULL)
{
+ GetEnvironmentVariableW(L"PATH", buf, len);
+ _snwprintf(buf2, len2, L"%S;%s", dir, buf);
+ SetEnvironmentVariableW(L"PATH", buf2);
hLibintlDLL = LoadLibrary(GETTEXT_DLL);
+ #ifdef GETTEXT_DLL_ALT
if (!hLibintlDLL)
! hLibintlDLL = LoadLibrary(GETTEXT_DLL_ALT);
! #endif
! SetEnvironmentVariableW(L"PATH", buf);
}
+ free(buf);
+ free(buf2);
+ if (!hLibintlDLL)
+ return 0;
// Get the addresses of the functions we need.
for (i = 0; libintl_entry[i].name != NULL
*** ../vim-7.4.1382/src/GvimExt/gvimext.h 2015-05-04 18:27:29.920714802
+0200
--- src/GvimExt/gvimext.h 2016-02-21 20:28:32.561755811 +0100
***************
*** 42,47 ****
--- 42,48 ----
#include <windows.h>
#include <windowsx.h>
#include <shlobj.h>
+ #include <wchar.h>
/* Accommodate old versions of VC that don't have a modern Platform SDK */
#if (defined(_MSC_VER) && _MSC_VER < 1300) || !defined(MAXULONG_PTR)
*** ../vim-7.4.1382/src/version.c 2016-02-21 20:08:19.550419591 +0100
--- src/version.c 2016-02-21 20:28:21.685869780 +0100
***************
*** 749,750 ****
--- 749,752 ----
{ /* Add new patch number below this line */
+ /**/
+ 1383,
/**/
--
WOMAN: I didn't know we had a king. I thought we were an autonomous
collective.
DENNIS: You're fooling yourself. We're living in a dictatorship. A
self-perpetuating autocracy in which the working classes--
WOMAN: Oh there you go, bringing class into it again.
DENNIS: That's what it's all about if only people would--
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.