On Wed, 4 Sep 2024 20:10:54 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. >> >> Please note that guidelines for doing this appear in >> src/hotspot/share/runtime/os.hpp > > Simon Tooke has updated the pull request incrementally with two additional > commits since the last revision: > > - simplify windwos realpath() implementation > - get rid of os::posix::realpath() and os::win32::realpath() Looks good, thanks for the work. One question inline. src/hotspot/os/windows/os_windows.cpp line 5327: > 5325: > 5326: char* result = nullptr; > 5327: ALLOW_C_FUNCTION(::_fullpath, result = ::_fullpath(outbuf, filename, > outbuflen);) Would this work for non-Latin-1 utf-8? ------------- Marked as reviewed by stuefe (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20683#pullrequestreview-2282041961 PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1744925864