RFR: 8345589: Simplify Windows definition of strtok_r
Julian Waters
jwaters at openjdk.org
Fri Dec 6 08:10:37 UTC 2024
On Fri, 6 Dec 2024 06:25:12 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to move the Windows-specific definition of strtok_r
> to globalDefinitions_visCPP.hpp. In addition, the unused S_ISCHR macro is
> removed and the S_ISFIFO macro is also moved.
>
> Testing: mach5 tier1
This moves it to a place inaccessible to my port, but it's a small change and I can handle it rather easily, so I'm ok with this.
src/hotspot/share/utilities/globalDefinitions_visCPP.hpp line 89:
> 87: // under the name strtok_s_l. Make strtok_r a synonym so we can use that name
> 88: // in shared code.
> 89: const auto strtok_r = strtok_s;
Just 1 question, is strtok_r in this VC definition a function pointer? I don't think I've ever seen code do this before. Also, I think Annex K is C11, not C99
-------------
PR Review: https://git.openjdk.org/jdk/pull/22597#pullrequestreview-2483949516
PR Review Comment: https://git.openjdk.org/jdk/pull/22597#discussion_r1872778245
More information about the hotspot-dev
mailing list