diff options
author | Roland McGrath <roland@redhat.com> | 1995-02-05 23:49:40 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1995-02-05 23:49:40 +0000 |
commit | 21a8ec0d722cf6248ec02307c924b52dc58fd9bf (patch) | |
tree | 05d65b468ef762f808d06233a10b50b75dccd7fe /main.c | |
parent | fecd9e661a02e8f1608398220a324aa7032cd0b6 (diff) | |
download | gunmake-21a8ec0d722cf6248ec02307c924b52dc58fd9bf.tar.gz |
(main) [! HAVE_MKTEMP]: Use tmpnam instead of mktemp.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |