summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-24 11:57:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-24 11:57:18 +0000
commit23a8183bea8dda2d7528b57f2e0c8bc31162db3e (patch)
tree8e64e549c56714f87ef0a65f4f80628ca7d4bf03 /configure.ac
parenta582007e3611e1d6e1d57b697391be74dc03c2ac (diff)
Check stx_btime in struct statx
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 4 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index cf3d06884e..d251da9915 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1563,6 +1563,8 @@ AC_CHECK_MEMBERS([struct stat.st_ctim])
AC_CHECK_MEMBERS([struct stat.st_ctimespec])
AC_CHECK_MEMBERS([struct stat.st_ctimensec])
AC_CHECK_MEMBERS([struct stat.st_birthtimespec])
+AS_IF([test "x$ac_cv_member_struct_stat_st_birthtimespec" != xyes],
+ [AC_CHECK_MEMBERS([struct statx.stx_btime])])
AC_CHECK_TYPES([struct timeval], [], [], [@%:@ifdef HAVE_TIME_H
@%:@include <time.h>
@@ -1885,19 +1887,8 @@ AC_CHECK_FUNCS(utimes)
AC_CHECK_FUNCS(wait4)
AC_CHECK_FUNCS(waitpid)
-AS_CASE(["$target_os"],[aix*],[ac_cv_func_statx=no],[AC_CHECK_FUNCS(statx)])
-AS_IF([test "$ac_cv_func_statx" = no], [AS_CASE(["$target_os"], [linux*],
- [AC_CHECK_DECLS([__NR_statx], [ac_cv_func_statx=syscall], [],
- [
-@%:@ ifdef HAVE_SYSCALL_H
-@%:@ include <syscall.h>
-@%:@ elif defined HAVE_SYS_SYSCALL_H
-@%:@ include <sys/syscall.h>
-@%:@ endif
- ])
- ])
-])
-AS_IF([test "$ac_cv_func_statx" = syscall], [AC_DEFINE(HAVE_STATX, 0)])
+AS_IF([test "x$ac_cv_member_struct_statx_stx_btime" = xyes],
+ [AC_CHECK_FUNCS(statx)])
AS_CASE(["$ac_cv_func_memset_s:$ac_cv_func_qsort_s"], [*yes*],
[RUBY_DEFINE_IF([!defined __STDC_WANT_LIB_EXT1__], [__STDC_WANT_LIB_EXT1__], 1)])