[webkit-dev] A platform define for the Cocoa port?

Maciej Stachowiak mjs at apple.com
Wed Jun 28 11:36:36 PDT 2006

On Jun 28, 2006, at 11:15 AM, Kevin Ollivier wrote:

> Hi all,
> While working on the wx port, I've noticed there are a number of  
> places where there are __APPLE__ defines that will conflict with  
> the wxWidgets port because wxWidgets uses Carbon and so the Cocoa  
> defines, native data types, etc. aren't appropriate in this case.
> What I was thinking is that we can add a PLATFORM(COCOA) define to  
> Platform.h and define it when __OBJC__ and __APPLE__ are defined.  
> Would this be an acceptable solution?  This would still cause  
> conflicts with our wxCocoa port, but unfortunately development work  
> on that port has stalled so IMHO the conflict is not a major issue  
> at the moment. Eventually, if we do move to support wxCocoa, we  
> could add some __BUILDING_WXCOCOA define and check for that in  
> Platform.h before defining KXMLCORE_PLATFORM_COCOA.
> Thoughts?

The intent is that PLATFORM(DARWIN) means core MacOS system  
facilities which would likely be used by any toolkit port on the Mac,  
and PLATFORM(MAC) means Cocoa/Aqua UI (and other higher-level Mac OS  
stuff). So PLATFORM(MAC) is intended to mean what you suggest for  
PLATFORM(COCOA), we just haven't deployed it everywhere yet.


More information about the webkit-dev mailing list