Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67852 - trunk/libs/chrono/example
From: vicente.botet_at_[hidden]
Date: 2011-01-09 02:47:42


Author: viboes
Date: 2011-01-09 02:47:41 EST (Sun, 09 Jan 2011)
New Revision: 67852
URL: http://svn.boost.org/trac/boost/changeset/67852

Log:
Boost.Chrono: Try to solve Darwin issue

 Test output: Sandia-darwin-4.0.1 - chrono - runtime_resolution_shared / darwin-4.0.1
Rev 67828 / Sun, 9 Jan 2011 01:50:24 +0000
Report Time: Sun, 9 Jan 2011 04:02:34 +0000

Compile [2011-01-09 02:37:56 UTC]: fail

    "/usr/bin/g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -g -dynamic -no-cpp-precomp -gdwarf-2 -Wno-long-double -fPIC -Wextra -Wno-long-long -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_CHRONO_USES_MPL_ASSERT -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_USE_WINDOWS_H -I".." -c -o "/Volumes/Scratch/kbelco/boost/results/boost/bin.v2/libs/chrono/test/runtime_resolution_shared.test/darwin-4.0.1/debug/runtime_resolution.o" "../libs/chrono/test/../example/runtime_resolution.cpp"

../libs/chrono/test/../example/runtime_resolution.cpp: In function 'double runtime_resolution::init_duration()':
../libs/chrono/test/../example/runtime_resolution.cpp:131: error: 'mach_timebase_info_data_t' was not declared in this scope
../libs/chrono/test/../example/runtime_resolution.cpp:131: error: expected `;' before 'MachInfo'
../libs/chrono/test/../example/runtime_resolution.cpp:132: error: 'MachInfo' was not declared in this scope
../libs/chrono/test/../example/runtime_resolution.cpp:132: error: 'mach_timebase_info' was not declared in this scope
../libs/chrono/test/../example/runtime_resolution.cpp: In static member function 'static runtime_resolution::time_point runtime_resolution::clock::now()':
../libs/chrono/test/../example/runtime_resolution.cpp:190: error: 'gettimeofday' was not declared in this scope

TinyUrl
Text files modified:
   trunk/libs/chrono/example/runtime_resolution.cpp | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: trunk/libs/chrono/example/runtime_resolution.cpp
==============================================================================
--- trunk/libs/chrono/example/runtime_resolution.cpp (original)
+++ trunk/libs/chrono/example/runtime_resolution.cpp 2011-01-09 02:47:41 EST (Sun, 09 Jan 2011)
@@ -32,6 +32,11 @@
 
 #include <iostream>
 
+#if defined(BOOST_CHRONO_MAC_API)
+#include <sys/time.h> //for gettimeofday and timeval
+#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
+#endif
+
 #if defined(BOOST_CHRONO_WINDOWS_API)
 #include <windows.h>
 


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