7052272: (aio) Definition of ConnectEx doesn't specify PASCAL calling convention
Alan Bateman
Alan.Bateman at oracle.com
Wed Jun 8 05:35:11 PDT 2011
The asynchronous I/O implementation on Windows defines the ConnectEx
extension without specifying the calling convention and so doesn't match
the actual calling convention. This creates potential issues although we
haven't had any reports. Easily fixed with the attached patch. This one
is for jdk8 (too late for jdk7).
-Alan
diff --git
a/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c
b/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c
--- a/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c
+++ b/src/windows/native/sun/nio/ch/WindowsAsynchronousSocketChannelImpl.c
@@ -44,7 +44,7 @@
#define SO_UPDATE_CONNECT_CONTEXT 0x7010
#endif
-typedef BOOL (*ConnectEx_t)
+typedef BOOL (PASCAL *ConnectEx_t)
(
SOCKET s,
const struct sockaddr* name,
More information about the nio-dev
mailing list