1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Check whether syscall(2) is deprecated by actual warnings

This commit is contained in:
Nobuyoshi Nakada 2019-08-20 01:58:45 +09:00
parent 588b74e8d8
commit 19b0161b85
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -794,7 +794,13 @@ AS_CASE(["$target_os"],
ORIG_LIBS="$LIBS" ORIG_LIBS="$LIBS"
RUBY_PREPEND_OPTION(LIBS, -lobjc) RUBY_PREPEND_OPTION(LIBS, -lobjc)
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT) 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_func_syscall=no ac_cv_func_syscall=no
ac_cv_header_sys_syscall_h=no ac_cv_header_sys_syscall_h=no