aboutsummaryrefslogtreecommitdiff
path: root/libiberty/getruntime.c
diff options
context:
space:
mode:
authorMichael Sokolov <msokolov@ivan.Harhan.ORG>2000-07-23 19:18:32 +0000
committerJeff Law <law@gcc.gnu.org>2000-07-23 13:18:32 -0600
commitc6451ce1ed9c5be3d6851cbbf272e34d216693a9 (patch)
tree3ee1847e8d1882a5dac6cd708d3ffd930f27d940 /libiberty/getruntime.c
parentcd44736010929b5e06f932279960a16165c59449 (diff)
downloadgcc-c6451ce1ed9c5be3d6851cbbf272e34d216693a9.zip
gcc-c6451ce1ed9c5be3d6851cbbf272e34d216693a9.tar.gz
gcc-c6451ce1ed9c5be3d6851cbbf272e34d216693a9.tar.bz2
configure.in (AC_CHECK_HEADERS): Add time.h.
* 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>. Co-Authored-By: Jeffrey A Law <law@cygnus.com> From-SVN: r35212
Diffstat (limited to 'libiberty/getruntime.c')
-rw-r--r--libiberty/getruntime.c14
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