summaryrefslogtreecommitdiffstats
path: root/Source/cmFileTimeComparison.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2013-12-05 05:17:24 (GMT)
committerBrad King <brad.king@kitware.com>2013-12-09 15:29:43 (GMT)
commit0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc (patch)
tree512d1177b107bba94ddd7b016530f0c6a140b531 /Source/cmFileTimeComparison.cxx
parentce598cc838c717132a122a97c5e21b99f11fe23b (diff)
downloadCMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.zip
CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.tar.gz
CMake-0b9906c2fba3fa7d2aebc5e217da31cd129b2bfc.tar.bz2
Windows: Use wide-character system APIs
Make CMake compile with -DUNICODE. Make it possible for the 8 bit encoding to eventually be UTF-8 instead ANSI.
Diffstat (limited to 'Source/cmFileTimeComparison.cxx')
-rw-r--r--Source/cmFileTimeComparison.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx
index 3167be4..02f10c0 100644
--- a/Source/cmFileTimeComparison.cxx
+++ b/Source/cmFileTimeComparison.cxx
@@ -16,6 +16,8 @@
# include <cmsys/hash_map.hxx>
#endif
+#include <cmsys/Encoding.hxx>
+
// Use a platform-specific API to get file times efficiently.
#if !defined(_WIN32) || defined(__CYGWIN__)
# define cmFileTimeComparison_Type struct stat
@@ -86,7 +88,8 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname,
// Windows version. Get the modification time from extended file
// attributes.
WIN32_FILE_ATTRIBUTE_DATA fdata;
- if(!GetFileAttributesEx(fname, GetFileExInfoStandard, &fdata))
+ if(!GetFileAttributesExW(cmsys::Encoding::ToWide(fname).c_str(),
+ GetFileExInfoStandard, &fdata))
{
return false;
}