summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-20 13:34:16 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-20 13:34:16 +0000
commitccb9fb0b26fa8fed9320a0b2e0ca86202dd4b3de (patch)
treea35485051eaf0abe7d25f5a1e30a0563e90eea08 /configure.in
parent55f14b455138e2094371a22954f8f29587b6c456 (diff)
merge revision(s) 39772,39773: [Backport #8080]
* configure.in: check struct timeval exist or not. * include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL properly. and don't include sys/time.h if struct timeval exist. * file.c: include sys/time.h explicitly. * random.c: ditto. * thread_pthread.c: ditto. * time.c: ditto. * ext/date/date_strftime.c: ditto. * include/ruby/missing.h (struct timespec): include <sys/time.h> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 93a13e80ce..cf53e019c1 100644
--- a/configure.in
+++ b/configure.in
@@ -1371,6 +1371,13 @@ AC_CHECK_MEMBERS([struct stat.st_ctim])
AC_CHECK_MEMBERS([struct stat.st_ctimespec])
AC_CHECK_MEMBERS([struct stat.st_ctimensec])
+AC_CHECK_TYPES([struct timeval], [], [], [@%:@ifdef HAVE_TIME_H
+@%:@include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@include <sys/time.h>
+@%:@endif])
+
AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
@%:@include <time.h>
@%:@endif