[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No Subject
Hello,
I do intend to keep 2.99.41 under wrappers for a while,
but here are fixes that I found rather vital for survival
at vger.rutgers.edu (SunOS 4.1.4/GCC 2.6.3, mixed up
includes, etc..) with 2.99.40, as I got to test it a bit.
The most important crasher was the first patch below.
I plan to spend time on the verification of DSN, and filling
in some odd corners so far open in its implementation.
("open" = "will not generate desired report")
/Matti Aarnio <mea@nic.funet.fi>
diff -u -r zmailer-2.99.40/libc/mail.c zmailer-2.99.41/libc/mail.c
--- zmailer-2.99.40/libc/mail.c Thu Oct 31 16:35:17 1996
+++ zmailer-2.99.41/libc/mail.c Mon Nov 4 14:46:14 1996
@@ -239,12 +239,12 @@
/* Extend when need! */
- if (FILENO(fp) > mail_nfiles) {
+ if (FILENO(fp) >= mail_nfiles) {
int nfile = FILENO(fp)+1;
if (mail_file == NULL) {
mail_file = (char**)mail_alloc((u_int)(sizeof(char*) * nfile));
} else {
- mail_file = (char**)mail_realloc((u_int)(mail_file,sizeof(char*) * nfile));
+ mail_file = (char**)mail_realloc(mail_file,(sizeof(char*) * nfile));
}
while (mail_nfiles < nfile) {
mail_file[mail_nfiles] = NULL;
diff -u -r zmailer-2.99.40/libc/syslog.c zmailer-2.99.41/libc/syslog.c
--- zmailer-2.99.40/libc/syslog.c Fri Nov 1 15:32:30 1996
+++ zmailer-2.99.41/libc/syslog.c Mon Nov 4 22:34:27 1996
@@ -41,17 +41,21 @@
* Modified to use UNIX domain IPC by Ralph Campbell
*/
+#include <stdio.h>
+#include "hostenv.h"
#include <sys/types.h>
#include <sys/socket.h>
+#include <fcntl.h>
#include <sys/file.h>
#include "syslog.h"
-#include <sys/uio.h>
+#ifdef HAVE_WRITEV
+# include <sys/uio.h>
+#endif
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#else
# include <varargs.h>
#endif
-#include <stdio.h>
#ifndef _PATH_LOGNAME
/* if you are running an old syslog, change /dev/log to the same as it
@@ -137,6 +141,7 @@
cnt = strlen(tbuf);
/* output to stderr if requested */
+#ifdef HAVE_WRITEV
if (LogStat & LOG_PERROR) {
struct iovec iov[2];
register struct iovec *v = iov;
@@ -148,7 +153,7 @@
v->iov_len = 1;
(void)writev(2, iov, 2);
}
-
+#endif
/* output the message to the local logger */
if (send(LogFile, tbuf, cnt, 0) >= 0 || !(LogStat&LOG_CONS))
return;
diff -u -r zmailer-2.99.40/libsh/io.c zmailer-2.99.41/libsh/io.c
--- zmailer-2.99.40/libsh/io.c Tue Oct 29 18:02:09 1996
+++ zmailer-2.99.41/libsh/io.c Sun Nov 3 02:07:48 1996
@@ -58,7 +58,10 @@
#endif
int (*std_printf) __((char *fmt, ...)) = (int(*)__((char *, ...)))printf;
#else
-int (*std_printf) __((/*char *fmt, ...*/)) = (int (*) __((/* char *fmt, ... */)))printf;
+#if (defined(__GNUC__) && defined(sun) && !defined(__svr4__))
+extern int printf __((char *fmt, ...));
+#endif
+int (*std_printf) __((char *fmt, ...)) = (int (*) __((char *fmt, ...)))printf;
#endif
int std_fread(b,s,n,fp) char *b; int s, n; FILE *fp;{ return fread(b,s,n,fp); }
diff -u -r zmailer-2.99.40/smtpserver/smtpserver.c zmailer-2.99.41/smtpserver/smtpserver.c
--- zmailer-2.99.40/smtpserver/smtpserver.c Fri Nov 1 17:31:10 1996
+++ zmailer-2.99.41/smtpserver/smtpserver.c Sun Nov 3 02:05:15 1996
@@ -2591,9 +2591,9 @@
#else
/* VARARGS2 */
void
-type(code, fmt, va_alist)
+type(code, status, fmt, va_alist)
int code;
- char *fmt;
+ char *status, *fmt;
va_dcl
#endif
#else /* No VPRINTF */