mirror of
https://github.com/cc65/cc65.git
synced 2025-01-12 02:30:44 +00:00
ar65: fix parallel builds by using a per-process temp file
This commit is contained in:
parent
b02838439c
commit
d3c495e8b9
@ -249,9 +249,10 @@ void LibOpen (const char* Name, int MustExist, int NeedTemp)
|
|||||||
if (NeedTemp) {
|
if (NeedTemp) {
|
||||||
|
|
||||||
/* Create the temporary library name */
|
/* Create the temporary library name */
|
||||||
NewLibName = xmalloc (strlen (Name) + strlen (".temp") + 1);
|
NewLibName = xmalloc (strlen (Name) + strlen (".temp-") + 8 + 1);
|
||||||
strcpy (NewLibName, Name);
|
strcpy (NewLibName, Name);
|
||||||
strcat (NewLibName, ".temp");
|
strcat (NewLibName, ".temp-");
|
||||||
|
sprintf (NewLibName + strlen (NewLibName), "%X", (unsigned int)getpid());
|
||||||
|
|
||||||
/* Create the temporary library */
|
/* Create the temporary library */
|
||||||
NewLib = fopen (NewLibName, "w+b");
|
NewLib = fopen (NewLibName, "w+b");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user