openbsd-ports/devel/cmake/patches/patch-Source_cmDocumentation_cxx
espie 58e493f790 update to cmake 2.4.5, quite a few patches vanish since cmake can now
build stuff with system libraries, so we no longer have to repair
curl/zlib... just xmlrpc which cmake can't find without help.
2006-12-18 16:04:31 +00:00

19 lines
941 B
Plaintext

$OpenBSD: patch-Source_cmDocumentation_cxx,v 1.2 2006/12/18 16:04:31 espie Exp $
--- Source/cmDocumentation.cxx.orig Mon Dec 4 17:03:55 2006
+++ Source/cmDocumentation.cxx Sun Dec 17 11:07:03 2006
@@ -336,11 +336,11 @@ bool cmDocumentation::CreateSingleModule
{
return false;
}
- char* pname = strcpy(new char[strlen(moduleName)+1], moduleName);
- char* ptext = strcpy(new char[text.length()+1], text.c_str());
+ char* pname = cmSystemTools::dupstring(moduleName);
+ char* ptext = cmSystemTools::dupstring(text.c_str());
this->ModuleStrings.push_back(pname);
this->ModuleStrings.push_back(ptext);
- char* pbrief = strcpy(new char[brief.length()+1], brief.c_str());
+ char* pbrief = cmSystemTools::dupstring(brief.c_str());
this->ModuleStrings.push_back(pbrief);
cmDocumentationEntry e = { pname, pbrief, ptext };
this->ModulesSection.push_back(e);