Fix warnings on SuSE 9.0.
[vlendec/samba-autobuild/.git] / source3 / include / debug.h
index d8dafcbd457509b25f35ca423d0b4f7b46668028..d1716320b3bb75b28bc2b05d4d6cfd377c11a0f5 100644 (file)
@@ -169,12 +169,20 @@ extern bool *DEBUGLEVEL_CLASS_ISSET;
 #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
 
 #define CHECK_DEBUGLVL( level ) \
   ( ((level) <= MAX_DEBUG_LEVEL) && \