[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems building Zmailer
Here are the diffs:
*** zmailer.orig/libsh/execute.c Sun Sep 18 13:08:11 1994
--- zmailer.bsdi/libsh/execute.c Thu Oct 20 14:06:31 1994
***************
*** 3,8 ****
--- 3,14 ----
* This will be free software, but only when it is finished.
*/
+ #include "mailer.h"
+ #include <ctype.h>
+ #include <signal.h>
+ #include <fcntl.h>
+ #include <sys/file.h>
+
#define static
#define register
#define RUNIO(X) (/*fprintf(runiofp, "runio(%s,%d)\n", __FILE__, __LINE__), */runio(&X))
***************
*** 10,21 ****
/*
* Runtime execution and I/O control.
*/
-
- #include "mailer.h"
- #include <ctype.h>
- #include <signal.h>
- #include <fcntl.h>
- #include <sys/file.h>
#include "interpret.h"
#include "io.h"
--- 16,21 ----
diff -rc zmailer.orig/libsh/interpret.c zmailer.bsdi/libsh/interpret.c
*** zmailer.orig/libsh/interpret.c Sun Sep 18 12:32:13 1994
--- zmailer.bsdi/libsh/interpret.c Thu Oct 20 14:06:18 1994
***************
*** 3,8 ****
--- 3,13 ----
* This will be free software, but only when it is finished.
*/
+ #include "mailer.h"
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <sys/file.h>
+
#define static
#define register
#define RUNIO(X) (/*fprintf(runiofp, "runio(%s,%d)\n", __FILE__, __LINE__), */runio(&X))
***************
*** 11,20 ****
* Runtime interpreter for the shell pseudo-code.
*/
- #include "mailer.h"
- #include <ctype.h>
- #include <fcntl.h>
- #include <sys/file.h>
#include "interpret.h"
#include "io.h"
#include "shconfig.h"
--- 16,21 ----
diff -rc zmailer.orig/libsh/io.c zmailer.bsdi/libsh/io.c
*** zmailer.orig/libsh/io.c Sat Jun 25 19:56:40 1994
--- zmailer.bsdi/libsh/io.c Thu Oct 20 14:00:32 1994
***************
*** 20,26 ****
--- 20,28 ----
extern int cvt();
extern double modf();
extern char *exponent(), *round();
+ #ifndef __STDC__
extern int printf();
+ #endif
struct siobuf *siofds[MAXNFILE]; /* string buffers */
diff -rc zmailer.orig/scheduler/msgerror.c zmailer.bsdi/scheduler/msgerror.c
*** zmailer.orig/scheduler/msgerror.c Wed Sep 21 11:26:01 1994
--- zmailer.bsdi/scheduler/msgerror.c Thu Oct 20 14:08:06 1994
***************
*** 18,24 ****
extern struct ctlfile *slurp();
extern char *mailshare, *progname;
! extern int lockaddr();
extern char *strchr();
extern char *strnsave();
--- 18,24 ----
extern struct ctlfile *slurp();
extern char *mailshare, *progname;
! /*extern int lockaddr();*/
extern char *strchr();
extern char *strnsave();
diff -rc zmailer.orig/smtpserver/smtpserver.c zmailer.bsdi/smtpserver/smtpserver.c
*** zmailer.orig/smtpserver/smtpserver.c Wed Sep 21 10:22:58 1994
--- zmailer.bsdi/smtpserver/smtpserver.c Thu Oct 20 14:01:09 1994
***************
*** 65,73 ****
--- 65,80 ----
# define STATFSTYPE struct statfs
# define FSTATFS statfs
#else /* !ULTRIX */
+ #ifdef bsdi
+ # include <sys/types.h>
+ # include <sys/mount.h>
+ # define FSTATFS fstatfs
+ # define STATFSTYPE struct statfs
+ #else /* !bsdi */
# include <sys/vfs.h>
/*# define FSTATFS fstatfs*/
# define STATFSTYPE struct statfs
+ #endif /* !bsdi */
#endif /* !ULTRIX */
#endif /* !SYSV */
#endif /* !USE_STATVFS */
***************
*** 812,826 ****
availspace = statbuf.f_bavail * statbuf.f_bsize;
}
#else
#if defined(FSTATFS)
if ((rc = FSTATFS(fileno(mfp), &statbuf)) == 0) {
availspace = statbuf.f_bavail * statbuf.f_frsize;
}
! #else /* no __linux__, no FSTATFS */
if ((rc = fstatfs(fileno(mfp),
&statbuf,sizeof statbuf,0)) == 0){
availspace = statbuf.f_bfree * statbuf.f_bsize;
}
#endif
#endif
if (availspace < 0)
--- 819,839 ----
availspace = statbuf.f_bavail * statbuf.f_bsize;
}
#else
+ #if defined(bsdi)
+ if ((rc = FSTATFS(fileno(mfp), &statbuf)) == 0) {
+ availspace = statbuf.f_bfree * statbuf.f_bsize;
+ }
+ #else /* no __linux__, no bsdi */
#if defined(FSTATFS)
if ((rc = FSTATFS(fileno(mfp), &statbuf)) == 0) {
availspace = statbuf.f_bavail * statbuf.f_frsize;
}
! #else /* no __linux__, no FSTATFS, no bsdi */
if ((rc = fstatfs(fileno(mfp),
&statbuf,sizeof statbuf,0)) == 0){
availspace = statbuf.f_bfree * statbuf.f_bsize;
}
+ #endif
#endif
#endif
if (availspace < 0)
diff -rc zmailer.orig/transports/sm/sm.c zmailer.bsdi/transports/sm/sm.c
*** zmailer.orig/transports/sm/sm.c Mon Sep 26 00:15:24 1994
--- zmailer.bsdi/transports/sm/sm.c Thu Oct 20 14:01:22 1994
***************
*** 838,844 ****
/* we are assumed to be positioned properly at start of message body */
bufferfull = 0;
! mfd_pos = tell(mfd);
while ((i = read(mfd, let_buffer, sizeof let_buffer)) != 0) {
if (i < 0) {
--- 838,844 ----
/* we are assumed to be positioned properly at start of message body */
bufferfull = 0;
! mfd_pos = lseek(mfd, 0L, SEEK_CUR);
while ((i = read(mfd, let_buffer, sizeof let_buffer)) != 0) {
if (i < 0) {
diff -rc zmailer.orig/transports/smtp/smtp.c zmailer.bsdi/transports/smtp/smtp.c
*** zmailer.orig/transports/smtp/smtp.c Wed Sep 21 11:48:18 1994
--- zmailer.bsdi/transports/smtp/smtp.c Thu Oct 20 14:01:28 1994
***************
*** 2194,2200 ****
/* we are assumed to be positioned properly at start of message body */
bufferfull = 0;
! mfd_pos = tell(mfd);
while ((i = read(mfd, let_buffer, sizeof let_buffer)) != 0) {
if (i < 0) {
--- 2194,2200 ----
/* we are assumed to be positioned properly at start of message body */
bufferfull = 0;
! mfd_pos = lseek(mfd, 0L, SEEK_CUR);
while ((i = read(mfd, let_buffer, sizeof let_buffer)) != 0) {
if (i < 0) {
*** Makefile.in.orig Thu Oct 20 18:51:50 1994
--- Makefile.in Thu Oct 20 18:52:04 1994
***************
*** 14,20 ****
LIBDEB= ../../lib/libz.a-a ../../libc/libzc.a-a
CFLAGS= $(COPTS) $(DEFS) $(INCL) $(SENDMAIL_INCL)
MAKE= make
! USRLIB= /usr/lib
sendmail-a: $(LIBDEB) sendmail
--- 14,20 ----
LIBDEB= ../../lib/libz.a-a ../../libc/libzc.a-a
CFLAGS= $(COPTS) $(DEFS) $(INCL) $(SENDMAIL_INCL)
MAKE= make
! USRLIB= /usr/sbin
sendmail-a: $(LIBDEB) sendmail
*** functions.c.orig Fri Oct 21 01:09:51 1994
--- functions.c Fri Oct 21 01:16:38 1994
***************
*** 837,843 ****
--- 837,848 ----
*/
/* We ASSUME that seekdir(fd,0L) is the proper thing
to do. */
+ #ifndef bsdi
seekdir(dirp[i], 0L); /* essentially a REWIND().. */
+ #else
+ closedir(dirp[i]);
+ dirp[i] = opendir(dirs[i]);
+ #endif
if (stability)
did_cnt = rd_stability(dirp[i],dirs[i]);