aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-04-14 12:04:20 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-09-09 16:32:30 +0900
commite44cca47c569ce0bf6738caf0029e399123cb1ec (patch)
treee5f60448b15048a946603794bf3f4539d3087043
parent82982ade2bc424218f3c8dc90b5ce5aa4efd800e (diff)
downloadruby-e44cca47c569ce0bf6738caf0029e399123cb1ec.tar.gz
configure.in: don't check for time.h
It's part of C89.
-rw-r--r--configure.in21
-rw-r--r--include/ruby/missing.h4
-rw-r--r--win32/Makefile.sub1
3 files changed, 6 insertions, 20 deletions
diff --git a/configure.in b/configure.in
index e4ebc705c9..294eaa8733 100644
--- a/configure.in
+++ b/configure.in
@@ -1416,7 +1416,6 @@ AC_CHECK_HEADERS(sys/times.h)
AC_CHECK_HEADERS(sys/uio.h)
AC_CHECK_HEADERS(sys/utime.h)
AC_CHECK_HEADERS(syscall.h)
-AC_CHECK_HEADERS(time.h)
AC_CHECK_HEADERS(ucontext.h)
AC_CHECK_HEADERS(utime.h)
@@ -2039,18 +2038,14 @@ AC_CHECK_MEMBERS([struct stat.st_ctimespec])
AC_CHECK_MEMBERS([struct stat.st_ctimensec])
AC_CHECK_MEMBERS([struct stat.st_birthtimespec])
-AC_CHECK_TYPES([struct timeval], [], [], [@%:@ifdef HAVE_TIME_H
-@%:@include <time.h>
-@%:@endif
+AC_CHECK_TYPES([struct timeval], [], [], [@%:@include <time.h>
@%:@ifdef HAVE_SYS_TIME_H
@%:@include <sys/time.h>
@%:@endif])
AS_IF([test "${ac_cv_type_struct_timeval}" = yes], [
RUBY_CHECK_SIZEOF([struct timeval.tv_sec], [time_t long "long long"], [],
- [@%:@ifdef HAVE_TIME_H
-@%:@include <time.h>
-@%:@endif
+ [@%:@include <time.h>
@%:@ifdef HAVE_SYS_TIME_H
@%:@include <sys/time.h>
@%:@endif])
@@ -2064,23 +2059,17 @@ AS_IF([test "${ac_cv_type_struct_timeval}" = yes], [
])
])
-AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
-@%:@include <time.h>
-@%:@endif
+AC_CHECK_TYPES([struct timespec], [], [], [@%:@include <time.h>
@%:@ifdef HAVE_SYS_TIME_H
@%:@include <sys/time.h>
@%:@endif])
-AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
-@%:@ include <time.h>
-@%:@endif
+AC_CHECK_TYPES([struct timezone], [], [], [@%:@ include <time.h>
@%:@ifdef HAVE_SYS_TIME_H
@%:@ include <sys/time.h>
@%:@endif])
-AC_CHECK_TYPES([clockid_t], [], [], [@%:@ifdef HAVE_TIME_H
-@%:@ include <time.h>
-@%:@endif
+AC_CHECK_TYPES([clockid_t], [], [], [@%:@ include <time.h>
@%:@ifdef HAVE_SYS_TIME_H
@%:@ include <sys/time.h>
@%:@endif])
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index a3d7a6b7b7..fb5c3130c9 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -29,9 +29,7 @@ extern "C" {
#endif
#if !defined(HAVE_STRUCT_TIMEVAL) || !defined(HAVE_STRUCT_TIMESPEC)
-#if defined(HAVE_TIME_H)
-# include <time.h>
-#endif
+#include <time.h>
#if defined(HAVE_SYS_TIME_H)
# include <sys/time.h>
#endif
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 147a6171a3..7aab81deb4 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -635,7 +635,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#define HAVE_DECL_SYS_NERR 1
#define HAVE_FCNTL_H 1
#define HAVE_SYS_UTIME_H 1
-#define HAVE_TIME_H 1
#define rb_pid_t int
#define rb_gid_t int
#define rb_uid_t int