summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-07-27 02:52:39 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-07-27 02:52:39 +0000
commit978f1b8e18efed5647513070f53f269049feb83c (patch)
treece00da25c18405cf3e6847ad3d72d14d363e98b9 /gnu/usr.bin/gcc/f/runtime/libF77/signal_.c
parente2ce9843b6a157aadf0700edefbe6d916cb98c57 (diff)
Initial integration of G77.
Please do a make cleandir before rebuilding gcc!
Diffstat (limited to 'gnu/usr.bin/gcc/f/runtime/libF77/signal_.c')
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libF77/signal_.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c b/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c
new file mode 100644
index 00000000000..b62cedad25c
--- /dev/null
+++ b/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c
@@ -0,0 +1,29 @@
+#include "f2c.h"
+
+#ifndef RETSIGTYPE
+/* we shouldn't rely on this... */
+#ifdef KR_headers
+#define RETSIGTYPE int
+#else
+#define RETSIGTYPE void
+#endif
+#endif
+typedef RETSIGTYPE (*sig_type)();
+
+#ifdef KR_headers
+extern sig_type signal();
+
+ftnint signal_(sigp, proc) integer *sigp; sig_type proc;
+#else
+#include "signal.h"
+typedef int (*sig_proc)(int);
+
+ftnint signal_(integer *sigp, sig_proc proc)
+#endif
+{
+ int sig;
+ sig = (int)*sigp;
+
+ return (ftnint)signal(sig, (sig_type)proc);
+ return 0;
+ }