diff options
Diffstat (limited to 'Zend/zend.h')
| -rw-r--r-- | Zend/zend.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Zend/zend.h b/Zend/zend.h index 8fe005398f..8caa382326 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -531,8 +531,10 @@ typedef struct _zend_utility_functions { int (*write_function)(const char *str, uint str_length); FILE *(*fopen_function)(const char *filename, char **opened_path TSRMLS_DC); void (*message_handler)(long message, void *data TSRMLS_DC); +#ifndef ZEND_SIGNALS void (*block_interruptions)(void); void (*unblock_interruptions)(void); +#endif int (*get_configuration_directive)(const char *name, uint name_length, zval *contents); void (*ticks_function)(int ticks); void (*on_timeout)(int seconds TSRMLS_DC); @@ -674,8 +676,10 @@ BEGIN_EXTERN_C() extern ZEND_API int (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2); extern ZEND_API zend_write_func_t zend_write; extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC); +#ifndef ZEND_SIGNALS extern ZEND_API void (*zend_block_interruptions)(void); extern ZEND_API void (*zend_unblock_interruptions)(void); +#endif extern ZEND_API void (*zend_ticks_function)(int ticks); extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0); extern void (*zend_on_timeout)(int seconds TSRMLS_DC); @@ -698,8 +702,15 @@ END_EXTERN_C() #define ZEND_UV(name) (zend_uv.name) +#ifndef ZEND_SIGNALS #define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); } #define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); } +#else +#include "zend_signal.h" + +#define HANDLE_BLOCK_INTERRUPTIONS() SIGG(depth)++; +#define HANDLE_UNBLOCK_INTERRUPTIONS() if (UNEXPECTED((--SIGG(depth))==SIGG(blocked))) { zend_signal_handler_unblock(TSRMLS_C); } +#endif BEGIN_EXTERN_C() ZEND_API void zend_message_dispatcher(long message, void *data TSRMLS_DC); |
