RE: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

2018-02-01 Thread Langer, Christoph
Hi Gary, I was having a look at your changes. I'm wondering what the reason is behind uncommenting WSASendDisconnect in Java_sun_nio_ch_SocketDispatcher_preClose0 of file SocketDispatcher.c? And in dbgsysSocketClose? In socketTransport.c, line: 331 setLastError(0, "gethostb

Re: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

2018-02-01 Thread gary.ad...@oracle.com
First pass over the code I disabled the compilation flag and then did quick substitution for the easier functions. I commented out the WSASendDisconnect calls so I could see what tests would fail if the function was just removed. I have a replacement now that uses "shutdown(fd,SD_SEND)", but I sti

RE: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

2018-02-01 Thread Langer, Christoph
But WSASendDisconnect isn't deprecated, right? So you wanted to get rid of it? I still don't see the reason... -Original Message- From: gary.ad...@oracle.com [mailto:gary.ad...@oracle.com] Sent: Donnerstag, 1. Februar 2018 12:17 To: Langer, Christoph ; OpenJDK Serviceability ; OpenJDK B

Re: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

2018-02-01 Thread Gary Adams
On 2/1/18, 6:59 AM, Langer, Christoph wrote: But WSASendDisconnect isn't deprecated, right? So you wanted to get rid of it? I still don't see the reason... vs2013 include/um/winsock2.h has WSASendDisconnect deprecated. .../src/jdk.jdwp.agent/windows/native/libdt_socket/socket_md.c(230) : erro

Re: RFR 8195059: Update java.net Socket and DatagramSocket implementations to use Cleaner

2018-02-01 Thread Chris Hegarty
Hi Roger, > On 31 Jan 2018, at 15:52, Roger Riggs wrote: > > Adding net-dev@openjdk.java.net > > On 1/30/2018 5:08 PM, Roger Riggs wrote: >> Please review changes to replace finalizers in socket, datagram, and >> multicast networking >> with Cleaner based release of the raw file descriptors.

Re: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

2018-02-01 Thread Gary Adams
Here's a revised webrev http://cr.openjdk.java.net/~gadams/8080990/webrev.01/index.html Still testing ... Using shutdown() fixed problems reported by the java/nio/channelSocketChannel tests. I also noticed prior use of getaddrinfo for "localhost" was not calling freeaddrinfo. ... On 2/

Re: RFR 8195059: Update java.net Socket and DatagramSocket implementations to use Cleaner

2018-02-01 Thread Roger Riggs
Hi Chris, Thanks for the review and suggestion. Webrev updated:    http://cr.openjdk.java.net/~rriggs/webrev-net-cleanup-8195059/ * Refactored SocketCleanup into a java.net package private SocketCleanable * Moved register and unregister into static methods in SocketCleanable * Simplified the