diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2023-03-28 06:08:03 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2023-03-28 06:08:03 +0000 |
commit | 1d0c39f77ec4ef64f9f839dc115185e7b19609a9 (patch) | |
tree | f57b78132a12fd10355b361f1de2fcfccb16c002 /Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh | |
parent | ed32e2445badb98795c8f8cc21e75e4ebf5ff19c (diff) |
harfbuzz 7.1.0
git-svn-id: svn://tug.org/texlive/trunk@66694 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh index 857571b42fd..d09849e5653 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb.hh @@ -246,7 +246,15 @@ extern "C" void hb_free_impl(void *ptr); * Compiler attributes */ -#if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE__) +// gcc 10 has __has_builtin but not earlier versions. Sanction any gcc >= 5 +// clang defines it so no need. +#ifdef __has_builtin +#define hb_has_builtin __has_builtin +#else +#define hb_has_builtin(x) ((defined(__GNUC__) && __GNUC__ >= 5)) +#endif + +#if defined(__OPTIMIZE__) && hb_has_builtin(__builtin_expect) #define likely(expr) (__builtin_expect (!!(expr), 1)) #define unlikely(expr) (__builtin_expect (!!(expr), 0)) #else |