This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch / rfc / 5.3] Attempt N++ for gdb_realpath()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 12 Nov 2002 15:28:02 -0500
- Subject: Re: [patch / rfc / 5.3] Attempt N++ for gdb_realpath()
- References: <3DCFDF46.7000900@redhat.com> <3DD13854.4010407@redhat.com>
I've checked this in. Now to see what breaks :-/
Andrew
2002-11-09 Andrew Cagney <ac131313@redhat.com>
* 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
2002-11-12 Andrew Cagney <ac131313@redhat.com>
* 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);