[comp.sys.ncr] Patches to run GNU EMACS 18.55 on Tower System V release 3.

ra@intsys.no (Robert Andersson) (10/21/90)

My mailbox got flooded with requests for this, so I decided to post
rather than mail.  Enjoy.

Regards, Robert.


#!/bin/sh
# This is a shell archive (shar 3.24)
# made 10/17/1990 18:24 UTC by ra@intsys.no
# Source directory /u/ra/emacs
#
# existing files will NOT be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    718 -rw-rw-rw- README
#   4437 -rw-rw-rw- m-tower32v3.h
#   2850 -rw-rw-rw- patches
#
if touch 2>&1 | fgrep '[-amc]' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= README ==============
if test X"$1" != X"-c" -a -f 'README'; then
	echo "File already exists: skipping 'README'"
else
echo "x - extracting README (Text)"
sed 's/^X//' << 'SHAR_EOF' > README &&
XChanges needed to bring EMACS 18.55 up on an NCR Tower 32 running 
XSystem V release 3.
X
XThere is one new file, m-tower32v3.h, put it in the src directory.
X
XThe context diffs, patches, should be applied with Larry Wall's patch
Xprogram against a virgin 18.55 distribution.  They do the following:
Xa) etc/MACHINES is updated with info about the Towers.
Xb) src/fileio.c has the BROKEN_SYMLINK test added.
Xc) src/m-tower32.h has some comments added.
Xd) src/sysdep.c has the NO_SIOCTL_H and NEED_PTEM_H tests added.
X---
XRobert Andersson       Voice +47 2 371055       International Systems A/S
Xra@intsys.no           Fax   +47 2 356448       P.O. Box 3356
X...!{uunet,mcsun,nuug}!intsys.no!ra             0405 Oslo 4, NORWAY
SHAR_EOF
$TOUCH -am 1017192390 README &&
chmod 0666 README ||
echo "restore of README failed"
set `wc -c README`;Wc_c=$1
if test "$Wc_c" != "718"; then
	echo original size 718, current size $Wc_c
fi
fi
# ============= m-tower32v3.h ==============
if test X"$1" != X"-c" -a -f 'm-tower32v3.h'; then
	echo "File already exists: skipping 'm-tower32v3.h'"
else
echo "x - extracting m-tower32v3.h (Text)"
sed 's/^X//' << 'SHAR_EOF' > m-tower32v3.h &&
X/* m- file for the NCR Tower 32 running System V.3.
X   Copyright (C) 1986 Free Software Foundation, Inc.
X
XThis file is part of GNU Emacs.
X
XGNU Emacs is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY.  No author or distributor
Xaccepts responsibility to anyone for the consequences of using it
Xor for whether it serves any particular purpose or works at all,
Xunless he says so in writing.  Refer to the GNU Emacs General Public
XLicense for full details.
X
XEveryone is granted permission to copy, modify and redistribute
XGNU Emacs, but only under the conditions described in the
XGNU Emacs General Public License.   A copy of this license is
Xsupposed to have been given to you along with GNU Emacs so you
Xcan know your rights and responsibilities.  It should be in a
Xfile named COPYING.  Among other things, the copyright notice
Xand this notice must be preserved on all copies.  */
X
X
X/* The following three symbols give information on
X the size of various data types.  */
X
X#define SHORTBITS 16		/* Number of bits in a short */
X
X#define INTBITS 32		/* Number of bits in an int */
X
X#define LONGBITS 32		/* Number of bits in a long */
X
X/* Define BIG_ENDIAN iff lowest-numbered byte in a word
X   is the most significant byte.  */
X
X#define BIG_ENDIAN
X
X/* Define NO_ARG_ARRAY if you cannot take the address of the first of a
X * group of arguments and treat it as an array of the arguments.  */
X
X/* #define NO_ARG_ARRAY */
X
X/* Define WORD_MACHINE if addresses and such have
X * to be corrected before they can be used as byte counts.  */
X
X/* #define WORD_MACHINE */
X
X/* Define how to take a char and sign-extend into an int.
X   On machines where char is signed, this is a no-op.  */
X
X#define SIGN_EXTEND_CHAR(c) (c)
X
X/* Now define a symbol for the cpu type, if your compiler
X   does not define it automatically:
X   vax, m68000, ns16000, pyramid, orion, tahoe and APOLLO
X   are the ones defined so far.  */
X#define m68000
X
X/* Use type int rather than a union, to represent Lisp_Object */
X/* This is desirable for most machines.  */
X
X#define NO_UNION_TYPE
X
X/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
X   the 24-bit bit field into an int.  In other words, if bit fields
X   are always unsigned.
X
X   If you use NO_UNION_TYPE, this flag does not matter.  */
X
X#define EXPLICIT_SIGN_EXTEND
X
X/* Data type of load average, as read out of kmem.  */
X
X/* #define LOAD_AVE_TYPE long */
X
X/* Convert that into an integer that is 100 for a load average of 1.0  */
X
X/* #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE) */
X
X/* Define CANNOT_DUMP on machines where unexec does not work.
X   Then the function dump-emacs will not be defined
X   and temacs will do (load "loadup") automatically unless told otherwise.  */
X
X/* #define CANNOT_DUMP */
X
X/* Define VIRT_ADDR_VARIES if the virtual addresses of
X   pure and impure space as loaded can vary, and even their
X   relative order cannot be relied on.
X
X   Otherwise Emacs assumes that text space precedes data space,
X   numerically.  */
X
X/* #define VIRT_ADDR_VARIES */
X
X/* Define C_ALLOCA if this machine does not support a true alloca
X   and the one written in C should be used instead.
X   Define HAVE_ALLOCA to say that the system provides a properly
X   working alloca function and it should be used.
X   Define neither one if an assembler-language alloca
X   in the file alloca.s should be used.  */
X
X#ifdef __GNUC__
X#define HAVE_ALLOCA
X#define alloca __builtin_alloca
X#define C_OPTIMIZE_SWITCH -O -fstrength-reduce -fomit-frame-pointer
X#define LIB_STANDARD -lc /lib/crtn.o
X#else
X/* This section is correct if you do *not* change src/ymakefile so that
X   CFLAGS includes C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH.  */
X#define HAVE_ALLOCA
X#define C_DEBUG_SWITCH -g -O0
X#define LIB_STANDARD -lc -lPW /lib/crtn.o
X/* This section is correct if you do enable C_OPTIMIZE_SWITCH.  */
X/* #define C_ALLOCA */
X/* #define STACK_DIRECTION -1 */
X/* #define C_OPTIMIZE_SWITCH -O2 */
X/* #define LIB_STANDARD -lc /lib/crtn.o */
X#endif
X
X/* The OS maps the data section far away from the text section.  */
X#define NO_REMAP
X#define TEXT_START 0
X#undef static
X#define START_FILES pre-crt0.o /lib/crt1.o
X
X/* The OS has an implementation of symlinks that is semantically different
X   from BSD, but for some silly reason it partly has the same syntax.  */
X#define BROKEN_SYMLINK
X
X/* The OS needs stream.h+ptem.h included in sysdep.c.  */
X#define NO_SIOCTL_H
X#define NEED_PTEM_H
SHAR_EOF
$TOUCH -am 1017185290 m-tower32v3.h &&
chmod 0666 m-tower32v3.h ||
echo "restore of m-tower32v3.h failed"
set `wc -c m-tower32v3.h`;Wc_c=$1
if test "$Wc_c" != "4437"; then
	echo original size 4437, current size $Wc_c
fi
fi
# ============= patches ==============
if test X"$1" != X"-c" -a -f 'patches'; then
	echo "File already exists: skipping 'patches'"
else
echo "x - extracting patches (Text)"
sed 's/^X//' << 'SHAR_EOF' > patches &&
X*** etc/orig/MACHINES	Wed Oct 17 15:35:18 1990
X--- etc/MACHINES	Wed Oct 17 18:49:32 1990
X***************
X*** 389,397 ****
X  
X    Changes merged in 18.39.
X  
X! NCR Tower 32 (m-tower32.h; s-usg5-2.h)
X  
X!   Works as of 17.56.
X  
X  Nixdorf Targon 31 (m-targon31.h; s-usg5-2-2.h)
X  
X--- 389,405 ----
X  
X    Changes merged in 18.39.
X  
X! NCR Tower 32 running System V release 2 (m-tower32.h; s-usg5-2-2.h)
X  
X!   Works as of 17.56.  If you change src/ymakefile so that CFLAGS includes
X!   C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, check out the comments
X!   in src/m-tower32.h about this.
X! 
X! NCR Tower 32 running System V release 3 (m-tower32v3.h; s-usg5-3.h)
X! 
X!   Works as of 18.56.  If you change src/ymakefile so that CFLAGS includes
X!   C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, and do not use gcc, check 
X!   out the comments in src/m-tower32v3.h about this.
X  
X  Nixdorf Targon 31 (m-targon31.h; s-usg5-2-2.h)
X
X*** src/orig/fileio.c	Fri Oct 12 12:55:31 1990
X--- src/fileio.c	Wed Oct 17 15:52:44 1990
X***************
X*** 65,70 ****
X--- 65,75 ----
X  #include <errnet.h>
X  #endif
X  
X+ /* Some UNIX'es advertize S_IFLNK, but have broken or missing system calls.  */
X+ #ifdef BROKEN_SYMLINK
X+ #undef S_IFLNK
X+ #endif
X+ 
X  #define min(a, b) ((a) < (b) ? (a) : (b))
X  #define max(a, b) ((a) > (b) ? (a) : (b))
X  
X*** src/orig/m-tower32.h	Wed Oct 17 15:30:39 1990
X--- src/m-tower32.h	Wed Oct 17 18:28:50 1990
X***************
X*** 109,117 ****
X  
X  #define LIB_STANDARD -lPW -lcieee
X  
X! /* crt0.c should use the vax-bsd style of entry, with no dummy args.  */
X  
X  #define CRT0_DUMMIES zero, bogus_fp,
X  
X  /* emacs's magic number isn't temacs's;
X     temacs is writeable text (the default!).  */
X--- 109,127 ----
X  
X  #define LIB_STANDARD -lPW -lcieee
X  
X! /* crt0.c should use the vax-bsd style of entry.  Beware that if you have
X!    OS release 2.00.00 or later, *and* change src/ymakefile so that CFLAGS
X!    includes C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, you need to
X!    uncomment CRT0_DUMMIES and C_OPTIMIZE_SWITCH below.  */
X  
X+ /* With the optimizer OFF */
X+ 
X  #define CRT0_DUMMIES zero, bogus_fp,
X+ 
X+ /* With the optimizer ON */
X+ 
X+ /* #define CRT0_DUMMIES */
X+ /* #define C_OPTIMIZE_SWITCH -O2 */
X  
X  /* emacs's magic number isn't temacs's;
X     temacs is writeable text (the default!).  */
X*** src/orig/sysdep.c	Fri Oct 12 12:28:06 1990
X--- src/sysdep.c	Wed Oct 17 19:19:12 1990
X***************
X*** 147,156 ****
X--- 147,162 ----
X  #ifdef TIOCGWINSZ
X  #ifndef IRIS_4D
X  #ifndef mips
X+ #ifndef NO_SIOCTL_H
X  /* Some USG systems with TIOCGWINSZ need this file; some don't have it.
X     We don't know how to distinguish them.
X     If this #include gets an error, just delete it.  */
X  #include <sys/sioctl.h>
X+ #endif
X+ #ifdef NEED_PTEM_H
X+ #include <sys/stream.h>
X+ #include <sys/ptem.h>
X+ #endif
X  #endif
X  #endif
X  #endif
SHAR_EOF
$TOUCH -am 1017192090 patches &&
chmod 0666 patches ||
echo "restore of patches failed"
set `wc -c patches`;Wc_c=$1
if test "$Wc_c" != "2850"; then
	echo original size 2850, current size $Wc_c
fi
fi
exit 0
-- 
Robert Andersson       Voice +47 2 371055       International Systems A/S
ra@intsys.no           Fax   +47 2 356448       P.O. Box 3356
...!{uunet,mcsun,nuug}!intsys.no!ra             0405 Oslo 4, NORWAY