com php-src: Add #ifndef restrict: Zend/zend_portability.h

[email protected] (Nikita Popov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    7a0adb4cd2ec0eef10f2ae6453c61e90b7615462
Author:    dreamsxin <[email protected]>         Tue, 7 Feb 2017 11:36:22 +0800
Committer: Nikita Popov <[email protected]>      Wed, 8 Feb 2017 01:00:35 +0100
Parents:   714d825b62e719447686da6efe3b4063c2f25749
Branches:  PHP-7.0 PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=7a0adb4cd2ec0eef10f2ae6453c61e90b7615462

Log:
Add #ifndef restrict

Changed paths:
  M  Zend/zend_portability.h


Diff:
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index c1e17c3..cce55b7 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.