diff options
Diffstat (limited to 'include/features.h')
-rw-r--r-- | include/features.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/features.h b/include/features.h index 8b69a5828..7af149bcc 100644 --- a/include/features.h +++ b/include/features.h @@ -411,9 +411,12 @@ uClibc was built without large file support enabled. #endif /* Prepare for the case that `__builtin_expect' is not available. */ -#ifndef HAVE_BUILTIN_EXPECT -# define __builtin_expect(expr, val) (expr) +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) #endif +#define likely(x) __builtin_expect((x),1) +#define unlikely(x) __builtin_expect((x),0) + #endif /* features.h */ |