From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18679 invoked by alias); 14 Jun 2008 19:51:53 -0000 Received: (qmail 18665 invoked by uid 22791); 14 Jun 2008 19:51:53 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 14 Jun 2008 19:51:28 +0000 Received: from HOME-C4E4A596F7 ([84.228.242.237]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K2G00IPPYIRQYG0@i_mtaout2.012.net.il> for gdb-patches@sources.redhat.com; Sat, 14 Jun 2008 23:06:27 +0300 (IDT) Date: Sat, 14 Jun 2008 22:05:00 -0000 From: Eli Zaretskii Subject: Re: Better realpath In-reply-to: <200806141614.07742.vladimir@codesourcery.com> X-012-Sender: halo1@inter.net.il To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Reply-to: Eli Zaretskii Message-id: References: <200806141024.41812.vladimir@codesourcery.com> <200806141614.07742.vladimir@codesourcery.com> 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/msg00269.txt.bz2 > From: Vladimir Prus > Date: Sat, 14 Jun 2008 16:14:07 +0400 > Cc: gdb-patches@sources.redhat.com > > Speaking of the issues you've raised in: > > http://sourceware.org/ml/gdb-patches/2005-05/msg00612.html > > I think that: > > 1. The order of slashes is a cosmetic issue. > 2. The case of filenames is also a cosmetic issues. Would it surprise you that I disagree? Fixing those is not a big deal, so how about making gdb_realpath correct both cosmetically and behavior-wise? > 3. The matter of filename existance is a behaviour issue, and I think > I can modify gdb_realpath to perform a check explicitly. OTOH, it's not > clear if any code actually expects file existane check to be performed. I don't think it matters whether the callers expect it or not. As long as we use realpath, which always checks the result for existence, we should do the same in the other branches, so that the resulting GDB function behaves consistently. Alternatively, we could refrain from using realpath, in which case we should consistently _not_ require that the file exists.