… | |
… | |
59 | fdatasync (fd); |
59 | fdatasync (fd); |
60 | return 0; |
60 | return 0; |
61 | } |
61 | } |
62 | ],ac_cv_fdatasync=yes,ac_cv_fdatasync=no)]) |
62 | ],ac_cv_fdatasync=yes,ac_cv_fdatasync=no)]) |
63 | test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is available) |
63 | test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is available) |
64 | |
|
|
65 | AC_CACHE_CHECK(for pread and pwrite, ac_cv_preadwrite, [AC_LINK_IFELSE([ |
|
|
66 | #include <unistd.h> |
|
|
67 | int main (void) |
|
|
68 | { |
|
|
69 | int fd = 0; |
|
|
70 | size_t count = 1; |
|
|
71 | char buf; |
|
|
72 | off_t offset = 1; |
|
|
73 | ssize_t res; |
|
|
74 | res = pread (fd, &buf, count, offset); |
|
|
75 | res = pwrite (fd, &buf, count, offset); |
|
|
76 | return 0; |
|
|
77 | } |
|
|
78 | ],ac_cv_preadwrite=yes,ac_cv_preadwrite=no)]) |
|
|
79 | test $ac_cv_preadwrite = yes && AC_DEFINE(HAVE_PREADWRITE, 1, pread(2) and pwrite(2) are available) |
|
|
80 | |
64 | |
81 | AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([ |
65 | AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([ |
82 | # include <sys/types.h> |
66 | # include <sys/types.h> |
83 | #if __linux |
67 | #if __linux |
84 | # include <sys/sendfile.h> |
68 | # include <sys/sendfile.h> |