Mail Archives: djgpp-workers/1998/04/05/18:57:09
Hello again!
I wrote:
>
> 1) `mktemp()' looks for "ccaaaaaa.*" rather than for just
> "ccaaaaaa",
>
> 2) `gpc1.exe' creates a dummy "ccaaaaaa", so `mktemp()' will
> find it, or
>
> 3) `gpc1.exe' does something else (e.g. does not use `mktemp()')
> to ensure that all base names are unique.
Method (2) works, and it's not *too* clumsy /-:
8< ---- from `gpc.c' (essentially `gcc.c' from gcc-2.8.0) --------------
/* Choose directory for temp files. */
temp_filename = choose_temp_base ();
temp_filename_length = strlen (temp_filename);
#ifdef GPC
#ifdef __MSDOS__
/* Ensure that `temp_filename' is really unique by
* creating a dummy file of that name.
*/
{
FILE *kludge = fopen (temp_filename, "wc");
fclose (kludge);
record_temp_file (temp_filename, 1, 0);
}
#endif
#endif
/* Make a table of what switches there are (switches, n_switches).
Make a table of specified input files (infiles, n_infiles).
Decode switches that are handled locally. */
process_command (argc, argv);
- Raw text -