From 8738974f3a88aad341ed19df98e5b0d092a7ebbf Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Tue, 12 Jun 2001 23:36:19 +0000 Subject: on openbsd, NI_MAXHOST value is different from RFC2553. PR 1870 --- lib/libc/net/getnameinfo.3 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3 index 755e7bd4829..f5d40842470 100644 --- a/lib/libc/net/getnameinfo.3 +++ b/lib/libc/net/getnameinfo.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getnameinfo.3,v 1.11 2001/01/05 13:43:02 itojun Exp $ +.\" $OpenBSD: getnameinfo.3,v 1.12 2001/06/12 23:36:18 itojun Exp $ .\" $KAME: getnameinfo.3,v 1.20 2001/01/05 13:37:37 itojun Exp $ .\" .\" Copyright (c) 1983, 1987, 1991, 1993 @@ -111,7 +111,7 @@ Therefore to aid the application in allocating buffers for these two returned strings the following constants are defined in .Aq Pa netdb.h : .Bd -literal -offset -#define NI_MAXHOST 1025 +#define NI_MAXHOST MAXHOSTNAMELEN #define NI_MAXSERV 32 .Ed .Pp @@ -302,3 +302,8 @@ and documented in The current implementation is not thread-safe. .Pp The text was shamelessly copied from RFC2553. +.Pp +.Ox +intentionally uses different +.Dv NI_MAXHOST +value from what RFC2553 suggests, to avoid buffer length handling mistakes. -- cgit v1.2.3