summaryrefslogtreecommitdiff
path: root/src/html
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-16 16:10:45 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-16 22:17:35 +0100
commit627326bed4e58cf457e8c8f2c45b2e6d7c316a54 (patch)
tree90fb81020f409b82d55acd5ca58f1074e55bfd9d /src/html
parent485ef21b95e257e9d9cbcaa804c3c164f1f49a80 (diff)
Feature test for __builtin_expect
Diffstat (limited to 'src/html')
-rw-r--r--src/html/houdini.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/html/houdini.h b/src/html/houdini.h
index b8ed0d9..9e1200e 100644
--- a/src/html/houdini.h
+++ b/src/html/houdini.h
@@ -6,10 +6,16 @@ extern "C" {
#endif
#include <stdint.h>
+#include "config.h"
#include "buffer.h"
-#define likely(x) __builtin_expect((x),1)
-#define unlikely(x) __builtin_expect((x),0)
+#ifdef HAVE___BUILTIN_EXPECT
+# define likely(x) __builtin_expect((x),1)
+# define unlikely(x) __builtin_expect((x),0)
+#else
+# define likely(x) (x)
+# define unlikely(x) (x)
+#endif
#ifdef HOUDINI_USE_LOCALE
# define _isxdigit(c) isxdigit(c)