summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-04 23:21:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-04 23:21:16 (GMT)
commitce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea (patch)
tree531282a8cb31f5b28cb55d8768c9bca4d8169411 /unix
parent7be69be5fe039ab0840432baa8d07bb448f19393 (diff)
downloadtcl-ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea.zip
tcl-ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea.tar.gz
tcl-ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea.tar.bz2
Fix [0f19edcb78]: Windows 11 not reported in tcl_platform(osVersion)
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 7467938..47b8df3 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -895,6 +895,9 @@ 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);
Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY);