From owner-freebsd-net Mon Mar 12 18:11:21 2001 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 9AEEE37B71A for ; Mon, 12 Mar 2001 18:11:17 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id VAA66732; Mon, 12 Mar 2001 21:10:15 -0500 (EST) (envelope-from wollman) Date: Mon, 12 Mar 2001 21:10:15 -0500 (EST) From: Garrett Wollman Message-Id: <200103130210.VAA66732@khavrinen.lcs.mit.edu> To: Brian Somers Cc: net@FreeBSD.org, freebsd-standards@bostonradio.org Subject: Re: MAXHOSTNAMELEN redux In-Reply-To: <200103130149.f2D1nQB08449@hak.lan.Awfulhak.org> References: <200103121813.NAA61145@khavrinen.lcs.mit.edu> <200103130149.f2D1nQB08449@hak.lan.Awfulhak.org> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > This change seems to make it even more likely that people will forget > whether MUMBLE_MAX includes the NUL or not. I chose to conform to the definition of {NAME_MAX} because it was the one I was staring at when I wrote the aardvark. I could just as easily have used {LOGIN_NAME_MAX} or {PATH_MAX}. I think the common-sense interpretation when one speaks of the ``maximum length'' of some string is that it is the maximum value strlen() might return, and doesn't include metainformation. (Ghu help us when we get around to doing internationalized domain names!) There should probably be a limits(7) manual page which describes all of the system limits. > If I were defining this sort of thing (hah!), I'd have *_LEN as > definitions without NULs and *_SIZE as definitions with the NUL. foo_MAX was chosen because the namespace *_MIN and *_MAX were already reserved by ANSI C in the header file. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message