From veksler at il.ibm.com:

* utils.c (gdb_realpath): If canonicalize_file_name fails, return
the xstrduped original path.
Fix PR gdb/417.
This commit is contained in:
Andrew Cagney 2002-03-28 03:43:37 +00:00
parent e92d460e59
commit 520f6ade4a
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2002-03-27 Andrew Cagney <ac131313@redhat.com>
From veksler at il.ibm.com:
* utils.c (gdb_realpath): If canonicalize_file_name fails, return
the xstrduped original path.
Fix PR gdb/417.
2002-03-27 Michael Snyder <msnyder@redhat.com> 2002-03-27 Michael Snyder <msnyder@redhat.com>
* breakpoint.c (_initialize_breakpoint): Clean up help string. * breakpoint.c (_initialize_breakpoint): Clean up help string.

View File

@ -2551,7 +2551,11 @@ gdb_realpath (const char *filename)
char *rp = realpath (filename, buf); char *rp = realpath (filename, buf);
return xstrdup (rp ? rp : filename); return xstrdup (rp ? rp : filename);
#elif defined(HAVE_CANONICALIZE_FILE_NAME) #elif defined(HAVE_CANONICALIZE_FILE_NAME)
return canonicalize_file_name (filename); char *rp = canonicalize_file_name (filename);
if (rp == NULL)
return xstrdup (filename);
else
return rp;
#else #else
return xstrdup (filename); return xstrdup (filename);
#endif #endif