Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: vladimir@codesourcery.com, gdb-patches@sources.redhat.com
Subject: Re: Better realpath
Date: Mon, 16 Jun 2008 03:32:00 -0000	[thread overview]
Message-ID: <uy756jc83.fsf@gnu.org> (raw)
In-Reply-To: <20080616012933.GA9279@caradoc.them.org>

> Date: Sun, 15 Jun 2008 21:29:33 -0400
> From: Daniel Jacobowitz <drow@false.org>
> Cc: vladimir@codesourcery.com, gdb-patches@sources.redhat.com
> 
> On Sun, Jun 15, 2008 at 08:58:29PM +0300, Eli Zaretskii wrote:
> > I don't mind doing so, although libiberty has other customers, which
> > could make it harder for us to do what we think is right (if it
> > happens to be different from what lrealpath does now).  Note that
> > right now, lrealpath does not behave consistently with realpath (if
> > the latter is unavailable), so it cannot be regarded as a portable
> > version of realpath, at least not entirely so.
> 
> I assume that it is simply an oversight when Windows support was
> added

But canonicalize_filename also behaves like the Windows version does.

> > Not just for GDB, in general as well: it doesn't seem right to me to
> > expand a file name and check for its existence in the same primitive,
> > not to mention refuse to produce an expansion if the file does not
> > exist.  These are two separate tests, so they should be kept separate.
> > (I actually suspect that realpath was used because it's more
> > convenient -- no messy memory allocation issues -- but I have no facts
> > to back this up.)
> 
> On the other hand, it seems perfectly reasonable to me; we can't know
> where the file would really be if it existed, unless it exists, since
> we don't know whether it would be a symlink.

I don't see any problem with this behavior for non-existing files.
And, if we want to resolve symlinks, the Windows code should also do
that.


  reply	other threads:[~2008-06-16  3:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-14 11:09 Vladimir Prus
2008-06-14 11:30 ` Pierre Muller
2008-06-14 12:14   ` Vladimir Prus
2008-06-14 14:29 ` Eli Zaretskii
2008-06-14 15:10   ` Vladimir Prus
2008-06-14 22:05     ` Eli Zaretskii
2008-06-14 22:26       ` Vladimir Prus
2008-06-15 17:37         ` Eli Zaretskii
2008-06-15 17:43           ` Daniel Jacobowitz
2008-06-15 21:04             ` Eli Zaretskii
2008-06-16  3:17               ` Daniel Jacobowitz
2008-06-16  3:32                 ` Eli Zaretskii [this message]
2008-06-18 18:39               ` Stan Shebs
2008-06-18 20:47                 ` DJ Delorie
2008-06-18 15:22           ` Vladimir Prus
2008-06-18 21:08             ` Eli Zaretskii
2008-06-19  7:27               ` Vladimir Prus
2008-06-20  2:49                 ` Eli Zaretskii

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=uy756jc83.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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