com php-src: data type fixes: Zend/zend_stream.c ext/gd/g d.c ext/session/mod_files.c ext/standard/iptc.c e xt/zlib/zlib.c

From: Date: Fri, 29 Aug 2014 10:53:37 +0000
Subject: com php-src: data type fixes: Zend/zend_stream.c ext/gd/g d.c ext/session/mod_files.c ext/standard/iptc.c e xt/zlib/zlib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81294@lists.php.net to get a copy of this message
Commit: 451856420c42d4fc2f2ab579135c23eb78ae7378 Author: Anatol Belski <ab@php.net> Fri, 29 Aug 2014 12:53:37 +0200 Parents: 34f536693cc4696285f491e79ed14a6cee303b8f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=451856420c42d4fc2f2ab579135c23eb78ae7378 Log: data type fixes Changed paths: M Zend/zend_stream.c M ext/gd/gd.c M ext/session/mod_files.c M ext/standard/iptc.c M ext/zlib/zlib.c Diff: diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c index 7824ee1..f67f59a 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 f139538..97e6257 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 b5c9354..8cdf446 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 6298674..e5e9f04 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 ad6b6fa..20346c0 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) {

« previous php.cvs (#81294) next »