RFR [jdk7u-dev] : 8064407, 8068507 : (fc) FileChannel transferTo should use TransmitFile on Windows
Seán Coffey
sean.coffey at oracle.com
Wed Jan 7 14:54:48 UTC 2015
I've ported the FileChannel transferTo change back to the jdk7u-dev
codebase. One or two minor changes :
jdk7u uses Util.load() in the static initializer block of
windows/classes/sun/nio/ch/FileDispatcherImpl.java - I've kept that
there in JDK 7u. JDK-8022594 changed logic there in JDK 8 and later.
Importing the Mswsock.h library caused a compilation failure [1] for JDK
7u (still using the win2003/xp compile platform) - It's like the
winsock2 header values needed to be imported first. Doing that fixed the
issue. I'm not sure why I don't see that in jdk8u compilation.
I've also renamed the new system property to
jdk.nio.enableFastFileTransfer and will make a similar change in
jdk8u-dev and jdk9. CCC has been approved for that change to happen.
Added the bug IDs to the @bug tag in testcase also.
webrev :
http://cr.openjdk.java.net/~coffeys/webrev.8064407.8068507.jdk7u/webrev/
regards,
Sean.
[1]
c:/PROGRA~1/MICROS~2.0/VC/Bin/cl -O1 -Zi -nologo -MD /D
_STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB -Zc:wchar_t-
-FdC:/jprt/T/P1/194319~1.SCO/s/build/windows-i586/tmp/java/java.nio/nio/obj/FileChannelImpl.pdb
-FmC:/jprt/T/P1/194319~1.SCO/s/build/windows-i586/tmp/java/java.nio/nio/obj/FileChannelImpl.map
-wd4800 -W3 -D _CRT_SECURE_NO_DEPRECATE -D _CRT_NONSTDC_NO_DEPRECATE
-DNDEBUG -DWIN32 -DIAL -D_LITTLE_ENDIAN -D_X86_ -Dx86
-DWIN32_LEAN_AND_MEAN -I.
-IC:/jprt/T/P1/194319~1.SCO/s/build/windows-i586/tmp/java/java.nio/nio/CClassHeaders
-I../../../src/closed/share/javavm/export
-I../../../src/windows/javavm/export -I../../../src/share/javavm/export
-I../../../src/share/native/sun/nio/ch
-I../../../src/share/native/java/io -I../../../src/share/native/java/net
-I../../../src/windows/native/java/net
-IC:/jprt/T/P1/194319~1.SCO/s/build/windows-i586/tmp/java/java.nio/nio/CClassHeaders/../../../java.lang/java/CClassHeaders
-I../../../src/share/native/common -I../../../src/windows/native/common
-I../../../src/share/native/java/nio
-I../../../src/windows/native/java/nio -c
-FoC:/jprt/T/P1/194319~1.SCO/s/build/windows-i586/tmp/java/java.nio/nio/obj/FileChannelImpl.obj
../../../src/windows/native/sun/nio/ch/FileChannelImpl.c
FileChannelImpl.c
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(121) :
error C2146: syntax error : missing ')' before identifier 's'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(121) :
error C2061: syntax error : identifier 's'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(121) :
error C2059: syntax error : ';'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(121) :
error C2059: syntax error : ','
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(125) :
error C2059: syntax error : ')'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(146) :
error C2146: syntax error : missing ')' before identifier 'hSocket'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(146) :
error C2061: syntax error : identifier 'hSocket'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(146) :
error C2059: syntax error : ';'
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(146) :
error C2059: syntax error : ','
c:\Program Files\Microsoft SDKs\Windows\v7.0A\include\Mswsock.h(153) :
error C2059: syntax error : ')'
.......etc....
More information about the nio-dev
mailing list