summaryrefslogtreecommitdiffstats
path: root/win/tclWinInit.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-06 17:32:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-01-06 17:32:06 (GMT)
commitcf560b3fb9c317bb0e6a6d458d5467aae8fc6a79 (patch)
tree1d2f85f6a6abb2126784bdf59ae66a1ff01b5ade /win/tclWinInit.c
parent72eb4e42290dccb6db60a66a085c355fb1e779e9 (diff)
parentce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea (diff)
downloadtcl-cf560b3fb9c317bb0e6a6d458d5467aae8fc6a79.zip
tcl-cf560b3fb9c317bb0e6a6d458d5467aae8fc6a79.tar.gz
tcl-cf560b3fb9c317bb0e6a6d458d5467aae8fc6a79.tar.bz2
Fix [0f19edcb78]: Windows 11 not reported in tcl_platform(osVersion)
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r--win/tclWinInit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index eae4404..582c700 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -552,6 +552,9 @@ TclpSetVariables(
TCL_GLOBAL_ONLY);
Tcl_SetVar2(interp, "tcl_platform", "os",
"Windows NT", TCL_GLOBAL_ONLY);
+ if (osInfo.dwMajorVersion == 10 && osInfo.dwBuildNumber >= 22000) {
+ osInfo.dwMajorVersion = 11;
+ }
wsprintfA(buffer, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion);
Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY);
if (sys.oemId.wProcessorArchitecture < NUMPROCESSORS) {