Added gethostbyname_ex(), which returns the same kind of data as
gethostbyaddr().  (Plain gethostbyname() returns only the IP address.)
This moves the code shared by gethostbyaddr() and gethostbyname_ex()
to a subroutine.

Original patch by Dan Stromberg; some tweaks by GvR.
1 file changed