[comp.emacs] bringing up 18.51 on masscomp RTU

reese@eeg3.UUCP (06/22/88)

(originally sent to bug-gnu-emacs, but got bounced)

I've been bringing up GNU Emacs 18.51 on a set of Masscomps and had a fair
amount of trouble, but don't worry, its all masscomp's fault.
it works now, but there were some things that had to be fixed.
one is small emacs problem, other is large Masscomp problem.
If you would like the details of the workaround for the second part,
please let me know and I will send you diffs of my stuff and the
distribution or however you would like it. The tedious part of this fix
is going through and finding all of the places the compiler bug might strike
and installing changes there, which is why i thought you might like the
diffs. please at least let me know if you get this as our mailer is
screwy on occasion.

we will be installing new release of RTU with new C compiler soon, i
will let you know how many problems go away.

my address is:
pacbell.pacbell.com!eeg!eeg3!reese
or
reese@sim.berkeley.edu

-r

------------------------------
problem #1:
GNU emacs v 18.51
file buffer.c
function SetBfp

register struct buffer *swb;

should be:
register struct buffer *swb=0;

else if w (= selected-window) is NULL, then p is compared to an
uninitialized swb , which may in fact match (as is happening to me at
this very moment), causing w->pointm to be referenced, which gives
segmentation fault...

(this won't make any sense until you have code in front of you of course,
 unless you have all this stuff memorized)

----------------------------------
2nd (major) problem:
MASSCOMP C version 1.2
under RTU 3.1
"unsigned {char,short} *" bug

unsigned char *p;
x = p[k]; or x = *(p+k); :

compiler clears D0, then puts k in D0, then p[k] in lowest byte of D0,
(leaving upper bytes unaltered since they were just cleared, right?) then
D0 in x
causes problems when k > 255
similar if k > 0xffff for unsigned shorts

fix:
#define MASSCOMP_UNSIGNED_BUG
and put workarounds all over the place

----------------------------------
better 
#define register
in config.h else things die. whats best way to get register.elc to
not get turned to ".elc" in the makefile without adding
#undef register
to makefile ?

----------------------------------
one more change: masscomp RTU now supports ptys better, at least our
version of RTU(3.1), so define FIRST_PTY_LETTER to be 'p' in s-rtu.h
(or config.h to not affect your distribution) and then M-x shell will
work *much* better.