ruby-changes:57187
From: Nobuyoshi <ko1@a...>
Date: Tue, 20 Aug 2019 02:27:41 +0900 (JST)
Subject: [ruby-changes:57187] Nobuyoshi Nakada: 19b0161b85 (master): Check whether syscall(2) is deprecated by actual warnings
https://git.ruby-lang.org/ruby.git/commit/?id=19b0161b85 From 19b0161b851ba32d5bc6c367db5b520d35905d6b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 20 Aug 2019 01:58:45 +0900 Subject: Check whether syscall(2) is deprecated by actual warnings diff --git a/configure.ac b/configure.ac index a6231b6..093010d 100644 --- a/configure.ac +++ b/configure.ac @@ -794,7 +794,13 @@ AS_CASE(["$target_os"], https://github.com/ruby/ruby/blob/trunk/configure.ac#L794 ORIG_LIBS="$LIBS" RUBY_PREPEND_OPTION(LIBS, -lobjc) RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT) - AS_IF([test "${target_os@%:@darwin}" -ge 16], [ + AC_CACHE_CHECK([whether syscall(2) is deprecated], rb_cv_syscall_deprecated, + [RUBY_WERROR_FLAG([ + AC_TRY_COMPILE([@%:@include <unistd.h>], + [if (syscall(0)) return 1;], + [rb_cv_syscall_deprecated=no], + [rb_cv_syscall_deprecated=yes])])]) + AS_IF([test $rb_cv_syscall_deprecated = yes], [ ac_cv_func___syscall=no ac_cv_func_syscall=no ac_cv_header_sys_syscall_h=no -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/