| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| #ifndef _XFUNCPROTO_H_ |
| #define _XFUNCPROTO_H_ |
|
|
| #ifndef NeedFunctionPrototypes |
| #define NeedFunctionPrototypes 1 |
| #endif |
|
|
| #ifndef NeedVarargsPrototypes |
| #define NeedVarargsPrototypes 1 |
| #endif |
|
|
| #if NeedFunctionPrototypes |
|
|
| #ifndef NeedNestedPrototypes |
| #define NeedNestedPrototypes 1 |
| #endif |
|
|
| #ifndef _Xconst |
| #define _Xconst const |
| #endif |
|
|
| |
| #ifndef NARROWPROTO |
| #define NARROWPROTO |
| #endif |
| #ifndef FUNCPROTO |
| #define FUNCPROTO 15 |
| #endif |
|
|
| #ifndef NeedWidePrototypes |
| #ifdef NARROWPROTO |
| #define NeedWidePrototypes 0 |
| #else |
| #define NeedWidePrototypes 1 |
| #endif |
| #endif |
|
|
| #endif |
|
|
| #ifndef _XFUNCPROTOBEGIN |
| #if defined(__cplusplus) || defined(c_plusplus) |
| #define _XFUNCPROTOBEGIN extern "C" { |
| #define _XFUNCPROTOEND } |
| #else |
| #define _XFUNCPROTOBEGIN |
| #define _XFUNCPROTOEND |
| #endif |
| #endif |
|
|
| #if defined(__GNUC__) && (__GNUC__ >= 4) |
| # define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) |
| # define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) |
| #else |
| # define _X_SENTINEL(x) |
| # define _X_ATTRIBUTE_PRINTF(x,y) |
| #endif |
|
|
| #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__CYGWIN__) |
| # define _X_EXPORT __attribute__((visibility("default"))) |
| # define _X_HIDDEN __attribute__((visibility("hidden"))) |
| # define _X_INTERNAL __attribute__((visibility("internal"))) |
| #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
| # define _X_EXPORT __global |
| # define _X_HIDDEN __hidden |
| # define _X_INTERNAL __hidden |
| #else |
| # define _X_EXPORT |
| # define _X_HIDDEN |
| # define _X_INTERNAL |
| #endif |
|
|
| #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) |
| # define _X_LIKELY(x) __builtin_expect(!!(x), 1) |
| # define _X_UNLIKELY(x) __builtin_expect(!!(x), 0) |
| # define _X_INLINE inline |
| #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) |
| # define _X_LIKELY(x) (x) |
| # define _X_UNLIKELY(x) (x) |
| # define _X_INLINE inline |
| #else |
| # define _X_LIKELY(x) (x) |
| # define _X_UNLIKELY(x) (x) |
| # define _X_INLINE |
| #endif |
|
|
| #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) |
| # define _X_DEPRECATED __attribute__((deprecated)) |
| #else |
| # define _X_DEPRECATED |
| #endif |
|
|
| #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205) |
| # define _X_NORETURN __attribute((noreturn)) |
| #else |
| # define _X_NORETURN |
| #endif |
|
|
| #endif |
|
|