--- IO-AIO/configure 2018/02/20 05:23:47 1.22 +++ IO-AIO/configure 2018/08/12 06:10:31 1.24 @@ -2020,7 +2020,7 @@ -ac_config_headers="$ac_config_headers libeio/config.h" +ac_config_headers="$ac_config_headers config.h" @@ -4200,6 +4200,73 @@ $as_echo "#define HAVE_PRCTL_SET_NAME 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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for renameat2" >&5 +$as_echo_n "checking for renameat2... " >&6; } +if ${ac_cv_renameat2+:} 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_renameat2, 0, 0, 0, 0, RENAME_EXCHANGE | RENAME_NOREPLACE); + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_renameat2=yes +else + ac_cv_renameat2=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_renameat2" >&5 +$as_echo "$ac_cv_renameat2" >&6; } +test $ac_cv_renameat2 = yes && +$as_echo "#define HAVE_RENAMEAT2 1" >>confdefs.h + + + + +# for these to work, you need to run autoheader in IO::AIO, not libeio :( { $as_echo "$as_me:${as_lineno-$LINENO}: checking for set/getrlimit" >&5 $as_echo_n "checking for set/getrlimit... " >&6; } @@ -4450,9 +4517,9 @@ $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 : +{ $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 @@ -4460,95 +4527,100 @@ #include #include -#include +/*#include */ int res; int main (void) { - res = syscall (SYS_renameat2, 0, 0, 0, 0, RENAME_EXCHANGE | RENAME_NOREPLACE); + /*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_renameat2=yes + ac_cv_copy_file_range=yes else - ac_cv_renameat2=no + 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_renameat2" >&5 -$as_echo "$ac_cv_renameat2" >&6; } -test $ac_cv_renameat2 = yes && -$as_echo "#define HAVE_RENAMEAT2 1" >>confdefs.h +{ $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 copy_file_range" >&5 -$as_echo_n "checking for copy_file_range... " >&6; } -if ${ac_cv_copy_file_range+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_xtimensec" >&5 +$as_echo_n "checking for st_xtimensec... " >&6; } +if ${ac_cv_xtimensec+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -/*#include */ +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + 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 PL_statcache.st_atimensec + + PL_statcache.st_mtimensec + + PL_statcache.st_ctimensec; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_copy_file_range=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_xtimensec=yes else - ac_cv_copy_file_range=no + ac_cv_xtimensec=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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}: result: $ac_cv_xtimensec" >&5 +$as_echo "$ac_cv_xtimensec" >&6; } +test $ac_cv_xtimensec = yes && +$as_echo "#define HAVE_ST_XTIMENSEC 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 "$as_me:${as_lineno-$LINENO}: checking for st_xtimespec" >&5 +$as_echo_n "checking for st_xtimespec... " >&6; } +if ${ac_cv_xtimespec+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + int res; int main (void) { - res = posix_close (0, 0); /* we do not need any flags */ - return 0; + return PL_statcache.st_atim.tv_nsec + + PL_statcache.st_mtim.tv_nsec + + PL_statcache.st_ctim.tv_nsec; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_posix_close=yes +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_xtimespec=yes else - ac_cv_posix_close=no + ac_cv_xtimespec=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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 - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_xtimespec" >&5 +$as_echo "$ac_cv_xtimespec" >&6; } +test $ac_cv_xtimespec = yes && +$as_echo "#define HAVE_ST_XTIMESPEC 1" >>confdefs.h +# apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -5222,7 +5294,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in - "libeio/config.h") CONFIG_HEADERS="$CONFIG_HEADERS libeio/config.h" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac @@ -5567,3 +5639,4 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi +