diff --git a/picohttpparser.c b/picohttpparser.c index 5e5783a..c0a78c8 100644 --- a/picohttpparser.c +++ b/picohttpparser.c @@ -37,12 +37,20 @@ #include "picohttpparser.h" #if __GNUC__ >= 3 +#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 #ifdef _MSC_VER #define ALIGNED(n) _declspec(align(n))