kalle Tue May 19 16:02:38 2009 UTC Modified files: /php-src/sapi/cgi cgi_main.c fastcgi.c Log: Fix compiler warnings, and some unicode stuff http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.377&r2=1.378&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.377 php-src/sapi/cgi/cgi_main.c:1.378 --- php-src/sapi/cgi/cgi_main.c:1.377 Tue Mar 10 23:40:02 2009 +++ php-src/sapi/cgi/cgi_main.c Tue May 19 16:02:38 2009 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.377 2009/03/10 23:40:02 helly Exp $ */ +/* $Id: cgi_main.c,v 1.378 2009/05/19 16:02:38 kalle Exp $ */ #include "php.h" #include "php_globals.h" @@ -472,7 +472,8 @@ static int sapi_cgi_read_post(char *buffer, uint count_bytes TSRMLS_DC) { - int read_bytes=0, tmp_read_bytes; + uint read_bytes = 0; + int tmp_read_bytes; count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes)); while (read_bytes < count_bytes) { http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.54&r2=1.55&diff_format=u Index: php-src/sapi/cgi/fastcgi.c diff -u php-src/sapi/cgi/fastcgi.c:1.54 php-src/sapi/cgi/fastcgi.c:1.55 --- php-src/sapi/cgi/fastcgi.c:1.54 Tue Mar 10 23:40:02 2009 +++ php-src/sapi/cgi/fastcgi.c Tue May 19 16:02:38 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fastcgi.c,v 1.54 2009/03/10 23:40:02 helly Exp $ */ +/* $Id: fastcgi.c,v 1.55 2009/05/19 16:02:38 kalle Exp $ */ #include "php.h" #include "fastcgi.h" @@ -746,7 +746,7 @@ } else if (hdr.type == FCGI_GET_VALUES) { unsigned char *p = buf + sizeof(fcgi_header); HashPosition pos; - char * str_index; + zstr key; uint str_length; ulong num_index; int key_type; @@ -763,13 +763,13 @@ } zend_hash_internal_pointer_reset_ex(req->env, &pos); - while ((key_type = zend_hash_get_current_key_ex(req->env, &str_index, &str_length, &num_index, 0, &pos)) != HASH_KEY_NON_EXISTANT) { + while ((key_type = zend_hash_get_current_key_ex(req->env, &key, &str_length, &num_index, 0, &pos)) != HASH_KEY_NON_EXISTANT) { int zlen; zend_hash_move_forward_ex(req->env, &pos); if (key_type != HASH_KEY_IS_STRING) { continue; } - if (zend_hash_find(&fcgi_mgmt_vars, str_index, str_length, (void**) &value) != SUCCESS) { + if (zend_hash_find(&fcgi_mgmt_vars, key.s, str_length, (void**) &value) != SUCCESS) { continue; } --str_length; @@ -793,7 +793,7 @@ *p++ = (zlen >> 8) & 0xff; *p++ = zlen & 0xff; } - memcpy(p, str_index, str_length); + memcpy(p, key.s, str_length); p += str_length; memcpy(p, Z_STRVAL_PP(value), zlen); p += zlen;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php