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: 517545 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 78AE7140779 for ; Tue, 15 Sep 2015 04:18:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=SEOAl7ML; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; q= dns; s=default; b=qQV1mvHmJzYSjidmDF93FadAwllCZsawyboKSm16/Vhssq A2c1IaI8AE9ncqXy4Sh0OkqmZZjIsLn049wUgchcV/8JcU+81ckq2QEXjGDfDAkJ eazJwWkg9usOq9B0OuKvrMMRn2+IxQwcvz1q3Ot6mfayjF/l8fabJLkWM4MfQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:subject:message-id:date; s= default; bh=MwwKG1lfOLWYOgWRunahqNvyZZU=; b=SEOAl7MLX+B0iOb5AbQd 2qmzHdAcaAHeff5C98fGw+sUD1HQT5ipeHhw1Gbio1b7MjLxyF5sa5sNaZ99pnQF Asbv95AhqAfYke4z/iK5IXWiMJfA2LeTh8WehWcLQEb/zq2VZA79EIp9DCJiRd+W jwuVIQp7KKDao3IoEp2j4zQ= 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