From f698831f0ae0cd86225eb647ae4aeb813f08d3b5 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 25 Sep 2008 01:51:49 -0400 Subject: Sync with upstream changes --- talloc/talloc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'talloc/talloc.c') diff --git a/talloc/talloc.c b/talloc/talloc.c index 12b85f5a..1f7e5243 100644 --- a/talloc/talloc.c +++ b/talloc/talloc.c @@ -82,11 +82,19 @@ #if (__GNUC__ >= 3) /* the strange !! is to ensure that __builtin_expect() takes either 0 or 1 as its first argument */ +#ifndef likely #define likely(x) __builtin_expect(!!(x), 1) +#endif +#ifndef unlikely #define unlikely(x) __builtin_expect(!!(x), 0) +#endif #else -#define likely(x) x -#define unlikely(x) x +#ifndef likely +#define likely(x) (x) +#endif +#ifndef unlikely +#define unlikely(x) (x) +#endif #endif /* this null_context is only used if talloc_enable_leak_report() or -- cgit