]> granicus.if.org Git - php/commitdiff
data type fixes
authorAnatol Belski <ab@php.net>
Fri, 29 Aug 2014 10:53:37 +0000 (12:53 +0200)
committerAnatol Belski <ab@php.net>
Fri, 29 Aug 2014 10:53:37 +0000 (12:53 +0200)
Zend/zend_stream.c
ext/gd/gd.c
ext/session/mod_files.c
ext/standard/iptc.c
ext/zlib/zlib.c

index 7824ee1f832d988f3e2ebce7fbc02205871fb0b7..f67f59af4a2ba97fbb4b2ad25f0f8159fc1f763c 100644 (file)
@@ -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;
index f13953843f95c085d0d4d356a2002e07d97cd696..97e625742f9ef089283f876f93d4f2c03f6ce1ea 100644 (file)
@@ -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) {
index b5c9354c8753a6976941756f46af380c7081a5f2..8cdf44600079bc5a3445aa2b61cdd9247db08442 100644 (file)
@@ -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 */
index 629867484bc434936b1c48dee6e2b88a0b15529f..e5e9f04483ebfe45c335ca99b21a3c81b46c375b 100644 (file)
@@ -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) {
index ad6b6fad697b5418429f21510d2da83b7ef2150b..20346c04e3f2787c2e410f89eb6476525fae63a7 100644 (file)
@@ -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) {