#include "smtp.h"
#include <zotnet/mts/mts.h>
#include <signal.h>
+#include <h/signals.h>
#ifdef MPOP
#include <errno.h>
#endif
+
+
/*
* This module implements an interface to SendMail very similar
* to the MMDF mm_(3) routines. The sm_() routines herein talk
char **smail_copyip (char **, char **, int);
#endif
+/* from zotnet/mts/client.c */
+int client (char *, char *, char *, int, char *, int);
int
sm_init (char *client, char *server, int watch, int verbose,
if (sm_rfp != NULL && sm_wfp != NULL)
goto send_options;
- if (client == NULL || *client == '\0')
- if (clientname)
+ if (client == NULL || *client == '\0') {
+ if (clientname) {
client = clientname;
- else
+ } else {
client = LocalName(); /* no clientname -> LocalName */
+ }
+ }
#ifdef ZMAILER
if (client == NULL || *client == '\0')
}
-#ifdef _AIX
/*
- * AIX by default will inline the strlen and strcpy commands by redefining
- * them as __strlen and __strcpy respectively. This causes compile problems
- * with the #ifdef MPOP in the middle. Should the #ifdef MPOP be removed,
- * remove these #undefs.
+ * On some systems, strlen and strcpy are defined as preprocessor macros. This
+ * causes compile problems with the #ifdef MPOP in the middle. Should the
+ * #ifdef MPOP be removed, remove these #undefs.
*/
+#ifdef strlen
# undef strlen
+#endif
+#ifdef strcpy
# undef strcpy
-#endif /* _AIX */
+#endif
static int
sm_werror (void)