aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make.c8
-rw-r--r--src/lexer.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/make.c b/make.c
index 0b3837f..ec48e23 100644
--- a/make.c
+++ b/make.c
@@ -31,6 +31,14 @@ static char *cflags_all[] = {
#if __GLIBC__
"-D_GNU_SOURCE",
#endif
+#if __GNUC__
+ "-Dlikely(x)=__builtin_expect(!!(x), 1)",
+ "-Dunlikely(x)=__builtin_expect(!!(x), 0)",
+#else
+ "-D__attribute__(x)=",
+ "-Dlikely(x)=(x)",
+ "-Dunlikely(x)=(x)",
+#endif
};
static char *cflags_dbg[] = {
diff --git a/src/lexer.c b/src/lexer.c
index 8ca35e7..4df1e52 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -12,14 +12,6 @@
#include "lexer.h"
#include "unicode.h"
-#ifdef __GNUC__
-# define likely(x) __builtin_expect(!!(x), 1)
-# define unlikely(x) __builtin_expect(!!(x), 0)
-#else
-# define likely(x) (x)
-# define unlikely(x) (x)
-#endif
-
#define LEXEMES_DFLT_CAP (2048)
#define SIZE_WDTH (sizeof(size_t) * CHAR_BIT)