Browse Source

compiledict.c: change 'temp' to "${dict}temp" temporary file

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'
master
Sergei Trofimovich 3 years ago
parent
commit
ccb1c31ba3
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/libespeak-ng/compiledict.c

+ 3
- 1
src/libespeak-ng/compiledict.c View File

fclose(f_in); fclose(f_in);
return create_file_error_context(context, error, fname_out); 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; value = N_HASH_DICT;
Write4Bytes(f_out, value); Write4Bytes(f_out, value);

Loading…
Cancel
Save