(main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.

This commit is contained in:
Roland McGrath 1995-02-05 23:49:40 +00:00
parent fecd9e661a
commit 21a8ec0d72

7
main.c
View file

@ -700,11 +700,16 @@ main (argc, argv, envp)
/* This makefile is standard input. Since we may re-exec
and thus re-read the makefiles, we read standard input
into a temporary file and read from that. */
static char name[] = "/tmp/GmXXXXXX";
FILE *outfile;
/* Make a unique filename. */
#ifdef HAVE_MKTEMP
static char name[] = "/tmp/GmXXXXXX";
(void) mktemp (name);
#else
static char name[L_tmpnam];
(void) tmpnam ();
#endif
outfile = fopen (name, "w");
if (outfile == 0)