… | |
… | |
12 | # for these to work, you need to run autoheader in IO::AIO, not libeio :( |
12 | # for these to work, you need to run autoheader in IO::AIO, not libeio :( |
13 | |
13 | |
14 | AC_CACHE_CHECK(for set/getrlimit, ac_cv_rlimits, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
14 | AC_CACHE_CHECK(for set/getrlimit, ac_cv_rlimits, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
15 | #include <sys/time.h> |
15 | #include <sys/time.h> |
16 | #include <sys/resource.h> |
16 | #include <sys/resource.h> |
17 | int res; |
|
|
18 | int main (void) |
17 | int main (void) |
19 | { |
18 | { |
20 | struct rlimit srl; |
19 | struct rlimit srl; |
|
|
20 | int res; |
21 | srl.rlim_cur = srl.rlim_max = RLIM_INFINITY; |
21 | srl.rlim_cur = srl.rlim_max = RLIM_INFINITY; |
22 | res = getrlimit (RLIMIT_NOFILE, &srl); |
22 | res = getrlimit (RLIMIT_NOFILE, &srl); |
23 | res = setrlimit (RLIMIT_NOFILE, &srl); |
23 | res = setrlimit (RLIMIT_NOFILE, &srl); |
24 | return 0; |
24 | return 0; |
25 | } |
25 | } |
… | |
… | |
87 | test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available) |
87 | test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available) |
88 | |
88 | |
89 | AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
89 | AC_CACHE_CHECK(for pipe2, ac_cv_pipe2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
90 | #include <fcntl.h> |
90 | #include <fcntl.h> |
91 | #include <unistd.h> |
91 | #include <unistd.h> |
|
|
92 | int main (void) |
|
|
93 | { |
92 | int res; |
94 | int res; |
93 | int main (void) |
|
|
94 | { |
|
|
95 | res = pipe2 (0, 0); |
95 | res = pipe2 (0, 0); |
96 | return 0; |
96 | return 0; |
97 | } |
97 | } |
98 | ]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) |
98 | ]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) |
99 | test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available) |
99 | test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available) |
100 | |
100 | |
101 | AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
101 | AC_CACHE_CHECK(for eventfd, ac_cv_eventfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
102 | #include <sys/eventfd.h> |
102 | #include <sys/eventfd.h> |
|
|
103 | int main (void) |
|
|
104 | { |
103 | int res; |
105 | int res; |
104 | int main (void) |
|
|
105 | { |
|
|
106 | res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); |
106 | res = eventfd (1, EFD_CLOEXEC | EFD_NONBLOCK); |
107 | return 0; |
107 | return 0; |
108 | } |
108 | } |
109 | ]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)]) |
109 | ]])],ac_cv_eventfd=yes,ac_cv_eventfd=no)]) |
110 | test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available) |
110 | test $ac_cv_eventfd = yes && AC_DEFINE(HAVE_EVENTFD, 1, eventfd(2) is available) |
111 | |
111 | |
112 | AC_CACHE_CHECK(for timerfd, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
112 | AC_CACHE_CHECK(for timerfd, ac_cv_timerfd, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
113 | #include <sys/timerfd.h> |
113 | #include <sys/timerfd.h> |
114 | int res; |
|
|
115 | int main (void) |
114 | int main (void) |
116 | { |
115 | { |
117 | struct itimerspec its; |
116 | struct itimerspec its; |
|
|
117 | int res; |
118 | res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); |
118 | res = timerfd_create (CLOCK_REALTIME, TFD_CLOEXEC | TFD_NONBLOCK); |
119 | res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0); |
119 | res = timerfd_settime (res, TFD_TIMER_ABSTIME /*| TFD_TIMER_CANCEL_ON_SET*/, &its, 0); |
120 | res = timerfd_gettime (res, &its); |
120 | res = timerfd_gettime (res, &its); |
121 | return 0; |
121 | return 0; |
122 | } |
122 | } |
… | |
… | |
125 | |
125 | |
126 | AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
126 | AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
127 | #include <unistd.h> |
127 | #include <unistd.h> |
128 | #include <sys/syscall.h> |
128 | #include <sys/syscall.h> |
129 | /*#include <linux/copy.h>*/ |
129 | /*#include <linux/copy.h>*/ |
|
|
130 | int main (void) |
|
|
131 | { |
130 | int res; |
132 | int res; |
131 | int main (void) |
|
|
132 | { |
|
|
133 | /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ |
133 | /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ |
134 | res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0); |
134 | res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0); |
135 | return 0; |
135 | return 0; |
136 | } |
136 | } |
137 | ]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) |
137 | ]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) |
… | |
… | |
201 | return PL_statcache.st_gen; |
201 | return PL_statcache.st_gen; |
202 | } |
202 | } |
203 | ]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)]) |
203 | ]])],ac_cv_st_gen=yes,ac_cv_st_gen=no)]) |
204 | test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member) |
204 | test $ac_cv_st_gen = yes && AC_DEFINE(HAVE_ST_GEN, 1, stat st_gen member) |
205 | |
205 | |
|
|
206 | AC_CACHE_CHECK(for statx, ac_cv_statx, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
207 | #include <sys/types.h> |
|
|
208 | #include <sys/stat.h> |
|
|
209 | #include <unistd.h> |
|
|
210 | #include <fcntl.h> |
|
|
211 | int res; |
|
|
212 | int main (void) |
|
|
213 | { |
|
|
214 | struct statx sx; |
|
|
215 | int res; |
|
|
216 | res = statx (AT_FDCWD, ".", |
|
|
217 | AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_SYMLINK_NOFOLLOW | AT_STATX_SYNC_AS_STAT | AT_STATX_FORCE_SYNC | AT_STATX_DONT_SYNC, |
|
|
218 | STATX_ALL, &sx); |
|
|
219 | STATX_TYPE; STATX_MODE; STATX_NLINK; STATX_UID; STATX_GID; STATX_ATIME; STATX_MTIME; STATX_CTIME; |
|
|
220 | STATX_INO; STATX_SIZE; STATX_BLOCKS; STATX_BASIC_STATS; STATX_BTIME; STATX_ALL; |
|
|
221 | STATX_ATTR_COMPRESSED; STATX_ATTR_IMMUTABLE; STATX_ATTR_APPEND; STATX_ATTR_NODUMP; STATX_ATTR_ENCRYPTED; |
|
|
222 | return 0; |
|
|
223 | } |
|
|
224 | ]])],ac_cv_statx=yes,ac_cv_statx=no)]) |
|
|
225 | test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available) |
|
|
226 | |
206 | AC_OUTPUT |
227 | AC_OUTPUT |
207 | |
228 | |