From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9994 invoked by alias); 27 Nov 2014 07:36:10 -0000 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 Received: (qmail 9985 invoked by uid 89); 27 Nov 2014 07:36:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 27 Nov 2014 07:36:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 40E351167F8; Thu, 27 Nov 2014 02:36:05 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6FZ5ANOL-d3P; Thu, 27 Nov 2014 02:36:05 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DC29311677C; Thu, 27 Nov 2014 02:36:04 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id EEFD440F79; Thu, 27 Nov 2014 11:36:00 +0400 (RET) Date: Thu, 27 Nov 2014 07:36:00 -0000 From: Joel Brobecker To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 6/7] Use canonicalize_file_name unconditionally Message-ID: <20141127073600.GA5042@adacore.com> References: <1416980800-21408-1-git-send-email-yao@codesourcery.com> <1416980800-21408-7-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1416980800-21408-7-git-send-email-yao@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg00678.txt.bz2 > 2014-11-26 Yao Qi > > * configure.ac (AC_CHECK_FUNCS): Remove canonicalize_file_name > and realpath. > * config.in: Re-generated. > * configure: Re-generated. > * utils.c (gdb_realpath): Remove code calling realpath, > canonicalize_file_name and pathconf. > [!_WIN32]: Call canonicalize_file_name. > /* The MS Windows method. If we don't have realpath, we assume we > don't have symlinks and just canonicalize to a Windows absolute > path. GetFullPath converts ../ and ./ in relative paths to > @@ -2946,6 +2885,13 @@ gdb_realpath (const char *filename) > if (len > 0 && len < MAX_PATH) > return xstrdup (buf); > } > +#else > + { > + char *rp = canonicalize_file_name (filename); > + > + if (rp != NULL) > + return rp; > + } > #endif I guess one step at a time, but why not use canonicalize_file_name on Windows hosts as well? My question is not necessarily to suggest that we should be doing it, but rather whether you know of a reason why we should not be doing it... -- Joel