Patch to add ASTRDUP macro to libiberty

DJ Delorie dj@redhat.com
Sun Sep 16 18:08:00 GMT 2001


> Any thoughts on ASTRDUP vs STRDUPA? :-) The former follows libiberty's
> asprintf style, the latter follows glibc's strdupa style.

Neither makes it obvious what the macro does, but something like
STRDUP_ALLOCA is probably too long.

> +   const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
> +extern unsigned long libiberty_len;
> +unsigned long libiberty_len;

Shouldn't these be size_t ?



More information about the Gcc-patches mailing list