diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-01-04 23:21:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-01-04 23:21:16 (GMT) |
commit | ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea (patch) | |
tree | 531282a8cb31f5b28cb55d8768c9bca4d8169411 /win/tclWinInit.c | |
parent | 7be69be5fe039ab0840432baa8d07bb448f19393 (diff) | |
download | tcl-ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea.zip tcl-ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea.tar.gz tcl-ce9fb3bcfb5727f83db328e2ee54bc6b56c6e7ea.tar.bz2 |
Fix [0f19edcb78]: Windows 11 not reported in tcl_platform(osVersion)
Diffstat (limited to 'win/tclWinInit.c')
-rw-r--r-- | win/tclWinInit.c | 3 |
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) { |