home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.freefriends.org
/
ftp.freefriends.org.tar
/
ftp.freefriends.org
/
arnold
/
Source
/
mush.rstevens.tar.gz
/
mush.tar
/
Fixes.solaris
/
Mush.sun.ucb.cc
< prev
Wrap
Internet Message Format
|
1994-07-23
|
7KB
From @marvin.cdf.toronto.edu:g1jmason@cdf.toronto.edu Mon Jul 11 06:15:19 1994
Received: from noao.edu by gemini (4.1/SAG.sat.13)
id AA06889; Mon, 11 Jul 94 06:15:17 MST; for rstevens
Received: from marvin.cdf.toronto.edu by noao.edu (4.1/SAG-Noao.G95)
id AA01685; Mon, 11 Jul 94 06:15:16 MST; for rstevens@gemini
Received: from marvin by marvin.cdf.toronto.edu via suspension id <177>; Mon, 11 Jul 1994 09:15:10 -0400
Received: from eddie by marvin.cdf.toronto.edu id <181>; Sat, 9 Jul 1994 16:22:32 -0400
From: Jamie Mason <g1jmason@cdf.toronto.edu>
To: rstevens@noao.edu
Subject: Re: Solaris 2.3 patches ??
Newsgroups: comp.mail.mush
In-Reply-To: <1994Jul9.122429.19263@noao.edu>
Organization: University of Toronto, Computing Disciplines Facility
Message-Id: <94Jul9.162232edt.181@marvin.cdf.toronto.edu>
Date: Sat, 9 Jul 1994 16:22:28 -0400
Status: OR
In Comp.mail.mush, you write:
>I'm trying to get 7.2.5 to work under Solaris 2.3. The problem begins
>with the file execute.c, which seems to be getting confused between the
>old tty ioctls and termio. <termio.h> is not getting inlcuded, but the
>macro echo_on() is trying to access members in the termio structure.
>Saying all the #ifdefs make the code hard to follow is an understatement.
At least at out site, Solaris comes with _two_ diffrent
configurations of the C compiler. One which compiles to SYS_V ish
solaris, and the other which does BSD emulaion. (Using altered
include and library paths.)
It is with the BSD-emulation compiler that I had the most success
compiling MUSH. On our system, this is installed in /usr/ucb/cc.
Once being sure that Make was using _this_ CC, the makefile which
worked best for me was the BSD one.
There remained only one problem -- timezone stuff. Even with
the BSD compiler, Solaris does the timezone stuff different. So I
had to edit dates.c and put in a new preprocessor switch.
I pieced together something which looks like a shar archive,
but actually does some patching and copying of files. I did this
so that I would get the 'X' protection from shar. Un-tar the
mush archive into a dircectory, then run this patch on it.
Make sure that the paths/etc... are the same in your system.
Let me know if this works for you.
Jamie
#! /bin/sh
# This is a shell patch. Remove anything before this line, then use 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 <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell patch."
# Contents:
# Copied files: dates.c-dist makefile.solaris Makefile config.h
# Patches for: dates.c makefile.solaris
# (dates.c-dist is old dates.c. config.h is config.h-dist unchanged.
# makefile.solaris and Makefile are patches to makefile.bsd.)
#
# Wrapped by g1jmason@eddie on Mon May 23 04:08:57 1994
PATH=/local/bin:/usr/ucb/:/bin:/usr/bin:/usr/ucb ; export PATH
echo shar: Copying \"'dates.c'\" to \"'dates.c-dist'\"
cp dates.c dates.c-dist
echo shar: Copying \"'makefile.bsd'\" to \"'makefile.solaris'\"
cp makefile.bsd makefile.solaris
echo shar: Patching \"'version.h makefile.solaris dates.c'\"
sed "s/^X//" <<'END_OF_FILE' | patch
XPrereq: "10/14/92"
X*** version.h.old Fri Oct 30 14:55:25 1992
X--- version.h Mon May 23 04:23:42 1994
X***************
X*** 5,7 ****
X--- 5,11 ----
X #define RELEASE 7
X #define REVISION "2"
X #define PATCHLEVEL 5
X+ /*
X+ * Changed slightly to compile under Solaris (Mon May 23 1994)
X+ * by g1jmason@cdf (Jamie Mason).
X+ */
X*** makefile.bsd.old Fri Oct 30 14:55:06 1992
X--- makefile.solaris Mon May 23 03:43:16 1994
X***************
X*** 1,6 ****
X # makefile.bsd (c) copyright 1991 (Dan Heller)
X- # SunOS users should add -DSUN_3_5, -DSUN_4_0, or -DSUN_4_1 to CFLAGS.
X #
X HDRS= mush.h config.h-dist strings.h bindings.h options.h version.h glob.h pop.h
X
X SRCS= main.c init.c misc.c mail.c hdrs.c execute.c commands.c print.c dates.c \
X--- 1,13 ----
X+ # makefile.solaris adapted by g1jmason@cdf from:
X # makefile.bsd (c) copyright 1991 (Dan Heller)
X #
X+ # Solaris users should compiler with /usr/ucb/cc. Solaris most closely
X+ # resembles SunOS 4.0. Use that as a starting point, defining
X+ # SUN_4_0 instead ofBSD. Define SOLARIS_TZ as well, because Solaris
X+ # uses the SYSV tzname stuff, not the BSD timezone() stuff. Also,
X+ # link with -ltermcap instead of -ltermlib. All of these changes
X+ # are incorporated in the file and seem to be enough.
X+ #
X HDRS= mush.h config.h-dist strings.h bindings.h options.h version.h glob.h pop.h
X
X SRCS= main.c init.c misc.c mail.c hdrs.c execute.c commands.c print.c dates.c \
X***************
X*** 22,31 ****
X
X # See the README for changes needed to compile under Ultrix.
X # In particular, you may need -DSIGRET=void and/or -ltermcap.
X! CFLAGS= -O -DCURSES -DBSD
X LDFLAGS=
X LINTFLAGS= -bxah -Dlint -DCURSES -DBSD
X! LIBS= -lcurses -ltermlib
X OTHERLIBS=
X # Use some variant of this one if you #define MMDF in config.h
X #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
X--- 29,39 ----
X
X # See the README for changes needed to compile under Ultrix.
X # In particular, you may need -DSIGRET=void and/or -ltermcap.
X! CC= /usr/ucb/cc
X! CFLAGS= -O -DCURSES -DSUN_4_0 -DSOLARIS_TZ
X LDFLAGS=
X LINTFLAGS= -bxah -Dlint -DCURSES -DBSD
X! LIBS= -lcurses -ltermcap
X OTHERLIBS=
X # Use some variant of this one if you #define MMDF in config.h
X #OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
X***************
X*** 32,38 ****
X
X mush: $(OBJS)
X @echo loading...
X! @cc $(LDFLAGS) $(OBJS) $(LIBS) $(OTHERLIBS) -o mush
X
X $(OBJS): config.h mush.h
X loop.o: version.h
X--- 40,46 ----
X
X mush: $(OBJS)
X @echo loading...
X! @$(CC) $(LDFLAGS) $(OBJS) $(LIBS) $(OTHERLIBS) -o mush
X
X $(OBJS): config.h mush.h
X loop.o: version.h
X*** dates.c.old Fri Oct 30 14:55:05 1992
X--- dates.c Mon May 23 03:30:51 1994
X***************
X*** 122,128 ****
X {
X struct tm *T;
X char *tz;
X! #if defined(SYSV) || defined(TIMEZONE)
X long x;
X
X (void) time(&x);
X--- 122,131 ----
X {
X struct tm *T;
X char *tz;
X!
X! /* Added an extra clause to deal with the fact that Solaris
X! uses the SYSV tzname stuff */
X! #if defined(SYSV) || defined(TIMEZONE) || defined(SOLARIS_TZ)
X long x;
X
X (void) time(&x);
X***************
X*** 133,139 ****
X tz = tzname[T->tm_isdst];
X }
X #endif /* TIMEZONE */
X! #else /* SYSV || TIMEZONE */
X extern char *timezone();
X struct timeval mytime;
X struct timezone myzone;
X--- 136,142 ----
X tz = tzname[T->tm_isdst];
X }
X #endif /* TIMEZONE */
X! #else /* SYSV || TIMEZONE || SOLARIS_TZ */
X extern char *timezone();
X struct timeval mytime;
X struct timezone myzone;
END_OF_FILE
echo shar: Removing tempfiles created by patch
rm version.h.orig makefile.solaris.orig dates.c.orig
echo shar: Copying new \"'makefile.solaris'\" to \"'Makefile'\"
cp makefile.solaris Makefile
echo shar: Copying \"'config.h-dist'\" to \"'config.h'\"
cp config.h-dist config.h
echo shar: End of shell patch.
exit 0