Hello, here is the new webrev . I took over and adjusted coding from os::open + create_unc_path functions in os_windows.cpp in hotspot :
http://cr.openjdk.java.net/~mbaesken/webrevs/8218547.0/webrev/ Best regards, Matthias > -----Original Message----- > From: Baesken, Matthias > Sent: Donnerstag, 21. März 2019 14:30 > To: Langer, Christoph <christoph.lan...@sap.com>; Alan Bateman > (alan.bate...@oracle.com) <alan.bate...@oracle.com> > Cc: 'Chris Hegarty' <chris.hega...@oracle.com>; 'core-libs- > d...@openjdk.java.net' <core-libs-dev@openjdk.java.net> > Subject: 8218547: Simplify JLI_Open on Windows in native code (libjli) - was : > RE: RFR : 8217093: Support extended-length paths in parse_manifest.c on > windows > > Hi Alan + Christoph, coming back to > https://bugs.openjdk.java.net/browse/JDK-8218547 . > > We wanted to check for the whole flow (in JLI_Open on Windows ) , e.g. > checking whether only CreateFileW can be used instead of open. > > I think there is already a similar solution available in the codebase . > > See the os::open + create_unc_path functions in os_windows.cpp in > the hotspot coding . > > There "simple" open is used for shorter paths ( < MAX_PATH) ; for > larger > paths an elp / unc path is constructed and _wopen is used on the elp/unc > path : > > > if (strlen(path) < MAX_PATH) { > ret = ::open(pathbuf, oflag | O_BINARY | O_NOINHERIT, mode); > } else { > errno_t err = ERROR_SUCCESS; > wchar_t* wpath = create_unc_path(pathbuf, err); > .... > ret = ::_wopen(wpath, oflag | O_BINARY | O_NOINHERIT, mode); > > > I think we should do it the same way in JLI_Open . Is that fine with you? > Unfortunately I think we cannot easily reuse the HS coding, so the have > to > take it over to jli . > > Best regards, Matthias > > > > > -----Original Message----- > > From: Baesken, Matthias > > Sent: Mittwoch, 6. Februar 2019 09:56 > > To: Langer, Christoph <christoph.lan...@sap.com> > > Cc: Chris Hegarty <chris.hega...@oracle.com>; core-libs- > > d...@openjdk.java.net; Alan Bateman (alan.bate...@oracle.com) > > <alan.bate...@oracle.com> > > Subject: RE: RFR : 8217093: Support extended-length paths in > > parse_manifest.c on windows > > > > Hi Christoph+Alan, I opened > > > > > > https://bugs.openjdk.java.net/browse/JDK-8218547 > > > > JDK-8218547 : use CreateFile without open on Windows in jdk native code > > > > > > To check for the usage of CreateFile (CreateFileW) without open . > > > > > > Best regards, Matthias > >