From 2ba87c11299b60938078e8156d77b63ac9130ff4 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 11 Aug 2009 14:14:42 +0000 Subject: [PATCH] * eina: Fix SunPro compiler. SVN revision: 41690 --- legacy/eina/src/include/eina_types.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/legacy/eina/src/include/eina_types.h b/legacy/eina/src/include/eina_types.h index 6592991de7..ecdf8ef9e6 100644 --- a/legacy/eina/src/include/eina_types.h +++ b/legacy/eina/src/include/eina_types.h @@ -154,7 +154,29 @@ # define EINA_UNLIKELY(exp) exp # define EINA_LIKELY(exp) exp -#else /* ! __GNUC__ && ! _WIN32 */ +#elif defined(__SUNPRO_C) +# define EINA_WARN_UNUSED_RESULT +# define EINA_ARG_NONNULL(...) +# define EINA_DEPRECATED +# if __SUNPRO_C >= 0x590 +# define EINA_MALLOC __attribute__ ((malloc)) +# define EINA_PURE __attribute__ ((pure)) +# else +# define EINA_MALLOC +# define EINA_PURE +# endif +# define EINA_PRINTF(fmt, arg) +# define EINA_SCANF(fmt, arg) +# define EINA_FORMAT(fmt) +# if __SUNPRO_C >= 0x590 +# define EINA_CONST __attribute__ ((const)) +# else +# define EINA_CONST +# endif +# define EINA_UNLIKELY(exp) exp +# define EINA_LIKELY(exp) exp + +#else /* ! __GNUC__ && ! _WIN32 && ! __SUNPRO_C */ # define EINA_WARN_UNUSED_RESULT # define EINA_ARG_NONNULL(idx, ...) # define EINA_DEPRECATED @@ -166,7 +188,7 @@ # define EINA_CONST # define EINA_UNLIKELY(exp) exp # define EINA_LIKELY(exp) exp -#endif /* ! __GNUC__ && ! _WIN32 */ +#endif /* ! __GNUC__ && ! _WIN32 && ! __SUNPRO_C */ /* remove this TRUE/FALSE redifinitions */