… | |
… | |
62 | AC_CHECK_HEADERS([linux/fs.h linux/fiemap.h]) |
62 | AC_CHECK_HEADERS([linux/fs.h linux/fiemap.h]) |
63 | |
63 | |
64 | dnl glibc major/minor macros |
64 | dnl glibc major/minor macros |
65 | AC_CHECK_HEADERS([sys/sysmacros.h]) |
65 | AC_CHECK_HEADERS([sys/sysmacros.h]) |
66 | |
66 | |
|
|
67 | dnl solaris major/minor |
|
|
68 | AC_CHECK_HEADERS([sys/mkdev.h]) |
|
|
69 | |
|
|
70 | dnl readv / preadv, vmsplice |
|
|
71 | AC_CHECK_HEADERS([sys/uio.h]) |
|
|
72 | |
|
|
73 | |
67 | AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
74 | AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([AC_LANG_SOURCE([ |
|
|
75 | #include <sys/types.h> |
68 | #include <fcntl.h> |
76 | #include <fcntl.h> |
|
|
77 | #include <sys/uio.h> |
69 | int main (void) |
78 | int main (void) |
70 | { |
79 | { |
71 | ssize_t res; |
80 | ssize_t res; |
72 | res = splice ((int)0, (loff_t)0, (int)0, (loff_t *)0, (size_t)0, SPLICE_F_MOVE | SPLICE_F_NONBLOCK | SPLICE_F_MORE); |
81 | res = splice ((int)0, (loff_t)0, (int)0, (loff_t *)0, (size_t)0, SPLICE_F_MOVE | SPLICE_F_NONBLOCK | SPLICE_F_MORE); |
73 | res = tee ((int)0, (int)0, (size_t)0, SPLICE_F_NONBLOCK); |
82 | res = tee ((int)0, (int)0, (size_t)0, SPLICE_F_NONBLOCK); |
… | |
… | |
131 | AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
140 | AC_CACHE_CHECK(for st_xtimensec, ac_cv_xtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
132 | #include "EXTERN.h" |
141 | #include "EXTERN.h" |
133 | #include "perl.h" |
142 | #include "perl.h" |
134 | #include "XSUB.h" |
143 | #include "XSUB.h" |
135 | |
144 | |
136 | int res; |
|
|
137 | int main (void) |
145 | int main (void) |
138 | { |
146 | { |
139 | return PL_statcache.st_atimensec |
147 | return PL_statcache.st_atimensec |
140 | + PL_statcache.st_mtimensec |
148 | + PL_statcache.st_mtimensec |
141 | + PL_statcache.st_ctimensec; |
149 | + PL_statcache.st_ctimensec; |
142 | return 0; |
|
|
143 | } |
150 | } |
144 | ]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) |
151 | ]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) |
145 | test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec) |
152 | test $ac_cv_xtimensec = yes && AC_DEFINE(HAVE_ST_XTIMENSEC, 1, stat nanosecond access by st_xtimensec) |
146 | |
153 | |
147 | AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
154 | AC_CACHE_CHECK(for st_xtimespec, ac_cv_xtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
148 | #include "EXTERN.h" |
155 | #include "EXTERN.h" |
149 | #include "perl.h" |
156 | #include "perl.h" |
150 | #include "XSUB.h" |
157 | #include "XSUB.h" |
151 | |
158 | |
152 | int res; |
|
|
153 | int main (void) |
159 | int main (void) |
154 | { |
160 | { |
155 | return PL_statcache.st_atim.tv_nsec |
161 | return PL_statcache.st_atim.tv_nsec |
156 | + PL_statcache.st_mtim.tv_nsec |
162 | + PL_statcache.st_mtim.tv_nsec |
157 | + PL_statcache.st_ctim.tv_nsec; |
163 | + PL_statcache.st_ctim.tv_nsec; |
… | |
… | |
159 | ]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) |
165 | ]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) |
160 | test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec) |
166 | test $ac_cv_xtimespec = yes && AC_DEFINE(HAVE_ST_XTIMESPEC, 1, stat nanosecond access by st_xtimespec) |
161 | |
167 | |
162 | # apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? |
168 | # apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? |
163 | |
169 | |
|
|
170 | AC_CACHE_CHECK(for st_birthtimensec, ac_cv_birthtimensec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
|
|
171 | #include "EXTERN.h" |
|
|
172 | #include "perl.h" |
|
|
173 | #include "XSUB.h" |
|
|
174 | |
|
|
175 | int main (void) |
|
|
176 | { |
|
|
177 | return PL_statcache.st_birthtime + PL_statcache.st_birthtimensec; |
|
|
178 | } |
|
|
179 | ]])],ac_cv_birthtimensec=yes,ac_cv_birthtimensec=no)]) |
|
|
180 | test $ac_cv_birthtimensec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMENSEC, 1, birthtime nanosecond access by st_birthtimensec) |
|
|
181 | |
|
|
182 | AC_CACHE_CHECK(for st_birthtimespec, ac_cv_birthtimespec, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
|
|
183 | #include "EXTERN.h" |
|
|
184 | #include "perl.h" |
|
|
185 | #include "XSUB.h" |
|
|
186 | |
|
|
187 | int main (void) |
|
|
188 | { |
|
|
189 | return PL_statcache.st_birthtim.tv_sec + PL_statcache.st_birthtim.tv_nsec; |
|
|
190 | } |
|
|
191 | ]])],ac_cv_birthtimespec=yes,ac_cv_birthtimespec=no)]) |
|
|
192 | test $ac_cv_birthtimespec = yes && AC_DEFINE(HAVE_ST_BIRTHTIMESPEC, 1, birthtime nanosecond access by st_birthtimespec) |
|
|
193 | |
|
|
194 | AC_CACHE_CHECK(for st_gen, ac_cv_st_gen, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ |
|
|
195 | #include "EXTERN.h" |
|
|
196 | #include "perl.h" |
|
|
197 | #include "XSUB.h" |
|
|
198 | |
|
|
199 | int main (void) |
|
|
200 | { |
|
|
201 | return PL_statcache.st_gen; |
|
|
202 | } |
|
|
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) |
|
|
205 | |
164 | AC_OUTPUT |
206 | AC_OUTPUT |
165 | |
207 | |