--- IO-AIO/configure 2017/06/23 03:23:19 1.18 +++ IO-AIO/configure 2018/02/20 05:23:47 1.22 @@ -4201,6 +4201,41 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for set/getrlimit" >&5 +$as_echo_n "checking for set/getrlimit... " >&6; } +if ${ac_cv_rlimits+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int res; +int main (void) +{ + struct rlimit srl; + srl.rlim_cur = srl.rlim_max = RLIM_INFINITY; + res = getrlimit (RLIMIT_NOFILE, &srl); + res = setrlimit (RLIMIT_NOFILE, &srl); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_rlimits=yes +else + ac_cv_rlimits=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rlimits" >&5 +$as_echo "$ac_cv_rlimits" >&6; } +test $ac_cv_rlimits = yes && +$as_echo "#define HAVE_RLIMITS 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_madvise" >&5 $as_echo_n "checking for posix_madvise... " >&6; } if ${ac_cv_posix_madvise+:} false; then : @@ -4350,6 +4385,71 @@ $as_echo "#define HAVE_PIPE2 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 +$as_echo_n "checking for eventfd... " >&6; } +if ${ac_cv_eventfd+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int res; +int main (void) +{ + res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_eventfd=yes +else + ac_cv_eventfd=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_eventfd" >&5 +$as_echo "$ac_cv_eventfd" >&6; } +test $ac_cv_eventfd = yes && +$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timerfd" >&5 +$as_echo_n "checking for timerfd... " >&6; } +if ${ac_cv_timerfd+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int res; +int main (void) +{ + struct itimerspec its; + res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); + res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0); + res = timerfd_gettime (res, &its); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_timerfd=yes +else + ac_cv_timerfd=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_timerfd" >&5 +$as_echo "$ac_cv_timerfd" >&6; } +test $ac_cv_timerfd = yes && +$as_echo "#define HAVE_TIMERFD 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for renameat2" >&5 $as_echo_n "checking for renameat2... " >&6; } if ${ac_cv_renameat2+:} false; then : @@ -4383,6 +4483,71 @@ $as_echo "#define HAVE_RENAMEAT2 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for copy_file_range" >&5 +$as_echo_n "checking for copy_file_range... " >&6; } +if ${ac_cv_copy_file_range+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +/*#include */ +int res; +int main (void) +{ + /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ + res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_copy_file_range=yes +else + ac_cv_copy_file_range=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_copy_file_range" >&5 +$as_echo "$ac_cv_copy_file_range" >&6; } +test $ac_cv_copy_file_range = yes && +$as_echo "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_close" >&5 +$as_echo_n "checking for posix_close... " >&6; } +if ${ac_cv_posix_close+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +int res; +int main (void) +{ + res = posix_close (0, 0); /* we do not need any flags */ + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_posix_close=yes +else + ac_cv_posix_close=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_close" >&5 +$as_echo "$ac_cv_posix_close" >&6; } +test $ac_cv_posix_close = yes && +$as_echo "#define HAVE_POSIX_CLOSE 1" >>confdefs.h + + cat >confcache <<\_ACEOF