(errno): Remove decl; we now assume C89 or better.
Include unistd.h if available, for gethostname.
(ENAMETOOLONG): Define to 0, not 9999, to avoid colliding with
existing errno values if any.
(gethostname): Remove decl, since unistd.h declares it (or doesn't,
in which case it's an older system and it should just work).
(xgethostname): Don't assume host name length is less than INT_MAX.
Exit if malloc fails, just as the comment says.
by allocating a larger buffer. Test the gethostname return value for
being >= 0, not == 0, for BeOS. Don't exhaust memory if gethostname
returns an error and ENAMETOOLONG isn't defined.
[ENAMETOOLONG] (xgethostname): If gethostname
returns an error other than buffer overflow, exit with an error
message instead of allocating infinite amounts of space.
[!EXIT_FAILURE] (EXIT_FAILURE): New macro.
<errno.h>: New include.
[!errno] (errno): New declaration.