[cairo] static inline C code in VC++
Hans Breuer
hans at breuer.org
Fri Jan 18 09:46:01 PST 2008
On 18.01.2008 18:19, Behdad Esfahbod wrote:
> On Fri, 2008-01-18 at 11:47 -0500, Antoine Azar wrote:
>> Hey all,
>>
>> it seems that Visual Studio's C compiler isn't totally up to date,
>> and chokes on static inline functions. I see there are a bunch of
>> functions declared static inline in cairo-fixed-private.h, and this
>> breaks compilation on Windows. A simple fix would be to simply drop
>> the inline keyword on MSCVER. Anyone has any objections or other suggestions?
>
> Sounds good as long as you limit that to the broken versions of the
> compiler only. Check out cairo-compiler-private.h.
>
It is not necessary to do this in the source at all. Just do some define
some things in the makefile. My makefile.msc (for vc6 - vc2008) contains:
DEFINES = -DWIN32 \
-Dsnprintf=_snprintf -Dinline=__inline
-DM_PI=3.1415926535897932384626433832795028841971693993751 \
-DPNGAPI=__cdecl -Dcairo_public=__declspec(dllexport) \
-DPACKAGE_BUGREPORT=\"http://bugs.freedesktop.org/enter_bug.cgi?product=cairo\"
\
-DHAVE_WINDOWS_H=1 \
-DPACKAGE_VERSION=\"1.5.2\"
Regards,
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
More information about the cairo
mailing list