summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index e2a63ceef8..28fc790ea9 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -552,7 +552,7 @@ PHP_FUNCTION(file_get_contents)
}
if (offset > 0 && php_stream_seek(stream, offset, SEEK_SET) < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position " ZEND_INT_FMT " in the stream", offset);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to seek to position " ZEND_LONG_FMT " in the stream", offset);
php_stream_close(stream);
RETURN_FALSE;
}
@@ -628,13 +628,13 @@ PHP_FUNCTION(file_put_contents)
switch (Z_TYPE_P(data)) {
case IS_RESOURCE: {
- php_size_t len;
+ size_t len;
if (php_stream_copy_to_stream_ex(srcstream, stream, PHP_STREAM_COPY_ALL, &len) != SUCCESS) {
ret_ok = 0;
} else {
- if (len > PHP_INT_MAX) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "content truncated from %zu to " ZEND_INT_FMT " bytes", len, PHP_INT_MAX);
- len = PHP_INT_MAX;
+ if (len > ZEND_LONG_MAX) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "content truncated from %zu to " ZEND_LONG_FMT " bytes", len, ZEND_LONG_MAX);
+ len = ZEND_LONG_MAX;
}
numbytes = len;
}
@@ -659,7 +659,7 @@ PHP_FUNCTION(file_put_contents)
case IS_ARRAY:
if (zend_hash_num_elements(Z_ARRVAL_P(data))) {
- php_size_t bytes_written;
+ size_t bytes_written;
zval *tmp;
ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(data), tmp) {
@@ -732,7 +732,7 @@ PHP_FUNCTION(file)
return;
}
if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | PHP_FILE_NO_DEFAULT_CONTEXT)) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "'" ZEND_INT_FMT "' flag is not supported", flags);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "'" ZEND_LONG_FMT "' flag is not supported", flags);
RETURN_FALSE;
}
@@ -1888,8 +1888,8 @@ PHP_FUNCTION(fputcsv)
}
/* }}} */
-/* {{{ PHPAPI php_size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char enclosure, char escape_char TSRMLS_DC) */
-PHPAPI php_size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char enclosure, char escape_char TSRMLS_DC)
+/* {{{ PHPAPI size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char enclosure, char escape_char TSRMLS_DC) */
+PHPAPI size_t php_fputcsv(php_stream *stream, zval *fields, char delimiter, char enclosure, char escape_char TSRMLS_DC)
{
int count, i = 0, ret;
zval *field_tmp;