]> granicus.if.org Git - php/commitdiff
Fixed compilation on Windows
authorDmitry Stogov <dmitry@zend.com>
Tue, 15 Jul 2014 11:50:42 +0000 (15:50 +0400)
committerDmitry Stogov <dmitry@zend.com>
Tue, 15 Jul 2014 11:50:42 +0000 (15:50 +0400)
ext/opcache/ZendAccelerator.c
ext/standard/crypt.c
ext/standard/http_fopen_wrapper.c
win32/registry.c
win32/sendmail.c

index c1775b853849b3368280e163142619ac7f179eb5..df36b55b62a1af2d6bc84484f7bf020643678fcf 100644 (file)
@@ -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);
index f7696cf5511399a02afbce5012f3dc0c77a9e57e..2a2304be2050c8634f7116fb5be039e11e9d90bf 100644 (file)
@@ -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);
index eb6cebf5345090677ad492bb33ca917bbbba4aec..d8f31960cced3d3dbe6ce0a08c3656d1b5468b7d 100644 (file)
@@ -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, ':');
index e7d1b2b2a90263270d0ce3299a7d68243462554f..ade09aa486c495e6d21f2c7f7eeb962ba9b15199 100644 (file)
@@ -146,8 +146,9 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_
        return ret;
 }
 
-static void delete_internal_hashtable(void *data)
+static void delete_internal_hashtable(zval *zv)
 {
+       void *data = Z_PTR_P(zv);
        zend_hash_destroy(*(HashTable**)data);
        free(*(HashTable**)data);
 }
index dd653879c21a89e05b4560c28d4767fed102c149..ed9736c1ddf2dab08d53af6f3e6d0da7b41ad679 100644 (file)
@@ -616,8 +616,8 @@ static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char
                return (res);
        }
 
-PHPAPI zend_string *php_str_to_str(char *haystack, int length, char *needle,
-               int needle_len, char *str, int str_len);
+//???PHPAPI zend_string *php_str_to_str(char *haystack, int length, char *needle,
+//???          int needle_len, char *str, int str_len);
        
        /* Escape \n. sequences
         * We use php_str_to_str() and not php_str_replace_in_subject(), since the latter