public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: James E Wilson <wilson@specifixinc.com>
Cc: Steve Ellcey <sje@cup.hp.com>,
	drow@false.org, binutils@sources.redhat.com
Subject: Re: Another HP-UX IA64 Build patch
Date: Thu, 05 May 2005 21:40:00 -0000	[thread overview]
Message-ID: <jefyx11hkr.fsf@sykes.suse.de> (raw)
In-Reply-To: <1115316630.8413.20.camel@aretha.corp.specifixinc.com> (James E. Wilson's message of "Thu, 05 May 2005 11:10:30 -0700")

James E Wilson <wilson@specifixinc.com> writes:

> On Thu, 2005-05-05 at 10:51, Steve Ellcey wrote:
>> I see it doesn't have the const modifier that libiberty has.  I didn't
>> get a warning or error presumbably because the build didn't include
>> libgen.h.
>
> This is a libiberty bug.  Try "man basename" on a linux system, and it
> will tell you that there are two versions of basename.  The posix one
> which takes a char * argument, and a glibc _GNU_SOURCE one which takes a
> const char * argument.  So this probably should be something like
> #if defined(_GNU_SOURCE)
> extern char *basename (const char *);
> #elif defined...
> extern char *basename (char *);
> #else
> extern char *basename ();
> #endif

Note that the POSIX basename function may modify the string in place (when
removing trailing slashes).  The GNU (and libiberty) version (naturally)
never does this.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2005-05-05 21:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05 17:26 Steve Ellcey
2005-05-05 17:41 ` Daniel Jacobowitz
2005-05-05 17:55   ` Steve Ellcey
2005-05-05 18:12     ` James E Wilson
2005-05-05 18:16       ` Daniel Jacobowitz
2005-05-05 19:17         ` James E Wilson
2005-05-05 19:32       ` DJ Delorie
2005-05-05 19:47         ` James E Wilson
2005-05-05 21:40       ` Andreas Schwab [this message]
2005-05-05 21:43         ` DJ Delorie
2005-05-05 18:10 ` James E Wilson
2005-05-05 20:12 ` James E Wilson
2005-05-05 20:42   ` Steve Ellcey
2005-05-05 21:36     ` DJ Delorie
2005-05-05 21:41       ` James E Wilson
2005-05-05 22:46         ` DJ Delorie
2005-05-06  1:57           ` James E Wilson
2005-05-06  1:58             ` DJ Delorie
2005-05-09 23:28               ` Steve Ellcey
2005-05-09 23:33                 ` DJ Delorie
2005-05-12 16:37                   ` Steve Ellcey
2005-05-05 22:06   ` James E Wilson

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=jefyx11hkr.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=binutils@sources.redhat.com \
    --cc=drow@false.org \
    --cc=sje@cup.hp.com \
    --cc=wilson@specifixinc.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).