Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70982 - branches/release/boost/date_time
From: marshall_at_[hidden]
Date: 2011-04-04 19:33:53


Author: marshall
Date: 2011-04-04 19:33:53 EDT (Mon, 04 Apr 2011)
New Revision: 70982
URL: http://svn.boost.org/trac/boost/changeset/70982

Log:
Merge date/time fixes to release. Fixes #4475
Properties modified:
   branches/release/boost/date_time/c_time.hpp (contents, props changed)
Text files modified:
   branches/release/boost/date_time/c_time.hpp | 16 ++++++++++++++++
   1 files changed, 16 insertions(+), 0 deletions(-)

Modified: branches/release/boost/date_time/c_time.hpp
==============================================================================
--- branches/release/boost/date_time/c_time.hpp (original)
+++ branches/release/boost/date_time/c_time.hpp 2011-04-04 19:33:53 EDT (Mon, 04 Apr 2011)
@@ -57,7 +57,15 @@
       static std::tm* localtime(const std::time_t* t, std::tm* result)
       {
         // localtime_r() not in namespace std???
+ #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+ std::tm tmp;
+ if(!localtime_r(t,&tmp))
+ result = 0;
+ else
+ *result = tmp;
+ #else
         result = localtime_r(t, result);
+ #endif
         if (!result)
           boost::throw_exception(std::runtime_error("could not convert calendar time to local time"));
         return result;
@@ -67,7 +75,15 @@
       static std::tm* gmtime(const std::time_t* t, std::tm* result)
       {
         // gmtime_r() not in namespace std???
+ #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
+ std::tm tmp;
+ if(!gmtime_r(t,&tmp))
+ result = 0;
+ else
+ *result = tmp;
+ #else
         result = gmtime_r(t, result);
+ #endif
         if (!result)
           boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time"));
         return result;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk