diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/conf/makefiles/support/pop ./conf/makefiles/support/pop --- ../mh-6.8-dist/conf/makefiles/support/pop Sat Dec 25 16:57:49 1993 +++ ./conf/makefiles/support/pop Sat Jul 16 18:05:55 1994 @@ -110,7 +110,7 @@ -@ls -l $@ -@echo "" -popd: xpopd +popd: xpopd; xpopd: popd.o popser.o syslog.o \ ../../uip/dropsbr.o \ @@ -146,7 +146,7 @@ -@ls -l $@ -@echo "" -popaka: xpopaka +popaka: xpopaka; xpopaka: popaka.o $(LIBES1) $(LD) $(LDFLAGS) -o $@ popaka.o $(LDLIBS1) @@ -169,7 +169,7 @@ -@ls -l $@ -@echo "" -popauth: xpopauth +popauth: xpopauth; xpopauth: popauth.o $(LIBES1) $(LD) $(LDFLAGS) -o $@ popauth.o $(LDLIBS2) @@ -193,7 +193,7 @@ -@ls -l $@ -@echo "" -popwrd: xpopwrd +popwrd: xpopwrd; xpopwrd: popwrd.o $(LIBES1) $(LD) $(LDFLAGS) -o $@ popwrd.o $(LDLIBS1) @@ -214,7 +214,7 @@ -@ls -l $@ -@echo "" -smtpd: xsmtpd +smtpd: xsmtpd; xsmtpd: smtpd.o syslog.o $(LD) $(LDFLAGS) -o $@ smtpd.o syslog.o diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/conf/makefiles/uip ./conf/makefiles/uip --- ../mh-6.8-dist/conf/makefiles/uip Sat Dec 25 16:57:50 1993 +++ ./conf/makefiles/uip Sat Jul 16 18:05:55 1994 @@ -267,7 +267,7 @@ -@ls -l $@ -@echo "" -ali: xali +ali: xali; xali: ali.o aliasbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ ali.o aliasbr.o $(LDLIBS) @@ -284,7 +284,7 @@ -@ls -l $@ -@echo "" -anno: xanno +anno: xanno; xanno: anno.o annosbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ anno.o annosbr.o $(LDLIBS) @@ -301,7 +301,7 @@ -@ls -l $@ -@echo "" -ap: xap +ap: xap; xap: ap.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ ap.o trmsbr.o $(LDLIBS) $(LDCURSES) @@ -325,7 +325,7 @@ -@ls -l $(BINDIR)/bbc -@echo "" -bbc: xbbc +bbc: xbbc; xbbc: bbc.o $(PSHLIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ bbc.o $(PSHLIB) $(LDLIBS) @@ -352,7 +352,7 @@ -@ls -l $@ -@echo "" -bbl: xbbl +bbl: xbbl; xbbl: bbl.o $(LIBES) $(LD) $(LDFLAGS) -o $@ bbl.o $(LDLIBS) @@ -369,7 +369,7 @@ -@ls -l $@ -@echo "" -burst: xburst +burst: xburst; xburst: burst.o $(LIBES) $(LD) $(LDFLAGS) -o $@ burst.o $(LDLIBS) @@ -386,7 +386,7 @@ -@ls -l $@ -@echo "" -cipher: xcipher +cipher: xcipher; xcipher: cipher.o $(TMALIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ cipher.o $(TMALIB) $(LDLIBS) @@ -403,7 +403,7 @@ -@ls -l $(BINDIR)/comp -@echo "" -comp: xcomp +comp: xcomp; xcomp: comp.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -423,7 +423,7 @@ -@ls -l $@ -@echo "" -conflict: xconflict +conflict: xconflict; xconflict: conflict.o aliasbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ conflict.o aliasbr.o $(LDLIBS) @@ -440,7 +440,7 @@ -@ls -l $@ -@echo "" -decipher: xdecipher +decipher: xdecipher; xdecipher: decipher.o $(TMALIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ decipher.o $(TMALIB) $(LDLIBS) @@ -457,7 +457,7 @@ -@ls -l $@ -@echo "" -dist: xdist +dist: xdist; xdist: dist.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -477,7 +477,7 @@ -@ls -l $(ETCDIR)/dp -@echo "" -dp: xdp +dp: xdp; xdp: dp.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ dp.o trmsbr.o $(LDLIBS) $(LDCURSES) @@ -494,7 +494,7 @@ -@ls -l $@ -@echo "" -fmtdump: xfmtdump +fmtdump: xfmtdump; xfmtdump: fmtdump.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS) @@ -514,8 +514,8 @@ -@ls -l $@ -@echo "" -folders: folder -folder: xfolder +folders: folder; +folder: xfolder; xfolder: folder.o $(LIBES) $(LD) $(LDFLAGS) -o $@ folder.o $(LDLIBS) @@ -532,7 +532,7 @@ -@ls -l $@ -@echo "" -forw: xforw +forw: xforw; xforw: forw.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -563,7 +563,7 @@ -@ls -l $@ -@echo "" -inc: xinc +inc: xinc; xinc: inc.o scansbr.o dropsbr.o trmsbr.o \ $(POPLIB) $(TMALIB) $(LIBES) @@ -584,7 +584,7 @@ -@ls -l $@ -@echo "" -install-mh: xinstall-mh +install-mh: xinstall-mh; xinstall-mh: install-mh.o $(LIBES) $(LD) $(LDFLAGS) -o $@ install-mh.o $(LDLIBS) @@ -601,7 +601,7 @@ -@ls -l $@ -@echo "" -kdsc: xkdsc +kdsc: xkdsc; xkdsc: kdsc.o $(KDSLIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ kdsc.o $(KDSLIB) $(LDLIBS) @@ -618,7 +618,7 @@ -@ls -l $@ -@echo "" -mark: xmark +mark: xmark; xmark: mark.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mark.o $(LDLIBS) @@ -635,7 +635,7 @@ -@ls -l $@ -@echo "" -mhl: xmhl +mhl: xmhl; xmhl: mhl.o \ mhlsbr.o trmsbr.o $(LIBES) @@ -655,7 +655,7 @@ -@ls -l $@ -@echo "" -mhmail: xmhmail +mhmail: xmhmail; xmhmail: mhmail.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhmail.o $(LDLIBS) @@ -672,7 +672,7 @@ -@ls -l $@ -@echo "" -mhn: xmhn +mhn: xmhn; xmhn: mhn.o ftpsbr.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhn.o ftpsbr.o trmsbr.o \ @@ -690,7 +690,7 @@ -@ls -l $@ -@echo "" -mhparam: xmhparam +mhparam: xmhparam; xmhparam: mhparam.o trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhparam.o $(LDLIBS) $(LDCURSES) @@ -707,7 +707,7 @@ -@ls -l $@ -@echo "" -mhpath: xmhpath +mhpath: xmhpath; xmhpath: mhpath.o $(LIBES) $(LD) $(LDFLAGS) -o $@ mhpath.o $(LDLIBS) @@ -731,7 +731,7 @@ -@ls -l $@ -@echo "" -msgchk: xmsgchk +msgchk: xmsgchk; xmsgchk: msgchk.o $(POPLIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) \ @@ -749,7 +749,7 @@ -@ls -l $@ -@echo "" -msh: xmsh +msh: xmsh; xmsh: msh.o mshcmds.o vmhsbr.o \ picksbr.o scansbr.o dropsbr.o mhlsbr.o trmsbr.o \ @@ -772,7 +772,7 @@ -@ls -l $@ -@echo "" -packf: xpackf +packf: xpackf; xpackf: packf.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ packf.o dropsbr.o $(LDLIBS) @@ -789,7 +789,7 @@ -@ls -l $@ -@echo "" -pick: xpick +pick: xpick; xpick: pick.o picksbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ pick.o picksbr.o $(LDLIBS) @@ -806,7 +806,7 @@ -@ls -l $@ -@echo "" -popi: xpopi +popi: xpopi; xpopi: popi.o $(POPLIB) trmsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ popi.o $(POPLIB) trmsbr.o $(LDLIBS) \ @@ -831,7 +831,7 @@ -@ls -l $@ -@echo "" -post: xpost +post: xpost; xpost: post.o \ aliasbr.o $(MTSBRS) $(TMALIB) $(LIBES) @@ -851,7 +851,7 @@ -@ls -l $@ -@echo "" -prompter: xprompter +prompter: xprompter; xprompter: prompter.o $(LIBES) $(LD) $(LDFLAGS) -o $@ prompter.o $(LDLIBS) @@ -868,7 +868,7 @@ -@ls -l $@ -@echo "" -rcvdist: xrcvdist +rcvdist: xrcvdist; xrcvdist: rcvdist.o distsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rcvdist.o distsbr.o $(LDLIBS) @@ -885,7 +885,7 @@ -@ls -l $@ -@echo "" -rcvpack: xrcvpack +rcvpack: xrcvpack; xrcvpack: rcvpack.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rcvpack.o dropsbr.o $(LDLIBS) @@ -902,7 +902,7 @@ -@ls -l $@ -@echo "" -rcvstore: xrcvstore +rcvstore: xrcvstore; xrcvstore: rcvstore.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rcvstore.o $(LDLIBS) @@ -923,7 +923,7 @@ -@ls -l $@ -@echo "" -rcvtty: xrcvtty +rcvtty: xrcvtty; xrcvtty: rcvtty.o scansbr.o trmsbr.o \ @BEGIN: TTYD @@ -952,7 +952,7 @@ -@ls -l $@ -@echo "" -refile: xrefile +refile: xrefile; xrefile: refile.o $(LIBES) $(LD) $(LDFLAGS) -o $@ refile.o $(LDLIBS) @@ -969,7 +969,7 @@ -@ls -l $@ -@echo "" -repl: xrepl +repl: xrepl; xrepl: repl.o replsbr.o whatnowproc.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -992,7 +992,7 @@ -@ls -l $@ -@echo "" -rmail: xrmail +rmail: xrmail; xrmail: rmail.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rmail.o $(LDLIBS) @@ -1009,7 +1009,7 @@ -@ls -l $@ -@echo "" -rmf: xrmf +rmf: xrmf; xrmf: rmf.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rmf.o $(LDLIBS) @@ -1026,7 +1026,7 @@ -@ls -l $@ -@echo "" -rmm: xrmm +rmm: xrmm; xrmm: rmm.o $(LIBES) $(LD) $(LDFLAGS) -o $@ rmm.o $(LDLIBS) @@ -1043,7 +1043,7 @@ -@ls -l $@ -@echo "" -scan: xscan +scan: xscan; xscan: scan.o \ scansbr.o trmsbr.o $(LIBES) @@ -1063,7 +1063,7 @@ -@ls -l $@ -@echo "" -send: xsend +send: xsend; xsend: send.o \ sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -1089,9 +1089,9 @@ -@ls -l $@ -@echo "" -next: show -prev: show -show: xshow +next: show; +prev: show; +show: xshow; xshow: show.o \ mhlsbr.o trmsbr.o $(LIBES) @@ -1118,7 +1118,7 @@ -@ls -l $@ -@echo "" -sbboards: xsbboards +sbboards: xsbboards; xsbboards: sbboards.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ sbboards.o dropsbr.o $(LDLIBS) @@ -1135,7 +1135,7 @@ -@ls -l $@ -@echo "" -slocal: xslocal +slocal: xslocal; xslocal: slocal.o aliasbr.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ slocal.o aliasbr.o dropsbr.o $(LDLIBS) @@ -1152,7 +1152,7 @@ -@ls -l $@ -@echo "" -sortm: xsortm +sortm: xsortm; xsortm: sortm.o $(LIBES) $(LD) $(LDFLAGS) -o $@ sortm.o $(LDLIBS) @@ -1172,7 +1172,7 @@ -@ls -l $@ -@echo "" -spop: xspop +spop: xspop; xspop: spop.o dropsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ spop.o dropsbr.o $(LDLIBS) @@ -1193,7 +1193,7 @@ -@ls -l $@ -@echo "" -spost: xspost +spost: xspost; xspost: spost.o aliasbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ spost.o aliasbr.o $(LDLIBS) @@ -1213,7 +1213,7 @@ -@echo "Don't forget to: ln -s /usr/lib/sendmail $@" -@echo "" -sendmail: xsendmail +sendmail: xsendmail; xsendmail: sendmail.o $(LIBES) $(LD) $(LDFLAGS) -o $@ sendmail.o $(LDLIBS) @@ -1230,7 +1230,7 @@ -@ls -l $@ -@echo "" -tma: xtma +tma: xtma; xtma: tma.o $(TMALIB) $(LIBES) $(LD) $(LDFLAGS) -o $@ tma.o $(TMALIB) $(LDLIBS) @@ -1247,7 +1247,7 @@ -@ls -l $@ -@echo "" -umhook: xumhook +umhook: xumhook; xumhook: umhook.o $(LIBES) $(LD) $(LDFLAGS) -o $@ umhook.o $(LDLIBS) $(LDCURSES) @@ -1264,7 +1264,7 @@ -@ls -l $@ -@echo "" -vmh: xvmh +vmh: xvmh; xvmh: vmh.o vmhsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDCURSES) $(LDLIBS) @@ -1285,7 +1285,7 @@ -@ls -l $@ -@echo "" -whatnow: xwhatnow +whatnow: xwhatnow; xwhatnow: whatnow.o \ whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) @@ -1305,7 +1305,7 @@ -@ls -l $@ -@echo "" -whom: xwhom +whom: xwhom; xwhom: whom.o distsbr.o $(LIBES) $(LD) $(LDFLAGS) -o $@ whom.o distsbr.o $(LDLIBS) @@ -1322,7 +1322,7 @@ -@ls -l $@ -@echo "" -wmh: xwmh +wmh: xwmh; xwmh: wmh.o vmhsbr.o $(LIBES) ${CC} $(LDFLAGS) -o $@ wmh.o vmhsbr.o $(LDLIBS) \ diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/h/strings.h ./h/strings.h --- ../mh-6.8-dist/h/strings.h Sat Dec 25 16:57:50 1993 +++ ./h/strings.h Sat Jul 16 18:05:55 1994 @@ -63,7 +63,9 @@ #ifdef SYS5 #include #define bcmp(b1,b2,length) memcmp(b1, b2, length) +#if __GNUC__ != 2 #define bcopy(b1,b2,length) (void) memcpy (b2, b1, length) +#endif #define bcpy(b1,b2,length) memcmp (b1, b2, length) #define bzero(b,length) (void) memset (b, 0, length) #endif /* SYS5 */ diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/sbr/discard.c ./sbr/discard.c --- ../mh-6.8-dist/sbr/discard.c Sat Dec 25 16:57:51 1993 +++ ./sbr/discard.c Sat Jul 16 18:11:18 1994 @@ -49,7 +49,11 @@ #ifdef _FSTDIO fpurge (io); #else +#ifdef _STDIO_USES_IOSTREAM + io -> _IO_write_ptr = io -> _IO_write_base; +#else if (io -> _ptr = io -> _base) io -> _cnt = 0; #endif +#endif /* _STDIO_USES_IOSTREAM */ } diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/sbr/m_getfld.c ./sbr/m_getfld.c --- ../mh-6.8-dist/sbr/m_getfld.c Sat Dec 25 16:57:51 1993 +++ ./sbr/m_getfld.c Sat Jul 16 18:10:23 1994 @@ -244,22 +244,40 @@ */ cp = name; i = NAMESZ - 1; for (;;) { +#ifdef _STDIO_USES_IOSTREAM + bp = sp = (unsigned char *) iob->_IO_read_ptr - 1; + j = (cnt = ((long) iob->_IO_read_end - (long) iob->_IO_read_ptr) + 1) < i? + cnt: i; +#else bp = sp = (unsigned char *) iob->_ptr - 1; j = (cnt = iob->_cnt+1) < i ? cnt : i; +#endif while ((c = *bp++) != ':' && c != '\n' && --j >= 0) *cp++ = c; j = bp - sp; if ((cnt -= j) <= 0) { +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr = iob->_IO_read_end; + if (__underflow(iob) == EOF) { +#else if (_filbuf(iob) == EOF) { +#endif *cp = *buf = 0; advise (NULLCP, "eof encountered in field \"%s\"", name); return FMTERR; } +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr++; /* NOT automatic in __underflow()! */ +#endif } else { +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr = bp + 1; +#else iob->_ptr = bp + 1; iob->_cnt = cnt - 1; +#endif } if (c == ':') break; @@ -298,16 +316,27 @@ */ cp = buf; i = bufsz-1; for (;;) { +#ifdef _STDIO_USES_IOSTREAM + cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr; + bp = (unsigned char *) --iob->_IO_read_ptr; +#else cnt = iob->_cnt++; bp = (unsigned char *) --iob->_ptr; +#endif c = cnt < i ? cnt : i; while (ep = locc( c, bp, '\n' )) { /* * if we hit the end of this field, return. */ if ((j = *++ep) != ' ' && j != '\t') { +#ifdef _STDIO_USES_IOSTREAM + j = ep - (unsigned char *) iob->_IO_read_ptr; + (void) bcopy( iob->_IO_read_ptr, cp, j); + iob->_IO_read_ptr = ep; +#else j = ep - (unsigned char *) iob->_ptr; (void) bcopy( iob->_ptr, cp, j); iob->_ptr = ep; iob->_cnt -= j; +#endif cp += j; state = FLD; goto finish; @@ -317,12 +346,21 @@ /* * end of input or dest buffer - copy what we've found. */ +#ifdef _STDIO_USES_IOSTREAM + c += bp - (unsigned char *) iob->_IO_read_ptr; + (void) bcopy( iob->_IO_read_ptr, cp, c); +#else c += bp - (unsigned char *) iob->_ptr; (void) bcopy( iob->_ptr, cp, c); +#endif i -= c; cp += c; if (i <= 0) { /* the dest buffer is full */ +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr += c; +#else iob->_cnt -= c; iob->_ptr += c; +#endif state = FLDPLUS; break; } @@ -333,11 +371,22 @@ * this is the end of the field. Otherwise loop. */ --i; +#ifdef _STDIO_USES_IOSTREAM + *cp++ = j = *(iob->_IO_read_ptr + c); + iob->_IO_read_ptr = iob->_IO_read_end; + c = __underflow(iob); + iob->_IO_read_ptr++; /* NOT automatic! */ +#else *cp++ = j = *(iob->_ptr + c); c = _filbuf(iob); +#endif if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') { if (c != EOF) +#ifdef _STDIO_USES_IOSTREAM + --iob->_IO_read_ptr; +#else --iob->_ptr, ++iob->_cnt; +#endif state = FLD; break; } @@ -353,7 +402,12 @@ * the output buffer and we don't add an eos. */ i = (bufsz < 0) ? -bufsz : bufsz-1; +#ifdef _STDIO_USES_IOSTREAM + bp = (unsigned char *) --iob->_IO_read_ptr; + cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr; +#else bp = (unsigned char *) --iob->_ptr; cnt = ++iob->_cnt; +#endif c = (cnt < i ? cnt : i); if (msg_style != MS_DEFAULT && c > 1) { /* @@ -410,8 +464,12 @@ } } (void) bcopy( bp, buf, c ); +#ifdef _STDIO_USES_IOSTREAM + iob->_IO_read_ptr += c; +#else iob->_cnt -= c; iob->_ptr += c; +#endif if (bufsz < 0) { msg_count = c; return (state); diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/support/pop/popd.c ./support/pop/popd.c --- ../mh-6.8-dist/support/pop/popd.c Sat Dec 25 16:57:51 1993 +++ ./support/pop/popd.c Sat Jul 16 18:05:56 1994 @@ -61,8 +61,10 @@ #ifndef BSD44 extern int sys_nerr; extern char *sys_errlist[]; +#ifndef linux extern char *sys_siglist[]; #endif +#endif int debug = 0; @@ -193,6 +195,10 @@ #ifdef SIGCHLD (void) signal (SIGCHLD, chldser); #endif /* SIGCHLD */ +#ifdef linux +/* No limit on the number of connections? this seems wrong... */ +#define SOMAXCONN 5 +#endif (void) listen (sd, SOMAXCONN); #endif /* KPOP */ #ifdef FAST diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/inc.c ./uip/inc.c --- ../mh-6.8-dist/uip/inc.c Sat Dec 25 16:57:51 1993 +++ ./uip/inc.c Sat Jul 16 18:05:56 1994 @@ -384,17 +384,23 @@ /* */ -#ifdef MAILGROUP - return_gid = getegid(); /* Save effective gid, assuming we'll use it */ - setgid(getgid()); /* Turn off extraordinary privileges */ -#endif /* MAILGROUP */ - #ifdef POP if (host && !*host) host = NULL; if (from || !host || rpop <= 0) (void) setuid (getuid ()); #endif /* POP */ + +/* + * 93/12/17 bsa@kf8nh.wariat.org relocated: with MAILGROUP and POP both defined + * the setgid() call ran as root, and saved gid would be lost. If the setuid() + * call above then ran, inc would be unable to reestablish its setgid state. + */ +#ifdef MAILGROUP + return_gid = getegid(); /* Save effective gid, assuming we'll use it */ + setgid(getgid()); /* Turn off extraordinary privileges */ +#endif /* MAILGROUP */ + if (from) { newmail = from; #ifdef POP diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/popi.c ./uip/popi.c --- ../mh-6.8-dist/uip/popi.c Sat Dec 25 16:57:51 1993 +++ ./uip/popi.c Sat Jul 16 18:05:57 1994 @@ -558,7 +558,11 @@ static int dselect (d) +#ifdef SYS5DIR +register struct dirent *d; +#else register struct direct *d; +#endif { int i; @@ -571,8 +575,13 @@ static int dcompar (d1, d2) +#ifdef SYS5DIR +struct dirent **d1, + **d2; +#else struct direct **d1, **d2; +#endif { struct stat s1, s2; @@ -592,7 +601,11 @@ int n, retval, sm; +#ifdef SYS5DIR + struct dirent **namelist; +#else struct direct **namelist; +#endif if (chdir (bulksw) == NOTOK) adios (bulksw, "unable to change directory to"); @@ -602,7 +615,11 @@ sm = NOTOK; for (i = 0; i < n; i++) { +#ifdef SYS5DIR + register struct dirent *d = namelist[i]; +#else register struct direct *d = namelist[i]; +#endif if (sm == NOTOK) { if (rp_isbad (retval = sm_init (NULLCP, host, 1, 1, snoop))) @@ -630,13 +647,21 @@ register int j; int l, m; +#ifdef SYS5DIR + struct dirent **newlist; +#else struct direct **newlist; +#endif while ((l = scandir (".", &newlist, dselect, dcompar)) > OK) { m = 0; for (j = 0; j < l; j++) { +#ifdef SYS5DIR + register struct dirent *d = newlist[j]; +#else register struct direct *d = newlist[j]; +#endif for (i = 0; i < n; i++) if (strcmp (d -> d_name, namelist[i] -> d_name) == 0) diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/sbboards.c ./uip/sbboards.c --- ../mh-6.8-dist/uip/sbboards.c Sat Dec 25 16:57:51 1993 +++ ./uip/sbboards.c Sat Jul 16 18:05:57 1994 @@ -66,7 +66,10 @@ #ifdef LOCALE #include #endif - +#ifdef linux +/* FIXME - who should be doing this? With what option? */ +#include +#endif #define NBB 100 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/scansbr.c ./uip/scansbr.c --- ../mh-6.8-dist/uip/scansbr.c Sat Dec 25 16:57:51 1993 +++ ./uip/scansbr.c Sat Jul 16 18:10:56 1994 @@ -238,14 +238,25 @@ */ body: ; while (state == BODY) { +#ifdef _STDIO_USES_IOSTREAM + if (scnout->_IO_write_ptr == scnout->_IO_write_end) { +#else if (scnout->_cnt <= 0) { +#endif if (fflush(scnout) == EOF) adios (scnmsg, "write error on"); } +#ifdef _STDIO_USES_IOSTREAM + state = m_getfld(state, name, scnout->_IO_write_ptr, + (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end, + inb); + scnout->_IO_write_ptr += msg_count; +#else state = m_getfld( state, name, scnout->_ptr, -(scnout->_cnt), inb ); scnout->_cnt -= msg_count; scnout->_ptr += msg_count; +#endif } goto finished; diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/spop.c ./uip/spop.c --- ../mh-6.8-dist/uip/spop.c Sat Dec 25 16:57:51 1993 +++ ./uip/spop.c Sat Jul 16 18:05:57 1994 @@ -66,6 +66,10 @@ #ifdef LOCALE #include #endif +#ifdef linux +/* FIXME - who should be doing this? With what option? */ +#include +#endif #define NBB 100 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/vmh.c ./uip/vmh.c --- ../mh-6.8-dist/uip/vmh.c Sat Dec 25 16:57:52 1993 +++ ./uip/vmh.c Sat Jul 16 18:05:57 1994 @@ -11,8 +11,10 @@ * means "AT&T line discipline" (termio, not sgttyb), whereas terminfo * is quite a separate issue. */ +#ifndef linux #define TERMINFO 1 #endif +#endif /* TODO: Pass signals to client during execution @@ -175,6 +177,9 @@ #if !defined(SYS5) && !defined(BSD44) int _putchar (); #endif /* not SYS5 */ +#ifdef linux +static int _putchar (c) int c; { putchar (c); } +#endif #ifdef SIGTSTP char *tgoto (); #endif /* SIGTSTP */ diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/zotnet/mts/lock.c ./zotnet/mts/lock.c --- ../mh-6.8-dist/zotnet/mts/lock.c Sat Dec 25 16:57:52 1993 +++ ./zotnet/mts/lock.c Sat Jul 16 18:05:57 1994 @@ -29,7 +29,9 @@ #include #include #ifdef SVR4 +#ifndef linux #define LOCKF +#endif #include #endif #ifdef LOCKF