char *buf = self->buffer + self->bytes_in_buffer;
- actual_read = sapi_module.read_post(buf, bytes_to_read TSRMLS_CC);
+ actual_read = (int)sapi_module.read_post(buf, bytes_to_read TSRMLS_CC);
/* update the buffer length */
if (actual_read > 0) {
spprintf(&self->boundary, 0, "--%s", boundary);
- self->boundary_next_len = spprintf(&self->boundary_next, 0, "\n--%s", boundary);
+ self->boundary_next_len = (int)spprintf(&self->boundary_next, 0, "\n--%s", boundary);
self->buf_begin = self->buffer;
self->bytes_in_buffer = 0;
} else if (zend_llist_count(header)) { /* If no ':' on the line, add to previous line */
- prev_len = strlen(prev_entry.value);
- cur_len = strlen(line);
+ prev_len = (int)strlen(prev_entry.value);
+ cur_len = (int)strlen(line);
entry.value = emalloc(prev_len + cur_len + 1);
memcpy(entry.value, prev_entry.value, prev_len);
char quote = *str;
str++;
- return substring_conf(str, strlen(str), quote);
+ return substring_conf(str, (int)strlen(str), quote);
} else {
char *strend = str;
}
/* update the buffer */
- self->bytes_in_buffer -= len;
+ self->bytes_in_buffer -= (int)len;
self->buf_begin += len;
}
- return len;
+ return (int)len;
}
/*
/* Get the boundary */
boundary = strstr(content_type_dup, "boundary");
if (!boundary) {
- int content_type_len = strlen(content_type_dup);
+ int content_type_len = (int)strlen(content_type_dup);
char *content_type_lcase = estrndup(content_type_dup, content_type_len);
php_strtolower(content_type_lcase, content_type_len);
}
boundary++;
- boundary_len = strlen(boundary);
+ boundary_len = (int)strlen(boundary);
if (boundary[0] == '"') {
boundary++;
#endif
cancel_upload = UPLOAD_ERROR_B;
} else if (blen > 0) {
+#ifdef PHP_WIN32
+ wlen = write(fd, buff, (unsigned int)blen);
+#else
wlen = write(fd, buff, blen);
+#endif
if (wlen == -1) {
/* write failed */
is_arr_upload = (start_arr = strchr(param,'[')) && (param[strlen(param)-1] == ']');
if (is_arr_upload) {
- array_len = strlen(start_arr);
+ array_len = (int)strlen(start_arr);
if (array_index) {
efree(array_index);
}
/* Add $foo_name */
if (llen < strlen(param) + MAX_SIZE_OF_INDEX + 1) {
- llen = strlen(param);
+ llen = (int)strlen(param);
lbuf = (char *) safe_erealloc(lbuf, llen, 1, MAX_SIZE_OF_INDEX + 1);
llen += MAX_SIZE_OF_INDEX + 1;
}