@@ -261,7 +261,7 @@ static int fill_buffer(multipart_buffer *self TSRMLS_DC)
261
261
262
262
char * buf = self -> buffer + self -> bytes_in_buffer ;
263
263
264
- actual_read = sapi_module .read_post (buf , bytes_to_read TSRMLS_CC );
264
+ actual_read = ( int ) sapi_module .read_post (buf , bytes_to_read TSRMLS_CC );
265
265
266
266
/* update the buffer length */
267
267
if (actual_read > 0 ) {
@@ -300,7 +300,7 @@ static multipart_buffer *multipart_buffer_new(char *boundary, int boundary_len T
300
300
301
301
spprintf (& self -> boundary , 0 , "--%s" , boundary );
302
302
303
- self -> boundary_next_len = spprintf (& self -> boundary_next , 0 , "\n--%s" , boundary );
303
+ self -> boundary_next_len = ( int ) spprintf (& self -> boundary_next , 0 , "\n--%s" , boundary );
304
304
305
305
self -> buf_begin = self -> buffer ;
306
306
self -> bytes_in_buffer = 0 ;
@@ -442,8 +442,8 @@ static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header T
442
442
443
443
} else if (zend_llist_count (header )) { /* If no ':' on the line, add to previous line */
444
444
445
- prev_len = strlen (prev_entry .value );
446
- cur_len = strlen (line );
445
+ prev_len = ( int ) strlen (prev_entry .value );
446
+ cur_len = ( int ) strlen (line );
447
447
448
448
entry .value = emalloc (prev_len + cur_len + 1 );
449
449
memcpy (entry .value , prev_entry .value , prev_len );
@@ -551,7 +551,7 @@ static char *php_ap_getword_conf(const zend_encoding *encoding, char *str TSRMLS
551
551
char quote = * str ;
552
552
553
553
str ++ ;
554
- return substring_conf (str , strlen (str ), quote );
554
+ return substring_conf (str , ( int ) strlen (str ), quote );
555
555
} else {
556
556
char * strend = str ;
557
557
@@ -646,11 +646,11 @@ static int multipart_buffer_read(multipart_buffer *self, char *buf, size_t bytes
646
646
}
647
647
648
648
/* update the buffer */
649
- self -> bytes_in_buffer -= len ;
649
+ self -> bytes_in_buffer -= ( int ) len ;
650
650
self -> buf_begin += len ;
651
651
}
652
652
653
- return len ;
653
+ return ( int ) len ;
654
654
}
655
655
656
656
/*
@@ -721,7 +721,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
721
721
/* Get the boundary */
722
722
boundary = strstr (content_type_dup , "boundary" );
723
723
if (!boundary ) {
724
- int content_type_len = strlen (content_type_dup );
724
+ int content_type_len = ( int ) strlen (content_type_dup );
725
725
char * content_type_lcase = estrndup (content_type_dup , content_type_len );
726
726
727
727
php_strtolower (content_type_lcase , content_type_len );
@@ -738,7 +738,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
738
738
}
739
739
740
740
boundary ++ ;
741
- boundary_len = strlen (boundary );
741
+ boundary_len = ( int ) strlen (boundary );
742
742
743
743
if (boundary [0 ] == '"' ) {
744
744
boundary ++ ;
@@ -1045,7 +1045,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1045
1045
#endif
1046
1046
cancel_upload = UPLOAD_ERROR_B ;
1047
1047
} else if (blen > 0 ) {
1048
+ #ifdef PHP_WIN32
1049
+ wlen = write (fd , buff , (unsigned int )blen );
1050
+ #else
1048
1051
wlen = write (fd , buff , blen );
1052
+ #endif
1049
1053
1050
1054
if (wlen == -1 ) {
1051
1055
/* write failed */
@@ -1113,7 +1117,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1113
1117
is_arr_upload = (start_arr = strchr (param ,'[' )) && (param [strlen (param )- 1 ] == ']' );
1114
1118
1115
1119
if (is_arr_upload ) {
1116
- array_len = strlen (start_arr );
1120
+ array_len = ( int ) strlen (start_arr );
1117
1121
if (array_index ) {
1118
1122
efree (array_index );
1119
1123
}
@@ -1122,7 +1126,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */
1122
1126
1123
1127
/* Add $foo_name */
1124
1128
if (llen < strlen (param ) + MAX_SIZE_OF_INDEX + 1 ) {
1125
- llen = strlen (param );
1129
+ llen = ( int ) strlen (param );
1126
1130
lbuf = (char * ) safe_erealloc (lbuf , llen , 1 , MAX_SIZE_OF_INDEX + 1 );
1127
1131
llen += MAX_SIZE_OF_INDEX + 1 ;
1128
1132
}
0 commit comments