[cairo] static inline C code in VC++

Antoine Azar cairo at antoineazar.com
Fri Jan 18 09:47:10 PST 2008


Actually it seems that using __inline instead of inline does the trick:

#ifdef _MSC_VER
#define STIN static __inline
#else
#define STIN static inline
#endif

this works fine. Strange.
Antoine


At 12:35 PM 1/18/2008, Antoine Azar wrote:
>I dropped the keyword if _MSC_VER is defined only. It seems all
>versions of Visual C++ will fail on this, as I'm using 2008 and I'm
>seeing reports of people on VC++ 6.0 having the same issue. Using
>_MSC_VER should still leave "static inline" for Windows folks using
>something else than VC++.
>
>Thanks,
>Antoine
>
>
>At 12:19 PM 1/18/2008, 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.
> >
> > > Thanks,
> > > Antoine
> >
> >--
> >behdad
> >http://behdad.org/
> >
> >"Those who would give up Essential Liberty to purchase a little
> >  Temporary Safety, deserve neither Liberty nor Safety."
> >         -- Benjamin Franklin, 1759
>
>_______________________________________________
>cairo mailing list
>cairo at cairographics.org
>http://lists.cairographics.org/mailman/listinfo/cairo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080118/daee8cb3/attachment.html 


More information about the cairo mailing list