fix the win32 side of pre-preocessing

This commit is contained in:
Bill Currie 2002-03-14 00:05:04 +00:00
parent 180c517771
commit b97ac96204

View file

@ -1048,8 +1048,12 @@ preprocess_file (const char *filename)
# ifdef _WIN32 # ifdef _WIN32
if (!options.save_temps) if (!options.save_temps)
mktemp (tempname->str); mktemp (tempname->str);
yyin = fopen (tempname->str, "wt");
fclose (yyin); {
FILE *tmp = fopen (tempname->str, "wt");
fclose (tmp);
}
{ {
int status = spawnvp (_P_WAIT, cpp_argv[0], (char **)cpp_argv); int status = spawnvp (_P_WAIT, cpp_argv[0], (char **)cpp_argv);
@ -1062,7 +1066,7 @@ preprocess_file (const char *filename)
} }
} }
yyin = fopen (tempname->str, "rt"); return fopen (tempname->str, "rt");
# else # else
if (!options.save_temps) if (!options.save_temps)
tempfd = mkstemp (tempname->str); tempfd = mkstemp (tempname->str);