RFR: 8338851: Hoist os::Posix::realpath() to os::realpath() and implement on Windows [v2]

David Holmes dholmes at openjdk.org
Thu Sep 5 12:32:51 UTC 2024


On Thu, 5 Sep 2024 07:12:21 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> 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()
>
> 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?

According to the docs:
> _fullpath automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20683#discussion_r1745389965


More information about the serviceability-dev mailing list