… | |
… | |
134 | 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([[ |
135 | #include "EXTERN.h" |
135 | #include "EXTERN.h" |
136 | #include "perl.h" |
136 | #include "perl.h" |
137 | #include "XSUB.h" |
137 | #include "XSUB.h" |
138 | |
138 | |
139 | int res; |
|
|
140 | int main (void) |
139 | int main (void) |
141 | { |
140 | { |
142 | return PL_statcache.st_atimensec |
141 | return PL_statcache.st_atimensec |
143 | + PL_statcache.st_mtimensec |
142 | + PL_statcache.st_mtimensec |
144 | + PL_statcache.st_ctimensec; |
143 | + PL_statcache.st_ctimensec; |
145 | return 0; |
|
|
146 | } |
144 | } |
147 | ]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) |
145 | ]])],ac_cv_xtimensec=yes,ac_cv_xtimensec=no)]) |
148 | 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) |
149 | |
147 | |
150 | 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([[ |
151 | #include "EXTERN.h" |
149 | #include "EXTERN.h" |
152 | #include "perl.h" |
150 | #include "perl.h" |
153 | #include "XSUB.h" |
151 | #include "XSUB.h" |
154 | |
152 | |
155 | int res; |
|
|
156 | int main (void) |
153 | int main (void) |
157 | { |
154 | { |
158 | return PL_statcache.st_atim.tv_nsec |
155 | return PL_statcache.st_atim.tv_nsec |
159 | + PL_statcache.st_mtim.tv_nsec |
156 | + PL_statcache.st_mtim.tv_nsec |
160 | + PL_statcache.st_ctim.tv_nsec; |
157 | + PL_statcache.st_ctim.tv_nsec; |
… | |
… | |
162 | ]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) |
159 | ]])],ac_cv_xtimespec=yes,ac_cv_xtimespec=no)]) |
163 | 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) |
164 | |
161 | |
165 | # apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? |
162 | # apparently, True64 uses st_u[amc]time, aix uses at_[amc]time_n and apple uses st_[amc,birth]timespec? |
166 | |
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 | |
167 | AC_OUTPUT |
200 | AC_OUTPUT |
168 | |
201 | |