diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-04-12 15:31:35 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-04-12 15:31:35 +0800 |
commit | 4fafd7309cb5073270455c2b59d6f475a37cf4e5 (patch) | |
tree | 5f54bb9d619101e033d2f5266330e45d3d7eb1a1 | |
parent | 79a2e0a2017cc6b7f789e065f44b80fedd348268 (diff) | |
parent | 9458f54969cceaf721eae7ac88ea747c324c7b64 (diff) | |
download | php-git-4fafd7309cb5073270455c2b59d6f475a37cf4e5.tar.gz |
Merge branch 'PHP-7.0'
* PHP-7.0:
This only make sense on *nix
-rw-r--r-- | ext/opcache/README | 2 | ||||
-rw-r--r-- | ext/opcache/ZendAccelerator.h | 2 | ||||
-rw-r--r-- | ext/opcache/zend_accelerator_module.c | 8 |
3 files changed, 9 insertions, 3 deletions
diff --git a/ext/opcache/README b/ext/opcache/README index 11c9c2748b..e4d36ba51a 100644 --- a/ext/opcache/README +++ b/ext/opcache/README @@ -215,4 +215,4 @@ opcache.mmap_base errors. opcache.lockfile_path (default "/tmp") - Absolute path used to store shared lockfiles. + Absolute path used to store shared lockfiles (for *nix only) diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index b4119bcd45..ffcb1b6eb6 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -195,7 +195,9 @@ typedef struct _zend_accel_directives { zend_long max_file_size; zend_long interned_strings_buffer; char *restrict_api; +#ifndef ZEND_WIN32 char *lockfile_path; +#endif #ifdef HAVE_OPCACHE_FILE_CACHE char *file_cache; zend_bool file_cache_only; diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 92f496c359..aa01073c97 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -299,9 +299,10 @@ ZEND_INI_BEGIN() STD_PHP_INI_BOOLEAN("opcache.enable_cli" , "0" , PHP_INI_SYSTEM, OnUpdateBool, accel_directives.enable_cli, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.error_log" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.error_log, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.restrict_api" , "" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.restrict_api, zend_accel_globals, accel_globals) - STD_PHP_INI_ENTRY("opcache.lockfile_path" , "/tmp" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.lockfile_path, zend_accel_globals, accel_globals) -#ifdef ZEND_WIN32 +#ifndef ZEND_WIN32 + STD_PHP_INI_ENTRY("opcache.lockfile_path" , "/tmp" , PHP_INI_SYSTEM, OnUpdateString, accel_directives.lockfile_path, zend_accel_globals, accel_globals) +#else STD_PHP_INI_ENTRY("opcache.mmap_base", NULL, PHP_INI_SYSTEM, OnUpdateString, accel_directives.mmap_base, zend_accel_globals, accel_globals) #endif @@ -712,7 +713,10 @@ static ZEND_FUNCTION(opcache_get_configuration) add_assoc_bool(&directives, "opcache.fast_shutdown", ZCG(accel_directives).fast_shutdown); add_assoc_bool(&directives, "opcache.enable_file_override", ZCG(accel_directives).file_override_enabled); add_assoc_long(&directives, "opcache.optimization_level", ZCG(accel_directives).optimization_level); + +#ifndef ZEND_WIN32 add_assoc_string(&directives, "opcache.lockfile_path", STRING_NOT_NULL(ZCG(accel_directives).lockfile_path)); +#endif #ifdef HAVE_OPCACHE_FILE_CACHE add_assoc_string(&directives, "opcache.file_cache", ZCG(accel_directives).file_cache ? ZCG(accel_directives).file_cache : ""); |