diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-07-22 15:42:17 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-07-22 15:42:17 +0400 |
commit | f2a2fcceceed5bb5851b459af9383d0da14a804b (patch) | |
tree | 6e9ac31a58214881ecd1380ba2b739b1dba17ce5 | |
parent | 821b8bbb397a70151bdd039c072757e0f12fad19 (diff) | |
parent | b39f98cf81cce1eae9f665a5c7f82c93e218a577 (diff) | |
download | php-git-f2a2fcceceed5bb5851b459af9383d0da14a804b.tar.gz |
Merge branch 'master' into phpng
* master:
fix nmake snap when ext name is different in target dll
force atoll macro usage on windows
Enable $ replacement in exif, ldap, pdo_pgsql and tidy
See bug #67635
NEWS
NEWS
improve previous, add message during configure
Fixed bug #67635 php links to systemd libraries without using pkg-config
Improve fix for #66608
Fixed segfault with empty break
New added opcodes don't need to be resloved
Update NEWS
Update NEWS
Update NEWS
Fixed bug #66827 Session raises E_NOTICE when session name variable is array
implemented copy libs of core exts in phpize mode
fix copy the ext dll into the prefix path in phpize mode
fix default prefix in phpize mode
fix file with zero size usage in phpize mode
Conflicts:
Zend/zend_opcode.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/session/session.c
-rw-r--r-- | .gitattributes | 4 | ||||
-rw-r--r-- | Zend/tests/bug66608.phpt | 46 | ||||
-rw-r--r-- | Zend/tests/try_finally_011.phpt | 15 | ||||
-rw-r--r-- | Zend/zend_compile.h | 4 | ||||
-rw-r--r-- | Zend/zend_opcode.c | 104 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 4 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 4 | ||||
-rw-r--r-- | ext/session/session.c | 22 | ||||
-rw-r--r-- | ext/session/tests/bug66827.phpt | 12 | ||||
-rw-r--r-- | main/rfc1867.c | 1 | ||||
-rw-r--r-- | sapi/fpm/config.m4 | 31 | ||||
-rw-r--r-- | win32/build/Makefile | 2 | ||||
-rw-r--r-- | win32/build/config.w32.phpize.in | 5 | ||||
-rw-r--r-- | win32/build/confutils.js | 21 | ||||
-rw-r--r-- | win32/build/phpize.js.in | 8 |
15 files changed, 218 insertions, 65 deletions
diff --git a/.gitattributes b/.gitattributes index 79b218fcba..091043a35b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -22,6 +22,10 @@ sapi/nsapi/nsapi.c ident sapi/continuity/capi.c ident Zend/RFCs/002.txt ident Zend/RFCs/003.txt ident +ext/exif/exif.c ident +ext/ldap/ldap.c ident +ext/pdo_pgsql/pdo_pgsql.c ident +ext/tidy/tidy.c ident NEWS merge=NEWS UPGRADING merge=NEWS UPGRADING.INTERNALS merge=NEWS diff --git a/Zend/tests/bug66608.phpt b/Zend/tests/bug66608.phpt index 6329506d06..5a499a1dab 100644 --- a/Zend/tests/bug66608.phpt +++ b/Zend/tests/bug66608.phpt @@ -5,28 +5,56 @@ Bug #66608 (Incorrect behavior with nested "finally" blocks) function bar() { try { echo "1\n"; + try { + } finally { + try { + } finally { + } + echo "2\n"; + } } finally { try { throw new Exception (""); } catch (Exception $ab) { - echo "2\n"; + echo "3\n"; } finally { try { } finally { - echo "3\n"; + echo "4\n"; try { } finally { } - echo "4\n"; + echo "5\n"; } } - echo "5\n"; + echo "6\n"; try { } finally { - echo "6\n"; + while (1) { + try { + echo "7\n"; + break; + } finally { + echo "8\n"; + } + echo "bad"; + } + echo "9\n"; + while (1) { + try { + throw new Exception(""); + } catch(Exception $e) { + echo "10\n"; + break; + } finally { + echo "11\n"; + } + echo "bak\n"; + } } + echo "12\n"; } - echo "7\n"; + echo "13\n"; } bar(); --EXPECT-- @@ -37,3 +65,9 @@ bar(); 5 6 7 +8 +9 +10 +11 +12 +13 diff --git a/Zend/tests/try_finally_011.phpt b/Zend/tests/try_finally_011.phpt new file mode 100644 index 0000000000..7aa3f35fee --- /dev/null +++ b/Zend/tests/try_finally_011.phpt @@ -0,0 +1,15 @@ +--TEST-- +Try finally (segfault with empty break) +--FILE-- +<?php +function foo () { + try { + break; + } finally { + } +} + +foo(); +?> +--EXPECTF-- +Fatal error: Cannot break/continue 1 level in %stry_finally_011.php on line %d diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index a838a58144..4c28be91f3 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -840,8 +840,8 @@ int zend_add_literal(zend_op_array *op_array, zval *zv TSRMLS_DC); #define ZEND_FAST_RET_TO_CATCH 1 #define ZEND_FAST_RET_TO_FINALLY 2 -#define ZEND_FAST_CALL_FOR_CATCH 1 -#define ZEND_FAST_CALL_FOR_FINALLY 2 +#define ZEND_FAST_CALL_FROM_CATCH 1 +#define ZEND_FAST_CALL_FROM_FINALLY 2 #define ZEND_ARRAY_ELEMENT_REF (1<<0) #define ZEND_ARRAY_NOT_PACKED (1<<1) diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index 2f0f0aeecd..8309599521 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -480,6 +480,49 @@ static void zend_check_finally_breakout(zend_op_array *op_array, zend_uint op_nu } } +static void zend_adjust_fast_call(zend_op_array *op_array, zend_uint fast_call, zend_uint start, zend_uint end TSRMLS_DC) +{ + int i; + zend_uint op_num = 0; + + for (i = 0; i < op_array->last_try_catch; i++) { + if (op_array->try_catch_array[i].finally_op > start + && op_array->try_catch_array[i].finally_end < end) { + op_num = op_array->try_catch_array[i].finally_op; + start = op_array->try_catch_array[i].finally_end; + } + } + + if (op_num) { + /* Must be ZEND_FAST_CALL */ + ZEND_ASSERT(op_array->opcodes[op_num - 2].opcode == ZEND_FAST_CALL); + op_array->opcodes[op_num - 2].extended_value = ZEND_FAST_CALL_FROM_FINALLY; + op_array->opcodes[op_num - 2].op2.opline_num = fast_call; + } +} + +static void zend_resolve_fast_call(zend_op_array *op_array, zend_uint fast_call, zend_uint op_num TSRMLS_DC) +{ + int i; + zend_uint finally_op_num = 0; + + for (i = 0; i < op_array->last_try_catch; i++) { + if (op_num >= op_array->try_catch_array[i].finally_op + && op_num < op_array->try_catch_array[i].finally_end) { + finally_op_num = op_array->try_catch_array[i].finally_op; + } + } + + if (finally_op_num) { + /* Must be ZEND_FAST_CALL */ + ZEND_ASSERT(op_array->opcodes[finally_op_num - 2].opcode == ZEND_FAST_CALL); + if (op_array->opcodes[fast_call].extended_value == 0) { + op_array->opcodes[fast_call].extended_value = ZEND_FAST_CALL_FROM_FINALLY; + op_array->opcodes[fast_call].op2.opline_num = finally_op_num - 2; + } + } +} + static void zend_resolve_finally_call(zend_op_array *op_array, zend_uint op_num, zend_uint dst_num TSRMLS_DC) { zend_uint start_op; @@ -507,11 +550,23 @@ static void zend_resolve_finally_call(zend_op_array *op_array, zend_uint op_num, opline->opcode = ZEND_FAST_CALL; SET_UNUSED(opline->op1); SET_UNUSED(opline->op2); - opline->op1.opline_num = op_array->try_catch_array[i].finally_op; + zend_adjust_fast_call(op_array, start_op, + op_array->try_catch_array[i].finally_op, + op_array->try_catch_array[i].finally_end TSRMLS_CC); if (op_array->try_catch_array[i].catch_op) { - opline->extended_value = ZEND_FAST_CALL_FOR_CATCH; + opline->extended_value = ZEND_FAST_CALL_FROM_CATCH; opline->op2.opline_num = op_array->try_catch_array[i].catch_op; + opline->op1.opline_num = get_next_op_number(op_array); + /* generate a FAST_CALL to hole CALL_FROM_FINALLY */ + opline = get_next_op(op_array TSRMLS_CC); + opline->opcode = ZEND_FAST_CALL; + SET_UNUSED(opline->op1); + SET_UNUSED(opline->op2); + zend_resolve_fast_call(op_array, start_op + 1, op_array->try_catch_array[i].finally_op - 2 TSRMLS_CC); + } else { + zend_resolve_fast_call(op_array, start_op, op_array->try_catch_array[i].finally_op - 2 TSRMLS_CC); } + opline->op1.opline_num = op_array->try_catch_array[i].finally_op; /* generate a sequence of FAST_CALL to upward finally block */ while (i > 0) { @@ -574,32 +629,12 @@ static void zend_resolve_finally_ret(zend_op_array *op_array, zend_uint op_num T } } -static void zend_resolve_fast_call(zend_op_array *op_array, zend_uint op_num TSRMLS_DC) -{ - int i; - zend_uint finally_op_num = 0; - - for (i = 0; i < op_array->last_try_catch; i++) { - if (op_array->try_catch_array[i].finally_op > op_num) { - break; - } - if (op_num < op_array->try_catch_array[i].finally_end) { - finally_op_num = op_array->try_catch_array[i].finally_op; - } - } - - if (finally_op_num) { - op_array->opcodes[op_num].extended_value = ZEND_FAST_CALL_FOR_FINALLY; - op_array->opcodes[op_num].op2.opline_num = finally_op_num - 2; /* it must be ZEND_FAST_CALL */ - } -} - static void zend_resolve_finally_calls(zend_op_array *op_array TSRMLS_DC) { - zend_uint i; + zend_uint i, j; zend_op *opline; - for (i = 0; i < op_array->last; i++) { + for (i = 0, j = op_array->last; i < j; i++) { opline = op_array->opcodes + i; switch (opline->opcode) { case ZEND_RETURN: @@ -614,15 +649,16 @@ static void zend_resolve_finally_calls(zend_op_array *op_array TSRMLS_DC) zend_brk_cont_element *jmp_to; nest_levels = Z_LVAL(op_array->literals[opline->op2.constant]); - array_offset = opline->op1.opline_num; - do { - jmp_to = &op_array->brk_cont_array[array_offset]; - if (nest_levels > 1) { - array_offset = jmp_to->parent; - } - } while (--nest_levels > 0); - zend_resolve_finally_call(op_array, i, opline->opcode == ZEND_BRK ? jmp_to->brk : jmp_to->cont TSRMLS_CC); - break; + if ((array_offset = opline->op1.opline_num) != -1) { + do { + jmp_to = &op_array->brk_cont_array[array_offset]; + if (nest_levels > 1) { + array_offset = jmp_to->parent; + } + } while (--nest_levels > 0); + zend_resolve_finally_call(op_array, i, opline->opcode == ZEND_BRK ? jmp_to->brk : jmp_to->cont TSRMLS_CC); + break; + } } case ZEND_GOTO: if (Z_TYPE(op_array->literals[opline->op2.constant]) != IS_LONG) { @@ -636,7 +672,7 @@ static void zend_resolve_finally_calls(zend_op_array *op_array TSRMLS_DC) zend_resolve_finally_call(op_array, i, opline->op1.opline_num TSRMLS_CC); break; case ZEND_FAST_CALL: - zend_resolve_fast_call(op_array, i TSRMLS_CC); + zend_resolve_fast_call(op_array, i, i TSRMLS_CC); break; case ZEND_FAST_RET: zend_resolve_finally_ret(op_array, i TSRMLS_CC); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 4b8f229c8d..48ad78915d 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -5757,7 +5757,7 @@ ZEND_VM_HANDLER(162, ZEND_FAST_CALL, ANY, ANY) { USE_OPLINE - if ((opline->extended_value & ZEND_FAST_CALL_FOR_CATCH) && + if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) && UNEXPECTED(EG(prev_exception) != NULL)) { /* in case of unhandled exception jump to catch block instead of finally */ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]); @@ -5773,7 +5773,7 @@ ZEND_VM_HANDLER(163, ZEND_FAST_RET, ANY, ANY) { if (EX(fast_ret)) { ZEND_VM_SET_OPCODE(EX(fast_ret) + 1); - if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FOR_FINALLY)) { + if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FROM_FINALLY)) { EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num]; } ZEND_VM_CONTINUE(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index d5bdb70762..df1731f177 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1466,7 +1466,7 @@ static int ZEND_FASTCALL ZEND_FAST_CALL_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE - if ((opline->extended_value & ZEND_FAST_CALL_FOR_CATCH) && + if ((opline->extended_value & ZEND_FAST_CALL_FROM_CATCH) && UNEXPECTED(EG(prev_exception) != NULL)) { /* in case of unhandled exception jump to catch block instead of finally */ ZEND_VM_SET_OPCODE(&EX(func)->op_array.opcodes[opline->op2.opline_num]); @@ -1482,7 +1482,7 @@ static int ZEND_FASTCALL ZEND_FAST_RET_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { if (EX(fast_ret)) { ZEND_VM_SET_OPCODE(EX(fast_ret) + 1); - if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FOR_FINALLY)) { + if ((EX(fast_ret)->extended_value & ZEND_FAST_CALL_FROM_FINALLY)) { EX(fast_ret) = &EX(func)->op_array.opcodes[EX(fast_ret)->op2.opline_num]; } ZEND_VM_CONTINUE(); diff --git a/ext/session/session.c b/ext/session/session.c index fdd6b1696a..ff04462ca4 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1405,9 +1405,16 @@ PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC) /* {{{ } /* }}} */ -#define PPID2SID \ - convert_to_string((ppid)); \ - PS(id) = STR_INIT(Z_STRVAL_P(ppid), Z_STRLEN_P(ppid), 0) +static void ppid2sid(zval *ppid TSRMLS_DC) { + if (Z_TYPE_P(ppid) != IS_STRING) { + PS(id) = NULL; + PS(send_cookie) = 1; + } else { + convert_to_string(ppid); + PS(id) = STR_INIT(Z_STRVAL_P(ppid), Z_STRLEN_P(ppid), 0); + PS(send_cookie) = 0; + } +} PHPAPI void php_session_reset_id(TSRMLS_D) /* {{{ */ { @@ -1502,9 +1509,8 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), lensess)) ) { - PPID2SID; + ppid2sid(ppid TSRMLS_CC); PS(apply_trans_sid) = 0; - PS(send_cookie) = 0; PS(define_sid) = 0; } @@ -1513,8 +1519,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), lensess)) ) { - PPID2SID; - PS(send_cookie) = 0; + ppid2sid(ppid TSRMLS_CC); } if (!PS(use_only_cookies) && !PS(id) && @@ -1522,8 +1527,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ Z_TYPE_P(data) == IS_ARRAY && (ppid = zend_hash_str_find(Z_ARRVAL_P(data), PS(session_name), lensess)) ) { - PPID2SID; - PS(send_cookie) = 0; + ppid2sid(ppid TSRMLS_CC); } } diff --git a/ext/session/tests/bug66827.phpt b/ext/session/tests/bug66827.phpt new file mode 100644 index 0000000000..4e1a4f7aea --- /dev/null +++ b/ext/session/tests/bug66827.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #66827: Session raises E_NOTICE when session name variable is array. +--INI-- +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php +$_COOKIE[session_name()] = array(); +session_start(); +echo 'OK'; +--EXPECTF-- +OK diff --git a/main/rfc1867.c b/main/rfc1867.c index ff01722c5f..3347a69ac8 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -36,6 +36,7 @@ #if defined(PHP_WIN32) && !defined(HAVE_ATOLL) # define atoll(s) _atoi64(s) +# define HAVE_ATOLL 1 #endif #define DEBUG_FILE_UPLOAD ZEND_DEBUG diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 40cd69c719..9c10aa6be2 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -584,14 +584,41 @@ if test "$PHP_FPM" != "no"; then [ --with-fpm-systemd Activate systemd integration], no, no) if test "$PHP_FPM_SYSTEMD" != "no" ; then - AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon") + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + unset SYSTEMD_LIBS + unset SYSTEMD_INCS + + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd; then + dnl systemd version >= 209 provides libsystemd + AC_MSG_CHECKING([for libsystemd]) + SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd` + SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd` + SYSTEMD_VERS=`$PKG_CONFIG --modversion libsystemd` + AC_MSG_RESULT([version $SYSTEMD_VERS]) + + elif test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd-daemon; then + dnl systemd version < 209 provides libsystemd-daemon + AC_MSG_CHECKING([for libsystemd-daemon]) + SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd-daemon` + SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd-daemon` + SYSTEMD_VERS=`$PKG_CONFIG --modversion libsystemd-daemon` + AC_MSG_RESULT([version $SYSTEMD_VERS]) + + else + dnl failback when no pkg-config + AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon") + fi + AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"]) if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then AC_MSG_ERROR([Your system does not support systemd.]) else AC_DEFINE(HAVE_SYSTEMD, 1, [FPM use systemd integration]) PHP_FPM_SD_FILES="fpm/fpm_systemd.c" - PHP_ADD_LIBRARY(systemd-daemon) + PHP_EVAL_LIBLINE($SYSTEMD_LIBS) + PHP_EVAL_INCLINE($SYSTEMD_INCS) php_fpm_systemd=notify fi else diff --git a/win32/build/Makefile b/win32/build/Makefile index 057b584549..7a3be93e87 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -183,7 +183,7 @@ msi-installer: dist # need to redirect, since INSTALL is a file in the root... install: really-install install-sdk -build-lib: +build-lib: build-ext-libs @if not exist $(BUILD_DIR_DEV)\lib mkdir $(BUILD_DIR_DEV)\lib >nul @copy $(BUILD_DIR)\$(PHPLIB) $(BUILD_DIR_DEV)\lib /y >nul diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index 7b3b40633b..cfec2a28f1 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -105,6 +105,11 @@ if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") { ERROR("Use of both --enable-debug and --enable-debug-pack not allowed.");
}
+if (PHP_PREFIX == '') {
+ PHP_PREFIX = "C:\\php";
+ if (PHP_DEBUG == "yes")
+ PHP_PREFIX += "\\debug";
+}
DEFINE('PHP_PREFIX', PHP_PREFIX);
DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext ");
diff --git a/win32/build/confutils.js b/win32/build/confutils.js index f2bc1f1479..489adf34a8 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -1364,9 +1364,6 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir) if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
cflags = "/FI main/config.pickle.h " + cflags;
}
- if (MODE_PHPIZE && FSO.FileExists(PHP_DIR + "/include/main/config.pickle.h")) {
- cflags = "/FI main/config.pickle.h " + cflags;
- }
ADD_FLAG("CFLAGS_" + EXT, cflags);
if (PHP_DSP != "no") {
@@ -1905,6 +1902,7 @@ function generate_phpize() var MF = FSO.CreateTextFile(dest + "/phpize.js", true);
var DEPS = FSO.CreateTextFile(dest + "/ext_deps.js", true);
+
prefix = get_define("PHP_PREFIX");
prefix = prefix.replace(new RegExp("/", "g"), "\\");
prefix = prefix.replace(new RegExp("\\\\", "g"), "\\\\");
@@ -1990,8 +1988,21 @@ function generate_makefile() for (var i in extensions_enabled) {
var lib = "php_" + extensions_enabled[i][0] + ".lib";
var dll = "php_" + extensions_enabled[i][0] + ".dll";
- MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib\\" + lib);
- //MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)\\" + dll);
+ MF.WriteLine(" @copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib");
+ MF.WriteLine(" @copy $(BUILD_DIR)\\" + dll + " $(PHP_PREFIX)");
+ }
+ } else {
+ MF.WriteBlankLines(1);
+ MF.WriteLine("build-ext-libs:");
+ MF.WriteLine(" @if not exist $(BUILD_DIR_DEV)\\lib mkdir $(BUILD_DIR_DEV)\\lib >nul");
+ for (var i in extensions_enabled) {
+ var lib;
+
+ lib = "php_" + extensions_enabled[i][0] + "*.lib";
+
+ if ('shared' == extensions_enabled[i][1]) {
+ MF.WriteLine(" @if exist $(BUILD_DIR)\\" + lib + " copy $(BUILD_DIR)\\" + lib + " $(BUILD_DIR_DEV)\\lib");
+ }
}
}
TF.Close();
diff --git a/win32/build/phpize.js.in b/win32/build/phpize.js.in index 3178804212..c99dece618 100644 --- a/win32/build/phpize.js.in +++ b/win32/build/phpize.js.in @@ -40,9 +40,13 @@ function ERROR(msg) function file_get_contents(filename)
{
+ var t = "";
var F = FSO.OpenTextFile(filename, 1);
- var t = F.ReadAll();
- F.Close();
+
+ if (!F.AtEndOfStream) {
+ t = F.ReadAll();
+ F.Close();
+ }
return t;
}
|