On Wed, 11 Sep 2024 19:17:19 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 one additional 
> commit since the last revision:
> 
>   properly test for buffer too small for path

Changes requested by dholmes (Reviewer).

src/hotspot/os/posix/os_posix.cpp line 990:

> 988: }
> 989: 
> 990: 

Spurious extra line ?

src/hotspot/os/windows/os_windows.cpp line 5337:

> 5335:     ALLOW_C_FUNCTION(::free, ::free(p);) // *not* os::free
> 5336:   }
> 5337: }

You have forgotten to return `result`.

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

PR Review: https://git.openjdk.org/jdk/pull/20683#pullrequestreview-2299014792
PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1755920995
PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1755930028

Reply via email to