#ifndef _SYS_CCOMPILE_H
#define _SYS_CCOMPILE_H
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__GNUC__)
#define __GNUC_VERSION \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#else
#define __GNUC_VERSION 0
#endif
#if defined(__ATTRIBUTE_IMPLEMENTED) || defined(__GNUC__)
#define __sun_attr___PRINTFLIKE__(__n) \
__attribute__((__format__(printf, __n, (__n)+1)))
#define __sun_attr___VPRINTFLIKE__(__n) \
__attribute__((__format__(printf, __n, 0)))
#define __FORMAT_ARG(__n) __attribute__((format_arg(__n)))
#if __GNUC_VERSION < 30402
#define __sun_attr___KPRINTFLIKE__ __sun_attr___PRINTFLIKE__
#define __sun_attr___KVPRINTFLIKE__ __sun_attr___VPRINTFLIKE__
#else
#define __sun_attr___KPRINTFLIKE__(__n) \
__attribute__((__format__(cmn_err, __n, (__n)+1)))
#define __sun_attr___KVPRINTFLIKE__(__n) \
__attribute__((__format__(cmn_err, __n, 0)))
#endif
#define __sun_attr___noreturn__ __attribute__((__noreturn__))
#if __GNUC_VERSION >= 40200
#define __sun_attr___gnu_inline__ __attribute__((__gnu_inline__))
#else
#define __sun_attr___gnu_inline__
#endif
#if __GNUC_VERSION >= 40100
#define __sun_attr___returns_twice__ __attribute__((__returns_twice__))
#else
#define __sun_attr___returns_twice__
#endif
#define __sun_attr___pure__ __attribute__((__pure__))
#define __sun_attr___const__ __attribute__((__const__))
#if __GNUC_VERSION >= 20700
#define __aligned(x) __attribute__((__aligned__(x)))
#define __sun_attr___unused__ __attribute__((__unused__))
#endif
#define ___sun_attr_inner(__a) __sun_attr_##__a
#define __sun_attr__(__a) ___sun_attr_inner __a
#else
#define __aligned(x)
#define __sun_attr__(__a)
#define __sun_attr___unused__
#define __FORMAT_ARG(__n)
#endif
#if __GNUC_VERSION >= 40100
#define __sentinel(__n) __attribute__((__sentinel__(__n)))
#else
#define __sentinel(__n)
#endif
#define __PRINTFLIKE(__n) __sun_attr__((__PRINTFLIKE__(__n)))
#define __VPRINTFLIKE(__n) __sun_attr__((__VPRINTFLIKE__(__n)))
#define __KPRINTFLIKE(__n) __sun_attr__((__KPRINTFLIKE__(__n)))
#define __KVPRINTFLIKE(__n) __sun_attr__((__KVPRINTFLIKE__(__n)))
#define __NORETURN __sun_attr__((__noreturn__))
#define __GNU_INLINE __inline__ __sun_attr__((__gnu_inline__))
#define __RETURNS_TWICE __sun_attr__((__returns_twice__))
#define __CONST __sun_attr__((__const__))
#define __PURE __sun_attr__((__pure__))
#define __packed __attribute__((__packed__))
#define __section(x) __attribute__((__section__(x)))
#define __unused __sun_attr__((__unused__))
#ifdef DEBUG
#define __maybe_unused
#else
#define __maybe_unused __sun_attr__((__unused__))
#endif
#define __used __attribute__((__used__))
#define __weak_symbol __attribute__((__weak__))
#define __HIDDEN __attribute__((visibility("hidden")))
#define __cacheline_aligned __aligned(_CACHE_LINE_SIZE)
#ifdef __cplusplus
}
#endif
#endif