mush on A/UX

Richard Todd rmtodd at servalan.uucp
Sat Nov 3 18:12:12 AEST 1990


rex at nbc1.ge.com (Rex Espiritu) writes:

>The latest compiled 7.1 gave me the following results with core dumped.
>Anyone else?

>% mush

>Disk read c0d0s0 Error: Error during SCSI status
>Generic Disk c0d0s0 retry limit exceeded: Logical block 0, physical block 128

>illegal instruction
>% 

  Yow! Unless I'm very much mistaken, that message has nothing to do with your
attempt to compile mush; what it's saying is that your disk drive had an error,
failing to respond when reading disk block 128.  Since it failed to read in
your program executable and instead read garbage, the attempt to execute it
caused an "illegal instruction" trap.  I'd have that disk drive checked out
if I were you...

  Now, as to getting mush to compile under A/UX, I've had version 7.1 
more-or-less working under A/UX 2.0 for some time.  I finally got around 
tonight to fixing the one remaining bug, so here's the diffs, config file, 
and makefile.  Warning: the config file I've got here is rigged to work with
smail/deliver as the MTA (that being what's in use here), not sendmail.  
I think the config file should work with A/UX sendmail once you change the MTA
invocation pathname (i.e. it's using the right mailbox locking mechanism), but
I can't know for sure.  Have fun....
#--------------------------------CUT HERE-------------------------------------
#! /bin/sh
#
# This is a shell archive.  Save this into a file, edit it
# and delete all lines above this comment.  Then give this
# file to sh by executing the command "sh file".  The files
# will be extracted into the current directory owned by
# you with default permissions.
#
# The files contained herein are:
#
# -rw-r--r--   1 rmtodd   root        1199 Nov  3 00:59 mush.aux.diffs
# -rw-r--r--   1 rmtodd   root        5383 Jun 10 01:34 config.h
# -rw-r--r--   1 rmtodd   root        1615 Nov  2 20:06 Makefile
#
echo 'x - mush.aux.diffs'
if test -f mush.aux.diffs; then echo 'shar: not overwriting mush.aux.diffs'; else
sed 's/^X//' << '________This_Is_The_END________' > mush.aux.diffs
X*** /tmp/,RCSt1a29697	Sat Nov  3 00:56:35 1990
X--- mail.c	Sat Nov  3 00:55:10 1990
X***************
X*** 1234,1240 ****
X--- 1234,1244 ----
X  	switch (fork()) {
X  	    case  0:  /* the child will send the letter. ignore signals */
X  #ifdef SYSV
X+ #ifndef AUX
X  		if (setpgrp() == -1)
X+ #else
X+ 		if (setpgrp(0, getpid()) == -1)
X+ #endif /* AUX */
X  #else /* SYSV */
X  		if (setpgrp(0, getpid()) == -1)
X  #endif /* SYSV */
X*** /tmp/,RCSt1a29702	Sat Nov  3 00:56:39 1990
X--- main.c	Sat Nov  3 00:55:11 1990
X***************
X*** 31,41 ****
X--- 31,46 ----
X      register char    *p;
X      struct mush_flags Flags;
X  
X+ 
X  #ifndef INTERNAL_MALLOC
X      extern char *stackbottom;	/* used by xfree() */
X  
X      stackbottom = (char *) &argc;
X  #endif /* INTERNAL_MALLOC */
X+ 
X+ #ifdef AUX
X+     set42sig();
X+ #endif
X  
X  #ifdef LCKDFLDIR
X      lckdfldir = LCKDFLDIR;
X*** /tmp/,RCSt1a29707	Sat Nov  3 00:56:42 1990
X--- mush.h	Sat Nov  3 00:55:13 1990
X***************
X*** 69,74 ****
X--- 69,77 ----
X  #else
X  #    include <sys/types.h>
X  #    include <signal.h>
X+ #    ifdef AUX
X+ #       include <sys/time.h>
X+ #    endif
X  #    ifndef SYSV
X  #	include <sys/time.h>
X  #	include <sys/ioctl.h>   /* for ltchars */
________This_Is_The_END________
if test `wc -l < mush.aux.diffs` -ne 51; then
	echo 'shar: mush.aux.diffs was damaged during transit (should have been 51 bytes)'
fi
fi		; : end of overwriting check
echo 'x - config.h'
if test -f config.h; then echo 'shar: not overwriting config.h'; else
sed 's/^X//' << '________This_Is_The_END________' > config.h
X/* config.h 1.1	(c) copyright 1986 (Dan Heller) */
X
X/* Default names and locations for files */
X#define MAILRC		".mushrc"
X#define ALTERNATE_RC	".mailrc"
X#define DEFAULT_RC	"/usr/lib/Mushrc"
X#define ALT_DEF_RC	"/usr/lib/Mail.rc"
X#define COMMAND_HELP	"/usr/local/lib/cmd_help"
X#ifdef SUNTOOL
X#    define TOOL_HELP	"/usr/lib/tool_help"
X#endif /* SUNTOOL */
X#define ALTERNATE_HOME	"/tmp"       /* Path must be read/write to EVERYONE */
X#define EDFILE  	".edXXXXXX"  /* file/pathname added to user's "home" */
X
X/*
X * Define INTERNAL_MALLOC and recompile if you have trouble with mush
X * core-dumping due to malloc/free errors.  Also, if you run a System 5
X * variant, you might notice a performance improvement if you define this
X * variable.  It uses the malloc distributed by Larry Wall for perl v2.
X */
X/* #define INTERNAL_MALLOC /**/
X
X/*
X * Define TIMEZONE if your system has neither the SysV external variable
X * tzname nor the BSD timezone() function.  The example below is for
X * Gould BSD4.3 systems; others should define it as a string, e.g. "PST"
X * If TIMEZONE is defined, DAYLITETZ can also be defined, e.g. "PDT"
X */
X/* #define TIMEZONE T->tm_zone /**/
X
X/* mail delivery system macros and defines... */
X
X/*
X * If you are using MMDF, define MMDF here.
X */
X/* #define MMDF /**/
X#ifdef MMDF
X/*
X * If MMDF delivers mail the user's home directory, define HOMEMAIL.
X * Also check the definition of the delivery file name MAILFILE, below.
X */
X/* #define HOMEMAIL /**/
X#define MAIL_DELIVERY	"exec /usr/mmdf/bin/submit -mlnr"
X#define VERBOSE_ARG	"Ww"
X#define MTA_EXIT	9	/* exit status for successful submit */
X#else /* MMDF */
X/*
X * If you are not using MMDF, check these definitions.
X */
X#define MAIL_DELIVERY	"/bin/smail" /* "-i" works like "-oi" */
X#define VERBOSE_ARG	"-v"    /* undef if none exists */
X/*#define METOO_ARG	"-m"    /* man sendmail for more info. */
X#define MTA_EXIT	0	/* exit status for successful mail delivery */
X#endif /* MMDF */
X
X/* If your mail transfer agent uses something *besides* "From " to separate
X * adjacent messages in a folder, define MSG_SEPARATOR to be this string.
X * If that string is 4 ^A's, then the string would be "\001\001\001\001".
X * With the exception of MMDF, below, you should OMIT a trailing newline
X * from the setting of MSG_SEPARATOR.
X * If you don't know what any of this means, leave it alone.
X */
X/* #define MSG_SEPARATOR "From " /**/
X#ifdef MMDF
X/*
X * These values should be identical (respectively) to the contents of
X * delim1 and delim2 in MMDFSRC/conf/yoursite/conf.c (sans newline).
X */
X#define MSG_SEPARATOR	"\001\001\001\001\n"
X#define END_MSG_SEP	"\001\001\001\001\n"
X/*
X * You only need to define LCKDFLDIR if you have MMDF configured to use the
X * locking routines in lib/util/lk_lock.c (ie., link(2)-based locking).
X * Most of you WILL NOT need this, since you probably use one of the more
X * sophisticated locking modules provided with MMDF.  Remember to alter the
X * Makefile so as to access the MMDF library at the link step.
X */
X/* #define LCKDFLDIR	"/usr/spool/mmdf/lockfiles" /* (for example) */
X#else /* !MMDF */
X#ifdef M_XENIX
X#define DOT_LOCK	/* DOT_LOCK should be used for SCO Xenix */
X#endif /* M_XENIX */
X#endif /* MMDF */
X
X/* If your mailer does not understand commas between addresses, you should
X * define NO_COMMAS.  This includes pre-3.0 smail and default MTAs used on
X * xenix, and sys-v systems.
X * This does NOT apply to MMDF or sendmail.
X */
X#define NO_COMMAS /**/
X
X/*
X * Most RFC822 compliant mailers (sendmail) will add the headers From:
X * and Date: on outgoing mail.  If the user or UA sends these headers,
X * most MTAs will not append them automatically.  However, there are
X * certain MTAs which will not allow this -- these "picky mailers" will
X * precede such headers with a '>' and make the headers very ugly and
X * somewhat redundant or contradictory.  It is advisable to set this
X * *UNLESS* your MTA is not RFC822 compiant -- therefore you should NOT
X * set this (xenix, sys-v).
X */
X/* #define PICKY_MAILER /**/
X
X/* Headers that will NOT be included when forwarding mail */
X#define IGNORE_ON_FWD	"status"	/* comma or space separated list */
X
X#define	MAXMSGS		1000	/* maximum number of messages we can read */
X#define HDRSIZ BUFSIZ	/* This should not be < BUFSIZ! (but can be >) */
X
X/* If your system supports the vprintf() functions, True for sys-v and
X * later sun versions (3.0+ ?).  Typically not true for BSD systems, but
X * that will probably change in the future.
X */
X#if defined(SYSV) || defined(sun)
X#define VPRINTF
X#endif /* SYSV || sun */
X
X#define LS_COMMAND	"ls"
X#define FORTUNE		"/usr/games/fortune"
X#define LPR		"lpr"
X#define SIGNATURE	".signature"
X#ifdef HOMEMAIL
X#define MAILFILE	"Mailbox"	/* or whatever */
X#else /* HOMEMAIL */
X#define MAILDIR		"/usr/mail"
X#endif /* HOMEMAIL */
X
X/* default settings for some variable strings */
X#define DEF_PROMPT	"Msg %m of %t: "
X#define DEF_PAGER	"more" /* set to "internal" to use internal pager */
X#define DEF_SHELL	"csh"
X#define DEF_EDITOR	"emacs"
X#define DEF_FOLDER	"~/Mail"        /* default Mail folder */
X#define DEF_MBOX	"~/mbox"	/* default mbox */
X#define DEF_INDENT_STR	"> "		/* indent included mail */
X#define DEF_PRINTER	"lp"
X#define DEF_ESCAPE	"~"
X#define DEF_HDR_FMT	"%25f %7d (%l/%c) \"%s\"" /* default hdr_format */
X#define DEF_CURSES_HELP	\
X    "display save mail reply next-msg back-msg screen-next screen-back"
________This_Is_The_END________
if test `wc -l < config.h` -ne 140; then
	echo 'shar: config.h was damaged during transit (should have been 140 bytes)'
fi
fi		; : end of overwriting check
echo 'x - Makefile'
if test -f Makefile; then echo 'shar: not overwriting Makefile'; else
sed 's/^X//' << '________This_Is_The_END________' > Makefile
X# Mush makefile for A/UX.
X#
XHDRS1= mush.h config.h
XHDRS2= strings.h options.h
XHDRS3= bindings.h glob.h
XHDRS4= version.h
XSRCS1= commands.c dates.c execute.c expr.c folders.c \
X	hdrs.c init.c loop.c mail.c main.c misc.c msgs.c pick.c \
X	print.c setopts.c signals.c sort.c viewopts.c options.c lock.c
XSRCS2= bind.c curs_io.c curses.c file.c strings.c macros.c \
X	addrs.c malloc.c glob.c
X
XOBJS1= commands.o dates.o execute.o expr.o folders.o \
X	hdrs.o init.o loop.o mail.o main.o misc.o msgs.o pick.o \
X	print.o setopts.o signals.o sort.o viewopts.o options.o lock.o
XOBJS2= bind.o curs_io.o curses.o file.o strings.o macros.o \
X	addrs.o malloc.o glob.o
X
XHELP_FILES= README README-7.0 README-7.1 mush.1 cmd_help \
X	Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
X
X
XAUXFLAGS=	-DSELECT -DDIRECTORY -DAUX
XCFLAGS= 	-O -DSYSV -DUSG -DCURSES -Dvfork=fork -DSIGRET=void -DREGCMP $(AUXFLAGS)
XLDFLAGS=
XLIBS= 		-lcurses -lPW
XOTHERLIBS=
X# Use some variant of this one if you #define MMDF in config.h
X#OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
XPROG=		mush
X
X$(PROG): $(OBJS1) $(OBJS2)
X	@echo loading...
X	@$(CC) $(LDFLAGS) $(OBJS1) $(OBJS2) -o $(PROG) $(LIBS) $(OTHERLIBS)
X
X$(OBJS1): $(HDRS1) $(HDRS2)
X$(OBJS2): $(HDRS1) $(HDRS2) $(HDRS3)
Xloop.o: version.h
X
XBINDIR= /usr/local/bin
XLIBDIR= /usr/local/lib
XMRCDIR= /usr/lib
XMANDIR= /usr/local/man/man1
XMANEXT= 1
X
Xinstall: mush
X	cp mush $(BINDIR)
X	strip $(BINDIR)/mush
X	chmod 0755 $(BINDIR)/mush
X	cp mush.1 $(MANDIR)/mush.$(MANEXT)
X	chmod 0644 $(MANDIR)/mush.$(MANEXT)
X	cp cmd_help $(LIBDIR)
X	chmod 0644 $(LIBDIR)/cmd_help
X	cp Mushrc $(MRCDIR)/Mushrc
X	chmod 0644 $(MRCDIR)/Mushrc
________This_Is_The_END________
if test `wc -l < Makefile` -ne 55; then
	echo 'shar: Makefile was damaged during transit (should have been 55 bytes)'
fi
fi		; : end of overwriting check
exit 0
 



More information about the Comp.unix.aux mailing list