ruby-changes:69979
From: Nobuyoshi <ko1@a...>
Date: Tue, 30 Nov 2021 11:14:32 +0900 (JST)
Subject: [ruby-changes:69979] f379748e80 (master): Cache wheather madvise declaration is needed on Solaris
https://git.ruby-lang.org/ruby.git/commit/?id=f379748e80 From f379748e80dacc208dbe23a2db508aead8b79978 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 30 Nov 2021 11:12:21 +0900 Subject: Cache wheather madvise declaration is needed on Solaris --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7ec11478f5c..a3e97d54dbc 100644 --- a/configure.ac +++ b/configure.ac @@ -1108,15 +1108,18 @@ main() https://github.com/ruby/ruby/blob/trunk/configure.ac#L1108 ]) ]) AC_CHECK_TYPES([caddr_t],[],[],[@%:@include <sys/types.h>]) - RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_CACHE_CHECK([whether madvise declaration is needed], rb_cv_madvice_prototype_using_caddr_t, + [RUBY_WERROR_FLAG([AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@if defined(HAVE_CADDR_T) && (defined(MADV_FREE) || defined(MADV_DONTNEED)) @%:@include <sys/unistd.h> @%:@include <sys/mman.h> @%:@include <sys/types.h> extern int madvise(caddr_t, size_t, int); ]], [[]])], - [AC_DEFINE(NEED_MADVICE_PROTOTYPE_USING_CADDR_T, 1)], []) + [rb_cv_madvice_prototype_using_caddr_t=yes], [rb_cv_madvice_prototype_using_caddr_t=no]) + ]) ]) + AS_IF([test $rb_cv_madvice_prototype_using_caddr_t = yes], [AC_DEFINE(NEED_MADVICE_PROTOTYPE_USING_CADDR_T, 1)]) ], [haiku*], [ LIBS="$LIBS" # m lib is include in root -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/