… | |
… | |
68 | AC_CHECK_HEADERS([sys/mkdev.h]) |
68 | AC_CHECK_HEADERS([sys/mkdev.h]) |
69 | |
69 | |
70 | dnl readv / preadv, vmsplice |
70 | dnl readv / preadv, vmsplice |
71 | AC_CHECK_HEADERS([sys/uio.h]) |
71 | AC_CHECK_HEADERS([sys/uio.h]) |
72 | |
72 | |
|
|
73 | dnl fexecve has always been in the single unix specification |
|
|
74 | dnl but some atrocities (like opsnbsd and osx) claim implementing it |
|
|
75 | dnl but then not definining it. ugh. garbage. and fexecve would be |
|
|
76 | dnl useful for security, but, no, not on openbsd. we'd rather lie |
|
|
77 | dnl about it. |
|
|
78 | AC_CACHE_CHECK(for fexecve, ac_cv_fexecve, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
79 | #include <fcntl.h> |
|
|
80 | #include <unistd.h> |
|
|
81 | int main (void) |
|
|
82 | { |
|
|
83 | char *const argv[] = { "foo", "bar", 0 }; |
|
|
84 | int res = fexecve (-1, argv, 0); |
|
|
85 | return 0; |
|
|
86 | } |
|
|
87 | ]])],ac_cv_fexecve=yes,ac_cv_fexecve=no)]) |
|
|
88 | test $ac_cv_fexecve = yes && AC_DEFINE(HAVE_FEXECVE, 1, fexecve(2) is available) |
|
|
89 | |
|
|
90 | AC_CACHE_CHECK([for siginfo_t], ac_cv_siginfo_t, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
|
|
91 | #include <signal.h> |
|
|
92 | int main (void) |
|
|
93 | { |
|
|
94 | siginfo_t si; |
|
|
95 | si.si_code; |
|
|
96 | si.si_pid; |
|
|
97 | si.si_uid; |
|
|
98 | si.si_value.sival_int; |
|
|
99 | si.si_value.sival_ptr; |
|
|
100 | return 0; |
|
|
101 | } |
|
|
102 | ])],ac_cv_siginfo_t=yes,ac_cv_siginfo_t=no)]) |
|
|
103 | test $ac_cv_siginfo_t = yes && AC_DEFINE(HAVE_SIGINFO_T, 1, have siginfo_t in signal.h) |
|
|
104 | |
|
|
105 | AC_CACHE_CHECK([for unix-style syscall interface], ac_cv_syscall, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
|
|
106 | #include <unistd.h> |
|
|
107 | #include <sys/syscall.h> |
|
|
108 | int main (void) |
|
|
109 | { |
|
|
110 | long res = syscall (SYS_exit, 0); |
|
|
111 | return 0; |
|
|
112 | } |
|
|
113 | ])],ac_cv_syscall=yes,ac_cv_syscall=no)]) |
|
|
114 | test $ac_cv_syscall = yes && AC_DEFINE(HAVE_SYSCALL, 1, unix syscall interface) |
73 | |
115 | |
74 | AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
116 | AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
75 | #include <sys/types.h> |
117 | #include <sys/types.h> |
76 | #include <fcntl.h> |
118 | #include <fcntl.h> |
77 | #include <sys/uio.h> |
119 | #include <sys/uio.h> |
… | |
… | |
130 | int res = memfd_create ("name", MFD_CLOEXEC | MFD_ALLOW_SEALING); |
172 | int res = memfd_create ("name", MFD_CLOEXEC | MFD_ALLOW_SEALING); |
131 | return 0; |
173 | return 0; |
132 | } |
174 | } |
133 | ]])],ac_cv_memfd_create=yes,ac_cv_memfd_create=no)]) |
175 | ]])],ac_cv_memfd_create=yes,ac_cv_memfd_create=no)]) |
134 | test $ac_cv_memfd_create = yes && AC_DEFINE(HAVE_MEMFD_CREATE, 1, memfd_create(2) is available) |
176 | test $ac_cv_memfd_create = yes && AC_DEFINE(HAVE_MEMFD_CREATE, 1, memfd_create(2) is available) |
135 | |
|
|
136 | AC_CACHE_CHECK(for copy_file_range, ac_cv_copy_file_range, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
137 | #include <unistd.h> |
|
|
138 | #include <sys/syscall.h> |
|
|
139 | /*#include <linux/copy.h>*/ |
|
|
140 | int main (void) |
|
|
141 | { |
|
|
142 | int res; |
|
|
143 | /*res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, COPY_FR_REFLINK | COPY_FR_DEDUP | COPY_FR_COPY);*/ |
|
|
144 | res = syscall (SYS_copy_file_range, 0, 0, 0, 0, 0, 0); |
|
|
145 | return 0; |
|
|
146 | } |
|
|
147 | ]])],ac_cv_copy_file_range=yes,ac_cv_copy_file_range=no)]) |
|
|
148 | test $ac_cv_copy_file_range = yes && AC_DEFINE(HAVE_COPY_FILE_RANGE, 1, copy_file_range(2) is available) |
|
|
149 | |
177 | |
150 | AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
178 | AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
151 | #include "EXTERN.h" |
179 | #include "EXTERN.h" |
152 | #include "perl.h" |
180 | #include "perl.h" |
153 | #include "XSUB.h" |
181 | #include "XSUB.h" |
… | |
… | |
232 | return 0; |
260 | return 0; |
233 | } |
261 | } |
234 | ]])],ac_cv_statx=yes,ac_cv_statx=no)]) |
262 | ]])],ac_cv_statx=yes,ac_cv_statx=no)]) |
235 | test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available) |
263 | test $ac_cv_statx = yes && AC_DEFINE(HAVE_STATX, 1, statx(2) is available) |
236 | |
264 | |
|
|
265 | AC_CACHE_CHECK(for accept4, ac_cv_accept4, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
266 | #include <sys/types.h> |
|
|
267 | #include <sys/socket.h> |
|
|
268 | int main (void) |
|
|
269 | { |
|
|
270 | int res = accept4 (1, (struct sockaddr *)0, (socklen_t)0, SOCK_NONBLOCK | SOCK_CLOEXEC); |
|
|
271 | return 0; |
|
|
272 | } |
|
|
273 | ]])],ac_cv_accept4=yes,ac_cv_accept4=no)]) |
|
|
274 | test $ac_cv_accept4 = yes && AC_DEFINE(HAVE_ACCEPT4, 1, accept4(2) is available) |
|
|
275 | |
|
|
276 | AC_CHECK_HEADERS([sys/mount.h]) |
|
|
277 | AC_CACHE_CHECK(for mount, ac_cv_mount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
278 | #include <sys/mount.h> |
|
|
279 | int main (void) |
|
|
280 | { |
|
|
281 | int res = mount ("path", "path", "fstype", MS_RDONLY, 0); |
|
|
282 | return 0; |
|
|
283 | } |
|
|
284 | ]])],ac_cv_mount=yes,ac_cv_mount=no)]) |
|
|
285 | test $ac_cv_mount = yes && AC_DEFINE(HAVE_MOUNT, 1, mount is available) |
|
|
286 | AC_CACHE_CHECK(for umount, ac_cv_umount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
287 | #include <sys/mount.h> |
|
|
288 | int main (void) |
|
|
289 | { |
|
|
290 | int res = umount ("path"); |
|
|
291 | return 0; |
|
|
292 | } |
|
|
293 | ]])],ac_cv_umount=yes,ac_cv_umount=no)]) |
|
|
294 | test $ac_cv_umount = yes && AC_DEFINE(HAVE_UMOUNT, 1, umount is available) |
|
|
295 | AC_CACHE_CHECK(for umount2, ac_cv_umount2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
296 | #include <sys/mount.h> |
|
|
297 | int main (void) |
|
|
298 | { |
|
|
299 | int res = umount2 ("path", MNT_FORCE|MNT_DETACH); |
|
|
300 | return 0; |
|
|
301 | } |
|
|
302 | ]])],ac_cv_umount2=yes,ac_cv_umount2=no)]) |
|
|
303 | test $ac_cv_umount2 = yes && AC_DEFINE(HAVE_UMOUNT2, 1, umount2 is available) |
|
|
304 | |
237 | AC_OUTPUT |
305 | AC_OUTPUT |
238 | |
306 | |