This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Allow multiple dlltools to be run concurrently in thesame directory
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Christopher Faylor <cgf at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Sat, 5 Jul 2003 08:41:52 -0400 (EDT)
- Subject: Re: [PATCH] Allow multiple dlltools to be run concurrently in thesame directory
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