diff options
author | fx <fx@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-09 03:40:06 +0000 |
---|---|---|
committer | fx <fx@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-09 03:40:06 +0000 |
commit | 040f7c93c610bdeb37aff9bc63a1a505572ba78e (patch) | |
tree | 5a4b3cf782ae0a62ccdf4a59b13b206880b37787 /libf2c/libU77 | |
parent | 761cd29b3a104f3e603fadce76b0ffacc2f7d8b0 (diff) | |
download | ppe42-gcc-040f7c93c610bdeb37aff9bc63a1a505572ba78e.tar.gz ppe42-gcc-040f7c93c610bdeb37aff9bc63a1a505572ba78e.zip |
Replace TIMES conditional stuff removed in
error by last change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21027 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c/libU77')
-rw-r--r-- | libf2c/libU77/sys_clock_.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libf2c/libU77/sys_clock_.c b/libf2c/libU77/sys_clock_.c index a4b99b8cf22..7b7a9d0c0d2 100644 --- a/libf2c/libU77/sys_clock_.c +++ b/libf2c/libU77/sys_clock_.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998 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 @@ -29,11 +29,14 @@ Boston, MA 02111-1307, USA. */ # include <time.h> # endif #endif -#include <sys/times.h> +#if HAVE_SYS_TIMES_H +# include <sys/times.h> +#endif #include <limits.h> #if HAVE_UNISTD_H # include <unistd.h> #endif +#include <errno.h> /* for ENOSYS */ #include "f2c.h" #ifdef KR_headers @@ -43,6 +46,7 @@ int G77_system_clock_0 (count, count_rate, count_max) int G77_system_clock_0 (integer *count, integer *count_rate, integer *count_max) #endif { +#if defined (HAVE_TIMES) struct tms buffer; unsigned long cnt; if (count_rate) { @@ -52,6 +56,8 @@ int G77_system_clock_0 (integer *count, integer *count_rate, integer *count_max) *count_rate = CLOCKS_PER_SECOND; #elif defined CLK_TCK *count_rate = CLK_TCK; +#elif defined HZ + *count_rate = HZ; #else #error Dont know clock tick length #endif @@ -64,4 +70,8 @@ int G77_system_clock_0 (integer *count, integer *count_rate, integer *count_max) else *count = cnt; return 0; +#else /* ! HAVE_TIMES */ + errno = ENOSYS; + return -1; +#endif /* ! HAVE_TIMES */ } |