Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67757 - trunk/boost/chrono/detail
From: vicente.botet_at_[hidden]
Date: 2011-01-07 13:19:56


Author: viboes
Date: 2011-01-07 13:19:55 EST (Fri, 07 Jan 2011)
New Revision: 67757
URL: http://svn.boost.org/trac/boost/changeset/67757

Log:
Boost.Chrono: Try to solve malloc/free issue on Solaris

 Test output: Sandia-sun - chrono - io_ex2_shared / sun-5.10
Rev 67745 / Fri, 7 Jan 2011 01:15:43 +0000
Report Time: Fri, 7 Jan 2011 16:48:51 +0000

Compile [2011-01-07 02:08:46 UTC]: fail

    "/opt/sunstudio12.1/bin/CC" +d -library=stlport4 -features=tmplife -features=tmplrefstatic -g -erroff=%none -m64 -KPIC -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 "/scratch2/kbelco/boost/results/boost/bin.v2/libs/chrono/test/io_ex2_shared.test/sun-5.10/debug/address-model-64/stdlib-sun-stlport/io_ex2.o" "../libs/chrono/test/../example/io_ex2.cpp"

"../boost/chrono/detail/scan_keyword.hpp", line 88: Error: free is not defined.
"../boost/chrono/chrono_io.hpp", line 269: Where: While instantiating "boost::chrono::chrono_detail::scan_keyword<std::istreambuf_iterator<char, std::char_traits<char>>, const std::string *>(std::istreambuf_iterator<char, std::char_traits<char>>&, std::istreambuf_iterator<char, std::char_traits<char>>, const std::string *, const std::string *, int&)".
"../boost/chrono/chrono_io.hpp", line 269: Where: Instantiated from boost::chrono::operator>><char, std::char_traits<char>, long long, boost::ratio<1, 1>>(std::istream &, boost::chrono::duration<long long, boost::ratio<1, 1>>&).
"../libs/chrono/test/../example/io_ex2.cpp", line 27: Where: Instantiated from non-template code.
"../boost/chrono/detail/scan_keyword.hpp", line 91: Error: The function "malloc" must have a prototype.
"../boost/chrono/chrono_io.hpp", line 269: Where: While instantiating "boost::chrono::chrono_detail::scan_keyword<std::istreambuf_iterator<char, std::char_traits<char>>, const std::string *>(std::istreambuf_iterator<char, std::char_traits<char>>&, std::istreambuf_iterator<char, std::char_traits<char>>, const std::string *, const std::string *, int&)".
"../boost/chrono/chrono_io.hpp", line 269: Where: Instantiated from boost::chrono::operator>><char, std::char_traits<char>, long long, boost::ratio<1, 1>>(std::istream &, boost::chrono::duration<long long, boost::ratio<1, 1>>&).
"../libs/chrono/test/../example/io_ex2.cpp", line 27: Where: Instantiated from non-template code.
2 Error(s) detected.

TinyUrl
Text files modified:
   trunk/boost/chrono/detail/scan_keyword.hpp | 24 ++----------------------
   1 files changed, 2 insertions(+), 22 deletions(-)

Modified: trunk/boost/chrono/detail/scan_keyword.hpp
==============================================================================
--- trunk/boost/chrono/detail/scan_keyword.hpp (original)
+++ trunk/boost/chrono/detail/scan_keyword.hpp 2011-01-07 13:19:55 EST (Fri, 07 Jan 2011)
@@ -19,37 +19,17 @@
 
 #include <boost/chrono/config.hpp>
 
-//#define BOOST_CORONO_IO_USES_LEX
-
-#ifdef BOOST_CORONO_IO_USES_LEX
-#else
 #include <boost/interprocess/smart_ptr/unique_ptr.hpp>
 #include <ios>
 #include <exception>
+#include <cstdlib>
 
 namespace boost {
     using interprocess::unique_ptr;
-#endif
+
 namespace chrono {
 namespace chrono_detail {
 
-#ifdef BOOST_CORONO_IO_USES_LEX
-
-template <class Lexer>
-struct keywords : lex::lexer<Lexer>
-{
- template <class ForwardIterator>
- keywords(ForwardIterator kb, ForwardIterator ke)
- {
- // define tokens (the keyword to match and the corresponding index
- // and add them to the lexer
- for (int indx=0, ForwardIterator it=kb; it!=ke; ++it, ++i)
- {
- this->self.add(*it, i);
- }
- }
-};
-#endif
 // scan_keyword
 // Scans [b, e) until a match is found in the basic_strings range
 // [kb, ke) or until it can be shown that there is no match in [kb, ke).


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