On Fri, 1 Nov 2024 18:11:13 GMT, Vladimir Kozlov <k...@openjdk.org> wrote:

>> Magnus Ihse Bursie has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Remove superfluous check for 64-bit on Windows in 
>> MacroAssembler::call_clobbered_xmm_registers
>>  - Remove windows-32-bit code in CompilerConfig::ergo_initialize
>
> Okay, I am confuse about `_WIN32` vs `WIN32`. 
> 
> You are saying that "_WIN32 is still defined on 64-bit Windows" but you are 
> removing code guarded by `#ifdef _WIN32`
> And our make files defines `WIN32` for all Windows OSs: 
> https://github.com/openjdk/jdk/blob/master/make/autoconf/flags-cflags.m4#L470

@vnkozlov 

> * There is use of `WIN32` instead of `_WIN32`.
> 
> * There are comments referencing `Win32` which we need to rename to `Windows` 
> to avoid confusion.
> 
> * There is `class os::win32` in `os_windows.hpp` which is batter to rename to 
> avoid confusion. Could be done in separate RFE.
> 
> * "Note that, oddly enough, _WIN32 is still defined on 64-bit Windows". If it 
> is really true, I would still suggest to use our variable `_WINDOWS` for that.

Ok. Let's start with being on the same page about the meaning of "win32". This 
is what Microsoft has to say about it:

"The Win32 API (also called the Windows API) is the native platform for Windows 
apps. [T]he same functions are generally supported on 32-bit and 64-bit 
Windows." 

https://learn.microsoft.com/en-us/windows/win32/apiindex/api-index-portal#win32-windows-api

I'd say that they are the authoritative source on the subject. :-)

So technically there is nothing **wrong** with stuff targeting Windows being 
called "win32", even if we only support 64-bit Windows going forward. 

With that said, it is sure as heck confusing! Which also apparently Microsoft 
acknowledges by phasing in the term "Windows API". So I agree that we should 
try to rename everything currently called "win32" into "windows". But I'd 
rather see such a global rename refactoring, that will also affect the 64-bit 
Windows platforms, to be done as a separate, follow-up PR. Are you okay with 
that?

I will, however, do an additional round of checking all the grep hits on 
"win32" left to double-and-triple check that they indeed are not 32-bit 
specific.

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

PR Comment: https://git.openjdk.org/jdk/pull/21744#issuecomment-2455104589

Reply via email to