Hi guys,

I am reading some native code in the jdk repos. I find that in Inet4AddressImpl.c (folder solaris), gethostbyname is used. Meanwhile in the Inet6AddressImpl.c. getaddrinfo is used. My question is why inet4 does not use getaddrinfo? Any concern here?

There are some pros I can see if getaddrinfo is used in the Inet4AddressImpl:
1. Code will look more clean and portable :-)
2. __GLIBC__ can be omitted. I have grep the __GLIBC__ in the jdk/src directories, only Inet4AddressImpl use it.

--
Yours Charles

Reply via email to