diff -rupN boost_1_43_0/boost/date_time/c_time.hpp boost_vms_1_43_0/boost/date_time/c_time.hpp
old
|
new
|
namespace date_time {
|
57 | 57 | static std::tm* localtime(const std::time_t* t, std::tm* result) |
58 | 58 | { |
59 | 59 | // localtime_r() not in namespace std??? |
| 60 | #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| 61 | std::tm tmp; |
| 62 | if(!localtime_r(t,&tmp)) |
| 63 | result = 0; |
| 64 | else |
| 65 | *result = tmp; |
| 66 | #else |
60 | 67 | result = localtime_r(t, result); |
| 68 | #endif |
61 | 69 | if (!result) |
62 | 70 | boost::throw_exception(std::runtime_error("could not convert calendar time to local time")); |
63 | 71 | return result; |
… |
… |
namespace date_time {
|
67 | 75 | static std::tm* gmtime(const std::time_t* t, std::tm* result) |
68 | 76 | { |
69 | 77 | // gmtime_r() not in namespace std??? |
| 78 | #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| 79 | std::tm tmp; |
| 80 | if(!gmtime_r(t,&tmp)) |
| 81 | result = 0; |
| 82 | else |
| 83 | *result = tmp; |
| 84 | #else |
70 | 85 | result = gmtime_r(t, result); |
| 86 | #endif |
71 | 87 | if (!result) |
72 | 88 | boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time")); |
73 | 89 | return result; |