svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/Zend.m4 branches/PHP_5_4/Zend/zend.h branches/PHP_5_4/main/main.c trunk/Zend/Zend.m4
trunk/Zend/zend.h trunk/main/main.c

From: Date: Thu, 16 Feb 2012 01:51:45 +0000
Subject: svn: /php/php-src/ branches/PHP_5_4/NEWS branches/PHP_5_4/Zend/Zend.m4 branches/PHP_5_4/Zend/zend.h branches/PHP_5_4/main/main.c trunk/Zend/Zend.m4
trunk/Zend/zend.h trunk/main/main.c
Groups: php.cvs 
Request: Send a blank email to [email protected] to get a copy of this message
stas                                     Thu, 16 Feb 2012 01:51:45 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=323245

Log:
make ZEND_SIGNALS configurable, off by default
also make ZEND_SIGNALS enabled and disabled binary-compatible

Changed paths:
    U   php/php-src/branches/PHP_5_4/NEWS
    U   php/php-src/branches/PHP_5_4/Zend/Zend.m4
    U   php/php-src/branches/PHP_5_4/Zend/zend.h
    U   php/php-src/branches/PHP_5_4/main/main.c
    U   php/php-src/trunk/Zend/Zend.m4
    U   php/php-src/trunk/Zend/zend.h
    U   php/php-src/trunk/main/main.c

Modified: php/php-src/branches/PHP_5_4/NEWS
===================================================================
--- php/php-src/branches/PHP_5_4/NEWS	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/branches/PHP_5_4/NEWS	2012-02-16 01:51:45 UTC (rev 323245)
@@ -4,6 +4,8 @@
 - Core:
   . Added ability to reset user opcode handlers (Yoram).
   . Improved max_input_vars directive to check nested variables (Dmitry).
+  . Made ZEND_SIGNALS configurable via --enable-zend-signals, off by
+    default (Stas).
   . Fixed bug #60965 (Buffer overflow on htmlspecialchars/entities with
     $double=false). (Gustavo)


Modified: php/php-src/branches/PHP_5_4/Zend/Zend.m4
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/Zend.m4	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/branches/PHP_5_4/Zend/Zend.m4	2012-02-16 01:51:45 UTC (rev 323245)
@@ -393,14 +393,20 @@
 AC_CHECK_FUNCS(mremap)


+AC_ARG_ENABLE(zend-signals,
+[  --enable-zend-signals   Use zend signal handling],[
+  ZEND_SIGNALS=$enableval
+],[
+  ZEND_SIGNALS=no
+])
+
 AC_CHECK_FUNC(sigaction, [
-	ZEND_SIGNALS=yes
-	AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])
 	AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
 ], [
 	ZEND_SIGNALS=no
 ])
 if test "$ZEND_SIGNALS" = "yes"; then
+	AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])
 	CFLAGS="$CFLAGS -DZEND_SIGNALS"
 fi


Modified: php/php-src/branches/PHP_5_4/Zend/zend.h
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend.h	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/branches/PHP_5_4/Zend/zend.h	2012-02-16 01:51:45 UTC (rev 323245)
@@ -531,10 +531,8 @@
 	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, const 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);
@@ -677,10 +675,8 @@
 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 ZEND_API void (*zend_on_timeout)(int seconds TSRMLS_DC);

Modified: php/php-src/branches/PHP_5_4/main/main.c
===================================================================
--- php/php-src/branches/PHP_5_4/main/main.c	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/branches/PHP_5_4/main/main.c	2012-02-16 01:51:45 UTC (rev 323245)
@@ -1999,10 +1999,8 @@
 	zuf.write_function = php_output_wrapper;
 	zuf.fopen_function = php_fopen_wrapper_for_zend;
 	zuf.message_handler = php_message_handler_for_zend;
-#ifndef ZEND_SIGNALS
 	zuf.block_interruptions = sapi_module.block_interruptions;
 	zuf.unblock_interruptions = sapi_module.unblock_interruptions;
-#endif
 	zuf.get_configuration_directive = php_get_configuration_directive_for_zend;
 	zuf.ticks_function = php_run_ticks;
 	zuf.on_timeout = php_on_timeout;

Modified: php/php-src/trunk/Zend/Zend.m4
===================================================================
--- php/php-src/trunk/Zend/Zend.m4	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/trunk/Zend/Zend.m4	2012-02-16 01:51:45 UTC (rev 323245)
@@ -393,14 +393,20 @@
 AC_CHECK_FUNCS(mremap)


+AC_ARG_ENABLE(zend-signals,
+[  --enable-zend-signals   Use zend signal handling],[
+  ZEND_SIGNALS=$enableval
+],[
+  ZEND_SIGNALS=no
+])
+
 AC_CHECK_FUNC(sigaction, [
-	ZEND_SIGNALS=yes
-	AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])
 	AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
 ], [
 	ZEND_SIGNALS=no
 ])
 if test "$ZEND_SIGNALS" = "yes"; then
+	AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])
 	CFLAGS="$CFLAGS -DZEND_SIGNALS"
 fi


Modified: php/php-src/trunk/Zend/zend.h
===================================================================
--- php/php-src/trunk/Zend/zend.h	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/trunk/Zend/zend.h	2012-02-16 01:51:45 UTC (rev 323245)
@@ -531,10 +531,8 @@
 	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, const 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);
@@ -677,10 +675,8 @@
 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 ZEND_API void (*zend_on_timeout)(int seconds TSRMLS_DC);

Modified: php/php-src/trunk/main/main.c
===================================================================
--- php/php-src/trunk/main/main.c	2012-02-16 00:51:37 UTC (rev 323244)
+++ php/php-src/trunk/main/main.c	2012-02-16 01:51:45 UTC (rev 323245)
@@ -1999,10 +1999,8 @@
 	zuf.write_function = php_output_wrapper;
 	zuf.fopen_function = php_fopen_wrapper_for_zend;
 	zuf.message_handler = php_message_handler_for_zend;
-#ifndef ZEND_SIGNALS
 	zuf.block_interruptions = sapi_module.block_interruptions;
 	zuf.unblock_interruptions = sapi_module.unblock_interruptions;
-#endif
 	zuf.get_configuration_directive = php_get_configuration_directive_for_zend;
 	zuf.ticks_function = php_run_ticks;
 	zuf.on_timeout = php_on_timeout;


Thread (4 messages)

« previous php.cvs (#67672) next »