dllwrap, windres and dlltools use mktemp, which should be avoided

PR 29534
	* dllwrap.c: Replace uses of choose_temp_base() with
	make_temp_file().
	* dlltool.c: Likewise.
	* resrc.c: Likewise.
This commit is contained in:
Nick Clifton 2022-09-01 14:51:50 +01:00
parent 7b0d7ede79
commit f4492fb683
4 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2022-09-01 Nick Clifton <nickc@redhat.com>
PR 29534
* dllwrap.c: Replace uses of choose_temp_base() with
make_temp_file().
* dlltool.c: Likewise.
* resrc.c: Likewise.
2022-08-23 Nick Clifton <nickc@redhat.com>
PR 29489

View File

@ -1270,7 +1270,7 @@ run (const char *what, char *args)
int i;
const char **argv;
char *errmsg_fmt = NULL, *errmsg_arg = NULL;
char *temp_base = choose_temp_base ();
char *temp_base = make_temp_file ("");
inform (_("run: %s %s"), what, args);

View File

@ -351,7 +351,7 @@ run (const char *what, char *args)
int i;
const char **argv;
char *errmsg_fmt = NULL, *errmsg_arg = NULL;
char *temp_base = choose_temp_base ();
char *temp_base = make_temp_file (NULL);
int in_quote;
char sep;
@ -818,7 +818,7 @@ main (int argc, char **argv)
if (! def_file_seen)
{
char *fileprefix = choose_temp_base ();
char *fileprefix = make_temp_file (NULL);
def_file_name = (char *) xmalloc (strlen (fileprefix) + 5);
sprintf (def_file_name, "%s.def",
@ -1031,7 +1031,7 @@ Creating one, but that may not be what you want"));
if (! base_file_name)
{
char *fileprefix = choose_temp_base ();
char *fileprefix = make_temp_file (NULL);
base_file_name = (char *) xmalloc (strlen (fileprefix) + 6);
sprintf (base_file_name, "%s.base",
(dontdeltemps) ? mybasename (fileprefix) : fileprefix);

View File

@ -202,7 +202,7 @@ run_cmd (char *cmd, const char *redir)
int i;
const char **argv;
char *errmsg_fmt = NULL, *errmsg_arg = NULL;
char *temp_base = choose_temp_base ();
char *temp_base = make_temp_file (NULL);
int in_quote;
char sep;
int redir_handle = -1;
@ -316,7 +316,7 @@ open_input_stream (char *cmd)
{
char *fileprefix;
fileprefix = choose_temp_base ();
fileprefix = make_temp_file (NULL);
cpp_temp_file = (char *) xmalloc (strlen (fileprefix) + 5);
sprintf (cpp_temp_file, "%s.irc", fileprefix);
free (fileprefix);