On Fri, 26 Jun 2026 14:27:53 GMT, Matthias Baesken <[email protected]> wrote:

>> 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/

Yes, IS_WIN2000 is always true, but it was `&&` with `minor >= 1`.

The condition was `(major >= 5 && minor >= 1) || (major > 5)`.

But the updated version is wrong because it will return true if minor version 
is 1 or greater irrespective of the major version.

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

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

Reply via email to