mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
re2c: Use tmpfile instead of fixed temporary filename.
This could cause a race condition when running parallel make. Tracked down by Volker Braun. [#238 state:resolved] [#165 state:resolved]
This commit is contained in:
parent
cc4657a134
commit
2bd66514b6
1 changed files with 1 additions and 2 deletions
|
|
@ -844,14 +844,13 @@ void DFA_emit(DFA *d, FILE *o){
|
|||
nOrgOline = oline;
|
||||
maxFillIndexes = vFillIndexes;
|
||||
orgVFillIndexes = vFillIndexes;
|
||||
tmpo = fopen("re2c.tmp", "wt");
|
||||
tmpo = tmpfile();
|
||||
for(s = d->head; s; s = s->next){
|
||||
int readCh = 0;
|
||||
State_emit(s, tmpo, &readCh);
|
||||
Go_genGoto(&s->go, tmpo, s, s->next, &readCh);
|
||||
}
|
||||
fclose(tmpo);
|
||||
remove("re2c.tmp");
|
||||
maxFillIndexes = vFillIndexes;
|
||||
vFillIndexes = orgVFillIndexes;
|
||||
oline = nOrgOline;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue