Skip to content

Commit

Permalink
Fix compilation with GCC 2, which had no __builtin_expect
Browse files Browse the repository at this point in the history
  • Loading branch information
hart-NTP authored and nmathewson committed May 20, 2011
1 parent 5786b91 commit 09d39a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util-internal.h
Expand Up @@ -179,7 +179,7 @@ long _evutil_weakrand(void);

/* Evaluates to the same boolean value as 'p', and hints to the compiler that
* 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)
#else
#define EVUTIL_UNLIKELY(p) (p)
Expand Down

0 comments on commit 09d39a1

Please sign in to comment.