]> granicus.if.org Git - php/commitdiff
MFH: __builtin_expect() exists only in GCC 3.0 and higher
authorDmitry Stogov <dmitry@php.net>
Mon, 18 Dec 2006 08:59:40 +0000 (08:59 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 18 Dec 2006 08:59:40 +0000 (08:59 +0000)
Zend/zend_alloc.c

index 032a565216edc119889e4c26067ce80a01a02387..23d57f4ee65723cde30ddd33f84ec6e89743eec1 100644 (file)
@@ -66,7 +66,7 @@ void zend_debug_alloc_output(char *format, ...)
 }
 #endif
 
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
+#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
 # define EXPECTED(condition)   __builtin_expect(condition, 1)
 # define UNEXPECTED(condition) __builtin_expect(condition, 0)
 static void zend_mm_panic(const char *message) __attribute__ ((noreturn));