From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29800 invoked by alias); 16 Jun 2008 01:29:55 -0000 Received: (qmail 29792 invoked by uid 22791); 16 Jun 2008 01:29:55 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Jun 2008 01:29:35 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 062189840B; Mon, 16 Jun 2008 01:29:34 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id D388898011; Mon, 16 Jun 2008 01:29:33 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1K83XJ-0002Q4-6C; Sun, 15 Jun 2008 21:29:33 -0400 Date: Mon, 16 Jun 2008 03:17:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: vladimir@codesourcery.com, gdb-patches@sources.redhat.com Subject: Re: Better realpath Message-ID: <20080616012933.GA9279@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , vladimir@codesourcery.com, gdb-patches@sources.redhat.com References: <200806141024.41812.vladimir@codesourcery.com> <200806141614.07742.vladimir@codesourcery.com> <20080615032653.GA5214@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00299.txt.bz2 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, not any deliberate divergence, and the libiberty maintainers would be receptive to improvement. > 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. -- Daniel Jacobowitz CodeSourcery