[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GDB (CVS) broken under GNU.
From: |
Alfred M. Szmidt |
Subject: |
GDB (CVS) broken under GNU. |
Date: |
Fri, 22 Feb 2002 16:18:05 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2.50 |
Hi,
Looks like we have more fun MAXPATHLEN/PATH_MAX problems.
And as we don't define them the follow change will make the
compilation of GDB barf with a nice error that MAXPATHLEN and/or
PATH_MAX not being defined.
2002-01-19 Andrew Cagney <ac131313@redhat.com>
* utils.c: Include <sys/param.h> for MAXPATHLEN.
(gdb_realpath): Use MAXPATHLEN when PATH_MAX is not defined.
Before reporting this to the GDB maintainers, I would like to get input
on the following code. This would make GDB use canonicalize_file_name() on
all systems were it is declared, which I find more sane then to use the
broken realpath() function.
2002-02-22 Alfred M. Szmidt <ams@kemisten.nu>
* utils.c: (gdb_realpath) Use canonicalize_file_name if declared.
--- utils.c.~1.64.~ Sat Feb 16 22:11:32 2002
+++ utils.c Fri Feb 22 15:36:33 2002
@@ -2526,7 +2526,9 @@ string_to_core_addr (const char *my_stri
char *
gdb_realpath (const char *filename)
{
-#ifdef HAVE_REALPATH
+#ifdef _GNU_SOURCE
+ return canonicalize_file_name (filename);
+#elif HAVE_REALPATH
#if defined (PATH_MAX)
char buf[PATH_MAX];
#elif defined (MAXPATHLEN)
char *rp = realpath (filename, buf);
return xstrdup (rp ? rp : filename);
#else
return xstrdup (filename);
#endif
}
--
Alfred M. Szmidt
- GDB (CVS) broken under GNU.,
Alfred M. Szmidt <=