RFR (XS) 8221824: Build failure with MSVS 2013 after JDK-8218418

Aleksey Shipilev shade at redhat.com
Tue Apr 2 13:04:33 UTC 2019


On 4/2/19 2:56 PM, Alan Bateman wrote:
>> diff -r 35794e8db61b src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c
>> --- a/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c  Tue Apr 02 10:04:35 2019
>> +0200
>> +++ b/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c  Tue Apr 02 13:56:19 2019
>> +0200
>> @@ -1066,6 +1066,9 @@
>>       // Allow creation of symbolic links when the process is not elevated.
>>       // Developer Mode must be enabled for this option to function, otherwise
>> -    // it will be ignored.
>> -    DWORD dwFlags = (DWORD)flags | SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
>> +    // it will be ignored. Check that symbol is available in current build SDK.
>> +    DWORD dwFlags = (DWORD)flags;
>> +#ifdef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE
>> +    dwFlags |= SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE;
>> +#endif
>>
>>       // On Windows 64-bit this appears to succeed even when there are
>>
>> Testing: local Windows build, jdk-submit (running)
>>
> With this patch then you undo JDK-8218418 when building on an older SDK. Instead, I think you need
> to set SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE when it's not set (its value seems to be 0x2).

I don't think it is a good idea to define and pass in flag that is not defined by the
toolchain/headers. I think we either do this fix, or we backout the entire changeset that currently
breaks the builds. Yes, current fix reverts the orginal change, but _only_ for older SDKs.
Follow-ups that make it right for everything would be appreciated.

-- 
Thanks,
-Aleksey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190402/977b5291/signature.asc>


More information about the nio-dev mailing list