rewrite the host name if the results of uname happen to be shorter than ...

Some platforms (HP-UX) truncate the node name part when calling uname(). Use the hostname part of the fully qualified domain name from gethostname() to rewrite the node name.