… | |
… | |
117 | return 0; |
117 | return 0; |
118 | } |
118 | } |
119 | ],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)]) |
119 | ],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)]) |
120 | test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available) |
120 | test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available) |
121 | |
121 | |
|
|
122 | dnl ############################################################################# |
|
|
123 | dnl # these checks exist for the benefit of IO::AIO |
|
|
124 | |
|
|
125 | dnl at least uclibc defines _POSIX_ADVISORY_INFO without *any* of the required |
|
|
126 | dnl functionality actually being present. ugh. |
|
|
127 | AC_CACHE_CHECK(for posix_madvise, ac_cv_posix_madvise, [AC_LINK_IFELSE([ |
|
|
128 | #include <sys/mman.h> |
|
|
129 | int main (void) |
|
|
130 | { |
|
|
131 | int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL); |
|
|
132 | int a = POSIX_MADV_SEQUENTIAL; |
|
|
133 | int b = POSIX_MADV_RANDOM; |
|
|
134 | int c = POSIX_MADV_WILLNEED; |
|
|
135 | int d = POSIX_MADV_DONTNEED; |
|
|
136 | return 0; |
|
|
137 | } |
|
|
138 | ],ac_cv_posix_madvise=yes,ac_cv_posix_madvise=no)]) |
|
|
139 | test $ac_cv_posix_madvise = yes && AC_DEFINE(HAVE_POSIX_MADVISE, 1, posix_madvise(2) is available) |
|
|
140 | |
|
|
141 | AC_CACHE_CHECK(for posix_fadvise, ac_cv_posix_fadvise, [AC_LINK_IFELSE([ |
|
|
142 | #define _XOPEN_SOURCE 600 |
|
|
143 | #include <fcntl.h> |
|
|
144 | int main (void) |
|
|
145 | { |
|
|
146 | int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL); |
|
|
147 | int a = POSIX_FADV_SEQUENTIAL; |
|
|
148 | int b = POSIX_FADV_NOREUSE; |
|
|
149 | int c = POSIX_FADV_RANDOM; |
|
|
150 | int d = POSIX_FADV_WILLNEED; |
|
|
151 | int e = POSIX_FADV_DONTNEED; |
|
|
152 | return 0; |
|
|
153 | } |
|
|
154 | ],ac_cv_posix_fadvise=yes,ac_cv_posix_fadvise=no)]) |
|
|
155 | test $ac_cv_posix_fadvise = yes && AC_DEFINE(HAVE_POSIX_FADVISE, 1, posix_fadvise(2) is available) |
|
|
156 | |