summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-23 04:42:48 +0000
committerglass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-23 04:42:48 +0000
commitdc700cf903e7fa1852bd9390e5e350d07edf1000 (patch)
tree779db6e473980f22ad75e15ad8bdf9ad163adba0 /configure.ac
parent6604e1b7cd75bef7ed72db699d8f88a7fb56c330 (diff)
configure.ac: skip check of statx() on AIX
Linux and AIX have statx() with different prototype. Linux: int statx(int, const char*, int, unsigned int, struct statx*) AIX: int statx(char, struct stat*, int, int) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 12 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index f4a03778fe..aa6a74a620 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1897,18 +1897,6 @@ AC_CHECK_FUNCS(sigaltstack)
AC_CHECK_FUNCS(sigprocmask)
AC_CHECK_FUNCS(sinh)
AC_CHECK_FUNCS(spawnv)
-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)
@@ -1924,6 +1912,18 @@ 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_CASE(["$ac_cv_func_memset_s:$ac_cv_func_qsort_s"], [*yes*],