summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixInit.c')
-rw-r--r--unix/tclUnixInit.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 21910e1..ce08425 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -469,7 +469,7 @@ TclpInitLibraryPath(
* Look for the library relative to the TCL_LIBRARY env variable. If the
* last dirname in the TCL_LIBRARY path does not match the last dirname in
* the installLib variable, use the last dir name of installLib in
- * addition to the orginal TCL_LIBRARY path.
+ * addition to the original TCL_LIBRARY path.
*/
str = getenv("TCL_LIBRARY"); /* INTL: Native. */
@@ -490,7 +490,7 @@ TclpInitLibraryPath(
* installed.
*/
- sprintf(installLib, "lib/tcl%s", TCL_VERSION);
+ snprintf(installLib, sizeof(installLib), "lib/tcl%s", TCL_VERSION);
/*
* If TCL_LIBRARY is set, search there.
@@ -510,7 +510,7 @@ TclpInitLibraryPath(
pathv[pathc - 1] = installLib + 4;
str = Tcl_JoinPath(pathc, pathv, &ds);
- Tcl_ListObjAppendElement(NULL, pathPtr, TclDStringToObj(&ds));
+ Tcl_ListObjAppendElement(NULL, pathPtr, Tcl_DStringToObj(&ds));
}
ckfree(pathv);
}
@@ -886,8 +886,11 @@ TclpSetVariables(
GetSystemInfo(&sysInfo);
+ if (osInfo.dwMajorVersion == 10 && osInfo.dwBuildNumber >= 22000) {
+ osInfo.dwMajorVersion = 11;
+ }
Tcl_SetVar2(interp, "tcl_platform", "os", "Windows NT", TCL_GLOBAL_ONLY);
- sprintf(buffer, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion);
+ snprintf(buffer, sizeof(buffer), "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion);
Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY);
if (sysInfo.wProcessorArchitecture < NUMPROCESSORS) {
Tcl_SetVar2(interp, "tcl_platform", "machine",
@@ -984,7 +987,7 @@ TclpSetVariables(
* TclpFindVariable --
*
* Locate the entry in environ for a given name. On Unix this routine is
- * case sensetive, on Windows this matches mixed case.
+ * case sensitive, on Windows this matches mixed case.
*
* Results:
* The return value is the index in environ of an entry with the name