Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: drow@mvista.com
Cc: mstump@apple.com, pfeifer@dbai.tuwien.ac.at,
	gcc-patches@gcc.gnu.org, binutils@sources.redhat.com,
	gdb-patches@sources.redhat.com
Subject: Re: PATCH[libiberty] for Re: Mainline: C++ include files not found!
Date: Thu, 20 Feb 2003 21:15:00 -0000	[thread overview]
Message-ID: <200302202112.h1KLClG12970@greed.delorie.com> (raw)
In-Reply-To: <20030220204639.GA22900@nevyn.them.org> (message from Daniel Jacobowitz on Thu, 20 Feb 2003 15:46:39 -0500)


> My initial reluctance was that readlink isn't guaranteed to give us
> something that we can append to the dirname and access.  And I'd
> need to drag in both stat and readlink, and some bits for
> HOST_EXECUTABLE_SUFFIX that I'm not entirely sure of.

I had at one point written a semi-portable canonicalize_file_name()
that did all that, but the reason I wrote it went away, so I dropped
it.

> Would you rather I add this, or can we leave it until someone needs
> this on DJGPP?

It will work well enough on DJGPP without it, so I wouldn't bother.

> Optionally returning filename seems risky to me, personally.

I'm thinking that most uses of this function will call it once at
program startup and not even need to free the malloc'd pointer.  I
guess it doesn't matter either way.

> You've got a good point on the xmalloc thing.  How about use malloc
> and return NULL on allocation failure?  And strdup instead of
> xstrdup.

That would be better.


  reply	other threads:[~2003-02-20 21:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030215135157.GA23004@nevyn.them.org>
     [not found] ` <C5533C51-4430-11D7-B22E-003065A77310@apple.com>
     [not found]   ` <20030220182105.GA7787@nevyn.them.org>
     [not found]     ` <200302202026.h1KKQk711991@greed.delorie.com>
2003-02-20 20:47       ` Daniel Jacobowitz
2003-02-20 21:15         ` DJ Delorie [this message]
2003-02-20 21:50           ` Daniel Jacobowitz
2003-02-20 22:01             ` DJ Delorie

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=200302202112.h1KLClG12970@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=drow@mvista.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mstump@apple.com \
    --cc=pfeifer@dbai.tuwien.ac.at \
    /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