This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/409: build failures for targets that should build with -Werror
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 14 Mar 2002 13:58:03 -0000
- Subject: Re: gdb/409: build failures for targets that should build with -Werror
- Reply-to: Richard Earnshaw <rearnsha at arm dot com>
The following reply was made to PR gdb/409; it has been noted by GNATS.
From: Richard Earnshaw <rearnsha@arm.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: rearnsha@arm.com, gdb-patches@sources.redhat.com,
gdb-gnats@sources.redhat.com
Subject: Re: gdb/409: build failures for targets that should build with
-Werror
Date: Thu, 14 Mar 2002 13:49:21 +0000
This is a multipart MIME message.
--==_Exmh_-21044459000
Content-Type: text/plain; charset=us-ascii
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=409
>
> I suspect the real bug is in the gdb_realpath() code. It should
> strongly prefer realpath() over canonicalize_file_name(). The latter is
> (as you noticed) GNU centric - I think it comes from the HURD.
>
OK, so how about this patch. It fixes most of the multi-build failures.
<date> Richard Earnshaw <rearnsha@arm.com>
* utils.c (gdb_realpath): Prefer realpath() over
canonicalize_file_name().
--==_Exmh_-21044459000
Content-Type: text/x-patch ; name="gdb-realpath.patch"; charset=us-ascii
Content-Description: gdb-realpath.patch
Content-Disposition: attachment; filename="gdb-realpath.patch"
Index: utils.c
===================================================================
RCS file: /cvs/src/src/gdb/utils.c,v
retrieving revision 1.68
diff -p -r1.68 utils.c
*** utils.c 2002/03/01 06:19:24 1.68
--- utils.c 2002/03/14 13:47:03
*************** string_to_core_addr (const char *my_stri
*** 2532,2540 ****
char *
gdb_realpath (const char *filename)
{
! #ifdef HAVE_CANONICALIZE_FILE_NAME
! return canonicalize_file_name (filename);
! #elif defined (HAVE_REALPATH)
#if defined (PATH_MAX)
char buf[PATH_MAX];
#elif defined (MAXPATHLEN)
--- 2532,2538 ----
char *
gdb_realpath (const char *filename)
{
! #ifdef HAVE_REALPATH
#if defined (PATH_MAX)
char buf[PATH_MAX];
#elif defined (MAXPATHLEN)
*************** gdb_realpath (const char *filename)
*** 2546,2551 ****
--- 2544,2551 ----
#endif
char *rp = realpath (filename, buf);
return xstrdup (rp ? rp : filename);
+ #elif defined (HAVE_CANONICALIZE_FILE_NAME)
+ return canonicalize_file_name (filename);
#else
return xstrdup (filename);
#endif
--==_Exmh_-21044459000--