summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-17 16:28:13 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-17 16:28:13 (GMT)
commite2ec4a18453f3bdc1ab826a618a2202c5e9e9dec (patch)
treee3da86475a22bb5fadac55c4fe258a244603bb82 /Source/cmSystemTools.cxx
parent508cff55f6a26fce3c2bc26b3d00de9c6f96c6e6 (diff)
downloadCMake-e2ec4a18453f3bdc1ab826a618a2202c5e9e9dec.zip
CMake-e2ec4a18453f3bdc1ab826a618a2202c5e9e9dec.tar.gz
CMake-e2ec4a18453f3bdc1ab826a618a2202c5e9e9dec.tar.bz2
ENH: Adding kwsys::SystemTools::FileTimeCompare method to compare file modification times with the highest resolution possible on the file system.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx31
1 files changed, 0 insertions, 31 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 556dcaf..f9890f4 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1327,34 +1327,3 @@ bool cmSystemTools::PutEnv(const char* value)
localEnvironment.push_back(envVar);
return ret == 0;
}
-
-bool cmSystemTools::FileTimeCompare(const char* f1, const char* f2,
- int* result)
-{
- struct stat stat1, stat2;
- if(stat(f1, &stat1) == 0 && stat(f2, &stat2) == 0)
- {
- *result = 0;
- if(stat1.st_mtime < stat2.st_mtime)
- {
- *result = -1;
- }
- else if(stat1.st_mtime > stat2.st_mtime)
- {
- *result = 1;
- }
-#if 0
- // TODO: Support resolution higher than one second.
- // Use st_mtim.tv_nsec if available and GetFileTime on Windows.
- else if(stat1.st_mtim.tv_nsec < stat2.st_mtim.tv_nsec)
- {
- *result = 1;
- }
-#endif
- return true;
- }
- else
- {
- return false;
- }
-}