[cairo] static inline C code in VC++
cairo at antoineazar.com
Fri Jan 18 10:17:20 PST 2008
Nice, that's an interesting solution. I'm personally not a big fan of
putting this kind of stuff in the makefile though because people end
up spending lots of time looking for defines in the code (and cursing
Intellisense), until they realize it's buried in the makefile. It
also doesn't make it obvious what compilation differences exist for
VC++ VS GCC, while an #ifdef #else #endif block makes it very clear.
Anyways here's my patch for it.
At 12:46 PM 1/18/2008, Hans Breuer wrote:
>On 18.01.2008 18:19, Behdad Esfahbod wrote:
>>On Fri, 2008-01-18 at 11:47 -0500, Antoine Azar wrote:
>>>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 -
>DEFINES = -DWIN32 \
> -Dsnprintf=_snprintf -Dinline=__inline
> -DM_PI=3.1415926535897932384626433832795028841971693993751 \
> -DPNGAPI=__cdecl -Dcairo_public=__declspec(dllexport) \
> -DHAVE_WINDOWS_H=1 \
>-------- Hans "at" Breuer "dot" Org -----------
>Tell me what you need, and I'll tell you how to
>get along without it. -- Dilbert
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3019 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080118/c5863ffe/attachment-0001.obj
More information about the cairo