standard-conforming error check for [de]time_.c

From-SVN: r26849
This commit is contained in:
Donn Terry 1999-05-09 20:03:20 +00:00 committed by Craig Burley
parent ea0f786baf
commit 26837cfb5b
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri May 7 9:33:55 1999 Donn Terry (donn@interix.com)
* libU77/dtime_.c (G77_dtime_0): Standard-conforming error check.
* libU77/etime_.c (G77_etime_0): Likewise.
Mon May 3 19:15:07 1999 Craig Burley <craig@jcb-sc.com>
* libU77/u77-test.f (main): Declare ABORT as intrinsic.

View File

@ -155,7 +155,7 @@ double G77_dtime_0 (real tarray[2])
# else
#error Dont know clock tick length
# endif
if (times(&buffer) < 0) return -1.0;
if (times(&buffer) == (clock_t)-1) return -1.0;
utime = buffer.tms_utime; stime = buffer.tms_stime;
tarray[0] = ((float)(utime - old_utime)) / (float)clk_tck;
tarray[1] = ((float)(stime - old_stime)) / (float)clk_tck;

View File

@ -148,7 +148,7 @@ double G77_etime_0 (real tarray[2])
# else
#error Dont know clock tick length
# endif
if (times(&buffer) < 0) return -1.0;
if (times(&buffer) == (clock_t)-1) return -1.0;
tarray[0] = (float) buffer.tms_utime / (float)clk_tck;
tarray[1] = (float) buffer.tms_stime / (float)clk_tck;
#endif /* HAVE_GETRUSAGE */