diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-12 08:24:24 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-12 08:24:24 +0000 |
commit | 0eccd99fb0ef62001bde22625dc74935f4bfc654 (patch) | |
tree | a774bdaa493e7e03cb60d8e82e972f679aa8d652 /include | |
parent | 16952cf2cc8f5ec0ef6bff66909ff211e2eddbe8 (diff) |
Fix a segfault in scandir for empty directories. After looking over
our version, I'm adopting the scandir from glibc (with minor changes)
instead as it seems simpler and already correct.
Diffstat (limited to 'include')
-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 */ |