summaryrefslogtreecommitdiffstats
path: root/Source/cmFileTimeComparison.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-10-12 17:50:25 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-10-12 17:50:25 (GMT)
commit2dd035c9a9fc712078c333ec282a741e6627624b (patch)
tree736951af13d3f43b4dfed1828dc516ed80a57d70 /Source/cmFileTimeComparison.cxx
parent775c3495e215ed1a9604ec045465483360704b52 (diff)
downloadCMake-2dd035c9a9fc712078c333ec282a741e6627624b.zip
CMake-2dd035c9a9fc712078c333ec282a741e6627624b.tar.gz
CMake-2dd035c9a9fc712078c333ec282a741e6627624b.tar.bz2
COMP: Windows fixes
Diffstat (limited to 'Source/cmFileTimeComparison.cxx')
-rw-r--r--Source/cmFileTimeComparison.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx
index 2b0c8cf..b4c603e 100644
--- a/Source/cmFileTimeComparison.cxx
+++ b/Source/cmFileTimeComparison.cxx
@@ -24,13 +24,14 @@
# include <cmsys/hash_map.hxx>
#endif
-#include <ctype.h>
-#include <sys/stat.h>
#if !defined(_WIN32) || defined(__CYGWIN__)
# define cmFileTimeComparison_Type struct stat
+# include <ctype.h>
+# include <sys/stat.h>
#else
# define cmFileTimeComparison_Type FILETIME
+# include <windows.h>
#endif
class cmFileTimeComparisonInternal
@@ -75,7 +76,7 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname, cmFileTimeComparison_
}
#else
// Windows version. Create file handles and get the modification times.
- HANDLE hf1 = CreateFile(f1, GENERIC_READ, FILE_SHARE_READ,
+ HANDLE hf1 = CreateFile(fname, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS,
NULL);
if(hf1 == INVALID_HANDLE_VALUE)