Hi, could you please review the following clean-up change (for a better formatted description please see the webrev):
http://cr.openjdk.java.net/~simonis/webrevs/8035949/ https://bugs.openjdk.java.net/browse/JDK-8035949 This change removes some unused code and macros from src/solaris/native/java/net/net_util_md.{c,h} and its dependent files. It also fixes a small bug which was introduced by 7112670 Inet4AddressImpl should use getaddrinfo/getnameinfo after which we didn't call gai_strerror() any more. The change has been build and tested (with the jdk JTreg regression tests) on Linux/x86_64/ppc64, AIX/ppc64, Solaris/sparcv9 and MacOS X but I won't be upset if somebody wants to run this through JPRT or any other automatic test suite :) Remove USE_SELECT macro. The macro isn't defined in any Makefile so it can never be defined in the actual build. So I simply removed all preprocessor tests for USE_SELECT by: - unconditionally making the code available which was guarded by #ifndef USE_SELECT - removing all code which was guarded by #ifdef USE_SELECT. - in src/solaris/native/java/net/solaris_close.c I removed the definition of NET_Select() although this was not guarded by #ifdef USE_SELECT like the other platform implementations. But NET_Select() isn't used anywhere else in the code so that should be OK. src/solaris/native/java/net/net_util_md.{c,h} - Remove unused typdefs for getaddrinfo_f, freeaddrinfo_f, getnameinfo_f and gai_strerror_f. gai_strerror_f was actually still used in src/solaris/native/java/net/net_util_md.c to declare gai_strerror_ptr. But after the change "7112670: Inet4AddressImpl should use getaddrinfo/getnameinfo" removed its initialization, gai_strerror_ptr was always NULL. I think the right solution is to just call gai_strerror() directly, like this is done with getaddrinfo()/getnameinfo() after 7112670. And that's exactly what this change does. - Removed unused globals getaddrinfo_ptr, freeaddrinfo_ptr and getnameinfo_ptr. - Rename ThrowUnknownHostExceptionWithGaiError() to NET_ThrowUnknownHostExceptionWithGaiError() to conform to the other functions declared in this file (especially NET_ThrowByNameWithLastError()). - Reorder the functions such that all NET_ functions are declared at the beginning of the file and the other utility functions at the end (as indicated by the comments). src/aix/native/java/net/aix_close.c src/solaris/native/java/net/bsd_close.c src/solaris/native/java/net/linux_close.c src/solaris/native/java/net/solaris_close.c - Remove unused NET_Select() function which was previously guarded by #ifdef USE_SELECT. src/solaris/native/java/net/Inet4AddressImpl.c src/solaris/native/java/net/Inet6AddressImpl.c - Rename ThrowUnknownHostExceptionWithGaiError() to NET_ThrowUnknownHostExceptionWithGaiError(). Thank you and best regards, Volker