Tcl Source Code

View Ticket
Login
Ticket UUID: 0f19edcb7822984c583e70d07ddc169b0b19dcb7
Title: Windows 11 not reported in tcl_platform(osVersion)
Type: Bug Created on: 2023-01-01 16:43:33
Submitter: fvogel Assigned to: jan.nijtmans
Subsystem: 52. Portability Support Severity: Minor
Priority: 5 Medium Last modified: 2023-01-06 21:21:02
Status: Closed Closed by: fvogel
Resolution: Fixed Closed on: 2023-01-06 21:21:02
Version: core-8-6-branch
Description:

Windows 11 is not reported in tcl_platform(osVersion). The following, run on a Win 11 box, still spits 10.0 as with Windows 10:

% set tcl_platform(osVersion)
10.0

User Comments:
fvogel added on 2023-01-02 21:43:57:

Running 'ver' on the command line in my Win 11 box says:

Microsoft Windows [version 10.0.22621.963]

Apparently one is supposed to use the build number in the OSVERSIONINFOW struct to make the difference between Win 10 and Win 11. If the build number is >=22000 then it is a Win 11 box. See this StackOverflow thread.

The TclpSetVariables() code in tclWinInit.c should probably be updated to take this into account.


jan.nijtmans added on 2023-01-04 23:26:53:

Proposed fix [ca81e84b4297b5ef|here]


fvogel added on 2023-01-06 21:21:02:
Works for me thanks.