[cairo] Cairo ported to OS/2 - Suggestions

Doodle doodle at scenergy.dfmk.hu
Wed Aug 17 02:44:37 PDT 2005


Bill Spitzak wrote:
> I would prefer "CAIROEXPORT" over "CAIRODECLSPEC" so that it is a little 
> more clear what it's purpose is. I've also found the best way to control 
> the Win32 dllimport/export mess is to do this:
> 
> #ifndef CAIROEXPORT
> # if _WIN32
> #  define CAIROEXPORT __declspec(dllimport)
> # endif
> #endif
> 
> The way Cairo itself is compiled is with 
> -DCAIROEXPORT=__declspec(dllexport). This avoids the need for yet 
> *another* variable (such as the -DBUILD_CAIRO you show).

Sounds good to me.

> 
> Have not had any experience with the calling conventions. Do all 
> compilers require it to be placed between the type and the function 
> name? I would think a compiler that required it before the type would 
> mean your CAIROCALL would not work.

AFAIK, all require it to be between type and function name, because it's
an attribute of the function/name/.
Again, I can only point to SDL (sorry for that :) ), that it's in there,
and it works on all platforms, even on embedded devices.

Doodle


More information about the cairo mailing list