mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 13:58:58 -04:00
Fix compilation with GCC 2, which had no __builtin_expect
This commit is contained in:
parent
5786b91e2e
commit
09d39a120d
@ -179,7 +179,7 @@ long _evutil_weakrand(void);
|
|||||||
|
|
||||||
/* Evaluates to the same boolean value as 'p', and hints to the compiler that
|
/* Evaluates to the same boolean value as 'p', and hints to the compiler that
|
||||||
* we expect this value to be false. */
|
* we expect this value to be false. */
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && __GNUC__ >= 3 /* gcc 3.0 or later */
|
||||||
#define EVUTIL_UNLIKELY(p) __builtin_expect(!!(p),0)
|
#define EVUTIL_UNLIKELY(p) __builtin_expect(!!(p),0)
|
||||||
#else
|
#else
|
||||||
#define EVUTIL_UNLIKELY(p) (p)
|
#define EVUTIL_UNLIKELY(p) (p)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user