This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA libiberty, gdb] Add hashtab support to filename_ncmp.c and use it in gdb.
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> I understand all that, but why would the eq_f function need to be an
Eli> external function on its own?
It is just to avoid other users having to write their own.
Eli> E.g., if we were to write a qsort replacement, would we have a
Eli> suitable string comparison function declared extern, when it is a
Eli> trivial wrapper around strcmp?
Yes.
We have streq for this, for use in hash tables and elsewhere. It would
have been better if this were in libiberty, since currently there is a
copy of this function in gdb and like 3 or 4 in gcc.
Tom