From: nicm Date: Mon, 12 Jan 2015 10:11:07 +0000 (+0000) Subject: Add a note that HOST_NAME_MAX does not include a terminating \0, unlike X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ae92b999c0206cae668c6ab7e67f5f31090df56a;p=openbsd Add a note that HOST_NAME_MAX does not include a terminating \0, unlike MAXHOSTNAMELEN. ok deraadt guenther --- diff --git a/lib/libc/gen/gethostname.3 b/lib/libc/gen/gethostname.3 index 4ecf2263029..f4ae65c5f8b 100644 --- a/lib/libc/gen/gethostname.3 +++ b/lib/libc/gen/gethostname.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gethostname.3,v 1.25 2014/01/21 03:15:45 schwarze Exp $ +.\" $OpenBSD: gethostname.3,v 1.26 2015/01/12 10:11:07 nicm Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: January 21 2014 $ +.Dd $Mdocdate: January 12 2015 $ .Dt GETHOSTNAME 3 .Os .Sh NAME @@ -105,6 +105,13 @@ Host names are limited to .In sys/param.h ) characters, currently 256. This includes the terminating NUL character. +Note that the corresponding POSIX definition +.Dv HOST_NAME_MAX +in +.In limits.h +does +.Em not +include the terminating NUL character. .Pp If the buffer passed to .Fn gethostname