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;
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;
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) {
{
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)) {
PS_READ_FUNC(files)
{
zend_long n;
- struct stat sbuf;
+ zend_stat_t sbuf;
PS_FILES_DATA;
/* If strict mode, check session id existence */
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) {
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) {