use mkstemp on systems that have it
[mmh] / sbr / m_scratch.c
index 123a498..e29b10a 100644 (file)
@@ -15,7 +15,11 @@ m_scratch (char *file, char *template)
     static char buffer[BUFSIZ], tmpfil[BUFSIZ];
 
     snprintf (tmpfil, sizeof(tmpfil), "%sXXXXXX", template);
+#ifdef HAVE_MKSTEMP
+    mkstemp (tmpfil);
+#else
     mktemp (tmpfil);
+#endif
     if ((cp = r1bindex (file, '/')) == file)
        strncpy (buffer, tmpfil, sizeof(buffer));
     else