Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: DJ Delorie <dj@redhat.com>
Cc: Ed Schouten <ed@nuxi.nl>, <gdb-patches@sourceware.org>
Subject: Re: Likely incorrect patch: remove the faulty basename() prototype from libiberty
Date: Thu, 02 Jun 2016 21:27:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1606022123460.9542@digraph.polyomino.org.uk> (raw)
In-Reply-To: <xnbn3o3ibh.fsf@greed.delorie.com>

On Sun, 29 May 2016, DJ Delorie wrote:

> I think the right path to go down is to add libgen.h to the list in
> AC_CHECK_HEADERS for every project that uses basename() (including
> libiberty itself, and binutils, gdb, and gcc), and then everyone who
> uses basename() from libiberty.h would need to include libgen.h *if*
> it's found by configure.

Note that there are two different and incompatible basename functions.  
libgen.h has the POSIX one.  libiberty has the GNU one (which glibc 
declares in <string.h> with _GNU_SOURCE).  If you include libgen.h with 
glibc, you get basename defined to __xpg_basename, which presumably is not 
what is wanted by applications using libiberty.

-- 
Joseph S. Myers
joseph@codesourcery.com


  parent reply	other threads:[~2016-06-02 21:27 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
2016-06-02 21:27       ` Joseph Myers [this message]
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=alpine.DEB.2.20.1606022123460.9542@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=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