Trying porting back WebKit

Anders F Björklund afb at macports.org
Fri Jan 25 01:50:08 PST 2008


Guido Soranzio wrote:

>> Your best bet maybe to work with the WebKit developers, as WebKit is 
>> not Apple (its mostly Apple, but not just Apple).
>
> Indeed, the problem is that the includes of 
> AplicationServices.framework
> are evaluated even when PLATFORM(GTK) is defined.
...
> from Webcore/Configurations/WebCore.xcconfig but, when Frame.cpp
> is compiled, the double definition of the struct Cursor is still
> imported from the Carbon system includes.

The usual workaround is to #define Cursor to something else,
so that it won't conflict with the legacy Mac OS headers...

#if defined(__APPLE__) && defined(__MACH__)
/* conflicts with Quickdraw.h */
#define Cursor X11Cursor
#endif

#include <X11/Xlib.h>
...

#if defined(__APPLE__) && defined(__MACH__)
/* matches the re-define above */
#undef Cursor
#endif

--anders



More information about the macports-dev mailing list