From: Roland McGrath Date: Sun, 5 Feb 1995 23:49:40 +0000 (+0000) Subject: (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp. X-Git-Tag: 3.72.5~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21a8ec0d722cf6248ec02307c924b52dc58fd9bf;p=thirdparty%2Fmake.git (main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp. --- diff --git a/main.c b/main.c index de9b8339..1a76f5af 100644 --- a/main.c +++ b/main.c @@ -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)