From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15185 invoked by alias); 15 Jun 2008 17:58:52 -0000 Received: (qmail 15177 invoked by uid 22791); 15 Jun 2008 17:58:52 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout1.012.net.il (HELO mtaout1.012.net.il) (84.95.2.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 15 Jun 2008 17:58:32 +0000 Received: from HOME-C4E4A596F7 ([84.228.242.237]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0K2I003ETNYL9Y10@i-mtaout1.012.net.il> for gdb-patches@sources.redhat.com; Sun, 15 Jun 2008 21:13:34 +0300 (IDT) Date: Sun, 15 Jun 2008 21:04:00 -0000 From: Eli Zaretskii Subject: Re: Better realpath In-reply-to: <20080615032653.GA5214@caradoc.them.org> X-012-Sender: halo1@inter.net.il To: Daniel Jacobowitz Cc: vladimir@codesourcery.com, gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: Content-transfer-encoding: 7BIT References: <200806141024.41812.vladimir@codesourcery.com> <200806141614.07742.vladimir@codesourcery.com> <20080615032653.GA5214@caradoc.them.org> 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/msg00278.txt.bz2 > Date: Sat, 14 Jun 2008 23:26:54 -0400 > From: Daniel Jacobowitz > Cc: Vladimir Prus , > gdb-patches@sources.redhat.com > > It seems to me that the thing to do is eliminate gdb_realpath in favor > of lrealpath. That's supposed to be a portable version of realpath, > so realpath semantics seem like the way to go. 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. > Why do you think realpath's behavior is wrong for GDB? 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.)