Skip to content

Commit

Permalink
compiledict.c: change 'temp' to "${dict}temp" temporary file
Browse files Browse the repository at this point in the history
This way we can compile multiple dictionaries at a time without
stepping on 'temp' file from different compilation steps:

    $ make -j8 -B
    ...
    make[1]: *** [Makefile:3082: espeak-ng-data/an_dict] Segmentation fault (core dumped)
    make[1]: *** Deleting file 'espeak-ng-data/an_dict'
    make[1]: *** [Makefile:3082: espeak-ng-data/az_dict] Segmentation fault (core dumped)
    make[1]: *** Deleting file 'espeak-ng-data/az_dict'
  • Loading branch information
trofi committed Nov 7, 2021
1 parent 569e1e9 commit ccb1c31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libespeak-ng/compiledict.c
Expand Up @@ -1558,7 +1558,9 @@ ESPEAK_NG_API espeak_ng_STATUS espeak_ng_CompileDictionary(const char *dsource,
fclose(f_in);
return create_file_error_context(context, error, fname_out);
}
sprintf(fname_temp, "%s%ctemp", path_home, PATHSEP);
/* Use dictionary-specific temp names to allow parallel compilation
* of multiple ductionaries. */
sprintf(fname_temp, "%s%c%stemp", path_home, PATHSEP, dict_name);

value = N_HASH_DICT;
Write4Bytes(f_out, value);
Expand Down

0 comments on commit ccb1c31

Please sign in to comment.