[PATCH] Allow multiple dlltools to be run concurrently in the same directory
Hans-Peter Nilsson
hp@bitrange.com
Sat Jul 5 12:41:00 GMT 2003
On Fri, 4 Jul 2003, Christopher Faylor wrote:
> Index: dlltool.c
> +prefix_encode PARAMS ((char *start, unsigned code))
> {
> - if (!buf)
> - buf = malloc (strlen (tmp_prefix) + 17);
> - sprintf (buf, fmt, tmp_prefix);
> + static char alpha[] = "abcdefghijklmnopqrstuvwxyz";
> + static char buf[32];
> + char *p;
> + strcpy (buf, start);
> + p = strchr (buf, '\0');
> + do
> + *p++ = alpha[code % sizeof (alpha)];
> + while ((code /= sizeof (alpha)) != 0);
I guess you want (sizeof (alpha) - 1) or strlen (alpha) or else
it seems PID n*26 gets a short prefix.
brgds, H-P
More information about the Binutils
mailing list