Patches for uucleanmail under SCO Xenix

The Beach Bum jfh at rpp386.Dallas.TX.US
Sun Sep 18 03:21:16 AEST 1988


Enclosed are a collection of patches for Rick Adams' uumailclean
stale-mail-bouncing program.  These patches allow you to compile
uumailclean on SCO Xenix.

The patches have several purposes.  The first is to set the
configuration switches for a System V-like system.  The second is
to remove the dependence on /usr/lib/sendmail and replace that
with /bin/mail.  The third fixes a genuine bug involving HASSUBDIRS
not conditionally controlling inclusion of Dsubfile().

There are also patches to the Makefile for the Xenix libraries
and options to control compilation under SCO Xenix 286 and 386.

As usual, the original sharchive and these patches are available
by anonymous uucp.  The file names are

/usr/archive/uumailclean/uumc.shar.Z
/usr/archive/uumailclean/uumc.pat.Z

on rpp386.  Instructions for using anonymous UUCP can be found in
back issues of comp.sources.d.

Enjoy -
- John.
--
*** orig/uumailclean.c
--- uumailclean.c
**************
*** 18,27
  #include <sys/stat.h>
  #include <ctype.h>
  
! #define BSD4_2			/**/
! /* #define USG	/* */
! /* #define NDIR	/* */
! #define HASSUBDIRS		/**/
  
  #ifdef	BSD4_2
  #include <sys/dir.h>
--- 18,27 -----
  #include <sys/stat.h>
  #include <ctype.h>
  
! /* #define BSD4_2		/**/
! #define USG	/* */
! #define NDIR	/* */
! /* #define HASSUBDIRS		/**/
  
  #ifdef	BSD4_2
  #include <sys/dir.h>
**************
*** 47,53
  #define DEBUG(level, format, param) if (Debug >= level) fprintf(stderr, format, param); else
  
  #ifndef SENDMAIL
! #define SENDMAIL   "/usr/lib/sendmail"
  #endif	/* !SENDMAIL */
  #define BLKSIZE    ((BUFSIZ/FILENAMELEN) - 1)
  
--- 47,53 -----
  #define DEBUG(level, format, param) if (Debug >= level) fprintf(stderr, format, param); else
  
  #ifndef SENDMAIL
! #define SENDMAIL   "/bin/mail"
  #endif	/* !SENDMAIL */
  #define BLKSIZE    ((BUFSIZ/FILENAMELEN) - 1)
  
**************
*** 229,235
  	strcpy(host, &cmdfile[2]);
  	host[strlen(cmdfile) - SYSNSIZE] = '\0';
  
! 	sprintf(cmd, "%s -t", SENDMAIL);
  	DEBUG(1, "Failed: From: %s\n\tTo:", from);
  	if (nflag) {
  		out = stdout;
--- 229,235 -----
  	strcpy(host, &cmdfile[2]);
  	host[strlen(cmdfile) - SYSNSIZE] = '\0';
  
! 	sprintf(cmd, "%s %s", SENDMAIL, from);
  	DEBUG(1, "Failed: From: %s\n\tTo:", from);
  	if (nflag) {
  		out = stdout;
**************
*** 298,304
  	strcpy(host, &cmdfile[2]);
  	host[strlen(cmdfile) - SYSNSIZE] = '\0';
  
! 	sprintf(cmd, "%s -t", SENDMAIL);
  	DEBUG(1, "Warning: From: %s\n\tTo:", from);
  	if (nflag) {
  		out = stdout;
--- 298,304 -----
  	strcpy(host, &cmdfile[2]);
  	host[strlen(cmdfile) - SYSNSIZE] = '\0';
  
! 	sprintf(cmd, "%s %s", SENDMAIL, from);
  	DEBUG(1, "Warning: From: %s\n\tTo:", from);
  	if (nflag) {
  		out = stdout;
**************
*** 700,705
  	0
  };
  
  /*
   * return (possibly) remapped string s 
   */
--- 700,706 -----
  	0
  };
  
+ #ifdef	HASSUBDIRS
  /*
   * return (possibly) remapped string s 
   */
**************
*** 735,737
  	}
  	return as;
  }
--- 736,739 -----
  	}
  	return as;
  }
+ #endif	/* HASSUBDIRS */

*** orig/Makefile
--- Makefile
**************
*** 1,4
! 
  CFLAGS=-O
  
  uumailclean: uumailclean.c
--- 1,16 -----
! #
! # Makefile for uumailclean
! #
! #	091788 - Hacked on to added SCO Xenix support - jfh at rpp386
! #
! SHELL = /bin/sh
! BINDIR = /usr/lib/uucp
! MANDIR = /usr/man/man8
! # 286 flags
! # CFLAGS=-Ox -M2s -g
! # 386 flags
! # CFLAGS=-Ox -M3s -g
! # Normal Machine flags
  CFLAGS=-O
  # Libraries
  LIBS=-lx
**************
*** 1,5
  
  CFLAGS=-O
  
  uumailclean: uumailclean.c
  	cc $(CFLAGS) -o uumailclean uumailclean.c
--- 12,19 -----
  # CFLAGS=-Ox -M3s -g
  # Normal Machine flags
  CFLAGS=-O
+ # Libraries
+ LIBS=-lx
  
  uumailclean: uumailclean.o
  	cc $(CFLAGS) -o uumailclean uumailclean.o $(LIBS)
**************
*** 1,8
  
  CFLAGS=-O
  
! uumailclean: uumailclean.c
! 	cc $(CFLAGS) -o uumailclean uumailclean.c
  
  install: uumailclean uumailclean.8c
  	install -s uumailclean /usr/lib/uucp
--- 15,22 -----
  # Libraries
  LIBS=-lx
  
! uumailclean: uumailclean.o
! 	cc $(CFLAGS) -o uumailclean uumailclean.o $(LIBS)
  
  install: uumailclean uumailclean.8c
  	cp uumailclean $(BINDIR)
**************
*** 5,11
  	cc $(CFLAGS) -o uumailclean uumailclean.c
  
  install: uumailclean uumailclean.8c
! 	install -s uumailclean /usr/lib/uucp
! 	install -c uumailclean.8c /usr/man/man8
  clean:
  	-rm -f core uumailclean *.o errs
--- 19,33 -----
  	cc $(CFLAGS) -o uumailclean uumailclean.o $(LIBS)
  
  install: uumailclean uumailclean.8c
! 	cp uumailclean $(BINDIR)
! 	chown uucp $(BINDIR)/uumailclean
! 	chgrp uucp $(BINDIR)/uumailclean
! 	chmod 4710 $(BINDIR)/uumailclean
! 	cp uumailclean.8c $(MANDIR)
! 	chown bin $(MANDIR)/uumailclean.8c
! 	chgrp bin $(MANDIR)/uumailclean.8c
! 	chmod 644 $(MANDIR)/uumailclean.8c
! 
  clean:
  	-rm -f core *.o
  
**************
*** 8,11
  	install -s uumailclean /usr/lib/uucp
  	install -c uumailclean.8c /usr/man/man8
  clean:
! 	-rm -f core uumailclean *.o errs
--- 29,38 -----
  	chmod 644 $(MANDIR)/uumailclean.8c
  
  clean:
! 	-rm -f core *.o
! 
! clobber: clean
! 	-rm -f uumailclean
! 
! shar:	uumailclean.c uumailclean.8c Makefile
! 	shar uumailclean.8c Makefile uumailclean.c > uumail.shar
-- 
John F. Haugh II (jfh at rpp386.Dallas.TX.US)                   HASA, "S" Division

    "If the code and the comments disagree, then both are probably wrong."
                -- Norm Schryer



More information about the Comp.sources.bugs mailing list