From 451856420c42d4fc2f2ab579135c23eb78ae7378 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Fri, 29 Aug 2014 12:53:37 +0200 Subject: [PATCH] data type fixes --- Zend/zend_stream.c | 4 ++-- ext/gd/gd.c | 2 +- ext/session/mod_files.c | 4 ++-- ext/standard/iptc.c | 2 +- ext/zlib/zlib.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 7824ee1f83..f67f59af4a 100644 --- a/Zend/zend_stream.c +++ b/Zend/zend_stream.c @@ -105,7 +105,7 @@ static inline int zend_stream_is_mmap(zend_file_handle *file_handle) { /* {{{ */ static size_t zend_stream_fsize(zend_file_handle *file_handle TSRMLS_DC) /* {{{ */ { - struct stat buf; + zend_stat_t buf; if (zend_stream_is_mmap(file_handle)) { return file_handle->handle.stream.mmap.len; @@ -113,7 +113,7 @@ static size_t zend_stream_fsize(zend_file_handle *file_handle TSRMLS_DC) /* {{{ if (file_handle->type == ZEND_HANDLE_STREAM || file_handle->type == ZEND_HANDLE_MAPPED) { return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle TSRMLS_CC); } - if (file_handle->handle.fp && fstat(fileno(file_handle->handle.fp), &buf) == 0) { + if (file_handle->handle.fp && zend_fstat(fileno(file_handle->handle.fp), &buf) == 0) { #ifdef S_ISREG if (!S_ISREG(buf.st_mode)) { return 0; diff --git a/ext/gd/gd.c b/ext/gd/gd.c index f13953843f..97e625742f 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -3917,7 +3917,7 @@ PHP_FUNCTION(imagepsloadfont) char *file; int file_len, f_ind, *font; #ifdef PHP_WIN32 - struct stat st; + zend_stat_t st; #endif if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &file, &file_len) == FAILURE) { diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index b5c9354c87..8cdf446000 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -122,7 +122,7 @@ static void ps_files_open(ps_files *data, const char *key TSRMLS_DC) { char buf[MAXPATHLEN]; #if !defined(O_NOFOLLOW) || !defined(PHP_WIN32) - struct stat sbuf; + zend_stat_t sbuf; #endif if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) { @@ -336,7 +336,7 @@ PS_CLOSE_FUNC(files) PS_READ_FUNC(files) { zend_long n; - struct stat sbuf; + zend_stat_t sbuf; PS_FILES_DATA; /* If strict mode, check session id existence */ diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index 629867484b..e5e9f04483 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -184,7 +184,7 @@ PHP_FUNCTION(iptcembed) unsigned int marker, done = 0; int inx; unsigned char *spoolbuf = NULL, *poi = NULL; - struct stat sb; + zend_stat_t sb; zend_bool written = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sp|l", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) { diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ad6b6fad69..20346c04e3 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -605,7 +605,7 @@ static PHP_FUNCTION(readgzfile) size_t filename_len; int flags = REPORT_ERRORS; php_stream *stream; - int size; + size_t size; zend_long use_include_path = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len, &use_include_path) == FAILURE) { -- 2.40.0