diff options
author | Anatol Belski <ab@php.net> | 2014-08-19 15:12:13 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-19 15:12:13 +0200 |
commit | 8704e392a1283ca5509a0785fd87f5a39d96036f (patch) | |
tree | 136f1e23a67f32f5d8103851cb67eb037619ec13 /ext/phar/stream.c | |
parent | 398a1cc655c4b5076aac2492765da154f9fad9e5 (diff) | |
download | php-git-8704e392a1283ca5509a0785fd87f5a39d96036f.tar.gz |
ported ext/phar
Diffstat (limited to 'ext/phar/stream.c')
-rw-r--r-- | ext/phar/stream.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/phar/stream.c b/ext/phar/stream.c index d4ff1efc76..a500758420 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -377,7 +377,7 @@ static size_t phar_stream_read(php_stream *stream, char *buf, size_t count TSRML got = php_stream_read(data->fp, buf, MIN(count, entry->uncompressed_filesize - data->position)); data->position = php_stream_tell(data->fp) - data->zero; - stream->eof = (data->position == (off_t) entry->uncompressed_filesize); + stream->eof = (data->position == (php_off_t) entry->uncompressed_filesize); return got; } @@ -386,12 +386,12 @@ static size_t phar_stream_read(php_stream *stream, char *buf, size_t count TSRML /** * Used for fseek($fp) on a phar file handle */ -static int phar_stream_seek(php_stream *stream, off_t offset, int whence, off_t *newoffset TSRMLS_DC) /* {{{ */ +static int phar_stream_seek(php_stream *stream, php_off_t offset, int whence, php_off_t *newoffset TSRMLS_DC) /* {{{ */ { phar_entry_data *data = (phar_entry_data *)stream->abstract; phar_entry_info *entry; int res; - off_t temp; + php_off_t temp; if (data->internal_file->link) { entry = phar_get_link_source(data->internal_file TSRMLS_CC); @@ -412,7 +412,7 @@ static int phar_stream_seek(php_stream *stream, off_t offset, int whence, off_t default: temp = 0; } - if (temp > data->zero + (off_t) entry->uncompressed_filesize) { + if (temp > data->zero + (php_off_t) entry->uncompressed_filesize) { *newoffset = -1; return -1; } @@ -440,7 +440,7 @@ static size_t phar_stream_write(php_stream *stream, const char *buf, size_t coun return -1; } data->position = php_stream_tell(data->fp); - if (data->position > (off_t)data->internal_file->uncompressed_filesize) { + if (data->position > (php_off_t)data->internal_file->uncompressed_filesize) { data->internal_file->uncompressed_filesize = data->position; } data->internal_file->compressed_filesize = data->internal_file->uncompressed_filesize; |