Rev 1892 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1892 | Rev 3959 | ||
---|---|---|---|
Line 112... | Line 112... | ||
112 | #define CAIRO_PRINTF_FORMAT(fmt_index, va_index) |
112 | #define CAIRO_PRINTF_FORMAT(fmt_index, va_index) |
113 | #endif |
113 | #endif |
Line 114... | Line 114... | ||
114 | 114 | ||
115 | /* slim_internal.h */ |
115 | /* slim_internal.h */ |
116 | #define CAIRO_HAS_HIDDEN_SYMBOLS 1 |
116 | #define CAIRO_HAS_HIDDEN_SYMBOLS 1 |
- | 117 | #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && \ |
|
- | 118 | (defined(__ELF__) || defined(__APPLE__)) && \ |
|
117 | #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun) |
119 | !defined(__sun) |
118 | #define cairo_private_no_warn __attribute__((__visibility__("hidden"))) |
120 | #define cairo_private_no_warn __attribute__((__visibility__("hidden"))) |
119 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
121 | #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
120 | #define cairo_private_no_warn __hidden |
122 | #define cairo_private_no_warn __hidden |
121 | #else /* not gcc >= 3.3 and not Sun Studio >= 8 */ |
123 | #else /* not gcc >= 3.3 and not Sun Studio >= 8 */ |
Line 179... | Line 181... | ||
179 | #define cairo_const |
181 | #define cairo_const |
180 | #define cairo_always_inline inline |
182 | #define cairo_always_inline inline |
181 | #endif |
183 | #endif |
Line 182... | Line 184... | ||
182 | 184 | ||
183 | #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) |
- | |
184 | #define _CAIRO_BOOLEAN_EXPR(expr) \ |
- | |
185 | __extension__ ({ \ |
- | |
186 | int _cairo_boolean_var_; \ |
- | |
187 | if (expr) \ |
- | |
188 | _cairo_boolean_var_ = 1; \ |
- | |
189 | else \ |
- | |
190 | _cairo_boolean_var_ = 0; \ |
- | |
191 | _cairo_boolean_var_; \ |
- | |
192 | }) |
185 | #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) |
193 | #define likely(expr) (__builtin_expect (_CAIRO_BOOLEAN_EXPR(expr), 1)) |
186 | #define likely(expr) (__builtin_expect (!!(expr), 1)) |
194 | #define unlikely(expr) (__builtin_expect (_CAIRO_BOOLEAN_EXPR(expr), 0)) |
187 | #define unlikely(expr) (__builtin_expect (!!(expr), 0)) |
195 | #else |
188 | #else |
196 | #define likely(expr) (expr) |
189 | #define likely(expr) (expr) |
197 | #define unlikely(expr) (expr) |
190 | #define unlikely(expr) (expr) |
Line 201... | Line 194... | ||
201 | #undef __attribute__ |
194 | #undef __attribute__ |
202 | #define __attribute__(x) |
195 | #define __attribute__(x) |
203 | #endif |
196 | #endif |
Line 204... | Line 197... | ||
204 | 197 | ||
205 | #if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER) |
198 | #if (defined(__WIN32__) && !defined(__WINE__)) || defined(_MSC_VER) |
206 | #define snprintf _snprintf |
199 | #define access _access |
207 | #define popen _popen |
- | |
208 | #define pclose _pclose |
200 | #define fdopen _fdopen |
- | 201 | #define hypot _hypot |
|
- | 202 | #define pclose _pclose |
|
- | 203 | #define popen _popen |
|
- | 204 | #define snprintf _snprintf |
|
- | 205 | #define strdup _strdup |
|
- | 206 | #define unlink _unlink |
|
209 | #define hypot _hypot |
207 | #define vsnprintf _vsnprintf |
Line 210... | Line 208... | ||
210 | #endif |
208 | #endif |
- | 209 | ||
211 | 210 | #ifdef _MSC_VER |
|
212 | #ifdef _MSC_VER |
211 | #ifndef __cplusplus |
213 | #undef inline |
- | |
214 | #define inline __inline |
- | |
215 | - | ||
216 | /* Add a definition of ffs */ |
- | |
217 | #include |
- | |
218 | #pragma intrinsic(_BitScanForward) |
- | |
219 | static __forceinline int |
- | |
220 | ffs (int x) |
- | |
221 | { |
- | |
222 | unsigned long i; |
- | |
223 | 212 | #undef inline |
|
224 | if (_BitScanForward(&i, x) != 0) |
- | |
225 | return i + 1; |
- | |
226 | - | ||
227 | return 0; |
- | |
228 | } |
213 | #define inline __inline |
Line 229... | Line 214... | ||
229 | 214 | #endif |
|
230 | #endif |
215 | #endif |
231 | 216 |