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().
This commit is contained in:
Ondřej Surý
2021-10-14 15:22:57 +02:00
committed by Ondřej Surý
parent e603983ec9
commit 8be27b308f
2 changed files with 0 additions and 26 deletions
-18
View File
@@ -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
#
-8
View File
@@ -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)