hpi::get_host_by_name() / hpi::get_host_by_addr() not defined for Linux/Solaris

Volker Simonis volker.simonis at gmail.com
Mon Sep 15 08:35:17 PDT 2008


Hi,

is there a specific reason why some of the hpi-methods declared in
"src/share/vm/runtime/hpi.hpp" are not defined for Linux/Solaris (e.g.
hpi::get_host_by_*()).

This leads to ugly code like:

#ifdef _WINDOWS
    struct hostent* host = hpi::get_host_by_name((char*)ip);
#else
    struct hostent* host = gethostbyname(ip);
#endif

in "src/share/vm/utilities/ostream.cpp".

What's the general advice if one needs to use for example networking
functions in HotSpot coding. Should the hpi-methods still be used? I
remember sombody on this list (Keith???) was saying they'll get
obsolete some day?

Regards,
Volker



More information about the hotspot-runtime-dev mailing list