ruby-changes:66064
From: Nobuyoshi <ko1@a...>
Date: Thu, 6 May 2021 11:33:31 +0900 (JST)
Subject: [ruby-changes:66064] a1fdc5f71c (master): Check only whether PAGE_SIZE is compile-time const
https://git.ruby-lang.org/ruby.git/commit/?id=a1fdc5f71c From a1fdc5f71cf0ad8254282e34b2a8b7dce11722ba Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 6 May 2021 11:15:24 +0900 Subject: Check only whether PAGE_SIZE is compile-time const --- configure.ac | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/configure.ac b/configure.ac index dd553b2..e781da0 100644 --- a/configure.ac +++ b/configure.ac @@ -2732,24 +2732,18 @@ AS_CASE([$target_os], https://github.com/ruby/ruby/blob/trunk/configure.ac#L2732 [AC_CHECK_HEADERS([sys/user.h])] ) AS_IF([test "x$ac_cv_func_mmap:$ac_cv_header_sys_user_h" = xyes:yes], [ - AC_CACHE_CHECK([PAGE_SIZE is defined], rb_cv_page_size, + AC_CACHE_CHECK([whether PAGE_SIZE is compile-time const], rb_cv_const_page_size, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@include <sys/user.h> typedef char conftest_page[PAGE_SIZE]; ]], [[]])], - [rb_cv_page_size=const], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include <sys/user.h> - ]], [[ - int page_size = (int)PAGE_SIZE; - (void)page_size; - ]])], - [rb_cv_page_size=variable], [rb_cv_page_size=no])])]) - AS_IF([test "x$rb_cv_page_size" = xconst], - [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 1)], - [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 0)] - ) -], [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 0)]) + [rb_cv_const_page_size=yes], + [rb_cv_const_page_size=no])]) +]) +AS_IF([test "x$rb_cv_const_page_size" = xyes], + [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 1)], + [AC_DEFINE(HAVE_CONST_PAGE_SIZE, 0)] +) } : "runtime section" && { -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/