From owner-freebsd-current Tue Nov 14 09:14:14 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA22871 for current-outgoing; Tue, 14 Nov 1995 09:14:14 -0800 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id JAA22858 for ; Tue, 14 Nov 1995 09:14:07 -0800 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA20157; Tue, 14 Nov 1995 10:08:13 -0700 From: Terry Lambert Message-Id: <199511141708.KAA20157@phaeton.artisoft.com> Subject: Re: cvs commit: src/sys/kern kern_sysctl.c To: wollman@lcs.mit.edu (Garrett A. Wollman) Date: Tue, 14 Nov 1995 10:08:12 -0700 (MST) Cc: phk@critter.tfs.com, current@FreeBSD.org In-Reply-To: <9511141616.AA23508@halloran-eldar.lcs.mit.edu> from "Garrett A. Wollman" at Nov 14, 95 11:16:03 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 716 Sender: owner-current@FreeBSD.org Precedence: bulk > > I would rather it fail all the time and we can get the code fixed, > > than having a mismatch between expectations like this... > > I would prefer for it to obey the standard. > > Digital UNIX 3.2: > The gethostname() function retrieves the standard host name of the local > host. If sufficient space is provided, the returned address parameter is > null-terminated. So if you provide sufficient space, it *isn't* NULL terminated? How do you find the end of the thing then? I guess you have to call it with steadily decreasing space until you get a NULL. 8-). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.