use mkstemp on systems that have it
[mmh] / sbr / m_tmpfil.c
index 1b4f354..31bce67 100644 (file)
@@ -14,7 +14,11 @@ m_tmpfil (char *template)
     static char tmpfil[BUFSIZ];
 
     snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template);
+#ifdef HAVE_MKSTEMP
+    unlink(mkstemp(tmpfil));
+#else
     unlink(mktemp(tmpfil));
+#endif
 
     return tmpfil;
 }