X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgethostname.c;h=eedc40ec4fe563123c6510af3991195265ca5ad2;hb=0191a7041eba6c7f9190e56dea2430ded092fc68;hp=2622c8ebfd2e5872508e8c005dbb7dfcb9e1e205;hpb=d349992d82f97d614404565ff66e3f8a47b4a568;p=gnulib.git diff --git a/lib/gethostname.c b/lib/gethostname.c index 2622c8ebf..eedc40ec4 100644 --- a/lib/gethostname.c +++ b/lib/gethostname.c @@ -1,5 +1,6 @@ /* gethostname emulation for SysV and POSIX.1. - Copyright (C) 1992, 2000 Free Software Foundation, Inc. + + Copyright (C) 1992, 2003, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,13 +14,11 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* David MacKenzie */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #ifdef HAVE_UNAME # include @@ -29,10 +28,10 @@ Null terminate it if the name is shorter than LEN. Return 0 if ok, -1 if error. */ +#include + int -gethostname (name, len) - char *name; - int len; +gethostname (char *name, size_t len) { #ifdef HAVE_UNAME struct utsname uts;