From patchwork Mon Sep 14 18:18:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 8689 Received: (qmail 129674 invoked by alias); 14 Sep 2015 18:18:23 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 129653 invoked by uid 89); 14 Sep 2015 18:18:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: "GNU C. Library" Subject: [PATCH roland/maxhostnamelen] Use HOST_NAME_MAX for MAXHOSTNAMELEN in . Message-Id: <20150914181817.9A42A2C39F1@topped-with-meat.com> Date: Mon, 14 Sep 2015 11:18:17 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=hOe2yjtxAAAA:8 a=kj9zAlcOel0A:10 a=WRbmqGcVZjcDwJ4Dv3YA:9 a=CjuIK1q_8ugA:10 This is a generic change, but in fact it only affects *-nacl configurations. For Linux configurations, (via the kernel's ) defines MAXHOSTNAMELEN already. For Hurd, nothing defines HOST_NAME_MAX, so this won't change anything. If there are no objections soon, I'll put this on both trunk and 2.22 branch. It is a user-visible change and I didn't bother filing in bugzilla, because no NaCl application developer will actually see the 2.22-release version before this change. Thanks, Roland 2015-09-14 Roland McGrath * misc/sys/param.h [!MAXHOSTNAMELEN && HOST_NAME_MAX] (MAXHOSTNAMELEN): Define it to HOST_NAME_MAX. diff --git a/misc/sys/param.h b/misc/sys/param.h index 62b7ed2..1908b93 100644 --- a/misc/sys/param.h +++ b/misc/sys/param.h @@ -50,6 +50,9 @@ #if !defined NOFILE && defined OPEN_MAX # define NOFILE OPEN_MAX #endif +#if !defined MAXHOSTNAMELEN && defined HOST_NAME_MAX +# define MAXHOSTNAMELEN HOST_NAME_MAX +#endif #ifndef NCARGS # ifdef ARG_MAX # define NCARGS ARG_MAX