diff options
author | Evan Martin <martine@danga.com> | 2012-01-05 17:24:30 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-05 17:24:30 (GMT) |
commit | 499d3e9ea1776e5f59ef722bc82188f46fce3a9d (patch) | |
tree | 5447d244788b4bf50290de14b8d07d020360dd1a /src/disk_interface.cc | |
parent | dc3ffcdd4c840a697cdbc71f2c0121908977af9a (diff) | |
download | Ninja-499d3e9ea1776e5f59ef722bc82188f46fce3a9d.zip Ninja-499d3e9ea1776e5f59ef722bc82188f46fce3a9d.tar.gz Ninja-499d3e9ea1776e5f59ef722bc82188f46fce3a9d.tar.bz2 |
convert all time_t to a new TimeStamp type
Diffstat (limited to 'src/disk_interface.cc')
-rw-r--r-- | src/disk_interface.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/disk_interface.cc b/src/disk_interface.cc index dec3836..0944643 100644 --- a/src/disk_interface.cc +++ b/src/disk_interface.cc @@ -50,7 +50,7 @@ bool DiskInterface::MakeDirs(const std::string& path) { std::string dir = DirName(path); if (dir.empty()) return true; // Reached root; assume it's there. - int mtime = Stat(dir); + TimeStamp mtime = Stat(dir); if (mtime < 0) return false; // Error. if (mtime > 0) @@ -65,7 +65,7 @@ bool DiskInterface::MakeDirs(const std::string& path) { // RealDiskInterface ----------------------------------------------------------- -int RealDiskInterface::Stat(const std::string& path) { +TimeStamp RealDiskInterface::Stat(const std::string& path) { #ifdef WIN32 WIN32_FILE_ATTRIBUTE_DATA attrs; if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &attrs)) { @@ -84,7 +84,7 @@ int RealDiskInterface::Stat(const std::string& path) { ((uint64_t)filetime.dwLowDateTime); mtime /= 1000000000LL / 100; // 100ns -> s. mtime -= 12622770400LL; // 1600 epoch -> 2000 epoch (subtract 400 years). - return (int)mtime; + return (TimeStamp)mtime; #else struct stat st; if (stat(path.c_str(), &st) < 0) { |