diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-06-19 02:04:49 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-06-19 02:04:49 +0000 |
commit | 629645d83d197923e3c3f76cffe73e88ec7afb38 (patch) | |
tree | 2686b84b72381cc6a945d763c8326730f9159320 /libcxx/src/typeinfo.cpp | |
parent | dfcae38ede033ec1edb2332e7d6bb982ca0c53e1 (diff) | |
download | bcm5719-llvm-629645d83d197923e3c3f76cffe73e88ec7afb38.tar.gz bcm5719-llvm-629645d83d197923e3c3f76cffe73e88ec7afb38.zip |
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
Diffstat (limited to 'libcxx/src/typeinfo.cpp')
0 files changed, 0 insertions, 0 deletions