# | 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 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |