summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SystemTools.hxx.in
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-09-29 16:20:52 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-09-29 16:20:52 (GMT)
commit3fc7dc5e70cd444731dd3adcc4599f9750e4936c (patch)
tree99f891a85d30981fa83a68c09ab33922356ec2fc /Source/kwsys/SystemTools.hxx.in
parentcf8d34040e66e2ffb13b4f6598024b38e298633d (diff)
downloadCMake-3fc7dc5e70cd444731dd3adcc4599f9750e4936c.zip
CMake-3fc7dc5e70cd444731dd3adcc4599f9750e4936c.tar.gz
CMake-3fc7dc5e70cd444731dd3adcc4599f9750e4936c.tar.bz2
ENH: Move permissions code to kwsys so that copyfile can use it. Fixes Bug #1133 - cmake -E copy file dir sets the wrong permissions on the destination directory
Diffstat (limited to 'Source/kwsys/SystemTools.hxx.in')
-rw-r--r--Source/kwsys/SystemTools.hxx.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index 02caf2a..2c253dc 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -20,6 +20,8 @@
#include <@KWSYS_NAMESPACE@/Configure.h>
+#include <sys/types.h>
+
/* Define these macros temporarily to keep the code readable. */
#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsys_stl @KWSYS_NAMESPACE@_stl
@@ -284,6 +286,12 @@ public:
*/
static int GetTerminalWidth();
+ /**
+ * Get and set permissions of the file.
+ */
+ static bool GetPermissions(const char* file, mode_t& mode);
+ static bool SetPermissions(const char* file, mode_t mode);
+
protected:
// these two functions can be called from ConvertToOutputPath
/**
@@ -299,6 +307,7 @@ protected:
* if there are spaces in the string it is double quoted.
*/
static kwsys_stl::string ConvertToWindowsOutputPath(const char*);
+
};
} // namespace @KWSYS_NAMESPACE@