Skip to content

Commit b4c2bd2

Browse files
committed
Fixed compilation on Windows
1 parent bcc6777 commit b4c2bd2

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,10 +400,12 @@ static void accel_use_shm_interned_strings(TSRMLS_D)
400400
}
401401

402402
/* class table hash keys, class names, properties, methods, constants, etc */
403-
for (idx = 0; idx < CG(class_table)->nNumUsed; idx++) {
403+
for (idx = 0; idx < CG(class_table)->nNumUsed; idx++) {
404+
zend_class_entry *ce;
405+
404406
p = CG(class_table)->arData + idx;
405407
if (Z_TYPE(p->val) == IS_UNDEF) continue;
406-
zend_class_entry *ce = (zend_class_entry*)Z_PTR(p->val);
408+
ce = (zend_class_entry*)Z_PTR(p->val);
407409

408410
if (p->key) {
409411
p->key = accel_new_interned_string(p->key TSRMLS_CC);

ext/standard/crypt.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ PHP_FUNCTION(crypt)
260260
char salt[PHP_MAX_SALT_LEN + 1];
261261
char *str, *salt_in = NULL;
262262
int str_len, salt_in_len = 0;
263-
salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
264263
zend_string *result;
265264

265+
salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
266+
266267
/* This will produce suitable results if people depend on DES-encryption
267268
* available (passing always 2-character salt). At least for glibc6.1 */
268269
memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);

ext/standard/http_fopen_wrapper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,14 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper,
224224
efree(transport_string);
225225

226226
if (stream && use_proxy && use_ssl) {
227+
smart_str header = {0};
228+
227229
/* Set peer_name or name verification will try to use the proxy server name */
228230
if (!context || (tmpzval = php_stream_context_get_option(context, "ssl", "peer_name")) == NULL) {
229231
ZVAL_STRING(&ssl_proxy_peer_name, resource->host);
230232
php_stream_context_set_option(stream->context, "ssl", "peer_name", &ssl_proxy_peer_name);
231233
}
232234

233-
smart_str header = {0};
234-
235235
smart_str_appendl(&header, "CONNECT ", sizeof("CONNECT ")-1);
236236
smart_str_appends(&header, resource->host);
237237
smart_str_appendc(&header, ':');

win32/registry.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_
146146
return ret;
147147
}
148148

149-
static void delete_internal_hashtable(void *data)
149+
static void delete_internal_hashtable(zval *zv)
150150
{
151+
void *data = Z_PTR_P(zv);
151152
zend_hash_destroy(*(HashTable**)data);
152153
free(*(HashTable**)data);
153154
}

win32/sendmail.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -616,8 +616,8 @@ static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char
616616
return (res);
617617
}
618618

619-
PHPAPI zend_string *php_str_to_str(char *haystack, int length, char *needle,
620-
int needle_len, char *str, int str_len);
619+
//???PHPAPI zend_string *php_str_to_str(char *haystack, int length, char *needle,
620+
//??? int needle_len, char *str, int str_len);
621621

622622
/* Escape \n. sequences
623623
* We use php_str_to_str() and not php_str_replace_in_subject(), since the latter

0 commit comments

Comments
 (0)