diff options
| author | Ben Fuhrmannek | 2016-03-04 11:34:33 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2016-03-04 11:34:33 +0100 |
| commit | 3d8cc07c5af283289f62f0964f153804f2cc1862 (patch) | |
| tree | 048e15e05ffd080fa1ad6752b0e893c62e83716e /php_suhosin7.h | |
| parent | 60ba43075649da201339634ed071ccb274c96ec8 (diff) | |
fixed ZTS segfault (closes #4)
Diffstat (limited to 'php_suhosin7.h')
| -rw-r--r-- | php_suhosin7.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/php_suhosin7.h b/php_suhosin7.h index 5024790..cbde402 100644 --- a/php_suhosin7.h +++ b/php_suhosin7.h | |||
| @@ -37,6 +37,9 @@ extern zend_module_entry suhosin7_module_entry; | |||
| 37 | # define SUHOSIN7_API | 37 | # define SUHOSIN7_API |
| 38 | #endif | 38 | #endif |
| 39 | 39 | ||
| 40 | #ifdef ZTS | ||
| 41 | #include "TSRM.h" | ||
| 42 | #endif | ||
| 40 | 43 | ||
| 41 | /* -------------- */ | 44 | /* -------------- */ |
| 42 | 45 | ||
| @@ -323,12 +326,12 @@ ZEND_BEGIN_MODULE_GLOBALS(suhosin7) | |||
| 323 | 326 | ||
| 324 | ZEND_END_MODULE_GLOBALS(suhosin7) | 327 | ZEND_END_MODULE_GLOBALS(suhosin7) |
| 325 | 328 | ||
| 326 | /* Always refer to the globals in your function as SUHOSIN7_G(variable). | ||
| 327 | You are encouraged to rename these macros something shorter, see | ||
| 328 | examples in any other php module directory. | ||
| 329 | */ | ||
| 330 | #define SUHOSIN7_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(suhosin7, v) | 329 | #define SUHOSIN7_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(suhosin7, v) |
| 331 | 330 | ||
| 331 | #if defined(ZTS) && defined(COMPILE_DL_SUHOSIN7) | ||
| 332 | ZEND_TSRMLS_CACHE_EXTERN(); | ||
| 333 | #endif | ||
| 334 | |||
| 332 | 335 | ||
| 333 | /* Error Constants */ | 336 | /* Error Constants */ |
| 334 | #ifndef S_MEMORY | 337 | #ifndef S_MEMORY |
| @@ -417,8 +420,6 @@ char *suhosin_strcasestr(char *haystack, char *needle) | |||
| 417 | #define suhosin_strcasestr(a, b) strcasestr(a, b) | 420 | #define suhosin_strcasestr(a, b) strcasestr(a, b) |
| 418 | #endif | 421 | #endif |
| 419 | 422 | ||
| 420 | /* {{{ suhosin_strcasestr */ | ||
| 421 | |||
| 422 | 423 | ||
| 423 | /* | 424 | /* |
| 424 | * Local variables: | 425 | * Local variables: |
