summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-09-14 18:50:13 +0200
committerStefan Metzmacher <metze@samba.org>2008-09-14 18:50:13 +0200
commit9d6e473c22baba10e8ad5f9423c6798e1d070d23 (patch)
tree468346c270afbfca23c9c95427395c9c178855e4 /source4/lib
parentf5d90683596e02023d0a81d7d7e4a1458dd28278 (diff)
downloadsamba-9d6e473c22baba10e8ad5f9423c6798e1d070d23.tar.gz
samba-9d6e473c22baba10e8ad5f9423c6798e1d070d23.tar.bz2
samba-9d6e473c22baba10e8ad5f9423c6798e1d070d23.zip
Fix warnings on SuSE 9.0.
The macros "[un]likely" are already defined on SuSE 9.0. Patch from Volker. (partialy cherry-picked 30d181c92463aecd6e649330d3645d86d5a17e43) metze (This used to be commit ad7ed33f786124e4afbba4330201a3a6463c6f73)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/talloc/talloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c
index baf88fe754..1f7e52439f 100644
--- a/source4/lib/talloc/talloc.c
+++ b/source4/lib/talloc/talloc.c
@@ -82,12 +82,20 @@
#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
+#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
talloc_enable_leak_report_full() is called, otherwise it remains