diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-23 19:18:32 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-07-23 19:18:32 +0000 |
commit | 1a163ca8de631d67b8f657e96e8d1ef6f0f5e113 (patch) | |
tree | 3ee1847e8d1882a5dac6cd708d3ffd930f27d940 /libiberty/getruntime.c | |
parent | a451eef0cb4c54cbe5ec2d32f7cb773e999d564d (diff) | |
download | gcc-1a163ca8de631d67b8f657e96e8d1ef6f0f5e113.tar.gz |
* configure.in (AC_CHECK_HEADERS): Add time.h.
(AC_HEADER_TIME): Add check.
* configure, config.in: Regenerate.
* getruntime.c: Portably #include <sys/time.h> and/or <time.h>.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/getruntime.c')
-rw-r--r-- | libiberty/getruntime.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libiberty/getruntime.c b/libiberty/getruntime.c index b855ea6e82f..4abfa83bf33 100644 --- a/libiberty/getruntime.c +++ b/libiberty/getruntime.c @@ -26,10 +26,20 @@ Boston, MA 02111-1307, USA. */ single way is available for all host systems, nor are there reliable ways to find out which way is correct for a given host. */ -#include <time.h> +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else +# if HAVE_SYS_TIME_H +# include <sys/time.h> +# else +# ifdef HAVE_TIME_H +# include <time.h> +# endif +# endif +#endif #if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H) -#include <sys/time.h> #include <sys/resource.h> #endif |