]> code.delx.au - gnu-emacs/commitdiff
(Fcall_process_region): Use HAVE_MKSTEMP.
authorDave Love <fx@gnu.org>
Tue, 7 Nov 2000 18:12:12 +0000 (18:12 +0000)
committerDave Love <fx@gnu.org>
Tue, 7 Nov 2000 18:12:12 +0000 (18:12 +0000)
src/callproc.c

index bf2fabcc75004e80b6674a5b695e395861d3b66f..9ba459f992ae5f9c28e6eac477c79ebbc89d5b20 100644 (file)
@@ -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);