diff -r -u boost_1_38_0/boost/date_time/c_time.hpp boost_1_38_vxworks/boost/date_time/c_time.hpp --- boost_1_38_0/boost/date_time/c_time.hpp 2008-11-12 13:37:54.000000000 -0500 +++ boost_1_38_vxworks/boost/date_time/c_time.hpp 2009-04-18 13:55:23.805375000 -0400 @@ -55,7 +55,10 @@ static std::tm* localtime(const std::time_t* t, std::tm* result) { // localtime_r() not in namespace std??? - result = localtime_r(t, result); +#if !defined(BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS_NO_RETVAL) + result = +#endif + localtime_r(t, result); if (!result) boost::throw_exception(std::runtime_error("could not convert calendar time to local time")); return result; @@ -65,7 +68,10 @@ static std::tm* gmtime(const std::time_t* t, std::tm* result) { // gmtime_r() not in namespace std??? - result = gmtime_r(t, result); +#if !defined(BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS_NO_RETVAL) + result = +#endif + gmtime_r(t, result); if (!result) boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time")); return result; diff -r -u boost_1_38_0/boost/date_time/compiler_config.hpp boost_1_38_vxworks/boost/date_time/compiler_config.hpp --- boost_1_38_0/boost/date_time/compiler_config.hpp 2008-11-12 13:37:54.000000000 -0500 +++ boost_1_38_vxworks/boost/date_time/compiler_config.hpp 2009-04-18 13:56:11.180375000 -0400 @@ -32,7 +32,7 @@ //Set up a configuration parameter for platforms that have //GetTimeOfDay -#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME) +#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME) || defined(BOOST_HAS_CLOCK_GETTIME) #define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK #endif @@ -164,6 +164,10 @@ //no reentrant posix functions (eg: localtime_r) # elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT))) # define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS +# if defined(__VXWORKS__) + // vxworks has strange versions of localtime_r and gmtime_r +# define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS_NO_RETVAL +# endif # endif #endif diff -r -u boost_1_38_0/boost/date_time/microsec_time_clock.hpp boost_1_38_vxworks/boost/date_time/microsec_time_clock.hpp --- boost_1_38_0/boost/date_time/microsec_time_clock.hpp 2008-11-23 05:13:36.000000000 -0500 +++ boost_1_38_vxworks/boost/date_time/microsec_time_clock.hpp 2009-04-18 13:31:08.742875000 -0400 @@ -84,6 +84,11 @@ gettimeofday(&tv, 0); //gettimeofday does not support TZ adjust on Linux. std::time_t t = tv.tv_sec; boost::uint32_t sub_sec = tv.tv_usec; +#elif defined(BOOST_HAS_CLOCK_GETTIME) + timespec ts; + clock_gettime(CLOCK_REALTIME, &ts); + std::time_t t = ts.tv_sec; + boost::uint32_t sub_sec = ts.tv_nsec/1000; #elif defined(BOOST_HAS_FTIME) winapi::file_time ft; winapi::get_system_time_as_file_time(ft);