[crac] RFR: Fix Windows build of Decoder

Radim Vansa rvansa at openjdk.org
Thu Nov 16 08:43:04 UTC 2023


On Thu, 16 Nov 2023 07:42:00 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> Fixes build failure on Windows introduced in https://github.com/openjdk/crac/pull/116
>
> src/hotspot/share/utilities/decoder.hpp line 125:
> 
>> 123:   static void print_state_on(outputStream* st);
>> 124: 
>> 125: #ifdef _WINDOWS
> 
> I'm not sure we have to use #ifdef WINDOWS here. 
> There is src\hotspot\os\windows\decoder_windows.cpp file already, I beileve it should be there.

The thing is that `decoder.cpp` has most of the code guarded by similar ifdefs. I don't think it's right to expose something in headers that would fail during linking, so I've put most of it to the else branch.
Yes, I could have used just a declaration in here and added the noop impl to `decoder_windows.cpp`; this way I am modifying just 1 file rather than 2.

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

PR Review Comment: https://git.openjdk.org/crac/pull/138#discussion_r1395338658


More information about the crac-dev mailing list