summaryrefslogtreecommitdiffstats
path: root/SystemTools.cxx
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2020-05-27 11:59:02 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-27 12:33:38 (GMT)
commitc47501bcca7c5d47aa22478071a16fae5cef9c63 (patch)
tree70970ede1617838c5edecc344b93e38ee27480f8 /SystemTools.cxx
parent8fd4c19e1b39efa6912321a72ac12a1c0121264e (diff)
downloadCMake-c47501bcca7c5d47aa22478071a16fae5cef9c63.zip
CMake-c47501bcca7c5d47aa22478071a16fae5cef9c63.tar.gz
CMake-c47501bcca7c5d47aa22478071a16fae5cef9c63.tar.bz2
KWSys 2020-05-27 (a3263389)
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit a3263389bcaab27fd62a23599d4ce9bdaa01479a (master). Upstream Shortlog ----------------- Brad King (7): ce4941c9 IOStream: Drop this component of KWSys 49d04c2c hashtable: Drop this component of KWSys a0bd892c SystemInformation: Use 'long long' unconditionally 441dd494 Drop unused checks for 'long long' and '__int64' 2b749749 Drop unused C type macros check 74daf33b Drop unused Borland and OpenWatcom preprocessor conditions c4e8126a Drop unused CXX cstdio check
Diffstat (limited to 'SystemTools.cxx')
-rw-r--r--SystemTools.cxx33
1 files changed, 4 insertions, 29 deletions
diff --git a/SystemTools.cxx b/SystemTools.cxx
index a6d210f..25705ea 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -6,9 +6,7 @@
# define _XOPEN_SOURCE_EXTENDED
#endif
-#if defined(_WIN32) && \
- (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || \
- defined(__MINGW32__))
+#if defined(_WIN32) && (defined(_MSC_VER) || defined(__MINGW32__))
# define KWSYS_WINDOWS_DIRS
#else
# if defined(__SUNPRO_CC)
@@ -65,7 +63,7 @@
#endif
#ifdef _MSC_VER
-# define umask _umask // Note this is still umask on Borland
+# define umask _umask
#endif
// support for realpath call
@@ -154,9 +152,7 @@ public:
}
#endif
-#if defined(_WIN32) && \
- (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || \
- defined(__MINGW32__))
+#if defined(_WIN32) && (defined(_MSC_VER) || defined(__MINGW32__))
# include <direct.h>
# include <io.h>
# define _unlink unlink
@@ -170,13 +166,6 @@ public:
#else
# define KWSYS_SYSTEMTOOLS_MAXPATH 16384
#endif
-#if defined(__WATCOMC__)
-# include <direct.h>
-# define _mkdir mkdir
-# define _rmdir rmdir
-# define _getcwd getcwd
-# define _chdir chdir
-#endif
#if defined(__BEOS__) && !defined(__ZETA__)
# include <be/kernel/OS.h>
@@ -259,11 +248,7 @@ inline const char* Getcwd(char* buf, unsigned int len)
}
inline int Chdir(const std::string& dir)
{
-# if defined(__BORLANDC__)
- return chdir(dir.c_str());
-# else
return _wchdir(KWSYS_NAMESPACE::Encoding::ToWide(dir).c_str());
-# endif
}
inline void Realpath(const std::string& path, std::string& resolved_path,
std::string* errorMessage = 0)
@@ -937,15 +922,9 @@ bool SystemTools::MakeDirectory(const std::string& path, const mode_t* mode)
}
topdir = dir;
if (Mkdir(topdir, mode) != 0) {
- // There is a bug in the Borland Run time library which makes MKDIR
- // return EACCES when it should return EEXISTS
// if it is some other error besides directory exists
// then return false
- if ((errno != EEXIST)
-#ifdef __BORLANDC__
- && (errno != EACCES)
-#endif
- ) {
+ if (errno != EEXIST) {
return false;
}
}
@@ -1448,11 +1427,7 @@ int SystemTools::Stat(const std::string& path, SystemTools::Stat_t* buf)
// long paths, but _wstat64 rejects paths with '?' in them, thinking
// they are wildcards.
std::wstring const& wpath = Encoding::ToWide(path);
-# if defined(__BORLANDC__)
- return _wstati64(wpath.c_str(), buf);
-# else
return _wstat64(wpath.c_str(), buf);
-# endif
#else
return stat(path.c_str(), buf);
#endif