Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Ed Schouten <ed@nuxi.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty
Date: Sun, 29 May 2016 17:35:00 -0000	[thread overview]
Message-ID: <xn7fec3gyv.fsf@greed.delorie.com> (raw)
In-Reply-To: <CABh_MK=q7sXBbV_XDXsdMNG46ppVz1n-1yn-1WpNzBO9ecAVNQ@mail.gmail.com> (message from Ed Schouten on Sun, 29 May 2016 19:24:13 +0200)


Libiberty provides basename() for those platforms that do not have one.

On platforms that *do* have one, you need to tell libiberty that you
already have one.  In your case, including some other header that
prototypes it, and *telling* libiberty that you have done so, is the
right solution.

Including a header that prototypes it, and *not* telling libiberty that
you have done so, leads to the error.

So each project must decide if it has a basename, and if not, it relies
on libiberty to provide one.  If you decide you have a basename and
*also* ask libiberty to provide one, you end up with a conflict.

Most of this difficulty comes from the fact that autoconf is run by gdb,
not libiberty, to control the macros that libiberty's includes see when
included by gdb.  There is no way for libiberty's autoconf to tell gdb
what to do.  So, we can't have a solution that's 100% controlled by
libiberty alone.


  reply	other threads:[~2016-05-29 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29 14:58 Ed Schouten
2016-05-29 16:32 ` DJ Delorie
2016-05-29 16:36   ` Ed Schouten
2016-05-29 17:06     ` DJ Delorie
2016-05-29 17:24       ` Ed Schouten
2016-05-29 17:35         ` DJ Delorie [this message]
2016-06-02 21:27       ` Joseph Myers
2016-06-03  9:37         ` Ed Schouten

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=xn7fec3gyv.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=ed@nuxi.nl \
    --cc=gdb-patches@sourceware.org \
    /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