[RFA] pei386 dll: auto-import patch

DJ Delorie dj@delorie.com
Wed Aug 1 23:10:00 GMT 2001


> no, this saves execution time rather than calling strlen OVER and OVER
> on the same constant strings.  We could compute it once and then cache
> those values, but geez, that's ugly.

Ok, never mind then.

> Is printf ("%s\n", __FUNCTION__); okay ?  If so, done.

Yup.

>    ret = snprintf (fixup_name, buffer_len, "__fu%d_%s",
>                    counter++, sym->name);

Sorry, can't use snprintf.  Use strlen every time (figure 20 for the
counter) and compare to the max length.  Round up to a multiple of 100
to reduce heap fragmentation.  Then use regular sprintf.



More information about the Cygwin-apps mailing list