summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-11 14:13:23 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-11 14:13:23 (GMT)
commit060cef0c44300c3fa8fb655619eb7a599083ef49 (patch)
treec07205d04371047d8ec210a932465f4497d68e6e /Source/kwsys/SystemTools.cxx
parentc47c011c77bfd1bfb8d2060511a2b957ce181c62 (diff)
parent9e0026216fb81e71ecd6918294a7ff8004132f1d (diff)
downloadCMake-060cef0c44300c3fa8fb655619eb7a599083ef49.zip
CMake-060cef0c44300c3fa8fb655619eb7a599083ef49.tar.gz
CMake-060cef0c44300c3fa8fb655619eb7a599083ef49.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2017-08-11 (e1006189)
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r--Source/kwsys/SystemTools.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index c5bbd41..11f3b81 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -847,6 +847,8 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
free(orig);
}
+#if defined(_WIN32) && !defined(__CYGWIN__)
+
#if defined(KEY_WOW64_32KEY) && defined(KEY_WOW64_64KEY)
#define KWSYS_ST_KEY_WOW64_32KEY KEY_WOW64_32KEY
#define KWSYS_ST_KEY_WOW64_64KEY KEY_WOW64_64KEY
@@ -855,7 +857,6 @@ void SystemTools::ReplaceString(std::string& source, const char* replace,
#define KWSYS_ST_KEY_WOW64_64KEY 0x0100
#endif
-#if defined(_WIN32) && !defined(__CYGWIN__)
static bool SystemToolsParseRegistryKey(const std::string& key,
HKEY& primaryKey, std::string& second,
std::string& valuename)
@@ -3796,11 +3797,7 @@ std::string SystemTools::GetFilenamePath(const std::string& filename)
*/
std::string SystemTools::GetFilenameName(const std::string& filename)
{
-#if defined(_WIN32)
std::string::size_type slash_pos = filename.find_last_of("/\\");
-#else
- std::string::size_type slash_pos = filename.rfind('/');
-#endif
if (slash_pos != std::string::npos) {
return filename.substr(slash_pos + 1);
} else {