From 01105493ccc24c97cbb5e2046adcac1f383754d8 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 23 Feb 2003 00:13:17 +0000 Subject: [PATCH] Work around an SC bug that causes it to try to use the same register for two purposes in s_wrpkt_prepare(). This makes SSH1 work on 68K Macs, at least until I deactivate the terminal window... [originally from svn r2876] --- mac/README.mac | 5 +---- ssh.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mac/README.mac b/mac/README.mac index 1c0de3f5..e09a682f 100644 --- a/mac/README.mac +++ b/mac/README.mac @@ -1,4 +1,4 @@ -$Id: README.mac,v 1.27 2003/02/11 23:10:34 ben Exp $ +$Id: README.mac,v 1.28 2003/02/23 00:13:17 ben Exp $ Information about PuTTY for the Mac OS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= @@ -61,9 +61,6 @@ Known bugs: * Display is far too slow. * Real bold doesn't compensate for changing character widths without Color QuickDraw. [MAYBE FIXED] - * Compiling ssh.c using SC 8.8.4 with "-opt time" causes SSH1 - connections to fail with "Incorrect CRC received on packet". Using - "-opt none" works around this. * When the last terminal window closes, the Edit menu doesn't get disabled immediately, which it should. * When using the "VT100" font, text copied to the clipboard doesn't diff --git a/ssh.c b/ssh.c index 76dc2ec6..9f7d1925 100644 --- a/ssh.c +++ b/ssh.c @@ -1167,8 +1167,18 @@ static void s_wrpkt_start(Ssh ssh, int type, int len) static int s_wrpkt_prepare(Ssh ssh) { - int pad, len, biglen, i; + int pad, biglen, i; unsigned long crc; +#ifdef __SC__ + /* + * XXX various versions of SC (including 8.8.4) screw up the + * register allocation in this function and use the same register + * (D6) for len and as a temporary, with predictable results. The + * following sledgehammer prevents this. + */ + volatile +#endif + int len; ssh->pktout.body[-1] = ssh->pktout.type;