AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass)
+AC_CHECK_FUNCS(memcpy strdup getpid kill strtod strtol finite fpclass sigsetjmp)
AC_ZEND_BROKEN_SPRINTF
AC_CHECK_FUNCS(finite isfinite isinf isnan)
CG(unclean_shutdown) = 1;
CG(in_compilation) = EG(in_execution) = 0;
EG(current_execute_data) = NULL;
- siglongjmp(*EG(bailout), FAILURE);
+ LONGJMP(*EG(bailout), FAILURE);
}
/* }}} */
END_EXTERN_C()
#define zend_bailout() _zend_bailout(__FILE__, __LINE__)
+#ifdef HAVE_SIGSETJMP
+# define SETJMP(a) sigsetjmp(a, 0)
+# define LONGJMP(a,b) siglongjmp(a, b)
+# define JMP_BUF sigjmp_buf
+#else
+# define SETJMP(a) setjmp(a)
+# define LONGJMP(a,b) longjmp(a, b)
+# define JMP_BUF jmp_buf
+#endif
+
#define zend_try \
{ \
- sigjmp_buf *__orig_bailout = EG(bailout); \
- sigjmp_buf __bailout; \
+ JMP_BUF *__orig_bailout = EG(bailout); \
+ JMP_BUF __bailout; \
\
EG(bailout) = &__bailout; \
- if (sigsetjmp(__bailout, 0)==0) {
+ if (SETJMP(__bailout)==0) {
#define zend_catch \
} else { \
EG(bailout) = __orig_bailout;