summaryrefslogtreecommitdiff
path: root/sapi/apache2handler
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/apache2handler')
-rw-r--r--sapi/apache2handler/php_apache.h2
-rw-r--r--sapi/apache2handler/php_functions.c4
-rw-r--r--sapi/apache2handler/sapi_apache2.c3
3 files changed, 4 insertions, 5 deletions
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index 26ddf222c4..f6f4f7a7c9 100644
--- a/sapi/apache2handler/php_apache.h
+++ b/sapi/apache2handler/php_apache.h
@@ -78,7 +78,7 @@ typedef struct {
extern zend_module_entry apache2_module_entry;
#ifdef ZTS
-TSRMG_DHE(php_apache2_info_struct, php_apache2_info_id);
+extern int php_apache2_info_id;
#define AP2(v) TSRMG(php_apache2_info_id, php_apache2_info_struct *, v)
#else
extern php_apache2_info_struct php_apache2_info;
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 3fc88edfbc..d9ae4d97ea 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -49,7 +49,7 @@
#include "php_apache.h"
#ifdef ZTS
-TSRMG_DE(php_apache2_info_struct, php_apache2_info_id);
+int php_apache2_info_id;
#else
php_apache2_info_struct php_apache2_info;
#endif
@@ -536,7 +536,7 @@ PHP_INI_END()
static PHP_MINIT_FUNCTION(apache)
{
#ifdef ZTS
- TSRMG_ALLOCATE(php_apache2_info_id, sizeof(php_apache2_info_struct), NULL, NULL);
+ ts_allocate_id(&php_apache2_info_id, sizeof(php_apache2_info_struct), (ts_allocate_ctor) NULL, NULL);
#endif
REGISTER_INI_ENTRIES();
return SUCCESS;
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 86372e126d..fe200304fd 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -451,7 +451,6 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
}
#ifdef ZTS
tsrm_startup(1, 1, 0, NULL);
- TSRMLS_INIT();
#endif
sapi_startup(&apache2_sapi_module);
apache2_sapi_module.startup(&apache2_sapi_module);
@@ -541,7 +540,7 @@ static int php_handler(request_rec *r)
apr_bucket *bucket;
apr_status_t rv;
request_rec * volatile parent_req = NULL;
- TSRMLS_INIT();
+ TSRMLS_FETCH();
#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC);