… | |
… | |
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 | int res = fexecve (-1, "argv", 0); |
|
|
84 | return 0; |
|
|
85 | } |
|
|
86 | ]])],ac_cv_fexecve=yes,ac_cv_fexecve=no)]) |
|
|
87 | test $ac_cv_fexecve = yes && AC_DEFINE(HAVE_FEXECVE, 1, fexecve(2) is available) |
|
|
88 | |
73 | AC_CACHE_CHECK([for siginfo_t], ac_cv_siginfo_t, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
89 | AC_CACHE_CHECK([for siginfo_t], ac_cv_siginfo_t, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
74 | #include <signal.h> |
90 | #include <signal.h> |
75 | int main (void) |
91 | int main (void) |
76 | { |
92 | { |
77 | siginfo_t si; |
93 | siginfo_t si; |
… | |
… | |
262 | AC_CACHE_CHECK(for accept4, ac_cv_accept4, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
278 | AC_CACHE_CHECK(for accept4, ac_cv_accept4, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
263 | #include <sys/types.h> |
279 | #include <sys/types.h> |
264 | #include <sys/socket.h> |
280 | #include <sys/socket.h> |
265 | int main (void) |
281 | int main (void) |
266 | { |
282 | { |
267 | int res; |
|
|
268 | res = accept4 (1, (struct sockaddr *)0, (socklen_t)0, SOCK_NONBLOCK | SOCK_CLOEXEC); |
283 | int res = accept4 (1, (struct sockaddr *)0, (socklen_t)0, SOCK_NONBLOCK | SOCK_CLOEXEC); |
269 | return 0; |
284 | return 0; |
270 | } |
285 | } |
271 | ]])],ac_cv_accept4=yes,ac_cv_accept4=no)]) |
286 | ]])],ac_cv_accept4=yes,ac_cv_accept4=no)]) |
272 | test $ac_cv_accept4 = yes && AC_DEFINE(HAVE_ACCEPT4, 1, accept4(2) is available) |
287 | test $ac_cv_accept4 = yes && AC_DEFINE(HAVE_ACCEPT4, 1, accept4(2) is available) |
273 | |
288 | |
274 | AC_CHECK_HEADERS([sys/mount.h]) |
289 | AC_CHECK_HEADERS([sys/mount.h]) |
275 | AC_CACHE_CHECK(for mount/umount, ac_cv_mount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
290 | AC_CACHE_CHECK(for mount, ac_cv_mount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
276 | #include <sys/mount.h> |
291 | #include <sys/mount.h> |
277 | int main (void) |
292 | int main (void) |
278 | { |
293 | { |
279 | int res; |
|
|
280 | res = mount ("path", "path", "fstype", MS_RDONLY, 0); |
294 | int res = mount ("path", "path", "fstype", MS_RDONLY, 0); |
281 | res = umount ("path"); |
|
|
282 | return 0; |
295 | return 0; |
283 | } |
296 | } |
284 | ]])],ac_cv_mount=yes,ac_cv_mount=no)]) |
297 | ]])],ac_cv_mount=yes,ac_cv_mount=no)]) |
|
|
298 | test $ac_cv_mount = yes && AC_DEFINE(HAVE_MOUNT, 1, mount is available) |
|
|
299 | AC_CACHE_CHECK(for umount, ac_cv_umount, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
|
|
300 | #include <sys/mount.h> |
|
|
301 | int main (void) |
|
|
302 | { |
|
|
303 | int res = umount ("path"); |
|
|
304 | return 0; |
|
|
305 | } |
|
|
306 | ]])],ac_cv_umount=yes,ac_cv_umount=no)]) |
285 | test $ac_cv_mount = yes && AC_DEFINE(HAVE_MOUNT, 1, mount/umount are available) |
307 | test $ac_cv_umount = yes && AC_DEFINE(HAVE_UMOUNT, 1, umount is available) |
286 | AC_CACHE_CHECK(for umount2, ac_cv_umount2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
308 | AC_CACHE_CHECK(for umount2, ac_cv_umount2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
287 | #include <sys/mount.h> |
309 | #include <sys/mount.h> |
288 | int main (void) |
310 | int main (void) |
289 | { |
311 | { |
290 | int res; |
|
|
291 | res = umount2 ("path", MNT_FORCE|MNT_DETACH); |
312 | int res = umount2 ("path", MNT_FORCE|MNT_DETACH); |
292 | return 0; |
313 | return 0; |
293 | } |
314 | } |
294 | ]])],ac_cv_umount2=yes,ac_cv_umount2=no)]) |
315 | ]])],ac_cv_umount2=yes,ac_cv_umount2=no)]) |
295 | test $ac_cv_umount2 = yes && AC_DEFINE(HAVE_UMOUNT2, 1, umount2 is available) |
316 | test $ac_cv_umount2 = yes && AC_DEFINE(HAVE_UMOUNT2, 1, umount2 is available) |
296 | |
317 | |