Ooops, bits strange. Below is a better.
diff -r c6f8f1957c66 src/GvimExt/gvimext.cpp
--- a/src/GvimExt/gvimext.cpp Mon Jun 13 21:21:22 2011 +0200
+++ b/src/GvimExt/gvimext.cpp Thu Jun 16 14:33:28 2011 +0900
@@ -142,6 +142,7 @@
static int dyn_libintl_init(char *dir);
static void dyn_libintl_end(void);
+static wchar_t *oldenv = NULL;
static HINSTANCE hLibintlDLL = 0;
static char *(*dyn_libintl_gettext)(const char *) = null_libintl_gettext;
static char *(*dyn_libintl_textdomain)(const char *) =
null_libintl_textdomain;
@@ -339,8 +340,10 @@
inc_cRefThisDLL()
{
#ifdef FEAT_GETTEXT
- if (g_cRefThisDll == 0)
+ if (g_cRefThisDll == 0) {
dyn_gettext_load();
+ oldenv = GetEnvironmentStringsW();
+ }
#endif
InterlockedIncrement((LPLONG)&g_cRefThisDll);
}
@@ -349,8 +352,11 @@
dec_cRefThisDLL()
{
#ifdef FEAT_GETTEXT
- if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0)
+ if (InterlockedDecrement((LPLONG)&g_cRefThisDll) == 0) {
dyn_gettext_free();
+ if (oldenv)
+ FreeEnvironmentStringsW(oldenv);
+ }
#else
InterlockedDecrement((LPLONG)&g_cRefThisDll);
#endif
@@ -890,8 +896,9 @@
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
- 0, // No creation flags.
- NULL, // Use parent's environment block.
+ oldenv ? CREATE_UNICODE_ENVIRONMENT : 0,
+ // No creation flags.
+ oldenv, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi) // Pointer to PROCESS_INFORMATION structure.
--
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