Commit cf480ba7 by Michael Sokolov Committed by Michael Sokolov

alarm_.c: Separate the #ifdef KR_headers logic from the G77_alarm_0 function definition.

	* 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.

From-SVN: r39256
parent db353c2c
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> 2001-01-24 David Billinghurst <David.Billinghurst@riotinto.com>
* libU77/Makefile.in: Explicitly generate a.out for check. * libU77/Makefile.in: Explicitly generate a.out for check.
......
/* 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 file is part of GNU Fortran libU77 library.
This library is free software; you can redistribute it and/or modify it This library is free software; you can redistribute it and/or modify it
...@@ -39,14 +39,20 @@ typedef RETSIGTYPE (*sig_type)(); ...@@ -39,14 +39,20 @@ typedef RETSIGTYPE (*sig_type)();
#ifdef KR_headers #ifdef KR_headers
extern sig_type signal(); 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 G77_alarm_0 (seconds, proc)
integer *seconds; integer *seconds;
sig_type proc; sig_type proc;
#else #else
#include <signal.h>
typedef int (*sig_proc)(int);
integer G77_alarm_0 (integer *seconds, sig_proc proc) integer G77_alarm_0 (integer *seconds, sig_proc proc)
#endif #endif
{ {
......
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