--- IO-AIO/configure.ac 2019/03/10 12:16:48 1.12 +++ IO-AIO/configure.ac 2019/03/18 23:52:09 1.13 @@ -14,10 +14,10 @@ AC_CACHE_CHECK(for set/getrlimit, ac_cv_rlimits, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include #include -int res; int main (void) { struct rlimit srl; + int res; srl.rlim_cur = srl.rlim_max = RLIM_INFINITY; res = getrlimit (RLIMIT_NOFILE, &srl); res = setrlimit (RLIMIT_NOFILE, &srl); @@ -89,9 +89,9 @@ AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include #include -int res; int main (void) { + int res; res = pipe2 (0, 0); return 0; } @@ -100,9 +100,9 @@ AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include -int res; int main (void) { + int res; res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); return 0; } @@ -111,10 +111,10 @@ AC_CACHE_CHECK(for timerfd, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include -int res; int main (void) { struct itimerspec its; + int res; 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); @@ -127,9 +127,9 @@ #include #include /*#include */ -int res; int main (void) { + int res; /*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; @@ -203,5 +203,26 @@ ]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)]) test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member) +AC_CACHE_CHECK(for statx, ac_cv_statx, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include +#include +int res; +int main (void) +{ + struct statx sx; + int res; + res = statx (AT_FDCWD, ".", + AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_SYNC_AS_STAT | AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNC, + STATX_ALL, &sx); + STATX_TYPE; STATX_MODE; STATX_NLINK; STATX_UID; STATX_GID; STATX_ATIME; STATX_MTIME; STATX_CTIME; + STATX_INO; STATX_SIZE; STATX_BLOCKS; STATX_BASIC_STATS; STATX_BTIME; STATX_ALL; + STATX_ATTR_COMPRESSED; STATX_ATTR_IMMUTABLE; STATX_ATTR_APPEND; STATX_ATTR_NODUMP; STATX_ATTR_ENCRYPTED; + return 0; +} +]])],ac_cv_statx=yes,ac_cv_statx=no)]) +test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available) + AC_OUTPUT