rasmus          Tue Mar 18 21:14:28 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2        Zend.m4 zend.c zend.h zend_globals.h 
    /php-src/win32/build        config.w32.h.in 
  Log:
  Make the sigsetjmp change more robust.  On systems that don't have 
  sigsetjmp use setjmp.  Windows is of course weird in that it seems to
  have sigsetjmp but not sigjmp_buf (??) so force it to use setjmp in
  config.w32.h.in
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/Zend.m4?r1=1.58.4.4.2.2&r2=1.58.4.4.2.3&diff_format=u
Index: ZendEngine2/Zend.m4
diff -u ZendEngine2/Zend.m4:1.58.4.4.2.2 ZendEngine2/Zend.m4:1.58.4.4.2.3
--- ZendEngine2/Zend.m4:1.58.4.4.2.2    Sun Mar 16 21:05:33 2008
+++ ZendEngine2/Zend.m4 Tue Mar 18 21:14:27 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: Zend.m4,v 1.58.4.4.2.2 2008/03/16 21:05:33 helly Exp $
+dnl $Id: Zend.m4,v 1.58.4.4.2.3 2008/03/18 21:14:27 rasmus Exp $
 dnl
 dnl This file contains Zend specific autoconf functions.
 dnl
@@ -109,7 +109,7 @@
 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)
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.308.2.12.2.35.2.14&r2=1.308.2.12.2.35.2.15&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.308.2.12.2.35.2.14 
ZendEngine2/zend.c:1.308.2.12.2.35.2.15
--- ZendEngine2/zend.c:1.308.2.12.2.35.2.14     Tue Mar 18 18:34:11 2008
+++ ZendEngine2/zend.c  Tue Mar 18 21:14:27 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.c,v 1.308.2.12.2.35.2.14 2008/03/18 18:34:11 rasmus Exp $ */
+/* $Id: zend.c,v 1.308.2.12.2.35.2.15 2008/03/18 21:14:27 rasmus Exp $ */
 
 #include "zend.h"
 #include "zend_extensions.h"
@@ -794,7 +794,7 @@
        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()
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.h?r1=1.293.2.11.2.9.2.19&r2=1.293.2.11.2.9.2.20&diff_format=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.293.2.11.2.9.2.19 
ZendEngine2/zend.h:1.293.2.11.2.9.2.20
--- ZendEngine2/zend.h:1.293.2.11.2.9.2.19      Tue Mar 18 18:34:11 2008
+++ ZendEngine2/zend.h  Tue Mar 18 21:14:27 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend.h,v 1.293.2.11.2.9.2.19 2008/03/18 18:34:11 rasmus Exp $ */
+/* $Id: zend.h,v 1.293.2.11.2.9.2.20 2008/03/18 21:14:27 rasmus Exp $ */
 
 #ifndef ZEND_H
 #define ZEND_H
@@ -520,13 +520,23 @@
 
 #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;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_globals.h?r1=1.141.2.3.2.7.2.12&r2=1.141.2.3.2.7.2.13&diff_format=u
Index: ZendEngine2/zend_globals.h
diff -u ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.12 
ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.13
--- ZendEngine2/zend_globals.h:1.141.2.3.2.7.2.12       Tue Mar 18 18:34:11 2008
+++ ZendEngine2/zend_globals.h  Tue Mar 18 21:14:27 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.12 2008/03/18 18:34:11 rasmus Exp $ */
+/* $Id: zend_globals.h,v 1.141.2.3.2.7.2.13 2008/03/18 21:14:27 rasmus Exp $ */
 
 #ifndef ZEND_GLOBALS_H
 #define ZEND_GLOBALS_H
@@ -161,7 +161,7 @@
 
        HashTable included_files;       /* files already included */
 
-       sigjmp_buf *bailout;
+       JMP_BUF *bailout;
 
        int error_reporting;
        int orig_error_reporting;
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32.h.in?r1=1.7.2.4.2.3&r2=1.7.2.4.2.3.2.1&diff_format=u
Index: php-src/win32/build/config.w32.h.in
diff -u php-src/win32/build/config.w32.h.in:1.7.2.4.2.3 
php-src/win32/build/config.w32.h.in:1.7.2.4.2.3.2.1
--- php-src/win32/build/config.w32.h.in:1.7.2.4.2.3     Wed Jul 11 17:36:56 2007
+++ php-src/win32/build/config.w32.h.in Tue Mar 18 21:14:28 2008
@@ -1,6 +1,6 @@
 /*
        Build Configuration Template for Win32.
-       $Id: config.w32.h.in,v 1.7.2.4.2.3 2007/07/11 17:36:56 johannes Exp $
+       $Id: config.w32.h.in,v 1.7.2.4.2.3.2.1 2008/03/18 21:14:28 rasmus Exp $
 */
 
 /* Default PHP / PEAR directories */
@@ -54,6 +54,7 @@
 #define NEED_ISBLANK 1
 #define DISCARD_PATH 0
 #undef HAVE_SETITIMER
+#undef HAVE_SIGSETJMP
 #undef HAVE_IODBC
 #define HAVE_LIBDL 1
 #define HAVE_GETTIMEOFDAY 1



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to