[cairo] Fix OS/2 build

Doodle doodle at scenergy.dfmk.hu
Mon Nov 10 07:55:13 PST 2008


Just a note:
Including os2.h from a library's header file might introduce problems 
sometimes.
Imagine a case, when the library needs only INCL_PM and INCL_DOSERRORS 
parts from os2.h, so it defines those, and includes os2.h.

Then the application includes the library's header file (thus, 
implicitly including the PM and DOSERRORS parts from os2.h), then it 
wants to include os2.h with INCL_SEMAPHORES, INCL_PM and INCL_DOSERRORS. 
However, as os2.h was already included, it won't be included again, and 
the INCL_SEMAPHORES will not take effect.

That was the reason for not having os2.h includes in Cairo's public 
os2-specific header files.

Bye,
   Doodle

Peter Weilbacher wrote:
> On 10.11.2008 15:59, Behdad Esfahbod wrote:
>> Dave Yeo wrote:
>>> Hi, this commit,
>>> http://gitweb.freedesktop.org/?p=cairo;a=commitdiff;h=d84752605a4aee96fa872a97a50e59a44ee7051a
>>> broke OS/2. We now get this error,
>>> In file included from ./cairo-os2-private.h:41:
>>> ./cairo-os2.h:56: error: syntax error before "hps_client_window"
>>> ./cairo-os2.h:58: warning: function declaration isn't a prototype
>>> ./cairo-os2.h:62: error: syntax error before "HWND"
>>> ./cairo-os2.h:62: warning: function declaration isn't a prototype
>>> ./cairo-os2.h:72: error: syntax error before "HPS"
>>>
>>> The problem is that these are all defined in os2*.h. Simplest fix seems
>>> to be
>> Then the correct fix is to include os2*.h in cairo-os2.h.
> 
> Agreed, then one can also remove the seperate os2.h include from
> cairo-os2-surface.c. Let me try to test and push the fix tonight.
> Hmm, why do we actually include os2emx.h and not os2.h for GCC?
>    Peter.
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
> 
> 



More information about the cairo mailing list