summaryrefslogtreecommitdiff
path: root/main/streams/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/streams/mmap.c')
-rw-r--r--main/streams/mmap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/streams/mmap.c b/main/streams/mmap.c
index ee2b210f66..04427ed5c4 100644
--- a/main/streams/mmap.c
+++ b/main/streams/mmap.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
@@ -22,10 +22,10 @@
#include "php.h"
#include "php_streams_int.h"
-PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_operation_t mode, size_t *mapped_len TSRMLS_DC)
+PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, php_stream_mmap_access_t mode, size_t *mapped_len)
{
php_stream_mmap_range range;
-
+
range.offset = offset;
range.length = length;
range.mode = mode;
@@ -36,7 +36,7 @@ PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t le
if (length > 4 * 1024 * 1024) {
return NULL;
}
-
+
if (PHP_STREAM_OPTION_RETURN_OK == php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_MAP_RANGE, &range)) {
if (mapped_len) {
*mapped_len = range.length;
@@ -46,12 +46,12 @@ PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t le
return NULL;
}
-PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC)
+PHPAPI int _php_stream_mmap_unmap(php_stream *stream)
{
return php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_UNMAP, NULL) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0;
}
-PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, off_t readden TSRMLS_DC)
+PHPAPI int _php_stream_mmap_unmap_ex(php_stream *stream, zend_off_t readden)
{
int ret = 1;