(xgethostname): Protect against the SunOS5.5 bug
authorJim Meyering <jim@meyering.net>
Sat, 8 Jul 2000 21:48:07 +0000 (21:48 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 8 Jul 2000 21:48:07 +0000 (21:48 +0000)
commit1c0d7dc343e0f293693e93f57a41ba9bfa92ea69
treeeed213bd39418e6ad54cb9b0ba58fdc243d92b55
parenta9b33f62e14d2fa44e77d44d5a27ac5703956c51
(xgethostname): Protect against the SunOS5.5 bug
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.
lib/xgethostname.c