summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-07-14 11:44:53 +0400
committerDmitry Stogov <dmitry@zend.com>2014-07-14 11:44:53 +0400
commit32e477c98c706303e1935e3af96632a02949137a (patch)
tree18559c9ae62daa74f657019569b62059aee96574
parent0ef6f729c91dbe2a4abdeefe9ac112021c7d60b0 (diff)
parent4bdb0120dc26a14d906e2e8a69e841920df3de99 (diff)
downloadphp-git-32e477c98c706303e1935e3af96632a02949137a.tar.gz
Merge branch 'master' into phpng
* master: (40 commits) Bug #67609: TLS connections fail behind HTTP proxy Updated NEWS for #67594 Updated NEWS for #67594 Fix #67594 - invisible colon should be stripped off header name Updated NEWS for 34407 Updated NEWS for 34407 Updated NEWS for 34407 Fix for bug #34407 - ucwords and title case fixed broken merged code Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. fixed broken merged code Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Test output relies on expose_php being on 1.2 is a problematic float to print out Lower the default display precision for this test The test output is dependent on expose_php ini fix makefile in phpize mode fixe output_as_table() when no ext was enabled fix end of stream exception when generating makefile ... Conflicts: ext/standard/http_fopen_wrapper.c ext/standard/string.c sapi/cli/php_cli_server.c
-rw-r--r--ext/intl/tests/collator_get_locale.phpt2
-rw-r--r--ext/standard/basic_functions.c3
-rw-r--r--ext/standard/http_fopen_wrapper.c10
-rw-r--r--ext/standard/string.c15
-rw-r--r--ext/standard/tests/strings/ucwords_error.phpt6
-rw-r--r--ext/standard/tests/strings/ucwords_variation5.phpt25
-rw-r--r--ext/zlib/tests/bug65391.phpt2
-rw-r--r--sapi/cli/php_cli_server.c11
-rw-r--r--sapi/litespeed/lsapi_main.c8
-rw-r--r--sapi/litespeed/lsapidef.h27
-rw-r--r--sapi/litespeed/lsapilib.c33
-rw-r--r--sapi/litespeed/lsapilib.h28
-rw-r--r--tests/basic/025.phpt1
-rw-r--r--win32/build/Makefile.phpize5
-rw-r--r--win32/build/config.w322
-rw-r--r--win32/build/confutils.js16
-rw-r--r--win32/build/phpize.js.in2
17 files changed, 137 insertions, 59 deletions
diff --git a/ext/intl/tests/collator_get_locale.phpt b/ext/intl/tests/collator_get_locale.phpt
index 68440f3ee7..e71a020b4b 100644
--- a/ext/intl/tests/collator_get_locale.phpt
+++ b/ext/intl/tests/collator_get_locale.phpt
@@ -3,6 +3,8 @@ get_locale() icu <= 4.2
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
+--INI--
+precision=6
--FILE--
<?php
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index c513090b19..d4c4f3962f 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2284,8 +2284,9 @@ ZEND_BEGIN_ARG_INFO(arginfo_lcfirst, 0)
ZEND_ARG_INFO(0, str)
ZEND_END_ARG_INFO()
-ZEND_BEGIN_ARG_INFO(arginfo_ucwords, 0)
+ZEND_BEGIN_ARG_INFO_EX(arginfo_ucwords, 0, 0, 1)
ZEND_ARG_INFO(0, str)
+ ZEND_ARG_INFO(0, delimiters)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_strtr, 0, 0, 2)
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index f7d6fc4500..eb6cebf534 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -120,7 +120,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper,
char *scratch = NULL;
char *tmp = NULL;
char *ua_str = NULL;
- zval *ua_zval = NULL, *tmpzval = NULL;
+ zval *ua_zval = NULL, *tmpzval = NULL, ssl_proxy_peer_name;
int scratch_len = 0;
int body = 0;
char location[HTTP_HEADER_BLOCK_SIZE];
@@ -224,6 +224,12 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper,
efree(transport_string);
if (stream && use_proxy && use_ssl) {
+ /* Set peer_name or name verification will try to use the proxy server name */
+ if (!context || (tmpzval = php_stream_context_get_option(context, "ssl", "peer_name")) == NULL) {
+ ZVAL_STRING(&ssl_proxy_peer_name, resource->host);
+ php_stream_context_set_option(stream->context, "ssl", "peer_name", &ssl_proxy_peer_name);
+ }
+
smart_str header = {0};
smart_str_appendl(&header, "CONNECT ", sizeof("CONNECT ")-1);
@@ -313,7 +319,7 @@ finish:
/* enable SSL transport layer */
if (stream) {
- if (php_stream_xport_crypto_setup(stream, STREAM_CRYPTO_METHOD_SSLv23_CLIENT, NULL TSRMLS_CC) < 0 ||
+ if (php_stream_xport_crypto_setup(stream, STREAM_CRYPTO_METHOD_ANY_CLIENT, NULL TSRMLS_CC) < 0 ||
php_stream_xport_crypto_enable(stream, 1 TSRMLS_CC) < 0) {
php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Cannot connect to HTTPS server through proxy");
php_stream_close(stream);
diff --git a/ext/standard/string.c b/ext/standard/string.c
index ec9b8a02a2..5f4f360ca6 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -2748,17 +2748,20 @@ PHP_FUNCTION(lcfirst)
Uppercase the first character of every word in a string */
PHP_FUNCTION(ucwords)
{
- char *str;
+ char *str, *delims = " \t\r\n\f\v";
register char *r, *r_end;
- int str_len;
+ int str_len, delims_len = 6;
+ char mask[256];
#ifndef FAST_ZPP
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &str, &str_len, &delims, &delims_len) == FAILURE) {
return;
}
#else
- ZEND_PARSE_PARAMETERS_START(1, 1)
+ ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STRING(str, str_len)
+ Z_PARAM_OPTIONAL
+ Z_PARAM_STRING(delims, delims_len)
ZEND_PARSE_PARAMETERS_END();
#endif
@@ -2766,12 +2769,14 @@ PHP_FUNCTION(ucwords)
RETURN_EMPTY_STRING();
}
+ php_charmask((unsigned char *)delims, delims_len, mask TSRMLS_CC);
+
ZVAL_STRINGL(return_value, str, str_len);
r = Z_STRVAL_P(return_value);
*r = toupper((unsigned char) *r);
for (r_end = r + Z_STRLEN_P(return_value) - 1; r < r_end; ) {
- if (isspace((int) *(unsigned char *)r++)) {
+ if (mask[(unsigned char)*r++]) {
*r = toupper((unsigned char) *r);
}
}
diff --git a/ext/standard/tests/strings/ucwords_error.phpt b/ext/standard/tests/strings/ucwords_error.phpt
index d79e569cc7..a01c688c4a 100644
--- a/ext/standard/tests/strings/ucwords_error.phpt
+++ b/ext/standard/tests/strings/ucwords_error.phpt
@@ -18,7 +18,7 @@ echo "\n-- Testing ucwords() function with more than expected no. of arguments -
$str = 'string_val';
$extra_arg = 10;
-var_dump( ucwords($str, $extra_arg) );
+var_dump( ucwords($str, $extra_arg, $extra_arg) );
// check if there were any changes made to $str
var_dump($str);
@@ -30,12 +30,12 @@ echo "Done\n";
-- Testing ucwords() function with Zero arguments --
-Warning: ucwords() expects exactly 1 parameter, 0 given in %s on line %d
+Warning: ucwords() expects at least 1 parameter, 0 given in %s on line %d
NULL
-- Testing ucwords() function with more than expected no. of arguments --
-Warning: ucwords() expects exactly 1 parameter, 2 given in %s on line %d
+Warning: ucwords() expects at most 2 parameters, 3 given in %s on line %d
NULL
string(10) "string_val"
Done
diff --git a/ext/standard/tests/strings/ucwords_variation5.phpt b/ext/standard/tests/strings/ucwords_variation5.phpt
new file mode 100644
index 0000000000..985df47c4a
--- /dev/null
+++ b/ext/standard/tests/strings/ucwords_variation5.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Test ucwords() function : usage variations - custom delimiters
+--FILE--
+<?php
+/* Prototype : string ucwords ( string $str )
+ * Description: Uppercase the first character of each word in a string
+ * Source code: ext/standard/string.c
+*/
+
+echo "*** Testing ucwords() : usage variations ***\n";
+
+var_dump(ucwords('testing-dashed-words', '-'));
+var_dump(ucwords('test(braced)words', '()'));
+var_dump(ucwords('testing empty delimiters', ''));
+var_dump(ucwords('testing ranges', 'a..e'));
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** Testing ucwords() : usage variations ***
+string(%d) "Testing-Dashed-Words"
+string(%d) "Test(Braced)Words"
+string(%d) "Testing empty delimiters"
+string(%d) "TeSting raNgeS"
+Done
diff --git a/ext/zlib/tests/bug65391.phpt b/ext/zlib/tests/bug65391.phpt
index 439473fc5d..9d9fd164f6 100644
--- a/ext/zlib/tests/bug65391.phpt
+++ b/ext/zlib/tests/bug65391.phpt
@@ -6,6 +6,8 @@ extension_loaded("zlib") or die("skip need zlib");
?>
--GET--
dummy=1
+--INI--
+expose_php=On
--FILE--
<?php
header("Vary: Cookie");
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 4b16e97a56..8fe195f6d7 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -1615,10 +1615,13 @@ static int php_cli_server_client_read_request_on_header_value(php_http_parser *p
return 1;
}
{
- char *header_name = zend_str_tolower_dup(client->current_header_name, client->current_header_name_len);
- zend_hash_str_add_ptr(&client->request.headers, header_name, client->current_header_name_len, value);
- zend_hash_str_add_ptr(&client->request.headers_original_case, client->current_header_name, client->current_header_name_len, value);
- efree(header_name);
+ /* strip off the colon */
+ zend_string *orig_header_name = STR_INIT(client->current_header_name, client->current_header_name_len, 1);
+ char *lc_header_name = zend_str_tolower_dup(client->current_header_name, client->current_header_name_len);
+ zend_hash_str_add_ptr(&client->request.headers, lc_header_name, client->current_header_name_len, value);
+ zend_hash_add_ptr(&client->request.headers_original_case, orig_header_name, value);
+ efree(lc_header_name);
+ STR_RELEASE(orig_header_name);
}
if (client->current_header_name_allocated) {
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 56f1cb5d97..3a4ed748e3 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2007 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,8 +16,6 @@
+----------------------------------------------------------------------+
*/
-/* $Id: lsapi_main.c,v 1.59 2013/11/18 21:14:38 gwang Exp $ */
-
#include "php.h"
#include "SAPI.h"
#include "php_main.h"
@@ -737,9 +735,9 @@ static int cli_main( int argc, char * argv[] )
case 'v':
if (php_request_startup(TSRMLS_C) != FAILURE) {
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2004 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2004 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
#ifdef PHP_OUTPUT_NEWAPI
php_output_end_all(TSRMLS_C);
diff --git a/sapi/litespeed/lsapidef.h b/sapi/litespeed/lsapidef.h
index 5d5b4c1687..fb75d01a17 100644
--- a/sapi/litespeed/lsapidef.h
+++ b/sapi/litespeed/lsapidef.h
@@ -1,5 +1,23 @@
/*
-Copyright (c) 2005, Lite Speed Technologies Inc.
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2014 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: George Wang <gwang@litespeedtech.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/*
+Copyright (c) 2002-2014, Lite Speed Technologies Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -30,13 +48,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/***************************************************************************
- $Id: lsapidef.h,v 1.17 2012/12/01 19:23:31 gwang Exp $
- -------------------
- begin : Thu Feb 10 2005
- author : George Wang
- email : gwang@litespeedtech.com
- ***************************************************************************/
#ifndef _LSAPIDEF_H_
#define _LSAPIDEF_H_
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index cdd60763db..786a3bd20b 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -1,5 +1,23 @@
/*
-Copyright (c) 2013, Lite Speed Technologies Inc.
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2014 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: George Wang <gwang@litespeedtech.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/*
+Copyright (c) 2002-2014, Lite Speed Technologies Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -30,14 +48,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/***************************************************************************
- lsapilib.c - description
- -------------------
- begin : Mon Feb 21 2005
- copyright : (C) 2005 by George Wang
- email : gwang@litespeedtech.com
- ***************************************************************************/
-
#include <ctype.h>
#include <dlfcn.h>
@@ -1935,6 +1945,7 @@ int LSAPI_ForeachOrgHeader_r( LSAPI_Request * pReq,
{
pKey = pReq->m_pHttpHeader + pCur->nameOff;
keyLen = pCur->nameLen;
+ *(pKey + keyLen ) = 0;
pValue = pReq->m_pHttpHeader + pCur->valueOff;
*(pValue + pCur->valueLen ) = 0;
@@ -2846,8 +2857,8 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer, LSAPI_Re
}
}
sigaction( SIGUSR1, &old_usr1, 0 );
- kill( -getpgrp(), SIGUSR1 );
- lsapi_all_children_must_die(); /* Sorry, children ;-) */
+ //kill( -getpgrp(), SIGUSR1 );
+ //lsapi_all_children_must_die(); /* Sorry, children ;-) */
return -1;
}
diff --git a/sapi/litespeed/lsapilib.h b/sapi/litespeed/lsapilib.h
index b0638fd436..cae1863c79 100644
--- a/sapi/litespeed/lsapilib.h
+++ b/sapi/litespeed/lsapilib.h
@@ -1,5 +1,23 @@
/*
-Copyright (c) 2013, Lite Speed Technologies Inc.
+ +----------------------------------------------------------------------+
+ | PHP Version 5 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997-2014 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Author: George Wang <gwang@litespeedtech.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/*
+Copyright (c) 2002-2014, Lite Speed Technologies Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -30,14 +48,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/***************************************************************************
- lsapilib.h - description
- -------------------
- begin : Mon Feb 21 2005
- copyright : (C) 2005 by George Wang
- email : gwang@litespeedtech.com
- ***************************************************************************/
-
#ifndef _LSAPILIB_H_
#define _LSAPILIB_H_
diff --git a/tests/basic/025.phpt b/tests/basic/025.phpt
index 58191bcd61..37561a2a2e 100644
--- a/tests/basic/025.phpt
+++ b/tests/basic/025.phpt
@@ -3,6 +3,7 @@ Test HTTP_RAW_POST_DATA with excessive post length
--INI--
always_populate_raw_post_data=1
post_max_size=1K
+expose_php=On
--POST--
a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
--FILE--
diff --git a/win32/build/Makefile.phpize b/win32/build/Makefile.phpize
index 17cfc90fbd..0463d332fb 100644
--- a/win32/build/Makefile.phpize
+++ b/win32/build/Makefile.phpize
@@ -5,10 +5,7 @@ MT="$(MT)"
PHPSDK_DIR=$(PHP_DIR)
PHPLIB=$(PHPSDK_DIR)\lib\$(PHPLIB)
-LDFLAGS=/libpath:"$(PHPSDK_DIR)\lib\;$(PHPSDK_DIR)"
-
-CFLAGS=/nologo /FD $(BASE_INCLUDES) /D _WINDOWS /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D_USE_32BIT_TIME_T=1 /D ZEND_WIN32_FORCE_INLINE /GF /D ZEND_DEBUG=0 /D ZTS=1 /D FD_SETSIZE=256
-CFLAGS_PHP=/D _USRDLL /D PHP5DLLTS_EXPORTS /D PHP_EXPORTS /D TSRM_EXPORTS /D SAPI_EXPORTS /D WINVER=0x500 /D COMPILE_DL_AJAXMIN
+LDFLAGS=$(LDFLAGS) /libpath:"$(PHPSDK_DIR)\lib\;$(PHPSDK_DIR)"
all: $(EXT_TARGETS) $(PECL_TARGETS)
diff --git a/win32/build/config.w32 b/win32/build/config.w32
index 3fe8469a90..564cea2dcc 100644
--- a/win32/build/config.w32
+++ b/win32/build/config.w32
@@ -474,5 +474,7 @@ if (PHP_ANALYZER == "vs") {
pvscfg.WriteLine("preprocessor = visualcpp");
pvscfg.WriteLine("language = C");
}
+} else {
+ PHP_ANALYZER = "no"
}
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 1dbc75b280..bb61a448e6 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1024,6 +1024,11 @@ function is_pgo_desired(mod)
{
var varname = "PHP_" + mod.toUpperCase() + "_PGO";
+ /* XXX enable PGO in phpize mode */
+ if (MODE_PHPIZE) {
+ return false;
+ }
+
/* don't disable if there's no mention of the varname */
if (eval("typeof " + varname + " == 'undefined'")) {
return true;
@@ -1165,11 +1170,6 @@ function ADD_EXTENSION_DEP(extname, dependson, optional)
var dep_present = false;
var dep_shared = false;
- if (MODE_PHPIZE) {
- ext_deps_js = file_get_contents(PHP_DIR + "\\script\\ext_deps.js");
- eval(ext_deps_js);
- }
-
try {
dep_present = eval("PHP_" + DEP);
@@ -1520,7 +1520,7 @@ function output_as_table(header, ar_out)
var min = new Array(l);
var max = new Array(l);
- if (l != ar_out[0].length) {
+ if (!!ar_out[0] && l != ar_out[0].length) {
STDOUT.WriteLine("Invalid header argument, can't output the table " + l + " " + ar_out[0].length );
return;
}
@@ -1842,7 +1842,9 @@ function generate_makefile()
MFO.Close();
TF = FSO.OpenTextFile("Makefile.objects", 1);
- MF.Write(TF.ReadAll());
+ if (!TF.AtEndOfStream) {
+ MF.Write(TF.ReadAll());
+ }
TF.Close();
MF.Close();
diff --git a/win32/build/phpize.js.in b/win32/build/phpize.js.in
index 4813ec0b5d..235c0816a3 100644
--- a/win32/build/phpize.js.in
+++ b/win32/build/phpize.js.in
@@ -209,6 +209,8 @@ C.WriteLine("/* This file automatically generated from script/confutils.js */");
C.WriteLine("var MODE_PHPIZE = true;");
C.WriteLine("var PHP_DIR = " + '"' + PHP_DIR.replace(new RegExp('(["\\\\])', "g"), '\\$1') + '"');
+C.Write(file_get_contents(PHP_DIR + "//script//ext_deps.js"));
+
C.Write(file_get_contents(PHP_DIR + "/script/confutils.js"));
C.Write(file_get_contents(PHP_DIR + "/script/config.phpize.js"));