JK,

thanks for your reply.  I'm not sure whether you mean that

(1) the CodeWarrior compiler defines "macintosh" so that certain PalmOS programs
can include MacOS header files, which require "macintosh" to be defined, or
(2) the CodeWarrior compiler itself doesn't define "macintosh", but "macintosh"
gets defined in one of the MacOS header files which you assume that my project
includes.

If you mean (1), then I would say that the existing behavior is certainly wrong
and should be fixed.  Simply put, a Palm is not a Macintosh.  It might seem
convenient for the compiler to define "macintosh" for the purposes of using a
few existing header files, but defining "macintosh" on a platform which is not a
Mac makes it confusing and difficult for developers to write cross-platform code
which may be built on either PalmOS, MacOS, or other platforms.

If you mean (2), then unfortunately you are wrong, because I'm not including any
header files at all, as you can see in the example source file which I included
with my original message.

In any case, I think that this is a bug and should be fixed.

-adam

----- Original Message -----
From: Jun-Kiat Lam <[EMAIL PROTECTED]>
Newsgroups: bombsoft.palmdev
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 12, 1999 3:12 PM
Subject: Re: CodeWarrior for PalmOS predefines symbol "macintosh"


> The reason that it's probably showing up is because some of the Palm OS
> Support sources use certain files from the MacOS MSL. For example, the
> simulator targets call MSL's <stdio.h> in ShellCmdApp.cp.
>
> JK Lam
> Metrowerks Technical Support
>
> ----- Original Message -----
> From: Adam Dingle <[EMAIL PROTECTED]>
> To: Palm Developers Forum List <[EMAIL PROTECTED]>
> Sent: Wednesday, May 12, 1999 4:56 PM
> Subject: Fw: CodeWarrior for PalmOS predefines symbol "macintosh"
>
>
> >
> > ----- Original Message -----
> > From: Adam Dingle
> > To: CodeWarrior Support
> > Sent: Wednesday, May 12, 1999 2:55 PM
> > Subject: CodeWarrior for PalmOS predefines symbol "macintosh"
> >
> >
> > I'm using CodeWarrior for PalmOS release 5 with patch 1 on Windows NT 4.0.
> >
> > CodeWarrior for PalmOS predefines the symbol "macintosh", which is
> supposed to
> > be defined only when compiling for a Mac.  To see this, add the following
> source
> > file to any CodeWarrior project and preprocess it:
> >
> > == begin foo.c ==
> > #ifdef macintosh
> > mac
> > #else
> > nomac
> > #endif
> > == end foo.c ==
> >
> > The output is:
> >
> > mac
> >
> > -adam
> >
> >
> >
>
>
>

Reply via email to