summaryrefslogtreecommitdiff
path: root/libf2c
diff options
context:
space:
mode:
authormsokolov <msokolov@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-25 05:11:38 +0000
committermsokolov <msokolov@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-25 05:11:38 +0000
commit88afed60e21cb4c6ad2a6735a848a09cb62b6132 (patch)
tree1957da560db51a4d46f5bf77445f7818371002bd /libf2c
parent0f3f02b41802e8011822049ddc7fc06f80bd0e92 (diff)
downloadgcc-88afed60e21cb4c6ad2a6735a848a09cb62b6132.tar.gz
* libU77/alarm_.c: Separate the #ifdef KR_headers logic from the
G77_alarm_0 function definition. Check for SIG_ERR and provide our own if missing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39256 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c')
-rw-r--r--libf2c/ChangeLog6
-rw-r--r--libf2c/libU77/alarm_.c14
2 files changed, 16 insertions, 4 deletions
diff --git a/libf2c/ChangeLog b/libf2c/ChangeLog
index 30318e72702..cdf9fd0727d 100644
--- a/libf2c/ChangeLog
+++ b/libf2c/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-24 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * libU77/alarm_.c: Separate the #ifdef KR_headers logic from the
+ G77_alarm_0 function definition. Check for SIG_ERR and provide our own
+ if missing.
+
2001-01-24 David Billinghurst <David.Billinghurst@riotinto.com>
* libU77/Makefile.in: Explicitly generate a.out for check.
diff --git a/libf2c/libU77/alarm_.c b/libf2c/libU77/alarm_.c
index 3e2f293d9b1..e7f9c2ddcc4 100644
--- a/libf2c/libU77/alarm_.c
+++ b/libf2c/libU77/alarm_.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001 Free Software Foundation, Inc.
This file is part of GNU Fortran libU77 library.
This library is free software; you can redistribute it and/or modify it
@@ -39,14 +39,20 @@ typedef RETSIGTYPE (*sig_type)();
#ifdef KR_headers
extern sig_type signal();
+#else
+#include <signal.h>
+typedef int (*sig_proc)(int);
+#endif
+
+#ifndef SIG_ERR
+#define SIG_ERR ((sig_type) -1)
+#endif
+#ifdef KR_headers
integer G77_alarm_0 (seconds, proc)
integer *seconds;
sig_type proc;
#else
-#include <signal.h>
-typedef int (*sig_proc)(int);
-
integer G77_alarm_0 (integer *seconds, sig_proc proc)
#endif
{