com php-src: Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10): ext/opcache/ZendAccelerator.c ext/opcache/zend_acce
lerator_module.c

From: Date: Sun, 18 Oct 2015 10:43:08 +0000
Subject: com php-src: Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10): ext/opcache/ZendAccelerator.c ext/opcache/zend_acce
lerator_module.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89511@lists.php.net to get a copy of this message
Commit: 74004a160d0f606202a4745f4abdd54dbca95238 Author: Xinchen Hui <laruence@gmail.com> Sat, 17 Oct 2015 01:45:23 -0700 Committer: Anatol Belski <ab@php.net> Sun, 18 Oct 2015 12:43:08 +0200 Parents: 294c3cdbdcc1577137c830b9af3b7802f70b9097 Branches: PHP-7.0.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=74004a160d0f606202a4745f4abdd54dbca95238 Log: Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10) Bugs: https://bugs.php.net/70724 Changed paths: M ext/opcache/ZendAccelerator.c M ext/opcache/zend_accelerator_module.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index e6d7005..14dce59 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2517,13 +2517,13 @@ static int accel_remap_huge_pages(void *start, size_t size, const char *name, si } memcpy(mem, start, size); -#ifdef MAP_HUGETLB +# ifdef MAP_HUGETLB ret = mmap(start, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_HUGETLB, -1, 0); -#endif -#ifdef MADV_HUGEPAGE +# endif +# ifdef MADV_HUGEPAGE if (ret == MAP_FAILED) { ret = mmap(start, size, PROT_READ | PROT_WRITE | PROT_EXEC, @@ -2531,7 +2531,7 @@ static int accel_remap_huge_pages(void *start, size_t size, const char *name, si -1, 0); madvise(start, size, MADV_HUGEPAGE); } -#endif +# endif if (ret == start) { memcpy(start, mem, size); mprotect(start, size, PROT_READ | PROT_EXEC); @@ -2565,7 +2565,13 @@ static void accel_move_code_to_huge_pages(void) fclose(f); } } -# endif +# else +static void accel_move_code_to_huge_pages(void) +{ + zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME ": opcache.huge_code_pages has no affect as huge page is not supported"); + return; +} +# endif /* defined(MAP_HUGETLB) || defined(MADV_HUGEPAGE) */ #endif /* HAVE_HUGE_CODE_PAGES */ static int accel_startup(zend_extension *extension) diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index bd53f6e..f65e270 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -242,7 +242,6 @@ static ZEND_INI_MH(OnEnable) } #ifdef HAVE_OPCACHE_FILE_CACHE - static ZEND_INI_MH(OnUpdateFileCache) { if (new_value) {

« previous php.cvs (#89511) next »