diff options
-rw-r--r-- | make.c | 8 | ||||
-rw-r--r-- | src/lexer.c | 8 |
2 files changed, 8 insertions, 8 deletions
@@ -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) |