summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-02-06 03:26:55 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-02-06 03:26:55 (GMT)
commit62b612fbf841fd8d1d4e293ad84d933133543860 (patch)
tree9f5e585824494932ec2dc85946e3a00446a38d88 /Source/cmSystemTools.cxx
parent9676bb4b22687e1265adc13647c078991d3b4c85 (diff)
downloadCMake-62b612fbf841fd8d1d4e293ad84d933133543860.zip
CMake-62b612fbf841fd8d1d4e293ad84d933133543860.tar.gz
CMake-62b612fbf841fd8d1d4e293ad84d933133543860.tar.bz2
add better testing for unlink
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 95f4d59..b395c98 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -15,7 +15,6 @@
=========================================================================*/
#include "cmSystemTools.h"
-#include "errno.h"
#include <stdio.h>
#include <sys/stat.h>
#include "cmRegularExpression.h"
@@ -1166,6 +1165,15 @@ long int cmSystemTools::ModifiedTime(const char* filename)
}
+void cmSystemTools::ReportLastSystemError(const char* msg)
+{
+ int e = errno;
+ std::string m = msg;
+ m += ": System Error: ";
+ m += strerror(e);
+ cmSystemTools::Error(m.c_str());
+}
+
bool cmSystemTools::RemoveFile(const char* source)
{