]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/gethostname.3
Libc-1353.11.2.tar.gz
[apple/libc.git] / gen / FreeBSD / gethostname.3
index 3a25abda456168c43ffc3b88cfb9bd325a3765cc..eed23463519a99be8834c84d5c767bcb86fdd167 100644 (file)
@@ -9,10 +9,6 @@
 .\" 2. Redistributions in binary form must reproduce the above copyright
 .\"    notice, this list of conditions and the following disclaimer in the
 .\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
 .\" 4. Neither the name of the University nor the names of its contributors
 .\"    may be used to endorse or promote products derived from this software
 .\"    without specific prior written permission.
@@ -30,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)gethostname.3      8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/gen/gethostname.3,v 1.16 2004/07/03 22:30:08 ru Exp $
+.\" $FreeBSD: src/lib/libc/gen/gethostname.3,v 1.17 2007/01/09 00:27:54 imp Exp $
 .\"
 .Dd August 18, 2003
 .Dt GETHOSTNAME 3
@@ -60,7 +56,7 @@ argument
 specifies the size of the
 .Fa name
 array.
-The returned name is null-terminated unless insufficient space is provided.
+The returned name is null-terminated, unless insufficient space is provided.
 .Pp
 The
 .Fn sethostname
@@ -72,8 +68,8 @@ which has length
 This call is restricted to the super-user and
 is normally used only when the system is bootstrapped.
 .Pp
-Host names are limited to
-.Brq Dv HOST_NAME_MAX
+Host names are limited in length to
+.Brq Dv sysconf(_SC_HOST_NAME_MAX)
 characters, not including the trailing null, currently 255.
 .Sh RETURN VALUES
 .Rv -std
@@ -105,7 +101,7 @@ The
 function conforms to
 .St -p1003.1-2001 .
 Callers should be aware that
-.Brq Dv HOST_NAME_MAX
+.Brq Dv sysconf(_SC_HOST_NAME_MAX)
 may be variable or infinite, but is guaranteed to be no less than
 .Brq Dv _POSIX_HOST_NAME_MAX .
 On older systems, this limit was defined in the non-standard header