[VM] #define Documentation

John M McIntosh johnmci at smalltalkconsulting.com
Thu Apr 11 05:32:47 UTC 2002


>From the cross tree:
>
>TARGET_OS_MAC

This is in the mpeg squeak code, it comes from the codewarrior headers and
indicates this is an mac os compile, otherwise it's either intel or os-x.
For OS-X I do a -DTARGET_OS_MAC

>  __APPLE__
>__MACH__
>WIN32
>__POWERPC__

These come from the compiler. __APPLE__ && __MACH__ lurked in some 
example indicating it was os-x.
__POWERPC__ indicates it's powerpc, versus say intel.

>From the Mac OS tree:
>
>__MWERKS__

This gets defined by metrowerks telling us it's a CodeWarrior 
compiler, thus CW headers and buggy pseudo unix support.

>BEOS_SQUEAK

This gets gets defined by metrowerks, we use it to work around a conflict with
the BE OS Squeak port.

>MINIMALVM


At one point this was used to build a minimal memory footprint Mac VM
say about 1024K.

TARGET_API_MAC_CARBON
This is explicitly set via a -D to indicating we should use the Carbon API.
In CodeWarrior/metrowerks this is set in the carbon precompiled headers.

I_AM_CARBON_EVENT
This is explicitly set via a -D to indicate I want to use the carbon 
event model versus waitnextevent. Allows you to build a mach-o osx vm 
with either feature to enable debugging.

>__APPLE__
>__MACH__
>__POWERPC__
>WIN32
>_WIN32
>_WINDOWS

These are all set by the compiler to indicate architectural issues. 
Tho I could look at why WIN32 AND _WIN32 AND _WINDOWS.

>JMMFoo

Bing... Ok, I've a few places were lots of effort was used to write 
some code and it's had problems, yet I don't want to toss it (yet) 
Thus #JMMFoo is a reminder Let's see one place is where I attempt to 
use CFM based plugins, but that didn't work because the CFM based 
plugins would call back to mach-o entry points and crash. The other 
place is where code was written for long file support under carbon 
using the metrowerks and Apple's carbonized StdLib. But that had too 
many bugs..

>XP_PC
>__OS2__
>OS2

These are used in the netscape plugin code from aol. I'd guess the 
OS/2 version of the squeak plugin could use them (is there such a 
beast?).

>From the unix tree:
>
>__APPLE__ PPC
>_POWER
>_IBMR2

Those all get defined by the compiler, I'd bet the PPC, _IBMR2 & 
_POWER come from early versions of ppc chips used in the sqGnu.h 
definitions?

>From the win32 tree:
>
>WIN32
>_WIN32
>_WIN32_WCE
>_WINDOWS_
>_WINDOWS_H
>__WINDOWS__
>_GNU_H_WINDOWS_H
>
>
>
>From the RiscOS tree:
>
>ACORN

As usual Tim has less complicated issues, no Float Point 
optimizations I might add.. (heh heh)
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list