At 10:32 AM 5/13/99 -0700, Steve Lemke wrote:
>I wouldn't really expect to see a "__palmos__" define in the
>Metrowerks compiler, since I have no idea how they would do it
>(again, given that the same compiler is used to generate Macintosh
>Simulators and non-Palm Macintosh apps, as well as Palm
>applications).
I think it's useful to note that there's more than just the "compiler"
(as in the actual program which compiles the preprocessed C/C++ file
into assembly language.) The compiler is part of a larger environment,
and this environment does have extra information about what the final
target is supposed to make (e.g., a bonafide Palm application.)
It's also useful to note that all of these "defines" do not have anything
directly to do with the compiler itself. They are for the preprocessor
step before reaching the compiler proper.
So, although you're right that the compiler is "blind" in this respect,
there is nothing preventing the CodeWarrior environment as a whole to
define __palmos__ appropriately depending on the final target settings.
Generally, the system should place defines for at least the target
architecture (machine), the target CPU, and the target OS.
And IMHO, yes, something like __palmos__ should be defined even when
building a Mac-simulated Palm OS target.
Regards,
-Ade