diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2017-11-11 23:42:54 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2017-11-12 00:28:22 +0200 |
commit | 8feb2f98f33d6f0351f9703823e612935239eaab (patch) | |
tree | 810099402bd9b6b4b92cde61721ade858c7de4a2 | |
parent | e428f970f69750094f6dbd40dee8e1d36182a545 (diff) | |
download | fribidi-8feb2f98f33d6f0351f9703823e612935239eaab.tar.gz |
These definitions don’t depend on GLib
-rw-r--r-- | lib/fribidi-common.h | 21 |
1 files changed, 8 insertions, 13 deletions
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 |