Fix bugs in last_write_time implementation.
* Fix passing a negative number as either tv_usec or tv_nsec. When file_time_type is negative and has a non-zero sub-second value we subtract 1 from tv_sec and make the sub-second duration positive. * Detect and report when 'file_time_type' cannot be represented by time_t. This happens when using large/small file_time_type values with a 32 bit time_t. There is more work to be done in the implementation. It should start to use stat's st_mtim or st_mtimeval if it's provided as an extension. That way we can provide a better resolution. llvm-svn: 273103
Loading
Please register or sign in to comment