diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-11-26 16:32:20 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-11-26 16:32:20 (GMT) |
commit | 7850f7b3194ec51b0295a3d4a3cadb3778785263 (patch) | |
tree | 5a275819e106a7407a8d95d76f9c9673b223c777 /Source | |
parent | 03e7f324f0a4e0e6cd249039b7bec4db1497ea60 (diff) | |
download | CMake-7850f7b3194ec51b0295a3d4a3cadb3778785263.zip CMake-7850f7b3194ec51b0295a3d4a3cadb3778785263.tar.gz CMake-7850f7b3194ec51b0295a3d4a3cadb3778785263.tar.bz2 |
removed warning messages
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 15 | ||||
-rw-r--r-- | Source/cmSystemTools.h | 3 |
2 files changed, 2 insertions, 16 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 6e6abfe..80a9454 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -930,7 +930,8 @@ bool cmSystemTools::RunCommand(const char* command, std::string commandToFile = command; commandToFile += " > "; std::string tempFile; - tempFile += cmSystemTools::TemporaryFileName(); + tempFile += _tempnam(0, "cmake"); + commandToFile += tempFile; retVal = system(commandToFile.c_str()); std::ifstream fin(tempFile.c_str()); @@ -982,18 +983,6 @@ bool cmSystemTools::RunCommand(const char* command, #endif } -#ifdef _MSC_VER -#define tempnam _tempnam -#endif - -std::string cmSystemTools::TemporaryFileName() -{ - /** \warning in Unix is recomended to use mkstemp( char * ) - instead of tempnam in order to avoid the security - risk of setting rights with 0666 */ - return tempnam(0, "cmake"); -} - /** * Find the file the given name. Searches the given path and then * the system search path. Returns the full path to the file if it is diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index be952fc..9e7fc35 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -282,9 +282,6 @@ public: static bool RunCommand(const char* command, std::string& output, int &retVal, bool verbose = true); - ///! Generate a temporary file name - static std::string TemporaryFileName(); - ///! change directory the the directory specified static int ChangeDirectory(const char* dir); |