diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-01-12 10:11:08 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-01-12 10:11:08 +0000 |
commit | 7e6efe8022b78cb72be9b0c4d1e4cf672625467e (patch) | |
tree | d999e618c4acb4d031e2f0eee34a83afaf54ec80 /lib/libc/gen/gethostname.3 | |
parent | fbad287ef3c914d6b9bc44046a3318b4512fc0d7 (diff) |
Add a note that HOST_NAME_MAX does not include a terminating \0, unlike
MAXHOSTNAMELEN.
ok deraadt guenther
Diffstat (limited to 'lib/libc/gen/gethostname.3')
-rw-r--r-- | lib/libc/gen/gethostname.3 | 11 |
1 files changed, 9 insertions, 2 deletions
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 |