Sync gethostname() with FreeBSD:
authorPeter Avalos <pavalos@theshell.com>
Tue, 10 Mar 2009 07:54:43 +0000 (21:54 -1000)
committerPeter Avalos <pavalos@theshell.com>
Tue, 7 Apr 2009 07:09:37 +0000 (21:09 -1000)
commitb39b2b27be6ef15e163a14f3aba068c5c95efeb9
tree32d3a19ea4579dd7a4b0ca5094b7fd8a3c7eca3b
parent6a7eb1f6ade5f6bcb315deaa6453702e35d8ac7d
Sync gethostname() with FreeBSD:

* Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEM
when the buffer is not long enough to hold the current host name.
POSIX does not standardize error returns for gethostname(), so it
doesn't matter which one we use, but ENAMETOOLONG is at least a little
more intuitive.

* Update prototype to match SuS (int->size_t).
include/unistd.h
lib/libc/gen/gethostname.3
lib/libc/gen/gethostname.c