View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0003063 | CMake | CMake | public | 2006-03-30 11:49 | 2006-10-04 13:35 | ||||
Reporter | John Biddiscombe | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | low | Severity | feature | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0003063: Need a SetEnv method to complement GetEnv in SystemTools | ||||||||
Description | in .h /** * Write an environment variable */ static bool SetEnv(const char* key, const char *val, bool overwrite); in .cxx bool SystemTools::SetEnv(const char* key, const char *val, bool overwrite) { bool retval; #ifdef _WIN32 char *buffer = new char[strlen(val) + strlen(name)]; sprintf(buffer,"%s=%s",name,val); retval = (putenv(buffer)==0); delete []buffer; #else retval = (setenv(name, val, overwrite)==0); #endif return retval; } | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0003934) John Biddiscombe (reporter) 2006-03-31 02:17 |
Should have been +2 to cater of null and = chars char *buffer = new char[strlen(val) + strlen(name)+2]; |
(0005150) Bill Hoffman (manager) 2006-10-04 13:35 |
cmSystemTools::PutEnv |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |