X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxgetdomainname.c;h=13dde76d227a1d769040d010ba35ef3bca97e183;hb=7ea63ac2ac3498f2d02d5f2cead9f521f6f9b766;hp=aaf50a92d1d9f7f98b510d720069fd871a1ca32c;hpb=1ac8626ab74430f819333b64e198da59a2ac5f54;p=gnulib.git diff --git a/lib/xgetdomainname.c b/lib/xgetdomainname.c index aaf50a92d..13dde76d2 100644 --- a/lib/xgetdomainname.c +++ b/lib/xgetdomainname.c @@ -1,5 +1,6 @@ /* xgetdomainname.c -- Return the NIS domain name, without size limitations. - Copyright (C) 1992, 1996, 2000, 2001, 2003 Free Software Foundation, Inc. + Copyright (C) 1992, 1996, 2000, 2001, 2003, 2004, 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. */ /* Based on xgethostname.c, written by Jim Meyering. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include /* Specification. */ #include "xgetdomainname.h" @@ -30,6 +29,9 @@ /* Get errno. */ #include +/* Get free. */ +#include + #include "xalloc.h" #ifndef INITIAL_DOMAINNAME_LENGTH @@ -39,7 +41,8 @@ /* Return the NIS domain name of the machine, in malloc'd storage. WARNING! The NIS domain name is unrelated to the fully qualified host name of the machine. It is also unrelated to email addresses. - WARNING! The NIS domain name is usually the empty string when not using NIS. + WARNING! The NIS domain name is usually the empty string or "(none)" when + not using NIS. If malloc fails, exit. Upon any other failure, set errno and return NULL. */ char *