DragonFly-2.3.0.640.gb39b2 master include unistd.h lib/libc/gen gethostname.3 gethostname.c
Peter Avalos
pavalos at crater.dragonflybsd.org
Tue Apr 7 00:13:42 PDT 2009
commit b39b2b27be6ef15e163a14f3aba068c5c95efeb9
Author: Peter Avalos <pavalos at theshell.com>
Date: Mon Mar 9 21:54:43 2009 -1000
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).
Summary of changes:
include/unistd.h | 2 +-
lib/libc/gen/gethostname.3 | 65 +++++++++++++++++++++++++++++++-------------
lib/libc/gen/gethostname.c | 16 +++++-----
3 files changed, 55 insertions(+), 28 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b39b2b27be6ef15e163a14f3aba068c5c95efeb9
--
DragonFly BSD source repository
More information about the Commits
mailing list