From fa0f595cf9f339ac2922ffea021e3763df775cb8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 7 Mar 2019 07:58:39 +0000 Subject: Fix [9471e6e304]: InitWinEnv not thread safe --- generic/tclEnv.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 40ced17..b001153 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -135,6 +135,18 @@ TclSetupEnv( } p2++; p2[-1] = '\0'; +#if defined(_WIN32) + /* + * Enforce PATH and COMSPEC to be all uppercase. This eliminates + * additional trace logic otherwise required in init.tcl. + */ + + if (strcasecmp(p1, "PATH") == 0) { + p1 = "PATH"; + } else if (strcasecmp(p1, "COMSPEC") == 0) { + p1 = "COMSPEC"; + } +#endif obj1 = Tcl_NewStringObj(p1, -1); obj2 = Tcl_NewStringObj(p2, -1); Tcl_DStringFree(&envString); -- cgit v0.12