VM 3.4.1 on SuSe Linux 8.1

Jim.Gettys at hp.com Jim.Gettys at hp.com
Fri Mar 14 03:00:03 UTC 2003


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' */

You see compile time autodetection of byte order.  Modern compilers
also completely optimize such constructs, optimizing away the dead code;
you end up with just the right assignment, since everything is computable
at compile time.  I suspect similar hacks can be derived for other similar
situations.

I do remember that this hack came to me from someone else: I don't wish
to take credit for such a hack...  Unfortunately, I don't know the
original author to blame ;-).

This is one way to get rid of having to configure things for a given
architecture...  There are others...
                                  - Jim




> Sender: squeak-dev-bounces at lists.squeakfoundation.org
> From: Ned Konz <ned at bike-nomad.com>
> Date: Thu, 13 Mar 2003 16:17:24 -0800
> To: The general-purpose Squeak developers list
> <squeak-dev at lists.squeakfoundation.org>
> Subject: Re: VM 3.4.1 on SuSe Linux 8.1
> -----
> On Thursday 13 March 2003 02:12 pm, Brian Brown wrote:
> > Greetings all...
> >
> > I have been trying to get Squeak running on this platform.. the RPM
> > didn't work (glib version 2_3 issue..), so I built it from scratch.
> > After installing various development libraries to get a clean
> > compile, (which I did) I was able to get the VM to run and bring
> > the image up... some issues:
> >
> > The window borders are black instead of the standard colors and
> > some of fonts are incorrect as well. Flaps won't come up at all and
> > I use my wheel on my mouse to scroll I get the emergency
> > evaluator...
> >
> > I'm running KDE 3.1 from the KDE.org site for SuSe 8.1... any
> > ideas? I'll try this under windowmaker and see if it's related to
> > the windowmanager...
>
> Look at your build/config.h file.
> Are the settings the same as this?
>
> /* architecture */
>
> #define	OS_TYPE "unix"
>
> #define	VM_HOST "i686-pc-linux-gnu"
> #define	VM_HOST_CPU "i686"
> /* #undef	VM_HOST_VENDOR */
> #define	VM_HOST_OS "linux-gnu"
>
> /* #undef	WORDS_BIGENDIAN */
> /* #undef	DOUBLE_WORD_ALIGNMENT */
> #define	DOUBLE_WORD_ORDER 1
>
> --
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE
--
Jim Gettys
Cambridge Research Laboratory
HP Labs, Hewlett-Packard Company
Jim.Gettys at hp.com


More information about the Squeak-dev mailing list