VM 3.4.1 on SuSe Linux 8.1

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Sat Mar 15 00:24:14 UTC 2003


Am Freitag, 14.03.03 um 04:00 Uhr schrieb <Jim.Gettys at hp.com>:

>
> I almost hate to own up to tremendous hacks, but....  If you look at 
> the
> following snippet of code from the X library:
>         int endian;
> 	endian = 1;
> 	if (*(char *) &endian)
> 	    client.byteOrder = '\154'; /* 'l' */
> 	else
> 	    client.byteOrder = '\102'; /* 'B' */

This is not the problem. Here is straight from Squeak's autoconf script:

int
main ()
{
   /* Are we little or big endian?  From Harbison&Steele.  */
   union
   {
     long l;
     char c[sizeof (long)];
   } u;
   u.l = 1;
   exit (u.c[sizeof (long) - 1] == 1);
}

The problem is that with GCC 3.x the autoscript logic for checking  
double-word order fails.

-- Bert



More information about the Squeak-dev mailing list