diff options
author | Jeff Law <law@redhat.com> | 2000-07-23 19:20:18 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 2000-07-23 19:20:18 +0000 |
commit | 62df20656565cd422330ae2b2aebf61c67cbaf22 (patch) | |
tree | 6fa6cd87995a561e5688cac81306465eb230d329 /libiberty/getruntime.c | |
parent | 25c6c1126869b8a7070f37b8a0f8a1fa5a3ade47 (diff) | |
download | gdb-62df20656565cd422330ae2b2aebf61c67cbaf22.zip gdb-62df20656565cd422330ae2b2aebf61c67cbaf22.tar.gz gdb-62df20656565cd422330ae2b2aebf61c67cbaf22.tar.bz2 |
* 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>.
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 b855ea6..4abfa83 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 |