Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 8/9] Normalize on PATH_MAX instead of MAXPATHLEN throughout.
Date: Fri, 28 Jun 2013 18:06:00 -0000	[thread overview]
Message-ID: <51CDD063.5060605@redhat.com> (raw)
In-Reply-To: <87mwqal0w4.fsf@fleche.redhat.com>

On 06/28/2013 04:18 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> 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 <sys/param.h>
#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


  reply	other threads:[~2013-06-28 18:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 18:52 [PATCH 00/09] Import unistd and pathmax gnulib modules Pedro Alves
2013-06-27 18:52 ` [PATCH 4/9] Rely on gnulib's unistd.h replacement Pedro Alves
2013-06-28  9:05   ` Yao Qi
2013-06-28 17:44     ` Pedro Alves
2013-06-28 18:11       ` Pedro Alves
2013-06-27 18:52 ` [PATCH 1/9] Reimport gnulib from scratch Pedro Alves
2013-06-28  8:49   ` Yao Qi
2013-06-28  9:55     ` Pedro Alves
2013-06-28 12:10       ` Yao Qi
2013-06-28 12:28         ` Pedro Alves
2013-06-27 18:52 ` [PATCH 2/9] utils.c: pathconf call, check for _PC_PATH_MAX instead of HAVE_UNISTD_H Pedro Alves
2013-06-27 18:52 ` [PATCH 5/9] Constify main.c:get_init_files Pedro Alves
2013-06-27 18:52 ` [PATCH 6/9] Reimplement DJGPP's .gdbinit -> gdb.ini renaming Pedro Alves
2013-06-27 18:52 ` [PATCH 3/9] Import the "unistd" gnulib module Pedro Alves
2013-06-27 18:53 ` [PATCH 8/9] Normalize on PATH_MAX instead of MAXPATHLEN throughout Pedro Alves
2013-06-28 15:21   ` Tom Tromey
2013-06-28 18:06     ` Pedro Alves [this message]
2013-06-28 19:08       ` Tom Tromey
2013-06-27 18:53 ` [PATCH 7/9] Import the "pathmax" gnulib module Pedro Alves
2013-06-27 18:59 ` [PATCH 9/9] [GDBserver] hostio.c: Fallback to packet buffer size if PATH_MAX is not available Pedro Alves
2013-06-28 15:43 ` [PATCH 00/09] Import unistd and pathmax gnulib modules Tom Tromey
2013-07-01 11:31 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51CDD063.5060605@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox