|
Boost : |
Subject: [boost] boost::thread compiler error on SUN CC 5.9
From: Urs Stotz (stotz_at_[hidden])
Date: 2010-02-11 15:52:39
boost::thread give a compile error on SUN CC 5.9:
/opt/SUNWspro/bin/CC +d -library=stlport4 -library=stlport4 -xcode=pic32 -erroff=wvarhidemem,hidevf,hidevfinvb -errtags=yes -features=tmplife -features=tmplrefstatic -g -mt -erroff=%none -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_POSIX -I"." -c -o "bin.v2/libs/thread/build/sun-5.9/debug/stdlib-sun-stlport/threading-multi/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"
"libs/thread/src/pthread/thread.cpp", line 77: Error, badbinaryop: The operation "boost::shared_ptr<boost::detail::tss_cleanup_function> && void*" is illegal.
"libs/thread/src/pthread/thread.cpp", line 588: Error, badbinaryop: The operation "boost::shared_ptr<boost::detail::tss_cleanup_function> || void*" is illegal.
2 Error(s) detected.
make: *** [thread.o] Error 2
with this small patch it will compile:
--- boost_1_42_0.org/libs/thread/src/pthread/thread.cpp 2009-10-19 11:18:13.000000000 +0200
+++ boost_1_42_0/libs/thread/src/pthread/thread.cpp 2010-02-10 13:48:25.037748000 +0100
@@ -74,7 +74,7 @@ namespace boost
{
current=next;
++next;
- if(current->second.func && current->second.value)
+ if(current->second.func && (current->second.value != 0))
{
(*current->second.func)(current->second.value);
}
@@ -585,7 +585,7 @@ namespace boost
{
(*current_node->func)(current_node->value);
}
- if(func || tss_data)
+ if(func || (tss_data != 0) )
{
current_node->func=func;
current_node->value=tss_data;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk