RFR: 8313396: Portable implementation of FORBID_C_FUNCTION and ALLOW_C_FUNCTION [v2]
Coleen Phillimore
coleenp at openjdk.org
Fri Jan 3 22:45:41 UTC 2025
On Fri, 3 Jan 2025 22:31:18 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>>
>> forbid windows _snprintf
>
> src/hotspot/share/utilities/forbiddenFunctions.hpp line 33:
>
>> 31: #include <stddef.h> // for size_t
>> 32:
>> 33: #include OS_HEADER(forbiddenFunctions)
>
> I thought there was an OS_VARIANT_HEADER to dispatch directly to the posix variant, but I guess it doesn't exist. Using the semaphore example, this could save your dispatch header files, at the cost of an #ifdef. Not sure which is worse:
>
>
> #if defined(LINUX) || defined(AIX)
> # include "semaphore_posix.hpp"
> #else
> # include OS_HEADER(semaphore)
> #endif
park.hpp has the same:
#if defined(LINUX) || defined(AIX) || defined(BSD)
# include "park_posix.hpp"
#else
# include OS_HEADER(park)
#endif
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22890#discussion_r1902218159
More information about the graal-dev
mailing list