From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25868 invoked by alias); 28 Jun 2013 18:05:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 25852 invoked by uid 89); 28 Jun 2013 18:05:28 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 28 Jun 2013 18:05:26 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5SI5PsR028355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 Jun 2013 14:05:25 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5SI5Nov027255; Fri, 28 Jun 2013 14:05:24 -0400 Message-ID: <51CDD063.5060605@redhat.com> Date: Fri, 28 Jun 2013 18:06:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: [PATCH 8/9] Normalize on PATH_MAX instead of MAXPATHLEN throughout. References: <20130627185200.6625.10526.stgit@brno.lan> <20130627185257.6625.19906.stgit@brno.lan> <87mwqal0w4.fsf@fleche.redhat.com> In-Reply-To: <87mwqal0w4.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00918.txt.bz2 On 06/28/2013 04:18 PM, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves writes: > > Pedro> With the pathmax gnulib module in place, we can use PATH_MAX > Pedro> consistently throughout, instead of the current mixbag of PATH_MAX and > Pedro> MAXPATHLEN uses. It's no longer necessary to include sys/param.h > Pedro> (supposedly, I can't check all ports touched here) for MAXPATHLEN. > > After this patch, I think HAVE_SYS_PARAM_H is never used, so the > configure.ac check can be removed as well. Yeah, I had grepped for all uses of it, and also removed all unconditional sys/param.h inclusions. But there's one use left that is what made me pause on the unistd.h removal from the checked headers. Notice: # elf_hp.h is for HP/UX 64-bit shared library support. AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h sys/socket.h proc_service.h \ sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ ... dlfcn.h sys/un.h linux/perf_event.h]) ... AC_CHECK_HEADERS(sys/proc.h, [], [], [#if HAVE_SYS_PARAM_H ^^^^^^^^^^^^^^^^^^^^ # include #endif ]) ... I don't think we presently run the autoconf checks with -Ignulib/import, so we still need to check for headers that are used in HAVE_FOO in configure tests explicitly. Maybe we should (run these checks with -Ignulib/import, or include gnulib's config.h while running these tests, but I don't think the latter would work), but I'd prefer treading with caution, and considering that a separate change. We also check for other headers that we have gnulib replacements for, so such a change can do all of them in one pass. -- Pedro Alves