X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/03695acef74e736c8d6538c56d39d535008fd72d..cd2904bd2c06864bc02f3e454caccdeb3f0e03f2:/src/callproc.c diff --git a/src/callproc.c b/src/callproc.c index bf2fabcc75..9ba459f992 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -967,7 +967,18 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you quit again.") coding_systems = Qt; +#ifdef HAVE_MKSTEMP + { + int fd = mkstemp (tempfile); + if (fd == -1) + report_file_error ("Failed to open temporary file", + Fcons (Vtemp_file_name_pattern, Qnil)); + else + close (fd); + } +#else mktemp (tempfile); +#endif filename_string = build_string (tempfile); GCPRO1 (filename_string);