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