com php-src: Fixed bug #73965 DTrace reported as enabled when disabled: Zend/zend.c Zend/zend.h ext/standard/info.c

From: Date: Fri, 20 Jan 2017 16:45:15 +0000
Subject: com php-src: Fixed bug #73965 DTrace reported as enabled when disabled: Zend/zend.c Zend/zend.h ext/standard/info.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96813@lists.php.net to get a copy of this message
Commit: f81b7df618750977b9d17f3443d2cb0d74529f50 Author: Remi Collet <remi@php.net> Fri, 20 Jan 2017 17:45:15 +0100 Parents: cad2598fcb80a2b3594568ced0f9a5823e98768e Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f81b7df618750977b9d17f3443d2cb0d74529f50 Log: Fixed bug #73965 DTrace reported as enabled when disabled Bugs: https://bugs.php.net/73965 Changed paths: M Zend/zend.c M Zend/zend.h M ext/standard/info.c Diff: diff --git a/Zend/zend.c b/Zend/zend.c index 2a47e92..22a92a6 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -152,6 +152,7 @@ ZEND_TSRMLS_CACHE_DEFINE() #endif ZEND_API zend_utility_values zend_uv; +ZEND_API zend_bool zend_dtrace_enabled; /* version information */ static char *zend_version_info; @@ -685,6 +686,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) / char *tmp = getenv("USE_ZEND_DTRACE"); if (tmp && zend_atoi(tmp, 0)) { + zend_dtrace_enabled = 1; zend_compile_file = dtrace_compile_file; zend_execute_ex = dtrace_execute_ex; zend_execute_internal = dtrace_execute_internal; diff --git a/Zend/zend.h b/Zend/zend.h index 141573f..bb9866d 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -299,6 +299,8 @@ extern ZEND_API zend_class_entry *zend_standard_class_def; extern ZEND_API zend_utility_values zend_uv; extern ZEND_API zval zval_used_for_init; +/* If DTrace is available and enabled */ +extern ZEND_API zend_bool zend_dtrace_enabled; END_EXTERN_C() #define ZEND_UV(name) (zend_uv.name) diff --git a/ext/standard/info.c b/ext/standard/info.c index fa19179...6b06f02 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -940,7 +940,7 @@ PHPAPI void php_print_info(int flag) #endif #if HAVE_DTRACE - php_info_print_table_row(2, "DTrace Support", "enabled" ); + php_info_print_table_row(2, "DTrace Support", (zend_dtrace_enabled ? "enabled" : "available, disabled")); #else php_info_print_table_row(2, "DTrace Support", "disabled" ); #endif

« previous php.cvs (#96813) next »