From: Khaled Hosny Date: Sat, 11 Nov 2017 21:42:54 +0000 (+0200) Subject: These definitions don’t depend on GLib X-Git-Tag: v1.0.0~26^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8feb2f98f33d6f0351f9703823e612935239eaab;p=fribidi These definitions don’t depend on GLib --- diff --git a/lib/fribidi-common.h b/lib/fribidi-common.h index 6fb3680..f5497e5 100644 --- a/lib/fribidi-common.h +++ b/lib/fribidi-common.h @@ -66,27 +66,22 @@ # define FRIBIDI_GNUC_DEPRECATED G_GNUC_DEPRECATED # define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS G_GNUC_BEGIN_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS G_GNUC_END_IGNORE_DEPRECATIONS -# if __GNUC__ > 2 -# define FRIBIDI_GNUC_WARN_UNUSED \ - __attribute__((__warn_unused_result__)) -# define FRIBIDI_GNUC_MALLOC \ - __attribute__((__malloc__)) -# define FRIBIDI_GNUC_HIDDEN \ - __attribute__((__visibility__ ("hidden"))) -# else /* __GNUC__ <= 2 */ -# define FRIBIDI_GNUC_WARN_UNUSED -# define FRIBIDI_GNUC_MALLOC -# define FRIBIDI_GNUC_HIDDEN -# endif /* __GNUC__ <= 2 */ #else /* !FRIBIDI_USE_GLIB */ # define FRIBIDI_GNUC_CONST # define FRIBIDI_GNUC_DEPRECATED # define FRIBIDI_GNUC_BEGIN_IGNORE_DEPRECATIONS # define FRIBIDI_GNUC_END_IGNORE_DEPRECATIONS +#endif /* !FRIBIDI_USE_GLIB */ + +#if defined(__GNUC__) && (__GNUC__ > 2) +# define FRIBIDI_GNUC_WARN_UNUSED __attribute__((__warn_unused_result__)) +# define FRIBIDI_GNUC_MALLOC __attribute__((__malloc__)) +# define FRIBIDI_GNUC_HIDDEN __attribute__((__visibility__ ("hidden"))) +#else /* __GNUC__ */ # define FRIBIDI_GNUC_WARN_UNUSED # define FRIBIDI_GNUC_MALLOC # define FRIBIDI_GNUC_HIDDEN -#endif /* !FRIBIDI_USE_GLIB */ +#endif /* __GNUC__ */ /* FRIBIDI_BEGIN_DECLS should be used at the beginning of your declarations, * so that C++ compilers don't mangle their names. Use FRIBIDI_END_DECLS at