X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=mts%2Fsmtp%2Fsmtp.c;h=025bb966c3516f7c5e653382d5680d42e7f6dfcb;hp=90b37a82572eacde30dee6fef39c3eb6e62a442a;hb=2da3024caea2be71550f9eabd2fbc08fefe29bb5;hpb=045b9601403a216c400642229f2b291f85f88f7d diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index 90b37a8..025bb96 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -9,10 +9,13 @@ #include "smtp.h" #include #include +#include #ifdef MPOP #include #endif + + /* * This module implements an interface to SendMail very similar * to the MMDF mm_(3) routines. The sm_() routines herein talk @@ -104,6 +107,8 @@ static int smail_brkany (char, char *); 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, @@ -125,11 +130,13 @@ 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') @@ -1004,16 +1011,17 @@ sm_wstream (char *buffer, int len) } -#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)