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.c52
1 files changed, 0 insertions, 52 deletions
diff --git a/main/streams/mmap.c b/main/streams/mmap.c
deleted file mode 100644
index 791b96436f..0000000000
--- a/main/streams/mmap.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 4 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2003 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.02 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available at through the world-wide-web at |
- | http://www.php.net/license/2_02.txt. |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Wez Furlong <wez@thebrainroom.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id$ */
-
-/* Memory Mapping interface for streams */
-#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)
-{
- php_stream_mmap_range range = { offset, length, mode, NULL };
-
- /* TODO: Enforce system policy and limits for mmap sizes ? */
-
- 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;
- }
- return range.mapped;
- }
- return NULL;
-}
-
-PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC)
-{
- return php_stream_set_option(stream, PHP_STREAM_OPTION_MMAP_API, PHP_STREAM_MMAP_UNMAP, NULL) == PHP_STREAM_OPTION_RETURN_OK ? 1 : 0;
-}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */