projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use mkstemp on systems that have it
[mmh]
/
mts
/
smtp
/
smtp.c
diff --git
a/mts/smtp/smtp.c
b/mts/smtp/smtp.c
index
f775638
..
773696b
100644
(file)
--- a/
mts/smtp/smtp.c
+++ b/
mts/smtp/smtp.c
@@
-9,6
+9,9
@@
#include "smtp.h"
#include <zotnet/mts/mts.h>
#include <signal.h>
#include "smtp.h"
#include <zotnet/mts/mts.h>
#include <signal.h>
+#ifdef MPOP
+#include <errno.h>
+#endif
/*
* This module implements an interface to SendMail very similar
/*
* This module implements an interface to SendMail very similar
@@
-71,10
+74,6
@@
static char *sm_moreply = "; ";
struct smtp sm_reply; /* global... */
struct smtp sm_reply; /* global... */
-#ifdef MPOP
-extern int errno;
-#endif
-
#define MAXEHLO 20
#define MAXEHLO 20
@@
-248,7
+247,11
@@
rclient (char *server, char *protocol, char *service)
if ((dp = strrchr(*ap, '/')) && *++dp == NULL)
*--dp = NULL;
snprintf (sm_tmpfil, sizeof(sm_tmpfil), "%s/smtpXXXXXX", *ap);
if ((dp = strrchr(*ap, '/')) && *++dp == NULL)
*--dp = NULL;
snprintf (sm_tmpfil, sizeof(sm_tmpfil), "%s/smtpXXXXXX", *ap);
+#ifdef HAVE_MKSTEMP
+ mkstemp (sm_tmpfil);
+#else
mktemp (sm_tmpfil);
mktemp (sm_tmpfil);
+#endif
if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) {
sm_ispool = 1;
if ((sd = creat (sm_tmpfil, 0600)) != NOTOK) {
sm_ispool = 1;