Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!hplabs!hplabsc!daemon From: jw@pan.UUCP Newsgroups: comp.mail.elm Subject: Message-ID: <1779@hplabsc.HP.COM> Date: Sat, 9-May-87 00:59:50 EDT Article-I.D.: hplabsc.1779 Posted: Sat May 9 00:59:50 1987 Date-Received: Sun, 10-May-87 01:30:28 EDT Sender: daemon@hplabsc.HP.COM Reply-To: mcvax!pan!jw@seismo.CSS.GOV Lines: 304 Approved: taylor@hplabs (with 'postmail') To: Path: pan!jw From: jw@pan.UUCP (Jamie Watson) Newsgroups: comp.mail.elm Subject: Bug fixes and port to SysV.3 Message-ID: <259@pan.UUCP> Date: 8 May 87 19:03:02 GMT Reply-To: jw@pan.UUCP (Jamie Watson) Distribution: world Organization: Pansystem Informatik AG, Zuerich, Switzerland Lines: 291 I have installed Elm on my Opus systems. In the process, I had to port to System V release 3.0, and fix some minor bugs. The following diffs implement those changes. The major points are: - The return type of signal(2) is a void pointer instead of an int pointer. I changed the declarations related to this to use a define instead of a literal int *, then changed Configure.sh to check the return type and adjust the definition accordingly. Files affected: Configure.sh, hdrs/sysdefs.master, src/file_utils.c, src/syscall.c, src/showmsg.c, src/editmsg.c. - Standard System V.[23] does not have libtermcap.a or libtermlib.a. The termcap compatibility routines are in libcurses.a. I changed Configure.sh to allow for this. However, many suppliers of SysV systems now include libtermcap as well; in such a case, it is not clear which library should be used. Files affected: Configure.sh - When executing 'make clean', bin/filter was not getting removed. I added a command to remove it. Files affected: filter/Makefile.mstr - There was an include of ; on Berklix systems this should be . Files affected: hdrs/defs.h - Quite a few files contained '#ifdef BSD4.1'. Newer cpp's complain about 'extra tokens after directive'. I changed this to BSD4_1. I searched all the sources for references to BSD4.1, and found that it is only used, never defined, which brings up the question of whether it is a symbol that is automatically defined on 4.1 (in which case I just broke the programs), or if it is a relic that should be removed from the sources because it is no longer needed. Since I've never worked with 4.1 I don't know the answer to this. Files affected: src/validname.c, src/savecopy.c, src/mailtime.c, src/file.c, src/date.c, src/newmbox.c, src/curses.c, utils/fastmail.c - A couple of files contain extra junk after '#endif' statements. I just changed these to comments. Files affected: src/return_addr.c, src/curses.c - The last patches from Dave Taylor omitted a paren, and contained a bogus structure declaration. Files affected: src/date.c, src/leavembox.c To apply all these changes, just feed this file to patch. By the way, the following are all normal diffs. System V diff does not have a context diff capability. Sigh. Jamie Watson ...!seismo!mcvax!cernvax!paninfo!jw Pansystem Informatics, Ltd. or Bahnhofstrasse 50 jw%paninfo@cernvax.bitnet 8305 Dietlikon, Switzerland Index: Configure.sh 108,110c108,111 < if [ "$os_name" = "" ] < then < cat << THE_END --- > case $os_name in > hp|hp-ux|vax|vaxen|bsd|uts|sun|pyramid|osx*|amdahl|sys_v) ;; > sv_*|svii_*|v5|v7|eunice|convergent|berkeley|ultrix|xenix) ;; > *) cat << THE_END 111a113 > 113a116,121 > running on. I understand the following names: > > hp hp-ux vax vaxen bsd berkeley uts amdahl sun pyramid osx* > sys_v v5 sv_* v7 svii_* eunice convergent ultrix > > 116c124 < echo $nflag "running on. I'll check the name in a minute : " $cflag --- > echo $nflag "I'll check the name in a minute : " $cflag 120,121c128,129 < os_name=`echo $junk | tr '[A-Z]' '[a-z]'` < fi --- > os_name=`echo $junk | tr '[A-Z]' '[a-z]'`;; > esac 137a146 > sys_v) NAME="System V"; OS_FLAG=""; ;; 504a514,537 > # what is the return type of signal()? > > cat < .test.c > #include > main () { > void (*r)(); > r = signal(SIGINT,SIG_DFL); > } > EOF > > cat < .signal_return > cc .test.c > EOF > > sh .signal_return > .log 2>&1 > > if [ "`cat .log | wc -l`" -eq "0" ] > then > echo "Your signal() system call returns type void (*r)()..." > echo "s/#define SG_TYPE int/#define SG_TYPE void/" >> $SED1 > fi > > $rm -f a.out .test.c .signal_return .log .test.o > 641a675,676 > if [ ! -f /usr/lib/libcurses.a -a ! -f /lib/libcurses.a ] > then 643a679,680 > else termlib=curses > fi Index: filter/Makefile.mstr 53c53 < ${RM} ${BINARIES} --- > ${RM} ${BINARIES} ../bin/filter Index: hdrs/defs.h 255a256,258 > #ifdef BSD > #include > #else 256a260 > #endif Index: hdrs/sysdefs.master 163a164,166 > /** What is the return type of signal() **/ > #define SG_TYPE int > Index: src/validname.c 18c18 < # ifdef BSD4.1 --- > # ifdef BSD4_1 Index: src/savecopy.c 10c10 < # ifdef BSD4.1 --- > # ifdef BSD4_1 Index: src/file_utils.c 71c71 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); 124c124 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); Index: src/mailtime.c 14c14 < # ifndef BSD4.1 --- > # ifndef BSD4_1 112c112 < # ifdef BSD4.1 --- > # ifdef BSD4_1 124c124 < # ifdef BSD4.1 --- > # ifdef BSD4_1 Index: src/syscall.c 69c69 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); Index: src/file.c 109c109 < #ifdef BSD4.1 --- > #ifdef BSD4_1 Index: src/return_addr.c 211c211 < #endif not DONT_OPTIMIZE_RETURN --- > #endif /* not DONT_OPTIMIZE_RETURN */ Index: src/date.c 11c11 < # ifndef BSD4.1 --- > # ifndef BSD4_1 74c74 < # ifdef BSD4.1 --- > # ifdef BSD4_1 102c102 < # ifdef BSD4.1 --- > # ifdef BSD4_1 105c105 < timezone(time_zone.tz_minuteswest, time_zone.tz_dsttime); --- > timezone(time_zone.tz_minuteswest, time_zone.tz_dsttime)); Index: src/showmsg.c 430c430 < register int (*istat)(), (*qstat)(); --- > register SG_TYPE (*istat)(), (*qstat)(); Index: src/editmsg.c 96c96,97 < int edit_interrupt(), (*oldint)(), (*oldquit)(); --- > int edit_interrupt(); > SG_TYPE (*oldint)(), (*oldquit)(); Index: src/leavembox.c 36c36,39 < struct utimbuf utime_buffer; /* utime command */ --- > struct { > time_t actime; > time_t modtime; > } utime_buffer; /* utime command */ Index: src/newmbox.c 18c18 < # ifndef BSD4.1 --- > # ifndef BSD4_1 Index: src/curses.c 30c30 < # ifndef BSD4.1 --- > # ifndef BSD4_1 547c547 < #endif ndef ELM --- > #endif /* ndef ELM */ Index: utils/fastmail.c 32c32 < # ifdef BSD4.1 --- > # ifdef BSD4_1 203c203 < # ifdef BSD4.1 --- > # ifdef BSD4_1 212c212 < # ifdef BSD4.1 --- > # ifdef BSD4_1 233c233 < # ifdef BSD4.1 --- > # ifdef BSD4_1