DragonFly commits List (threaded) for 2009-04
DragonFly BSD
DragonFly commits List (threaded) for 2009-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

DragonFly-2.3.0.640.gb39b2 master include unistd.h lib/libc/gen gethostname.3 gethostname.c


From: Peter Avalos <pavalos@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Apr 2009 00:12:54 -0700 (PDT)

commit b39b2b27be6ef15e163a14f3aba068c5c95efeb9
Author: Peter Avalos <pavalos@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]