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

2018-02-07 Thread gary.ad...@oracle.com
A fresh webrev rebased with latest jdk/jdk repos:  http://cr.openjdk.java.net/~gadams/8080990/webrev.03/index.html If there are no more comments, I'll check in locally with these reviewers   clanger,chegar,erikj and cut patches on Thurs AM. On 2/5/18 2:15 PM, Gary Adams wrote: One more to fix

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

2018-02-05 Thread Langer, Christoph
Cc: Langer, Christoph ; OpenJDK Serviceability ; OpenJDK Build ; OpenJDK Networking Subject: Re: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() One more to fix to cover the remaining test failures I was seeing. Previou

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

2018-02-05 Thread Gary Adams
One more to fix to cover the remaining test failures I was seeing. Previously, using inet_addr, there was a single -1 return that needed to be checked. Now that we're using inet_pton, there is a -1 and a 0 error return to be considered. My preference would be to leave the dbgSysInetAddr name

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

2018-02-02 Thread Langer, Christoph
Hi Gary, > 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. The fix looks good. I would think we should rename dbgsysInetAddr to dbgsysP

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: 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: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW()

2018-02-01 Thread Langer, Christoph
; OpenJDK Build ; OpenJDK Networking Subject: Re: JDK-8080990: libdt_socket/socket_md.c(202) : warning C4996: 'gethostbyname': Use getaddrinfo() or GetAddrInfoW() First pass over the code I disabled the compilation flag and then did quick substitution for the easier functions.

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
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