@@ -600,10 +600,10 @@ static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
600600/* }}} */ 
601601
602602/* {{{ curl_progress */ 
603- static  size_t  curl_progress (void  * clientp , double  dltotal , double  dlnow , double  ultotal , double  ulnow )
603+ static  int  curl_progress (void  * clientp , double  dltotal , double  dlnow , double  ultotal , double  ulnow )
604604{
605605	php_curl  * ch  =  (php_curl  * )clientp ;
606- 	size_t 	 rval  =  0 ;
606+ 	int   rval  =  0 ;
607607
608608#if  PHP_CURL_DEBUG 
609609	fprintf (stderr , "curl_progress() called\n" );
@@ -638,10 +638,10 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
638638/* }}} */ 
639639
640640/* {{{ curl_xferinfo */ 
641- static  size_t  curl_xferinfo (void  * clientp , curl_off_t  dltotal , curl_off_t  dlnow , curl_off_t  ultotal , curl_off_t  ulnow )
641+ static  int  curl_xferinfo (void  * clientp , curl_off_t  dltotal , curl_off_t  dlnow , curl_off_t  ultotal , curl_off_t  ulnow )
642642{
643643	php_curl  * ch  =  (php_curl  * )clientp ;
644- 	size_t  rval  =  0 ;
644+ 	int  rval  =  0 ;
645645
646646#if  PHP_CURL_DEBUG 
647647	fprintf (stderr , "curl_xferinfo() called\n" );
@@ -1145,17 +1145,17 @@ static void _php_curl_set_default_options(php_curl *ch)
11451145{
11461146	char  * cainfo ;
11471147
1148- 	curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS ,        1 );
1149- 	curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE ,           0 );
1148+ 	curl_easy_setopt (ch -> cp , CURLOPT_NOPROGRESS ,        1L );
1149+ 	curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE ,           0L );
11501150	curl_easy_setopt (ch -> cp , CURLOPT_ERRORBUFFER ,       ch -> err .str );
11511151	curl_easy_setopt (ch -> cp , CURLOPT_WRITEFUNCTION ,     curl_write );
11521152	curl_easy_setopt (ch -> cp , CURLOPT_FILE ,              (void  * ) ch );
11531153	curl_easy_setopt (ch -> cp , CURLOPT_READFUNCTION ,      curl_read );
11541154	curl_easy_setopt (ch -> cp , CURLOPT_INFILE ,            (void  * ) ch );
11551155	curl_easy_setopt (ch -> cp , CURLOPT_HEADERFUNCTION ,    curl_write_header );
11561156	curl_easy_setopt (ch -> cp , CURLOPT_WRITEHEADER ,       (void  * ) ch );
1157- 	curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120 );
1158- 	curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20 ); /* prevent infinite redirects */ 
1157+ 	curl_easy_setopt (ch -> cp , CURLOPT_DNS_CACHE_TIMEOUT , 120L );
1158+ 	curl_easy_setopt (ch -> cp , CURLOPT_MAXREDIRS , 20L ); /* prevent infinite redirects */ 
11591159
11601160	cainfo  =  INI_STR ("openssl.cafile" );
11611161	if  (!(cainfo  &&  cainfo [0 ] !=  '\0' )) {
@@ -2169,7 +2169,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
21692169					/* no need to build the mime structure for empty hashtables; 
21702170					   also works around https://github.com/curl/curl/issues/6455 */ 
21712171					curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDS , "" );
2172- 					error  =  curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0 );
2172+ 					error  =  curl_easy_setopt (ch -> cp , CURLOPT_POSTFIELDSIZE , 0L );
21732173				} else  {
21742174					return  build_mime_structure_from_hash (ch , zvalue );
21752175				}
@@ -2203,7 +2203,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22032203
22042204		case  CURLOPT_POSTREDIR :
22052205			lval  =  zval_get_long (zvalue );
2206- 			error  =  curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , lval  &  CURL_REDIR_POST_ALL );
2206+ 			error  =  curl_easy_setopt (ch -> cp , CURLOPT_POSTREDIR , ( long ) ( lval  &  CURL_REDIR_POST_ALL ) );
22072207			break ;
22082208
22092209		/* the following options deal with files, therefore the open_basedir check 
@@ -2243,11 +2243,11 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
22432243			if  (zend_is_true (zvalue )) {
22442244				curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , curl_debug );
22452245				curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , (void  * )ch );
2246- 				curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1 );
2246+ 				curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 1L );
22472247			} else  {
22482248				curl_easy_setopt (ch -> cp , CURLOPT_DEBUGFUNCTION , NULL );
22492249				curl_easy_setopt (ch -> cp , CURLOPT_DEBUGDATA , NULL );
2250- 				curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0 );
2250+ 				curl_easy_setopt (ch -> cp , CURLOPT_VERBOSE , 0L );
22512251			}
22522252			break ;
22532253
0 commit comments