Boost C++ Libraries: Ticket #4341: get_thread_info error https://svn.boost.org/trac10/ticket/4341 <p> Compiling on Haiku with gcc 4.3.3 gives two errors with code below: </p> <p> From file: <a href="http://www.boost.org/doc/libs/1_38_0/boost/thread/detail/thread.hpp">http://www.boost.org/doc/libs/1_38_0/boost/thread/detail/thread.hpp</a> </p> <p> detail::thread_data_ptr get_thread_info() const; </p> <p> 1) include/boost/thread/detail/thread.hpp:120: error: expected ';' before 'const' </p> <p> 2) include/boost/thread/detail/thread.hpp:120:49: error: macro "get_thread_info" requires 2 arguments, but only 1 given </p> <p> Haiku defines get_thread_info like this: <a class="ext-link" href="http://haiku.it.su.se:8180/source/xref/headers/os/kernel/OS.h#348"><span class="icon">​</span>http://haiku.it.su.se:8180/source/xref/headers/os/kernel/OS.h#348</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4341 Trac 1.4.3 tonestone57@… Sun, 13 Jun 2010 16:34:07 GMT <link>https://svn.boost.org/trac10/ticket/4341#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4341#comment:1</guid> <description> <p> That should say, compiling a program, requiring libboost_thread, on Haiku results in that error. Compiling boost thread library (libboost_thread) works. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Mon, 14 Jun 2010 00:44:45 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4341#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4341#comment:2</guid> <description> <p> I've looked at the references, and Haiku defines a macro named "get_thread_info". Boost.Thread has a private member function named "get_thread_info" (and yes, it appears in 1.43.0 too) </p> <p> Needless to say, these two don't play well together. </p> </description> <category>Ticket</category> </item> <item> <author>tonestone57@…</author> <pubDate>Mon, 14 Jun 2010 03:00:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4341#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4341#comment:3</guid> <description> <p> Ok, thanks Marshall. I understand now what is going on. </p> <p> I commented out the macro in OS.h and was able to compile the program. It started up but crashed because of Qt error. At least not a boost error anymore. ;-) </p> <p> Hopefully boost guys will rename their get_thread_info to avoid any conflict with Haiku's macro. Maybe add boost or BST in front or behind to make it dfferent? Bye, </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 24 Jun 2010 19:50:09 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4341#comment:4 https://svn.boost.org/trac10/ticket/4341#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I added some macro protection in <a class="changeset" href="https://svn.boost.org/trac10/changeset/63295" title="Protect get_thread_info from macro expansion to prevent errors on ...">[63295]</a>. </p> <p> Marshall, do you think we should modify the inspect tool to have a single list of evil macros to check for? We already have special cases for Microsoft's evilness and Apple's evilness. </p> Ticket