mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
32af37843c
commit
02330e1953
|
|
@ -1,3 +1,9 @@
|
||||||
|
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)
|
||||||
#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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue