Comment 13 for bug 144431

gethostbyname() fails to resolve domain names with minus sign at beginning or end of domain name,
in example, while it can be resolved using host and nslookup.

example sessiong:

insa@devel:~$ ping --
ping: unknown host

insa@devel:~$ host -- has address

Breif look at linux iputils/ping.c shows that it's using gethostbyname() function.
So i wrote C test example that can be found at

Tested on Debian 3.1, Debian 4, FreeBSD 5.4. All i386.
Mac OS X not affected.