]> granicus.if.org Git - php/commitdiff
__builtin_expect() exists only in GCC 3.0 and higher.
authorAndrei Zmievski <andrei@php.net>
Fri, 15 Dec 2006 22:47:09 +0000 (22:47 +0000)
committerAndrei Zmievski <andrei@php.net>
Fri, 15 Dec 2006 22:47:09 +0000 (22:47 +0000)
Zend/zend_alloc.c

index d6af6118dd24a485c8ba7ed4e7e52306f8f46639..1bd6731da79e9f2466d847d998bda4f02d914714 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));