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

Reply via email to