Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2020 16:51:19 +0000 (UTC)
From:      Gordon Bergling <gbe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r363371 - stable/12/lib/libc/gen
Message-ID:  <202007201651.06KGpJqe006761@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gbe (doc committer)
Date: Mon Jul 20 16:51:18 2020
New Revision: 363371
URL: https://svnweb.freebsd.org/changeset/base/363371

Log:
  MFC r363147: gethostname(3): Correct the reference of the undefined value HOST_NAME_MAX
  
  PR:		143472
  Submitted by:	bcran@
  Reported by:	Jeremy Huddleston <jeremyhu at apple dot com>
  Reviewed by:	bcr (mentor)
  Approved by:	bcr (mentor)
  Differential Revision:	https://reviews.freebsd.org/D25647

Modified:
  stable/12/lib/libc/gen/gethostname.3
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/gen/gethostname.3
==============================================================================
--- stable/12/lib/libc/gen/gethostname.3	Mon Jul 20 16:48:46 2020	(r363370)
+++ stable/12/lib/libc/gen/gethostname.3	Mon Jul 20 16:51:18 2020	(r363371)
@@ -28,7 +28,7 @@
 .\"     @(#)gethostname.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd August 18, 2003
+.Dd July 13, 2020
 .Dt GETHOSTNAME 3
 .Os
 .Sh NAME
@@ -68,9 +68,9 @@ 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
-characters, not including the trailing null, currently 255.
+Applications should use
+.Fn sysconf _SC_HOST_NAME_MAX
+to find the maximum length of a host name (not including the terminating null).
 .Sh RETURN VALUES
 .Rv -std
 .Sh ERRORS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007201651.06KGpJqe006761>