On Tue, 17 Sep 2024 14:14:31 GMT, Simon Tooke <sto...@openjdk.org> wrote:
>> This PR changes the status of realpath() from a Posix-specific API to a >> globally available API, i.e. adding it to the "Hotspot Porting API". Code >> would refer to os::realpath() instead of os::Posix::realpath(). >> >> This requires the addition of a stub routine in os_posix.cpp and a Windows >> implementation of realpath(), using Windows _fullpath(). >> >> This PR depends on #20597 in that it removes the need for one #ifdef in that >> PR. Because of that, this PR will be modified when and if #20597 is >> integrated (or vice-versa) >> >> Please note that guidelines for doing this appear in >> src/hotspot/share/runtime/os.hpp > > Simon Tooke has updated the pull request incrementally with one additional > commit since the last revision: > > Define MAX_PATH if required test/hotspot/gtest/runtime/test_os.cpp line 386: > 384: const char* returnedBuffer = os::realpath(path, buffer, 10); > 385: EXPECT_TRUE(errno == ENAMETOOLONG); > 386: EXPECT_TRUE(returnedBuffer == nullptr); Indentation is off through this code. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1764358363