[cairo-bugs] [Bug 10150] New: Support inline with Sun Studio
compiler
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 1 23:00:01 PST 2007
http://bugs.freedesktop.org/show_bug.cgi?id=10150
Summary: Support inline with Sun Studio compiler
Product: cairo
Version: 1.3.9
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: general
AssignedTo: cworth at cworth.org
ReportedBy: brian.cameron at sun.com
QAContact: cairo-bugs at cairographics.org
The attached patch fixes the INLINE macro so it also gets set properly when
using the Sun Studio compiler. It basically adds the __SUNPRO_C part:
#if defined(__GNUC__)
#define INLINE __inline__
#elif defined (__SUNPRO_C)
#define INLINE inline
#else
#define INLINE
#endif
It would be nice if this could go upstream so that Sun Studio also compiles
cairo with inline properly.
I notice that there is some mess with how inline is handled in
cairo/pixman/src. The macro is defined in icint.h and fbpict.h. Since
fbpict.h indirectly includes icint.h, this causes the macro to be defined
twice. The macro is defined separately in pixregion.c.
Also it seems some code uses "__inline" when it would be more consistent to use
the INLINE macro.
The attached patch defines INLINE just once in icint.h and adds an "#include
"icint.h" to pixregion.c to access this macro.
Note that the function fbmmx.c also uses __inline and could probably be made to
just use INLINE. Since I'm not building this code, I didn't make this change
since I can't test it. If so, then this code could be removed from icint.h
#ifndef __GNUC__
#define __inline
#endif
I'm not sure my attached patch is the best approach. Perhaps the macro should
be moved to a more general header file rather than in icint.h. Perhaps
pixman.h? But this patch shows the issues and how to approach fixing them.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the cairo-bugs
mailing list