From: Theodore Ts'o Date: Sun, 13 Jul 2008 12:05:54 +0000 (-0400) Subject: Only use __builtin_expect if __GNUC__ > 3 X-Git-Tag: v1.41.1~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=387df00577fa94f49da58bc74de4f9c4afd2cb41;p=thirdparty%2Fe2fsprogs.git Only use __builtin_expect if __GNUC__ > 3 Gcc only supports __builtin_expect for gcc versions 2.96 and up. Since it's tricky to check for gcc 2.95 vs 2.96 (and either are only used on really ancient systems anyway), we only use this optimization on 3.x and newer versions of gcc. Signed-off-by: "Theodore Ts'o" --- diff --git a/e2fsck/crc32defs.h b/e2fsck/crc32defs.h index 7d770d349..27414d2d0 100644 --- a/e2fsck/crc32defs.h +++ b/e2fsck/crc32defs.h @@ -55,7 +55,7 @@ #define __le32_to_cpu(x) (x) #endif -#ifdef __GNUC__ +#if (__GNUC__ >= 3) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else