diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-28 20:07:32 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-28 20:07:32 +0000 |
commit | 1526a87c04c6c718746cffdd9d0221c49ed39d47 (patch) | |
tree | 090fc13e4457409b9fd5f4c8b2fe0006c1e8ba1e /gcc/gcc.c | |
parent | f9293c8c7f8379d9b203232f4eec438ea4350fef (diff) | |
download | gcc-1526a87c04c6c718746cffdd9d0221c49ed39d47.tar.gz |
* choose-temp.c (choose_temp_base): Restore original variant of
this function for compatibility.
(make_temp_file): This is the new, preferred interface to create
temporary files.
* collect2.c (choose_temp_base): Delete declaration.
(make_temp_file): Declare.
(temp_filename_length, temp_filename): Delete.
(main): Use make_temp_file to get temporary files. Use --lang-c
to force the resulting ctort/dtor file to be compiled with the C
compiler. Make sure to remove temporary files on all exit paths.
* gcc.c (make_temp_file): Provide prototype if MKTEMP_EACH_FILE is
defined.
(choose_temp_base): Only provide prototype if MKTEMP_EACH_FILE is
not defined.
(do_spec): Use make_temp_file if MKTEMP_EACH_FILE is defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20784 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index cc4af8e897a..09b03326a68 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -121,7 +121,6 @@ static char dir_separator_str[] = {DIR_SEPARATOR, 0}; #define GET_ENVIRONMENT(ENV_VALUE,ENV_NAME) ENV_VALUE = getenv (ENV_NAME) #endif -extern char *choose_temp_base PROTO((void)); extern char *my_strerror PROTO((int)); #ifndef HAVE_KILL @@ -1269,6 +1268,9 @@ static int argbuf_index; #define MKTEMP_EACH_FILE #ifdef MKTEMP_EACH_FILE + +extern char *make_temp_file PROTO((void)); + /* This is the list of suffixes and codes (%g/%u/%U) and the associated temp file. */ @@ -1280,8 +1282,11 @@ static struct temp_name { int filename_length; /* strlen (filename). */ struct temp_name *next; } *temp_names; +#else +extern char *choose_temp_base PROTO((void)); #endif + /* Number of commands executed so far. */ static int execution_count; @@ -3512,7 +3517,7 @@ do_spec_1 (spec, inswitch, soft_matched_part) t->length = p - suffix; t->suffix = save_string (suffix, p - suffix); t->unique = (c != 'g'); - temp_filename = choose_temp_base (); + temp_filename = make_temp_file (); temp_filename_length = strlen (temp_filename); t->filename = temp_filename; t->filename_length = temp_filename_length; |