Branch: Tag:

2001-05-08

2001-05-08 12:38:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

The signal handler test now tries to fool optimizers that don't understand
volatile a bit more.

Rev: src/configure.in:1.519

1: - AC_REVISION("$Id: configure.in,v 1.518 2001/04/25 15:17:16 grubba Exp $") + AC_REVISION("$Id: configure.in,v 1.519 2001/05/08 12:38:39 grubba Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
3989:   #include <stdlib.h>   #include <stddef.h>   #endif - VOLATILE sig_atomic_t sigrun=0; + VOLATILE sig_atomic_t sigrun[2]= { 0, 0 };   RETSIGTYPE func(int sig)   {    write(2, "func called\n", sizeof("func called\n") - sizeof("")); -  sigrun=1; +  sigrun[0] = -1;   }      int main()
4028:       kill(getpid(), sig);   #ifdef HAVE_POLL -  while(!sigrun) poll(0,0,100); +  while(!strlen((char *)sigrun)) poll(0,0,100);   #else -  while(!sigrun) sleep(1); +  while(!strlen((char *)sigrun)) sleep(1);   #endif -  sigrun=0; +  sigrun[0]=0;    kill(getpid(), sig);   #ifdef HAVE_POLL -  while(!sigrun) poll(0,0,100); +  while(!strlen((char *)sigrun)) poll(0,0,100);   #else -  while(!sigrun) sleep(1); +  while(!strlen((char *)sigrun)) sleep(1);   #endif -  sigrun=0; +  sigrun[0]=0;    exit(0);   }   ],pike_cv_sys_signal_oneshot=no,pike_cv_sys_signal_oneshot=yes,pike_cv_sys_signal_oneshot=yes)])