what i did is this:
in the Target settings in CW, there's a place to specify an include file.
by default, this is "Us.Prefix.h". i created a Us.Prefix.Foo.h file, which
is simply:
#define _FOO_
#include "Us.Prefix.h"
then i point the Target settings to my own "Us.Prefix.Foo.h" file, and
bingo, now i have _FOO_ defined only when compiling under CW for PalmOS.
----- Original Message -----
From: David Williams <[EMAIL PROTECTED]>
To: Michael Yam <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 12, 1999 2:34 PM
Subject: Re: does CodeWarrior predefine a preprocessor symbol when building
for Palm?
> Jun-Kiat Lam wrote:
> >
> > ....<Pilot.h> uses __PALMOS_TRAPS__....
>
> Michael Yam wrote:
> >
> > #if defined (EMULATION_LEVEL) && (EMULATION_LEVEL == EMULATION_NONE)
> > ..
> > #endif
> > Those symbols are defined when compiling Palm OS applications.
>
> These are all good suggestions, the problem with them is that all of these
> macros are defined _in_ the Palm header files. We write a lot of code that
> needs to be compiled on multiple platforms (PalmOS, WindowsCE/95/NT,
Unix). It
> would be nice if the inclusion of the Palm headers themselves could be
made
> conditional based on the compiler's built in knowledge of the environment.
> Like so:
>
> #ifdef __palmos__
> #include <Pilot.h>
> #endif
>
> where __palmos__ is predefined by the compiler.
>
> djw
>