cvs: php4 /ext/pcntl pcntl.c
| From: | Jason Greene | Date: | Mon, 25 Jun 2001 17:56:24 +0000 |
| Subject: | cvs: php4 /ext/pcntl pcntl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6016@lists.php.net to get a copy of this message | ||
jason Mon Jun 25 19:56:24 2001 EDT
Modified files:
/php4/ext/pcntl pcntl.c
Log:
Fix casting wierdness that broke compiled code with Sun CC.
(Also easier to read)
Index: php4/ext/pcntl/pcntl.c
diff -u php4/ext/pcntl/pcntl.c:1.3 php4/ext/pcntl/pcntl.c:1.4
--- php4/ext/pcntl/pcntl.c:1.3 Tue Jun 19 23:42:57 2001
+++ php4/ext/pcntl/pcntl.c Mon Jun 25 19:56:23 2001
@@ -256,7 +256,6 @@
/* }}} */
/* Note Old */
-/* Our custom signal handler that calls the appropriate php_function */
static void old_pcntl_signal_handler(int signo)
{
char *func_name;
@@ -286,7 +285,7 @@
return;
}
-
+/* Our custom signal handler that calls the appropriate php_function */
static void pcntl_signal_handler(int signo)
{
long signal_num=signo;
@@ -362,12 +361,13 @@
/* Traverse through our signal queue and call the appropriate php functions */
for (element=(&PCNTL_G(php_signal_queue))->head; element; element=element->next) {
- if (zend_hash_index_find(&PCNTL_G(php_signal_table), (long) *element->data, (void *)
&func_name)==FAILURE) {
+ long *signal_num=(long *)&element->data;
+ if (zend_hash_index_find(&PCNTL_G(php_signal_table), *signal_num, (void *)
&func_name)==FAILURE) {
continue;
}
convert_to_long_ex(¶m);
convert_to_string_ex(&call_name);
- ZVAL_LONG(param, (long) *element->data);
+ ZVAL_LONG(param, *signal_num);
ZVAL_STRING(call_name, func_name, 0);
/* Call php singal handler - Note that we do not report errors, and we ignore the return value */