FYI: strdup() -> xstrdup()

J.T. Conklin jtc@redback.com
Mon Nov 22 15:13:00 GMT 1999


>>>>> "Andrew" == Andrew Cagney <ac131313@cygnus.com> writes:
>> #define strdup dont_use_strdup__use_xstrdup_instead

>> #undef strdup
>> strdup()
>> {
>> dont_use_strdup__use_xstrdup_instead();
>> }

Andrew> I considered suggesting this but bit my lip :-)  Now that it is on the
Andrew> table though, it's fine with me.

My concern about doing this is that there could be third party code
(ui goo, simulators, target i/o libraries, etc.) that may be linked
with GDB that uses strdup() directly.

        --jtc

-- 
J.T. Conklin
RedBack Networks


More information about the Gdb-patches mailing list