From 7a0adb4cd2ec0eef10f2ae6453c61e90b7615462 Mon Sep 17 00:00:00 2001 From: dreamsxin Date: Tue, 7 Feb 2017 11:36:22 +0800 Subject: [PATCH] Add #ifndef restrict --- Zend/zend_portability.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h index c1e17c30f28..cce55b71b2f 100644 --- a/Zend/zend_portability.h +++ b/Zend/zend_portability.h @@ -239,11 +239,13 @@ char *alloca(); # define ZEND_FASTCALL #endif -#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 -#else -# define __restrict__ +#ifndef restrict +# if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 +# else +# define __restrict__ +# endif +# define restrict __restrict__ #endif -#define restrict __restrict__ #if (defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)) || __has_attribute(noreturn) # define HAVE_NORETURN