RFR: [8u] JDK-8035949: Remove unused macro USE_SELECT and clean up Unix version of net_util_md.{c,h}
Andrew John Hughes
gnu.andrew at redhat.com
Thu Apr 30 02:00:17 UTC 2020
Bug: https://bugs.openjdk.java.net/browse/JDK-8035949
Webrev: https://cr.openjdk.java.net/~andrew/openjdk8/8035949/webrev.01/
This is the first of two backports to cleanup unused #include directives
and dead code in the networking stack. The initial motivation was to
resolve build breakage due to the upcoming release of glibc 2.32, which
removes the long deprecated sys/sysctl.h [0].
Rather than just fixing that with an 8u-specific patch, backporting
these two fixes will bring the code closer to that in 9+ (both were
completed during OpenJDK 9 development, so are well tested) and avoid
the need to maintain ageing and largely unused code.
The backport is largely clean, once paths are shuffled. The differences
lie in net_util_md.{c,h}, mainly because 8u does not contain
JDK-8034174, "Remove use of JVM_* functions from java.net code", but
does contain JDK-8032808, "Support Solaris SO_FLOW_SLA socket option",
which came later (and is in 9+ as part of JDK-8036979: "Support
java.net.SocketOption<> in java.net socket types"). The backport sync
the placement of the changes from 8032808 with their placement in 9u,
following 8035949.
A few other changes are also already present in 8u, and solaris_close.c
does not exist; the equivalent change is to remove the aliasing of
NET_Select to select in net_util_md.h.
I've tested this on x86_64 GNU/Linux and will be doing builds on other
GNU/Linux architectures over the next few days. Testing on Solaris & AIX
would be much appreciated, to make sure we don't break those platforms.
[0]
https://sourceware.org/git/?p=glibc.git;a=patch;h=076f09afbac1aa57756faa7a8feadb7936a724e4
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list