Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>, Gary Benson <gbenson@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 14/13] Move errno.h to common-defs.h
Date: Thu, 31 Jul 2014 10:00:00 -0000	[thread overview]
Message-ID: <53DA1310.7060207@redhat.com> (raw)
In-Reply-To: <87zjfqti57.fsf@fleche.redhat.com>

On 07/31/2014 02:46 AM, Tom Tromey wrote:
>>>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
> 
> Gary> This commit moves the inclusion of errno.h to common-defs.h and
> Gary> removes all other inclusions.  Note that prior to this commit errno.h
> Gary> was included unconditionally in defs.h, whereas in common-defs.h it is
> Gary> protected by "#ifdef HAVE_ERRNO_H".  This does not change the status
> Gary> quo, since presumably every platform on which GDB builds has errno.h.
> 
> Gary> Is this ok to commit?
> 
> Gary> 	* configure.ac (AC_CHECK_HEADERS): Add errno.h.
> 
> If a header in common/, nat/, or target/ requires an autoconf define,
> then the check should be added to common/common.m4 and then the various
> configure scripts rebuilt.
> 
> This way we ensure that gdb and gdbserver keep in sync.  There were
> problems with this in the past.
> 
> I think it's fine to unconditionally include errno.h.  For one thing
> some files in gdb did this.

That's actually not a good justification.  We should always check the
history of why the check is on the gdb or gdbserver side.  That's
because the set of hosts/ports supported by either side is not a strict
superset of the other side.

The checks for HAVE_ERRNO_H on the gdbserver side were added for the
Windows CE port (as git blame/log will show -- 68070c10).  There's no native
gdb Windows CE, so it didn't need that.  That said, the CE port is broken
for other (similar) reasons.  E.g., the CE port predated use of both libiberty
and gnulib in gdbserver, and libiberty unconditionally includes errno.h as
well, for example.  I don't think we should completely nuke the port because
most of the arch abstractions in the Windows target side are needed for
Windows (NT) on ARM anyway, but it's super fine with me to not have it prevent
modernization of the core code base.  (If someone were to fix the port, she
just somehow come up with an errno.h replacement and make it available to
all of the build, including libiberty, which doesn't use gnulib.)

> Also I believe it is pulled into gnulib as
> a dependency of some other module; though you'd probably want to check
> this.

Yeah, I think so.

> 
> If you go this route then I guess it would be nice to remove errno.h
> checks instead.

Let's do that.

-- 
Thanks,
Pedro Alves


  parent reply	other threads:[~2014-07-31  9:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-29 15:11 [PATCH 00/13] Include some headers in common-defs.h Gary Benson
2014-07-29 15:11 ` [PATCH 02/13] Move stdlib.h to common-defs.h Gary Benson
2014-07-29 15:11 ` [PATCH 12/13] Include gdb_assert.h in common-defs.h Gary Benson
2014-07-29 15:11 ` [PATCH 13/13] Include string.h " Gary Benson
2014-08-06 17:25   ` Doug Evans
2014-08-07  8:13     ` Gary Benson
2014-07-29 15:11 ` [PATCH 03/13] Move stdarg.h to common-defs.h Gary Benson
2014-07-29 15:13 ` [PATCH 04/13] Move stddef.h " Gary Benson
2014-07-29 15:14 ` [PATCH 09/13] Move gdb_locale.h " Gary Benson
2014-07-29 15:18 ` [PATCH 05/13] Move ansidecl.h " Gary Benson
2014-07-29 15:18 ` [PATCH 11/13] Move common-utils.h " Gary Benson
2014-07-29 15:35 ` [PATCH 01/13] Move stdio.h " Gary Benson
2014-07-29 16:02 ` [PATCH 07/13] Move pathmax.h " Gary Benson
2014-07-29 16:08 ` [PATCH 06/13] Move libiberty.h " Gary Benson
2014-07-29 16:22 ` [PATCH 08/13] Move gdb/signals.h " Gary Benson
2014-07-29 16:22 ` [PATCH 10/13] Move ptid.h " Gary Benson
2014-07-30  8:29   ` Gary Benson
2014-07-30 13:35 ` [PATCH 14/13] Move errno.h " Gary Benson
2014-07-31  8:55   ` Tom Tromey
2014-07-31  9:57     ` [PATCH 14/13 v2] " Gary Benson
2014-07-31 10:19       ` Pedro Alves
2014-07-31 15:10         ` Tom Tromey
2014-07-31 10:00     ` Pedro Alves [this message]
2014-07-31 14:49       ` [PATCH 14/13 v3] " Gary Benson
2014-08-06 17:26 ` [PATCH 00/13] Include some headers in common-defs.h Doug Evans
2014-08-07  8:15   ` Gary Benson

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=53DA1310.7060207@redhat.com \
    --to=palves@redhat.com \
    --cc=gbenson@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