ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostStatus/HostStatus.hpp
(Generate patch)

Comparing HostStatus/HostStatus.hpp (file contents):
Revision 32 by Douglas Thrift, 2003-11-14T23:44:08-08:00 vs.
Revision 33 by Douglas Thrift, 2003-11-15T00:38:48-08:00

# Line 28 | Line 28 | inline string sgetenv(const string& name
28          return value != NULL ? value : "";
29   }
30  
31 < inline int sputenv(const string& name) { return putenv(name.c_str()); }
31 > inline int sputenv(const string& name)
32 > {
33 >        char* value = new char[name.size() + 1];
34 >
35 >        sprintf(value, name.c_str());
36 >        
37 >        int code = putenv(value);
38 >
39 >        return code;
40 > }
41 >
42   inline void sunsetenv(const string& name) { unsetenv(name.c_str()); }
43  
44   class HostStatus

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines