From 6329eaac89b704a3947271472c245cf5ec9f6048 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 26 Jan 2016 17:10:53 +0100 Subject: [PATCH] fixup! mingw: Prepare the TMP environment variable for shell scripts This change is not actually needed any longer to pass the test suite. Signed-off-by: Johannes Schindelin --- compat/mingw.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 6419eeb1e0..d0ae495b4a 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -2735,8 +2735,14 @@ void mingw_startup() __argv[0] = wcstoutfdup_startup(buffer, _wpgmptr, maxlen); for (i = 1; i < argc; i++) __argv[i] = wcstoutfdup_startup(buffer, wargv[i], maxlen); - for (i = 0; wenv[i]; i++) + for (i = 0; wenv[i]; i++) { environ[i] = wcstoutfdup_startup(buffer, wenv[i], maxlen); + if (!strncasecmp(environ[i], "MSYS2_TZ=", 9)) { + char *to_free = environ[i]; + environ[i] = xstrdup(to_free + 6); + free(to_free); + } + } environ[i] = NULL; free(buffer);