On Fri, 26 Jun 2026 14:06:19 GMT, Alexey Ivanov <[email protected]> wrote:

>> The IS_WIN2000 macro checks for Windows major version number >= 5, see 
>> https://github.com/search?q=repo%3Aopenjdk%2Fjdk%20IS_WIN2000&type=code
>> but we run for a long time on much higher Windows versions as a minimum.
>> So the check is obsolete.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/java.desktop/windows/native/libawt/windows/awt.h line 161:
> 
>> 159:  * IS_WINVISTA returns TRUE on Vista
>> 160:  */
>> 161: #define IS_WINXP ((HIBYTE(LOWORD(::GetVersion())) >= 1) || 
>> LOBYTE(LOWORD(::GetVersion())) > 5)
> 
> This is wrong, you have to include the condition of IS_WIN2000 now.
> 
> Windows XP is 5.1 (or any later version). Now the condition looks like `minor 
> >= 1 || major > 5)`.

Isn't `IS_WIN2000`  always true these days on all the Windows versions we could 
potentially start/run ?
If it is, we can remove the check.
But you are correct that the logic looks really strange now. 
And yeah Win XP is 5.1 here is the list of versions 
https://www.techthoughts.info/windows-version-numbers/

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31676#discussion_r3482024925

Reply via email to