This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/7] Use canonicalize_file_name unconditionally


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]