Newsgroups: comp.sources.misc From: ron@mlfarm (Ronald Florence) Subject: v24i020: bsnews - Bootstrap News v2.1, Patch01 Message-ID: <1991Oct26.214956.4752@sparky.imd.sterling.com> X-Md4-Signature: ce0f356784bb05d4722b596dbe575469 Date: Sat, 26 Oct 1991 21:49:56 GMT Approved: kent@sparky.imd.sterling.com Submitted-by: ron@mlfarm (Ronald Florence) Posting-number: Volume 24, Issue 20 Archive-name: bsnews/patch01 Environment: SunOS, Xenix, SYSV, MS-DOS, Amiga, Atari, Coherent Patch-To: bsnews: Volume 22, Issue 106 This patch fixes some minor problems with the configuration and compilation of bsnews on older systems, including pre-SCO Xenix, and a possible problem with rnews dumping cores or producing segmentation violations. Do `| patch -d bsnews-source-directory' to install the patch from a newsreader. To rebuild bsnews, do `make clean', then follow the directions in the Readme. Ronald Florence ron@mlfarm.com *** Makefile.old Sun Sep 15 09:15:45 1991 --- Makefile Wed Oct 9 00:12:40 1991 *************** *** 1,6 **** # Makefile for bsnews # copyright 1991 Ronald Florence ! # @(#) version 2.1 (ron@mlfarm.com, 15 Sep 1991) # ----- For Unix systems, edit the following defines, as needed. ----- --- 1,6 ---- # Makefile for bsnews # copyright 1991 Ronald Florence ! # @(#) version 2.11 (ron@mlfarm.com, 4 Oct 1991) # ----- For Unix systems, edit the following defines, as needed. ----- *************** *** 61,67 **** chmod 544 expire chmod 555 readnews pn checknews chmod 6555 rnews uurec ! cp config $(NEWSLIB) mv $(PGMS) $(BINDIR) mv bsnews.man $(MANDIR)/bsnews.$(MANEXT) [ -x $(BINDIR)/uudecode ] || mv uudecode $(BINDIR) --- 61,67 ---- chmod 544 expire chmod 555 readnews pn checknews chmod 6555 rnews uurec ! cp config $(NEWSLIB)/config mv $(PGMS) $(BINDIR) mv bsnews.man $(MANDIR)/bsnews.$(MANEXT) [ -x $(BINDIR)/uudecode ] || mv uudecode $(BINDIR) *************** *** 89,94 **** --- 89,95 ---- checkname: myname.c Makefile bsnews.h $(CC) -DCHECKNAME myname.c -o checkname + @rm -f myname.o @./checkname checknews: checknews.o init.o *************** *** 98,104 **** $(CC) $(CFLAGS) rnews.o myname.o init.o -o rnews pn: Makefile pn.S ! if echo "zip\c" | fgrep -s "c" ; \ then sed -e "s/^n=.*/n=-n/" \ -e "s/BigNode/$(FEED)/" pn.S > pn ; \ else sed -e "s/BigNode/$(FEED)/" pn.S > pn ; \ --- 99,105 ---- $(CC) $(CFLAGS) rnews.o myname.o init.o -o rnews pn: Makefile pn.S ! if echo "zip\c" | fgrep "c" > /dev/null; \ then sed -e "s/^n=.*/n=-n/" \ -e "s/BigNode/$(FEED)/" pn.S > pn ; \ else sed -e "s/BigNode/$(FEED)/" pn.S > pn ; \ *** expire.S.old Sun Sep 15 09:23:13 1991 --- expire.S Fri Oct 4 12:56:54 1991 *************** *** 2,8 **** #! /bin/sh # expire - expires bsnews spool # copyright 1991 Ronald Florence ! # @(#) version 2.1 (ron@mlfarm.com, 15 Sep 1991) # # A version for gawk or nawk would be cleaner; this is portable. --- 2,8 ---- #! /bin/sh # expire - expires bsnews spool # copyright 1991 Ronald Florence ! # @(#) version 2.11 (ron@mlfarm.com, 4 Oct 1991) # # A version for gawk or nawk would be cleaner; this is portable. *************** *** 14,20 **** Touch=touch [ -x /usr/5bin/touch ] && Touch=/usr/5bin/touch ! if $Touch 2>&1 | fgrep -s '[-amc]'; then : else Touch=true --- 14,20 ---- Touch=touch [ -x /usr/5bin/touch ] && Touch=/usr/5bin/touch ! if $Touch 2>&1 | fgrep '[-amc]' > /dev/null; then : else Touch=true *** makefile.pc.old Wed Sep 11 11:00:27 1991 --- makefile.pc Fri Oct 4 12:57:31 1991 *************** *** 1,7 **** # makefile.pc # Auxiliary makefile for non-Unix systems. # Copyright 1991 Ronald Florence ! # @(#) version 2.1 (ron@mlfarm.com, 6 Sep 1991) # Your C compiler. CC = cc --- 1,7 ---- # makefile.pc # Auxiliary makefile for non-Unix systems. # Copyright 1991 Ronald Florence ! # @(#) version 2.11 (ron@mlfarm.com, 4 Oct 1991) # Your C compiler. CC = cc *************** *** 16,22 **** $(CC) -DMSDOS $(CFLAGS) $(SRCS) $(CC) -DMSDOS $(CFLAGS) uudecode.c ! amiga: $(SRCS) bsnews.h uudecode $(CC) $(CFLAGS) $(SRCS) $(CC) $(CFLAGS) uudecode.c --- 16,22 ---- $(CC) -DMSDOS $(CFLAGS) $(SRCS) $(CC) -DMSDOS $(CFLAGS) uudecode.c ! amiga: $(SRCS) bsnews.h $(CC) $(CFLAGS) $(SRCS) $(CC) $(CFLAGS) uudecode.c *** rnews.c.old Fri Sep 6 21:11:48 1991 --- rnews.c Wed Oct 9 00:12:18 1991 *************** *** 1,7 **** /* * rnews.c * copyright 1991 Ronald Florence ! * @(#) version 2.1 (ron@mlfarm.com, 6 Sep 1991) */ #include --- 1,7 ---- /* * rnews.c * copyright 1991 Ronald Florence ! * @(#) version 2.11 (ron@mlfarm.com, 4 Oct 1991) */ #include *************** *** 209,215 **** if (!strncmp(hold[i], "Path: ", 6)) fprintf(nf, "Path: %s!%s", iam, &hold[i][6]); else ! fprintf(nf, hold[i]); free(hold[i]); } h = -1; --- 209,215 ---- if (!strncmp(hold[i], "Path: ", 6)) fprintf(nf, "Path: %s!%s", iam, &hold[i][6]); else ! fputs(hold[i], nf); free(hold[i]); } h = -1; *************** *** 220,226 **** { if (!strncmp(buf, "From ", 5)) putc('>', nf); ! fprintf(nf, buf); } } --- 220,226 ---- { if (!strncmp(buf, "From ", 5)) putc('>', nf); ! fputs(buf, nf); } } *** whatami.sh.old Sat Sep 14 22:29:52 1991 --- whatami.sh Mon Oct 7 10:09:29 1991 *************** *** 2,8 **** #! /bin/sh # whatami.sh # copyright 1991 Ronald Florence ! # @(#) version 2.1 (ron@mlfarm.com, 30 Aug 1991) sys="looks unusual." eflag= --- 2,8 ---- #! /bin/sh # whatami.sh # copyright 1991 Ronald Florence ! # @(#) version 2.11 (ron@mlfarm.com, 4 Oct 1991) sys="looks unusual." eflag= *************** *** 16,22 **** echo "" echo "This may take a minute..." ! for i in /lib /usr/lib do [ -f $i/$lib ] && { libdir=$i; break; } done --- 16,22 ---- echo "" echo "This may take a minute..." ! for i in /usr/lib/386 /lib/386 /usr/lib /lib /usr/local/lib do [ -f $i/$lib ] && { libdir=$i; break; } done *************** *** 52,58 **** site=`uname -n` eflag="-DUNAME" elif [ "$libdir" != "bogus" ]; then ! nm $libdir/$lib | fgrep -s gethostname && { sys="has gethostname()." site=`hostname` eflag=-DGETHOSTNAME --- 52,58 ---- site=`uname -n` eflag="-DUNAME" elif [ "$libdir" != "bogus" ]; then ! nm $libdir/$lib | fgrep gethostname > /dev/null && { sys="has gethostname()." site=`hostname` eflag=-DGETHOSTNAME *************** *** 62,68 **** [ -z "$site" ] || sys="has a working uuname." fi ! [ $libdir != "bogus" ] && nm $libdir/$lib | fgrep -s strchr || eflag="$eflag -DBSD" echo "" --- 62,68 ---- [ -z "$site" ] || sys="has a working uuname." fi ! [ $libdir != "bogus" ] && nm $libdir/$lib | fgrep strchr > /dev/null || eflag="$eflag -DBSD" echo "" *************** *** 72,78 **** [ "$mandir" = "?" ] && echo "Not sure where to install the man page on your system." [ -x /usr/5bin/touch ] && Touch=/usr/5bin/touch ! if $Touch 2>&1 | fgrep -s '[-amc]'; then : else echo "The $Touch command on your system cannot set an arbitrary time; the" --- 72,78 ---- [ "$mandir" = "?" ] && echo "Not sure where to install the man page on your system." [ -x /usr/5bin/touch ] && Touch=/usr/5bin/touch ! if $Touch 2>&1 | fgrep '[-amc]' > /dev/null; then : else echo "The $Touch command on your system cannot set an arbitrary time; the" exit 0 # Just in case... -- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent Phone: (402) 291-8300 FAX: (402) 291-4362 Please send comp.sources.misc-related mail to kent@uunet.uu.net.