mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-16 03:10:28 +08:00
standard-conforming error check for [de]time_.c
From-SVN: r26849
This commit is contained in:
parent
ea0f786baf
commit
26837cfb5b
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user