diff options
-rw-r--r-- | Source/cmGeneratedFileStream.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 119067e..345f0ba 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -129,7 +129,9 @@ void cmGeneratedFileStreamBase::Open(std::string const& name) if (!this->TempExt.empty()) { this->TempName += this->TempExt; } else { - this->TempName += "tmp"; + char buf[64]; + sprintf(buf, "tmp%05x", cmSystemTools::RandomSeed() & 0xFFFFF); + this->TempName += buf; } // Make sure the temporary file that will be used is not present. |