RFR: 8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION [v2]

David Holmes dholmes at openjdk.org
Mon Jan 6 01:38:47 UTC 2025


On Sat, 4 Jan 2025 10:33:51 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> park.hpp has the same:
>> 
>> 
>> #if defined(LINUX) || defined(AIX) || defined(BSD)
>> # include "park_posix.hpp"
>> #else
>> # include OS_HEADER(park)
>> #endif
>
> If I was going to go that route, I'd be more inclined toward
> 
> #if !define(_WINDOWS)
> #include "forbiddenFunctions_windows.hpp"
> #else
> #include "forbiddenFunctions_posix.hpp"
> #endif
> 
> rather than list all (or maybe just a subset) of the posix-like ports.  My
> inclination is to leave it as-is with OS_HEADERS, since I think that's the
> "intended" idiom.

Overall I like this change. I appreciate the effort that has been put in to try and find an elegant solution to this problem.

but having OS specific files created just to include the posix version runs counter to why we have the posix variants in the first place IMO. Please select one of the above approaches so that the new aix/bsd/linux specific files can be removed in favour of the posix one. Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22890#discussion_r1903399996


More information about the graal-dev mailing list