From owner-freebsd-stable@freebsd.org Sun Oct 2 03:17:34 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F896AC437B for ; Sun, 2 Oct 2016 03:17:34 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20566E9 for ; Sun, 2 Oct 2016 03:17:33 +0000 (UTC) (envelope-from erichsfreebsdlist@alogt.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=OzVxkFOfhHJHFJrqd6nnYfoo4X9oXaEd0wd9BZ9d1HQ=; b=Gu5g9567kyug1vv3gseoUiqVEL yEkih6NxGXzsmefS4GNdu1YhNb6dtos+rmszHSgPQaEmw8OS8HQk2/W8HwrARYye17n3hc1UAsIKJ vVung/tQr0TrvGZ8c5wyzAPu6xATqxC1u2Aor0a/wfd9VLN7blfM8DrUzr1uvxb4lOxA=; Received: from [114.120.232.127] (port=21596 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1bqXHK-003lOj-Hw for freebsd-stable@FreeBSD.org; Sat, 01 Oct 2016 21:17:27 -0600 Date: Sun, 2 Oct 2016 11:17:19 +0800 From: Erich Dollansky To: freebsd-stable@FreeBSD.org Subject: HOST_NAME_MAX not defined in unistd.h Message-ID: <20161002111719.6e22f670@X220.alogt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Authenticated-Sender: sl-508-2.slc.westdc.net: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Oct 2016 03:17:34 -0000 Hi, there is a discrepancy in the documentation: sys/syslimits.h says: '/* * We leave the following values undefined to force applications to either * assume conservative values or call sysconf() to get the current value. * * HOST_NAME_MAX * * (We should do this for most of the values currently defined here, * but many programs are not prepared to deal with this yet.) */' man gethostname says: #include and 'Host names are limited to {HOST_NAME_MAX} characters, not including the trailing null, currently 255.' which makes people assume that HOST_NAME_MAX is defined in unistd.h. What is the real idea? Keep gethostname compatible to the rest or force users to call sysconf? Should I file a bug report? Erich