Diff for /embedaddon/php/Zend/zend_stream.c between versions 1.1 and 1.1.1.4

version 1.1, 2012/02/21 23:47:52 version 1.1.1.4, 2014/06/15 20:04:04
Line 2 Line 2
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
    | Zend Engine                                                          |     | Zend Engine                                                          |
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
   | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |   | Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
    | This source file is subject to version 2.00 of the Zend license,     |     | This source file is subject to version 2.00 of the Zend license,     |
    | that is bundled with this package in the file LICENSE, and is        |     | that is bundled with this package in the file LICENSE, and is        |
Line 79  static size_t zend_stream_stdio_fsizer(void *handle TS Line 79  static size_t zend_stream_stdio_fsizer(void *handle TS
 static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */  static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */
 #if HAVE_MMAP  #if HAVE_MMAP
         if (stream->mmap.map) {          if (stream->mmap.map) {
                munmap(stream->mmap.map, stream->mmap.len);                munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD);
         } else          } else
 #endif  #endif
         if (stream->mmap.buf) {          if (stream->mmap.buf) {
Line 134  ZEND_API int zend_stream_open(const char *filename, ze Line 134  ZEND_API int zend_stream_open(const char *filename, ze
         handle->type = ZEND_HANDLE_FP;          handle->type = ZEND_HANDLE_FP;
         handle->opened_path = NULL;          handle->opened_path = NULL;
         handle->handle.fp = zend_fopen(filename, &handle->opened_path TSRMLS_CC);          handle->handle.fp = zend_fopen(filename, &handle->opened_path TSRMLS_CC);
        handle->filename = (char *)filename;        handle->filename = filename;
         handle->free_filename = 0;          handle->free_filename = 0;
         memset(&handle->handle.stream.mmap, 0, sizeof(zend_mmap));          memset(&handle->handle.stream.mmap, 0, sizeof(zend_mmap));
                   
Line 284  ZEND_API int zend_stream_fixup(zend_file_handle *file_ Line 284  ZEND_API int zend_stream_fixup(zend_file_handle *file_
         if (ZEND_MMAP_AHEAD) {          if (ZEND_MMAP_AHEAD) {
                 memset(file_handle->handle.stream.mmap.buf + file_handle->handle.stream.mmap.len, 0, ZEND_MMAP_AHEAD);                  memset(file_handle->handle.stream.mmap.buf + file_handle->handle.stream.mmap.len, 0, ZEND_MMAP_AHEAD);
         }          }
   
 #if HAVE_MMAP  #if HAVE_MMAP
 return_mapped:  return_mapped:
 #endif  #endif
Line 328  ZEND_API void zend_file_handle_dtor(zend_file_handle * Line 327  ZEND_API void zend_file_handle_dtor(zend_file_handle *
                 fh->opened_path = NULL;                  fh->opened_path = NULL;
         }          }
         if (fh->free_filename && fh->filename) {          if (fh->free_filename && fh->filename) {
                efree(fh->filename);                efree((char*)fh->filename);
                 fh->filename = NULL;                  fh->filename = NULL;
         }          }
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>