summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-02-08 18:38:23 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-02-08 18:38:23 (GMT)
commite8df4cab82914f061752bc3e6b9a8a6498b1485b (patch)
tree1dc986a66272f9ca064231c67216fcd40397eafe /Source
parent98cca40d9b714db78e1fa67ed8dd1ef15c6492c2 (diff)
parent7df291fb6e6971f60cc7b338bcaa81069ed11757 (diff)
downloadCMake-e8df4cab82914f061752bc3e6b9a8a6498b1485b.zip
CMake-e8df4cab82914f061752bc3e6b9a8a6498b1485b.tar.gz
CMake-e8df4cab82914f061752bc3e6b9a8a6498b1485b.tar.bz2
Merge topic 'update-kwsys'
7df291f Merge branch 'upstream-kwsys' into update-kwsys 9d66f74 KWSys 2013-02-05 (5c34ed2e)
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/SystemTools.cxx28
1 files changed, 10 insertions, 18 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 881c49a..22bf193 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -196,18 +196,16 @@ inline int Rmdir(const char* dir)
}
inline const char* Getcwd(char* buf, unsigned int len)
{
- const char* ret = _getcwd(buf, len);
- if(!ret)
+ if(const char* ret = _getcwd(buf, len))
{
- fprintf(stderr, "No current working directory.\n");
- abort();
- }
- // make sure the drive letter is capital
- if(strlen(buf) > 1 && buf[1] == ':')
- {
- buf[0] = toupper(buf[0]);
+ // make sure the drive letter is capital
+ if(strlen(buf) > 1 && buf[1] == ':')
+ {
+ buf[0] = toupper(buf[0]);
+ }
+ return ret;
}
- return ret;
+ return 0;
}
inline int Chdir(const char* dir)
{
@@ -245,13 +243,7 @@ inline int Rmdir(const char* dir)
}
inline const char* Getcwd(char* buf, unsigned int len)
{
- const char* ret = getcwd(buf, len);
- if(!ret)
- {
- fprintf(stderr, "No current working directory\n");
- abort();
- }
- return ret;
+ return getcwd(buf, len);
}
inline int Chdir(const char* dir)
@@ -3089,7 +3081,7 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_path,
}
else
{
- // ??
+ base_components.push_back("");
}
}