]> granicus.if.org Git - php/commitdiff
Fixed bug #66471 (Keep backward compatibility)
authorDmitry Stogov <dmitry@zend.com>
Mon, 13 Jan 2014 11:34:25 +0000 (15:34 +0400)
committerDmitry Stogov <dmitry@zend.com>
Mon, 13 Jan 2014 11:34:25 +0000 (15:34 +0400)
ext/opcache/Optimizer/block_pass.c
ext/opcache/ZendAccelerator.c
ext/opcache/config.m4
ext/opcache/zend_accelerator_module.c

index 47f98725c17861c11448be5dd9aad91655b447d0..fff5d7e101630256b9e84f82aefe108591114e57 100644 (file)
@@ -1895,7 +1895,9 @@ static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *
                        if (RESULT_USED(opline)) {
                                if (!defined_here[VAR_NUM(ZEND_RESULT(opline).var)] && !used_ext[VAR_NUM(ZEND_RESULT(opline).var)] &&
                                    (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT ||
+#if ZEND_EXTENSION_API_NO > PHP_5_5_X_API_NO
                                     opline->opcode == ZEND_RECV_VARIADIC ||
+#endif
                                        (opline->opcode == ZEND_OP_DATA && ZEND_RESULT_TYPE(opline) == IS_TMP_VAR) ||
                                        opline->opcode == ZEND_ADD_ARRAY_ELEMENT)) {
                                        /* these opcodes use the result as argument */
@@ -1980,7 +1982,9 @@ static void zend_t_usage(zend_code_block *block, zend_op_array *op_array, char *
 
                        if (opline->opcode == ZEND_RECV ||
                 opline->opcode == ZEND_RECV_INIT ||
+#if ZEND_EXTENSION_API_NO > PHP_5_5_X_API_NO
                 opline->opcode == ZEND_RECV_VARIADIC ||
+#endif
                 opline->opcode == ZEND_ADD_ARRAY_ELEMENT) {
                                if (ZEND_OP1_TYPE(opline) == IS_VAR || ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
                                        usage[VAR_NUM(ZEND_RESULT(opline).var)] = 1;
index abb01b58a0b425451d1d51a4c300ec71908f4e14..81ab4826862eeefa726ee8352456cafbd0da376f 100644 (file)
 #include "main/php_open_temporary_file.h"
 #include "zend_API.h"
 #include "zend_ini.h"
-#include "zend_virtual_cwd.h"
+#if ZEND_EXTENSION_API_NO > PHP_5_5_X_API_NO
+# include "zend_virtual_cwd.h"
+#else
+# include "TSRM/tsrm_virtual_cwd.h"
+#endif
 #include "zend_accelerator_util_funcs.h"
 #include "zend_accelerator_hash.h"
 
@@ -387,8 +391,10 @@ static void accel_use_shm_interned_strings(TSRMLS_D)
 {
        Bucket *p, *q;
 
+#if ZEND_EXTENSION_API_NO > PHP_5_5_X_API_NO
        /* empty string */
        CG(interned_empty_string) = accel_new_interned_string("", sizeof(""), 0 TSRMLS_CC);
+#endif
 
        /* function table hash keys */
        p = CG(function_table)->pListHead;
index 60edeed966b36d5bc8e015a36572aa9fe9ee9b23..f6e6ca94449cd63f9960e35492b2e8bc6f5d591c 100644 (file)
@@ -362,7 +362,7 @@ AC_TRY_RUN([
 if test "$flock_type" == "unknown"; then
        AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
 fi
-  
+
   PHP_NEW_EXTENSION(opcache,
        ZendAccelerator.c \
        zend_accelerator_blacklist.c \
index ff21b01a7f1626140a03fa165b339e91fd8e5e07..83e7d4ca2bc7fe062f5347d3e97ffa7eda1e8678 100644 (file)
 #include "zend_accelerator_blacklist.h"
 #include "php_ini.h"
 #include "SAPI.h"
-#include "zend_virtual_cwd.h"
+#if ZEND_EXTENSION_API_NO > PHP_5_5_X_API_NO
+# include "zend_virtual_cwd.h"
+#else
+# include "TSRM/tsrm_virtual_cwd.h"
+#endif
 #include "ext/standard/info.h"
 #include "ext/standard/php_filestat.h"