BUG: Fix logic to return true when the file was already statted. Also, use nanosecond percision if available. Remove debug

This commit is contained in:
Andy Cedilnik 2005-10-13 10:07:12 -04:00
parent f2b8c8f31a
commit 6a67b1bf71
2 changed files with 3 additions and 4 deletions

View File

@ -89,7 +89,6 @@ void cmDepends::Clear(const char *file)
std::string markFile = file;
markFile += ".mark";
cmSystemTools::RemoveFile(markFile.c_str());
std::cout << "Remove mark file: " << markFile.c_str() << std::endl;
// Write an empty dependency file.
cmGeneratedFileStream depFileStream(file);

View File

@ -65,7 +65,7 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, cmFileTimeComparison_
if ( fit != this->Files.end() )
{
*st = fit->second;
return 0;
return true;
}
#endif
#if !defined(_WIN32) || defined(__CYGWIN__)
@ -114,7 +114,7 @@ bool cmFileTimeComparison::FileTimeCompare(const char* f1, const char* f2, int*
int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1, cmFileTimeComparison_Type* s2)
{
#if !defined(_WIN32) || defined(__CYGWIN__)
# if KWSYS_STAT_HAS_ST_MTIM
# if cmsys_STAT_HAS_ST_MTIM
// Compare using nanosecond resolution.
if(s1->st_mtim.tv_sec < s2->st_mtim.tv_sec)
{
@ -142,8 +142,8 @@ int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1, cmFileT
{
return 1;
}
return 0;
# endif
return 0;
#else
return (int)CompareFileTime(s1, s2);
#endif