Question about os::native_path

yumin qi yumin.qi at gmail.com
Thu Jan 24 11:47:29 UTC 2019


David, Pengfei

  Thanks. It is for Widows -- I did not notice that.

Thanks
Yumin

On Thu, Jan 24, 2019 at 6:07 PM David Holmes <david.holmes at oracle.com>
wrote:

> Hi Yumin,
>
> On 24/01/2019 7:47 pm, yumin qi wrote:
> > Hi,
> >
> >   inline char* os::native_path(char *path) {
> >    return path;
> > }
> >
> > What is the purpose of this function? I think it is for a full native
> path,
> > but the source code told me it is just itself.
>
> For POSIX systems it is a no-op, but for Windows there is extra stuff to
> be done.
>
> // Convert a pathname to native format.  On win32, this involves forcing
> all
> // separators to be '\\' rather than '/' (both are legal inputs, but Win95
> // sometimes rejects '/') and removing redundant separators.  The input
> path is
> // assumed to have been converted into the character encoding used by
> the local
> // system.  Because this might be a double-byte encoding, care is taken to
> // treat double-byte lead characters correctly.
> //
> // This procedure modifies the given path in place, as the result is never
> // longer than the original.  There is no error return; this operation
> always
> // succeeds.
>
> Cheers,
> David
>
> > Thanks
> > Yumin
> >
>


More information about the hotspot-runtime-dev mailing list