summaryrefslogtreecommitdiff
path: root/src/libknot/common.h
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-10-31 10:39:56 +0100
committerOndřej Surý <ondrej@sury.org>2012-10-31 10:39:56 +0100
commit77bfcd8d02fbe5cae75a41017144f15c5d0bc5f4 (patch)
treec1d837889eda794191f3fd4ef6254a6735d4a45c /src/libknot/common.h
parent9a7b8a090ba4fa50fc023bdea04e83602a2ad0bb (diff)
downloadknot-77bfcd8d02fbe5cae75a41017144f15c5d0bc5f4.tar.gz
Imported Upstream version 1.1.1upstream/1.1.1
Diffstat (limited to 'src/libknot/common.h')
-rw-r--r--[-rwxr-xr-x]src/libknot/common.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libknot/common.h b/src/libknot/common.h
index 9b2d8ae..0bff97e 100755..100644
--- a/src/libknot/common.h
+++ b/src/libknot/common.h
@@ -25,6 +25,7 @@
*/
#include <config.h>
+#include "common/errcode.h"
#ifdef HAVE_LIBLDNS
#define TEST_WITH_LDNS
@@ -56,23 +57,23 @@ typedef unsigned int uint; /*!< \brief Unsigned. */
({ typeof (a) _a = (a); typeof (b) _b = (b); _a > _b ? _a : _b; })
/* Optimisation macros. */
-#ifndef likely
+#ifndef knot_likely
/*! \brief Optimize for x to be true value. */
-#define likely(x) __builtin_expect((x),1)
+#define knot_likely(x) __builtin_expect((x),1)
#endif
-#ifndef unlikely
+#ifndef knot_unlikely
/*! \brief Optimize for x to be false value. */
-#define unlikely(x) __builtin_expect((x),0)
+#define knot_unlikely(x) __builtin_expect((x),0)
#endif
/* Optimisation macros. */
-#ifndef likely
+#ifndef knot_likely
/*! \brief Optimize for x to be true value. */
-#define likely(x) __builtin_expect((x),1)
+#define knot_likely(x) __builtin_expect((x),1)
#endif
-#ifndef unlikely
+#ifndef knot_unlikely
/*! \brief Optimize for x to be false value. */
-#define unlikely(x) __builtin_expect((x),0)
+#define knot_unlikely(x) __builtin_expect((x),0)
#endif
/*! \todo Refactor theese. We should have an allocator function handling this.*/