From: Ondřej Surý Date: Thu, 14 Oct 2021 12:26:07 +0000 (+0200) Subject: Remove unused LIBRPZ_(UN)LIKELY macros X-Git-Tag: v9.17.20~47^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8be27b308fe8d9201b20b6e38c459fb6dbfd311f;p=thirdparty%2Fbind9.git Remove unused LIBRPZ_(UN)LIKELY macros The librpz.h defined LIRPZ_LIKELY() and LIBRPZ_UNLIKELY() macros that were actually unused in the code. Remove the macros and the autoconf check for __builtin_expect(). --- diff --git a/configure.ac b/configure.ac index a582ad33a49..d45e0300b4a 100644 --- a/configure.ac +++ b/configure.ac @@ -1155,24 +1155,6 @@ AC_LINK_IFELSE( [AC_MSG_RESULT([no]) ]) -# -# Check for __builtin_expect -# -AC_MSG_CHECKING([compiler support for __builtin_expect]) -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[]], - [[return (__builtin_expect(1, 1) ? 1 : 0);]] - )], - [have_builtin_expect=yes - AC_MSG_RESULT(yes)], - [have_builtin_expect=no - AC_MSG_RESULT(no)] -) -if test "yes" = "$have_builtin_expect"; then - AC_DEFINE(HAVE_BUILTIN_EXPECT, 1, [Define to 1 if the compiler supports __builtin_expect.]) -fi - # # Check for __builtin_clz # diff --git a/lib/dns/include/dns/librpz.h b/lib/dns/include/dns/librpz.h index c6afa343796..1d9ce12c52e 100644 --- a/lib/dns/include/dns/librpz.h +++ b/lib/dns/include/dns/librpz.h @@ -222,14 +222,6 @@ typedef struct { #define LIBRPZ_NORET #endif /* ifdef LIBRPZ_HAVE_ATTR */ -#ifdef HAVE_BUILTIN_EXPECT -#define LIBRPZ_LIKELY(c) __builtin_expect(!!(c), 1) -#define LIBRPZ_UNLIKELY(c) __builtin_expect(!!(c), 0) -#else /* ifdef HAVE_BUILTIN_EXPECT */ -#define LIBRPZ_LIKELY(c) (c) -#define LIBRPZ_UNLIKELY(c) (c) -#endif /* ifdef HAVE_BUILTIN_EXPECT */ - typedef bool(librpz_parse_log_opt_t)(librpz_emsg_t *emsg, const char *arg); LIBDEF_F(parse_log_opt)