* utils.c (gdb_realpath): If canonicalize_file_name fails, return
the xstrduped original path.
Fix PR gdb/417.
+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>
* breakpoint.c (_initialize_breakpoint): Clean up help string.
char *rp = realpath (filename, buf);
return xstrdup (rp ? rp : filename);
#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
return xstrdup (filename);
#endif