]> granicus.if.org Git - php/commitdiff
Add #ifndef restrict
authordreamsxin <dreamsxin@qq.com>
Tue, 7 Feb 2017 03:36:22 +0000 (11:36 +0800)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 8 Feb 2017 00:00:35 +0000 (01:00 +0100)
Zend/zend_portability.h

index c1e17c30f287ad8e2f7ae5587039abd1068169dc..cce55b71b2f9adfbceaad265c388f098f25b02ef 100644 (file)
@@ -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