Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!think!ames!ucbcad!ucbvax!stellar.UUCP!stevep
From: stevep@stellar.UUCP (Steve Pitschke)
Newsgroups: comp.windows.x
Subject: Why Bug Fix #68 Fails on Suns
Message-ID: <8712022016.AA02373@pisces.stellar.uucp>
Date: Wed, 2-Dec-87 15:15:56 EST
Article-I.D.: pisces.8712022016.AA02373
Posted: Wed Dec  2 15:15:56 1987
Date-Received: Sun, 6-Dec-87 07:26:16 EST
Sender: usenet@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 41

The following patch works on our systems.  I discovered that the optimization
pass of the sun 3.2 compiler generates mixed up register usage for the
'fixed' c syntax.  The 3.4 compiler generates good code, which is why
a some sun users observed the problem and others did not.

						Reliable Source

*** /tmp/d02359	Wed Dec  2 15:09:08 1987
--- window.c	Wed Dec  2 12:50:39 1987
***************
*** 820,827 ****
--- 820,832 ----
      pVlist = vlist;
      while (vmask) 
      {
+ #ifdef sun
+ 	index = ffs(vmask) - 1;
+ 	vmask &= ~(index = (1 << index));
+ #else
  	index = 1 << (ffs(vmask) - 1);
  	vmask &= ~index;
+ #endif sun
  	switch (index) 
          {
  	  case CWBackPixmap: 
***************
*** 2002,2009 ****
--- 2007,2019 ----
      tmask = mask & ~ChangeMask;
      while (tmask) 
      {
+ #ifdef sun
+ 	index = ffs(tmask) - 1;
+ 	tmask &= ~(index = (1 << index));
+ #else
  	index = 1 << (ffs(tmask) - 1);
  	tmask &= ~index;
+ #endif sun
  	switch (index) 
          {
            case CWBorderWidth: