This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 6/7] Use canonicalize_file_name unconditionally
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 27 Nov 2014 11:36:00 +0400
- Subject: Re: [PATCH 6/7] Use canonicalize_file_name unconditionally
- Authentication-results: sourceware.org; auth=none
- References: <1416980800-21408-1-git-send-email-yao at codesourcery dot com> <1416980800-21408-7-git-send-email-yao at codesourcery dot com>
> 2014-11-26 Yao Qi <yao@codesourcery.com>
>
> * configure.ac (AC_CHECK_FUNCS): Remove canonicalize_file_name
> and realpath.
> * config.in: Re-generated.
> * configure: Re-generated.
> * utils.c (gdb_realpath): Remove code calling realpath,
> canonicalize_file_name and pathconf.
> [!_WIN32]: Call canonicalize_file_name.
> /* The MS Windows method. If we don't have realpath, we assume we
> don't have symlinks and just canonicalize to a Windows absolute
> path. GetFullPath converts ../ and ./ in relative paths to
> @@ -2946,6 +2885,13 @@ gdb_realpath (const char *filename)
> if (len > 0 && len < MAX_PATH)
> return xstrdup (buf);
> }
> +#else
> + {
> + char *rp = canonicalize_file_name (filename);
> +
> + if (rp != NULL)
> + return rp;
> + }
> #endif
I guess one step at a time, but why not use canonicalize_file_name
on Windows hosts as well? My question is not necessarily to suggest
that we should be doing it, but rather whether you know of a reason
why we should not be doing it...
--
Joel