public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Neil Booth <neil@daikokuya.demon.co.uk>
To: DJ Delorie <dj@redhat.com>
Cc: dave@hiauly1.hia.nrc.ca, gcc-patches@gcc.gnu.org
Subject: Re: cpplib: basename () fix
Date: Mon, 05 Mar 2001 11:56:00 -0000	[thread overview]
Message-ID: <20010305195511.C30317@daikokuya.demon.co.uk> (raw)
In-Reply-To: <200103051939.OAA31063@greed.delorie.com>

DJ Delorie wrote:-

> (3) If the results of passing an empty string are undefined
> standards-wise, programs should be careful not to pass empty strings.
> Otherwise, we might as well make basename() non-optional in libiberty,
> for the day when all platforms "fix" their basename.  I hesitate to do
> this, as we'd then be promoting obsolete behavior.

I agree with have a single basename () function, possibly with a different
name, that gives the same semantics wherever you run GCC.

The current situation of relying on the libc implementation on some
targets, is poor.  I was bitten by this last week; there doesn't seem to
be a "standard" basename () with common semantics across platforms.  So
IMO the best solution is we provide one for our own use and use that
always.

If we want to stick with an optional basename (), then let's make it
a stub that just calls gcc_basename (), which contains the function
body and does the right thing (tm).

Neil.

  reply	other threads:[~2001-03-05 11:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-04  8:24 John David Anglin
2001-03-05 11:40 ` DJ Delorie
2001-03-05 11:56   ` Neil Booth [this message]
2001-03-05 12:03     ` DJ Delorie
2001-03-05 13:01   ` John David Anglin
2001-03-05 13:20     ` DJ Delorie
2001-03-05 14:15       ` John David Anglin
2001-03-05 14:21         ` DJ Delorie
2001-03-05 14:40           ` John David Anglin
2001-03-05 14:54             ` Neil Booth
2001-03-05 15:08               ` John David Anglin
2001-03-05 15:15                 ` Neil Booth
2001-03-05 15:25                   ` John David Anglin
2001-03-05 15:16                 ` DJ Delorie
2001-03-05 15:57                   ` John David Anglin
2001-03-05 16:14                 ` Raja R Harinath
2001-03-05 17:17                   ` John David Anglin
     [not found] <no.id>
2001-03-04 10:11 ` John David Anglin
2001-03-06 10:07 ` John David Anglin
2001-03-06 10:29   ` DJ Delorie
2001-03-06 10:32   ` Zack Weinberg
2001-03-06 10:52     ` John David Anglin
2001-03-06 11:16       ` DJ Delorie
  -- strict thread matches above, loose matches on Subject: below --
2001-03-04  8:34 Mark E.
2001-03-04  7:08 Neil Booth

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=20010305195511.C30317@daikokuya.demon.co.uk \
    --to=neil@daikokuya.demon.co.uk \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).