diff options
author | Sascha Schumann <sas@php.net> | 2000-12-10 23:22:20 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-12-10 23:22:20 +0000 |
commit | 107aa9f71a562a39c31939c6283db409ec041df1 (patch) | |
tree | c0adf9f5a679e33164915f585a184140b55a463c /sapi/apache/php_apache.c | |
parent | d41137fedfca157ce76f339c28359019ca030322 (diff) | |
download | php-git-107aa9f71a562a39c31939c6283db409ec041df1.tar.gz |
Align ZTS handling of globals with common usage
Diffstat (limited to 'sapi/apache/php_apache.c')
-rw-r--r-- | sapi/apache/php_apache.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c index 13968ec5f0..64898b8916 100644 --- a/sapi/apache/php_apache.c +++ b/sapi/apache/php_apache.c @@ -45,7 +45,11 @@ #include "php_apache_http.h" #include "http_request.h" -static int php_apache_info_id; +#ifdef ZTS +int php_apache_info_id; +#else +php_apache_info_struct php_apache_info; +#endif #ifdef PHP_WIN32 #include "zend.h" @@ -74,34 +78,34 @@ function_entry apache_functions[] = { {NULL, NULL, NULL} }; -#ifndef PHP_WIN32 + PHP_INI_BEGIN() STD_PHP_INI_ENTRY("xbithack", "0", PHP_INI_ALL, OnUpdateInt, xbithack, php_apache_info_struct, php_apache_info) STD_PHP_INI_ENTRY("engine", "1", PHP_INI_ALL, OnUpdateInt, engine, php_apache_info_struct, php_apache_info) STD_PHP_INI_ENTRY("last_modified", "0", PHP_INI_ALL, OnUpdateInt, last_modified, php_apache_info_struct, php_apache_info) PHP_INI_END() + static PHP_MINIT_FUNCTION(apache) { +#ifdef ZTS + php_apache_info_id = ts_allocate_id(sizeof(php_apache_info_struct), NULL, NULL); +#endif REGISTER_INI_ENTRIES(); return SUCCESS; } + static PHP_MSHUTDOWN_FUNCTION(apache) { UNREGISTER_INI_ENTRIES(); return SUCCESS; } + zend_module_entry apache_module_entry = { "apache", apache_functions, PHP_MINIT(apache), PHP_MSHUTDOWN(apache), NULL, NULL, PHP_MINFO(apache), STANDARD_MODULE_PROPERTIES }; -#else -zend_module_entry apache_module_entry = { - "apache", apache_functions, NULL, NULL, NULL, NULL, PHP_MINFO(apache), STANDARD_MODULE_PROPERTIES -}; -#endif - /* {{{ proto string apache_note(string note_name [, string note_value]) Get and set Apache request notes */ |