summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-20 06:54:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-20 06:54:23 +0000
commit15a98ab42838be248a5b59ca342033ee338357ad (patch)
tree54d37b82280acbc3dc0dc10017b7470a77135c23 /configure.ac
parentd034fcb13f04b096f99d1824d5e7dd8ed256713e (diff)
Try statx syscall
* file.c (rb_file_s_birthtime): export for pathname to check if birthtime is supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 895afee804..f4a03778fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1897,7 +1897,18 @@ AC_CHECK_FUNCS(sigaltstack)
AC_CHECK_FUNCS(sigprocmask)
AC_CHECK_FUNCS(sinh)
AC_CHECK_FUNCS(spawnv)
-AC_CHECK_FUNCS(statx)
+AC_CHECK_FUNCS(statx, [],
+ [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
+ ])
+ ])
+])
AC_CHECK_FUNCS(symlink)
AC_CHECK_FUNCS(syscall)
AC_CHECK_FUNCS(sysconf)
@@ -1913,6 +1924,8 @@ AC_CHECK_FUNCS(utimes)
AC_CHECK_FUNCS(wait4)
AC_CHECK_FUNCS(waitpid)
+AS_IF([test "$ac_cv_func_statx" = syscall], [AC_DEFINE(HAVE_STATX, 0)])
+
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)])