[前][次][番号順一覧][スレッド一覧]

ruby-changes:54923

From: glass <ko1@a...>
Date: Sat, 23 Feb 2019 13:42:52 +0900 (JST)
Subject: [ruby-changes:54923] glass:r67128 (trunk): configure.ac: skip check of statx() on AIX

glass	2019-02-23 13:42:48 +0900 (Sat, 23 Feb 2019)

  New Revision: 67128

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67128

  Log:
    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)

  Modified files:
    trunk/configure.ac
Index: configure.ac
===================================================================
--- configure.ac	(revision 67127)
+++ configure.ac	(revision 67128)
@@ -1897,18 +1897,6 @@ AC_CHECK_FUNCS(sigaltstack) https://github.com/ruby/ruby/blob/trunk/configure.ac#L1897
 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) https://github.com/ruby/ruby/blob/trunk/configure.ac#L1912
 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*],

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]