Commit 02330e19 by Daniel Franke Committed by Daniel Franke

re PR fortran/30947 (intrinsic: ALARM)

2007-03-08  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/30947
        * intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with
        integer arguments.

From-SVN: r122716
parent 32af3784
2007-03-08 Daniel Franke <franke.daniel@gmail.com>
PR fortran/30947
* intrinsics/signal.c (alarm_sub_int): Avoid SEGFAULT with
integer arguments.
2007-03-04 Thomas Koenig <Thomas.Koenig@online.de> 2007-03-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/30981 PR libfortran/30981
......
...@@ -170,14 +170,14 @@ alarm_sub_int (int *seconds, int *handler, int *status) ...@@ -170,14 +170,14 @@ alarm_sub_int (int *seconds, int *handler, int *status)
#if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL) #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
if (status != NULL) if (status != NULL)
{ {
if (signal (SIGALRM, (void (*)(int)) handler) == SIG_ERR) if (signal (SIGALRM, (void (*)(int)) *handler) == SIG_ERR)
*status = -1; *status = -1;
else else
*status = alarm (*seconds); *status = alarm (*seconds);
} }
else else
{ {
signal (SIGALRM, (void (*)(int)) handler); signal (SIGALRM, (void (*)(int)) *handler);
alarm (*seconds); alarm (*seconds);
} }
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment