X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgethostname.c;h=f05ed85d535166cc67a7d1ff8e14204fc69646b4;hb=fef71c83bc8291522ae54810ae9b4238ca13cf1a;hp=e37e72189bd3943240f5167b00698d3cf6535d1c;hpb=5d08444ebcbd08cd195e1d9f52937a862c92efaa;p=gnulib.git diff --git a/lib/gethostname.c b/lib/gethostname.c index e37e72189..f05ed85d5 100644 --- a/lib/gethostname.c +++ b/lib/gethostname.c @@ -1,5 +1,5 @@ /* gethostname emulation for SysV and POSIX.1. - Copyright (C) 1992 Free Software Foundation, Inc. + Copyright (C) 1992, 2003 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,26 +13,26 @@ 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 +# include #endif #ifdef HAVE_UNAME -#include +# include #endif /* Put up to LEN chars of the host name into NAME. 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;