Changeset 2080
- Timestamp:
- 31/01/2008 23:43:24 (4 years ago)
- Location:
- box/trunk
- Files:
-
- 2 edited
-
configure.ac (modified) (1 diff)
-
lib/common/FileModificationTime.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/configure.ac
r2077 r2080 160 160 AC_CHECK_MEMBERS([struct stat.st_flags]) 161 161 AC_CHECK_MEMBERS([struct stat.st_mtimespec]) 162 AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec]) 163 AC_CHECK_MEMBERS([struct stat.st_atimensec]) 162 164 AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,, [[ 163 165 #include <sys/types.h> -
box/trunk/lib/common/FileModificationTime.h
r217 r2080 29 29 inline box_time_t FileAttrModificationTime(struct stat &st) 30 30 { 31 #ifndef HAVE_STRUCT_STAT_ST_MTIMESPEC 32 box_time_t statusmodified = ((int64_t)st.st_ctime) * (MICRO_SEC_IN_SEC_LL); 33 #else 34 box_time_t statusmodified = (((int64_t)st.st_ctimespec.tv_nsec) / NANO_SEC_IN_USEC_LL) 35 + (((int64_t)st.st_ctimespec.tv_sec) * (MICRO_SEC_IN_SEC_LL)); 31 box_time_t statusmodified = 32 #ifdef HAVE_STRUCT_STAT_ST_MTIMESPEC 33 (((int64_t)st.st_ctimespec.tv_nsec) / (NANO_SEC_IN_USEC_LL)) + 34 (((int64_t)st.st_ctimespec.tv_sec) * (MICRO_SEC_IN_SEC_LL)); 35 #elif defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 36 (((int64_t)st.st_ctim.tv_nsec) / (NANO_SEC_IN_USEC_LL)) + 37 (((int64_t)st.st_ctim.tv_sec) * (MICRO_SEC_IN_SEC_LL)); 38 #elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC 39 (((int64_t)st.st_ctimensec) / (NANO_SEC_IN_USEC_LL)) + 40 (((int64_t)st.st_ctime) * (MICRO_SEC_IN_SEC_LL)); 41 #else // no nanoseconds anywhere 42 (((int64_t)st.st_ctime) * (MICRO_SEC_IN_SEC_LL)); 36 43 #endif 37 44
Note: See TracChangeset
for help on using the changeset viewer.
