summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-07-15 15:50:42 +0400
committerDmitry Stogov <dmitry@zend.com>2014-07-15 15:50:42 +0400
commitb4c2bd227743e4ab9d47bf624911b230b3237b51 (patch)
tree2fc9d41f122c01bbc397128fd8bd65bf5c2e12bf /ext
parentbcc677789c1832916af77994059873a30d145a72 (diff)
downloadphp-git-b4c2bd227743e4ab9d47bf624911b230b3237b51.tar.gz
Fixed compilation on Windows
Diffstat (limited to 'ext')
-rw-r--r--ext/opcache/ZendAccelerator.c6
-rw-r--r--ext/standard/crypt.c3
-rw-r--r--ext/standard/http_fopen_wrapper.c4
3 files changed, 8 insertions, 5 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index c1775b8538..df36b55b62 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -400,10 +400,12 @@ static void accel_use_shm_interned_strings(TSRMLS_D)
}
/* class table hash keys, class names, properties, methods, constants, etc */
- for (idx = 0; idx < CG(class_table)->nNumUsed; idx++) {
+ for (idx = 0; idx < CG(class_table)->nNumUsed; idx++) {
+ zend_class_entry *ce;
+
p = CG(class_table)->arData + idx;
if (Z_TYPE(p->val) == IS_UNDEF) continue;
- zend_class_entry *ce = (zend_class_entry*)Z_PTR(p->val);
+ ce = (zend_class_entry*)Z_PTR(p->val);
if (p->key) {
p->key = accel_new_interned_string(p->key TSRMLS_CC);
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index f7696cf551..2a2304be20 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -260,9 +260,10 @@ PHP_FUNCTION(crypt)
char salt[PHP_MAX_SALT_LEN + 1];
char *str, *salt_in = NULL;
int str_len, salt_in_len = 0;
- salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
zend_string *result;
+ salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
+
/* This will produce suitable results if people depend on DES-encryption
* available (passing always 2-character salt). At least for glibc6.1 */
memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index eb6cebf534..d8f31960cc 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -224,14 +224,14 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper,
efree(transport_string);
if (stream && use_proxy && use_ssl) {
+ smart_str header = {0};
+
/* 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);
smart_str_appends(&header, resource->host);
smart_str_appendc(&header, ':');