Path: utzoo!attcan!uunet!mcvax!eutrc3!wswietse From: wswietse@eutrc3.UUCP (Wietse Venema) Newsgroups: comp.sources.bugs Subject: two patches for smail 2.5 (SYSV and uPORT) Keywords: smail,sysv,80*86 Message-ID: <240@eutrc3.UUCP> Date: 16 Jun 88 19:13:51 GMT Organization: Tech. Univ. Eindhoven, Neth. Lines: 107 Enclosed is a shar file wih two patches for smail 2.5. The first one (smail.patch) may be needed by System-V (not having sendmail) implementations in general. You can find out whether you need it by sending a mail message through smail to a non-existent local user. Smail will send the message back to the originator, including a copy of the standard error and standard output from the local-mail delivery program. If the diagnostic from the local-mail delivery program is garbled (the first part of the recipient's name is missing) you need the patch. The second one (uport.patch) is required in order to compile smail with the small memory model (8 kb stack) of Microport Unix 2.2. All the patch does is to move some large arrays from stack to static memory. #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh smail.patch <<'END_OF_smail.patch' XThe following patch for smail 2.5 prevents the local (SysV) mailer Xfrom clobbering its standard output with its standard error. X X Wietse Venema X X*** deliver.c- Fri Sep 25 14:44:51 1987 X--- deliver.c Sat Apr 23 17:02:14 1988 X*************** X*** 106,114 **** X (void) unlink(stderrfile); X (void) strcpy(stderrfile, "/tmp/stderrXXXXXX"); X (void) mktemp(stderrfile); X! (void) freopen(stderrfile, "w", stderr); X if(debug != YES) { X! (void) freopen(stderrfile, "w", stdout); X } X X *lend = *rend = *send = '\0'; X--- 106,114 ---- X (void) unlink(stderrfile); X (void) strcpy(stderrfile, "/tmp/stderrXXXXXX"); X (void) mktemp(stderrfile); X! (void) freopen(stderrfile, "a", stderr); X if(debug != YES) { X! (void) freopen(stderrfile, "a", stdout); X } X X *lend = *rend = *send = '\0'; END_OF_smail.patch if test 818 -ne `wc -c uport.patch <<'END_OF_uport.patch' X*** main.c.orig Fri Sep 25 14:44:57 1987 X--- main.c Fri Apr 22 21:48:48 1988 X*************** X*** 97,106 **** X int argc; X char *argv[]; X { X! char *hostv[MAXARGS]; /* UUCP neighbor */ X! char *userv[MAXARGS]; /* address given to host */ X! int costv[MAXARGS]; /* cost of resolved route */ X! enum eform formv[MAXARGS]; /* invalid, local, or uucp */ X char *p; X int c; X int printaddr = 0; /* or set by -A */ X--- 97,106 ---- X int argc; X char *argv[]; X { X! static char *hostv[MAXARGS]; /* UUCP neighbor */ X! static char *userv[MAXARGS]; /* address given to host */ X! static int costv[MAXARGS]; /* cost of resolved route */ X! static enum eform formv[MAXARGS]; /* invalid, local, or uucp */ X char *p; X int c; X int printaddr = 0; /* or set by -A */ END_OF_uport.patch if test 785 -ne `wc -c