From 387df00577fa94f49da58bc74de4f9c4afd2cb41 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 13 Jul 2008 08:05:54 -0400 Subject: [PATCH] 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" --- e2fsck/crc32defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2fsck/crc32defs.h b/e2fsck/crc32defs.h index 7d770d3..27414d2 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 -- 1.8.3.1