# | Line 38 | Line 38 | inline int sputenv(const string& name) | |
---|---|---|
38 | ||
39 | int code = putenv(value); | |
40 | ||
41 | – | delete [] value; |
42 | – | |
41 | return code; | |
42 | } | |
43 | ||
44 | inline void sunsetenv(const string& name) { unsetenv(name.c_str()); } | |
45 | ||
48 | – | #ifdef __CYGWIN__ |
49 | – | |
50 | – | inline time_t timegm(struct tm* time) |
51 | – | { |
52 | – | string zone = sgetenv("TZ"); |
53 | – | |
54 | – | sputenv("TZ="); |
55 | – | tzset(); |
56 | – | |
57 | – | time_t when = mktime(time); |
58 | – | |
59 | – | sputenv("TZ=" + zone); |
60 | – | tzset(); |
61 | – | |
62 | – | return when; |
63 | – | } |
64 | – | |
65 | – | #endif |
66 | – | |
46 | class HostStatus | |
47 | { | |
48 | private: |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |