aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/utils.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 55a1134..2299e64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2002-11-12 Andrew Cagney <ac131313@redhat.com>
+ * utils.c (gdb_realpath): Make rp a constant pointer.
+
+2002-11-12 Andrew Cagney <ac131313@redhat.com>
+
* utils.c (gdb_realpath): Rewrite. Try, in order: realpath() with
a constant buffer; cannonicalize_file_name(); realpath() with a
pathconf() defined buffer, xstrdup().
diff --git a/gdb/utils.c b/gdb/utils.c
index b2a1d18..62e4020 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2718,7 +2718,7 @@ gdb_realpath (const char *filename)
# 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);