Ping: RFR (M): 8167481: cleanup of headers and includes for native libnet
Langer, Christoph
christoph.langer at sap.com
Mon Oct 17 08:40:38 UTC 2016
Hi,
is there any comments/reviews for my cleanup work here?
The changeset was added to our local OpenJDK build and test infrastructure several days ago and it does not show issues...
Thanks
Christoph
From: Langer, Christoph
Sent: Mittwoch, 12. Oktober 2016 14:17
To: net-dev at openjdk.java.net
Subject: RFR (M): 8167481: cleanup of headers and includes for native libnet
Hi,
as I already mentioned, here is another proposal for cleanup in libnet:
https://bugs.openjdk.java.net/browse/JDK-8167481
http://cr.openjdk.java.net/~clanger/webrevs/8167481.0/
This time I touched the includes. Generally I reordered the includes to include "net_util.h" first, then any JNI includes, such as "java_net_InetAddress.h" and finally all standard header includes in alphabetical order. For platform specific includes, I use the order Linux, AIX, Solaris, BSD. I removed all includes that don't seem to be necessary to get the respective file compiled. Is that the correct approach that is desired?
To make this work, I had to remove the definitions "IPv4" and "IPv6" in net_util.h and replace their usages with "java_net_InetAddress_IPv4" resp. "java_net_InetAddress_IPv6" from JNI which seems to be the correct thing to do anyway. For Windows I also cleaned up (removed) the definition of SOCKADDR_IN6 in net_util_md.h and replaced all occurences with sockaddr_in6. It seems that the capital letters version SOCKADDR_IN6 is a remainder of a very old Microsoft runtime (_MSC_VER < 1310) which corresponds to MSVC 7.0, which is even older than Visual Studio 2003. So I'm wondering if I should remove the whole section in windows net_util_md.h now (lines 47 - 177)?
For Windows it seems that we can also completely get rid of src/java.base/windows/native/libnet/icmp.h as the icmp stuff is all brought by the #include <icmpapi.h>. Would you agree to that?
So far I successfully ran builds in my local environments for Windows, Linux, AIX, Solaris and Apple. I've now added the changeset to our local regression testing environment for OpenJDK. If the change is to your like, I would like to ask you to also run it through JPRT to see if I missed some dependency.
Thanks and best regards
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20161017/6f650e34/attachment-0001.html>
More information about the net-dev
mailing list