From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19555 invoked by alias); 12 Nov 2002 20:28:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19548 invoked from network); 12 Nov 2002 20:28:03 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 12 Nov 2002 20:28:03 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id D4ABE3D0F; Tue, 12 Nov 2002 15:28:02 -0500 (EST) Message-ID: <3DD16452.2050209@redhat.com> Date: Tue, 12 Nov 2002 12:28:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [patch / rfc / 5.3] Attempt N++ for gdb_realpath() References: <3DCFDF46.7000900@redhat.com> <3DD13854.4010407@redhat.com> Content-Type: multipart/mixed; boundary="------------060104030805080704050205" X-SW-Source: 2002-11/txt/msg00353.txt.bz2 This is a multi-part message in MIME format. --------------060104030805080704050205 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 382 > > I've checked this in. Now to see what breaks :-/ > > Andrew > > > 2002-11-09 Andrew Cagney > > * utils.c (gdb_realpath): Rewrite. Try realpath() with a constant > buffer, cannonicalize_file_name(), realpath() with a pathconf() > defined buffer, xstrdup(). Well so far not badly. The attached fixes a -Werror problem though. Andrew --------------060104030805080704050205 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 600 2002-11-12 Andrew Cagney * utils.c (gdb_realpath): Make rp a constant pointer. Index: utils.c =================================================================== RCS file: /cvs/src/src/gdb/utils.c,v retrieving revision 1.84 diff -u -r1.84 utils.c --- utils.c 12 Nov 2002 17:19:06 -0000 1.84 +++ utils.c 12 Nov 2002 20:25:15 -0000 @@ -2718,7 +2718,7 @@ # define USE_REALPATH # endif # if defined (USE_REALPATH) - char *rp = realpath (filename, buf); + const char *rp = realpath (filename, buf); if (rp == NULL) rp = filename; return xstrdup (rp); --------------060104030805080704050205--