diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-31 07:33:56 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-31 07:33:56 +0000 |
commit | cea21d59c1bf0ad2b4c6414fa542cba27485282c (patch) | |
tree | c37df0fbee06a9555c9e6671de543a62ac871dfd /gcc/timevar.c | |
parent | b3ca938c3a485efe1ce605509ce150ad5fcd2fa5 (diff) | |
download | gcc-cea21d59c1bf0ad2b4c6414fa542cba27485282c.tar.gz |
* timevar.c (getrusage): Don't ever declare if not HAVE_GETRUSAGE.
(times): Don't ever declare if not HAVE_TIMES.
(clock): Don't ever declare if not HAVE_CLOCK.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62175 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/timevar.c')
-rw-r--r-- | gcc/timevar.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/timevar.c b/gcc/timevar.c index 11bcec97a30..2eeeaa27ad7 100644 --- a/gcc/timevar.c +++ b/gcc/timevar.c @@ -33,7 +33,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "rtl.h" #include "toplev.h" - #ifndef HAVE_CLOCK_T typedef int clock_t; #endif @@ -48,16 +47,6 @@ struct tms }; #endif -#if defined HAVE_DECL_GETRUSAGE && !HAVE_DECL_GETRUSAGE -extern int getrusage PARAMS ((int, struct rusage *)); -#endif -#if defined HAVE_DECL_TIMES && !HAVE_DECL_TIMES -extern clock_t times PARAMS ((struct tms *)); -#endif -#if defined HAVE_DECL_CLOCK && !HAVE_DECL_CLOCK -extern clock_t clock PARAMS ((void)); -#endif - #ifndef RUSAGE_SELF # define RUSAGE_SELF 0 #endif @@ -81,17 +70,26 @@ extern clock_t clock PARAMS ((void)); /* Prefer times to getrusage to clock (each gives successively less information). */ #ifdef HAVE_TIMES +# if defined HAVE_DECL_TIMES && !HAVE_DECL_TIMES + extern clock_t times PARAMS ((struct tms *)); +# endif # define USE_TIMES # define HAVE_USER_TIME # define HAVE_SYS_TIME # define HAVE_WALL_TIME #else #ifdef HAVE_GETRUSAGE +# if defined HAVE_DECL_GETRUSAGE && !HAVE_DECL_GETRUSAGE + extern int getrusage PARAMS ((int, struct rusage *)); +# endif # define USE_GETRUSAGE # define HAVE_USER_TIME # define HAVE_SYS_TIME #else #ifdef HAVE_CLOCK +# if defined HAVE_DECL_CLOCK && !HAVE_DECL_CLOCK + extern clock_t clock PARAMS ((void)); +# endif # define USE_CLOCK # define HAVE_USER_TIME #endif |