diff options
author | Brad King <brad.king@kitware.com> | 2015-08-31 20:32:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-31 20:33:46 (GMT) |
commit | e0cf77b3109e74cbc4c050e9907dacc9f0f40f70 (patch) | |
tree | d78dc40c78bb381f720fccfc5ea8429033afbd61 /Source/cmSystemTools.cxx | |
parent | ac0bb4333d13e633e26d107f288162d7d6a37b3a (diff) | |
download | CMake-e0cf77b3109e74cbc4c050e9907dacc9f0f40f70.zip CMake-e0cf77b3109e74cbc4c050e9907dacc9f0f40f70.tar.gz CMake-e0cf77b3109e74cbc4c050e9907dacc9f0f40f70.tar.bz2 |
cmSystemTools: Use CreateFileW explicitly to pass wchar_t path
The call to CreateFile added by commit ac0bb433 (VS: Windows Store/Phone
package cert thumbprint, 2015-08-21) passes a wide character path
explicitly so we should call CreateFileW directly. Otherwise it does
not build without -DUNICODE (e.g. in bootstrap on MSYS).
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 583e1d0..0cbe15c 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1025,13 +1025,14 @@ std::string cmSystemTools::ComputeCertificateThumbprint( HCERTSTORE certStore = NULL; PCCERT_CONTEXT certContext = NULL; - HANDLE certFile = CreateFile(cmsys::Encoding::ToWide(source.c_str()).c_str(), - GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); + HANDLE certFile = + CreateFileW(cmsys::Encoding::ToWide(source.c_str()).c_str(), + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); if (certFile != INVALID_HANDLE_VALUE && certFile != NULL) { |