This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/libiberty] Fix documentation issues in filename_cmp.c
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org
- Date: Thu, 5 Apr 2007 23:12:18 -0700
- Subject: Re: [RFA/libiberty] Fix documentation issues in filename_cmp.c
- References: <20070405172720.GB9281@adacore.com> <ud52i4q62.fsf@gnu.org>
Eli,
> > 2007-04-05 Joel Brobecker <brobecker@adacore.com>
> >
> > * filename_cmp.c (filename_cmp): Improve documentation.
>
> Thanks, I am happy, as far as the documentation goes.
Am I to understand that you are not happy with the code?
You made two comments about the code:
1. Fold multiple consecutive slash/backslash characters into
single slash/backslash;
To do that without modifying the source filenames, we need to
allocate some memory locally to manipulate a copy of that filename.
My take on this is that the file names we have seen, at least in
the debugging information, have been consistent; and thus this
enhancement would end up having no actual effect. I would wait
until we come across a case where this is a problem before
going that way. This is my opinion, and you may disagree...
Note that this new function does pave the way for this sort
of enhancement though, and I promise I will not object to a patch
that implements your suggestion ;-).
2. The possible introduction of a bug with certain locales because
the function used in place of strcasecmp uses tolower.
For this one, as I said, I don't know, and I'm not sure where
to start looking for the answer. I'll be happy to modify the
function body to do it any other way, if someone tells me how.
--
Joel