Ticket #4341 (closed Bugs: fixed)

Opened 7 years ago

Last modified 7 years ago

get_thread_info error

Reported by: tonestone57@… Owned by: anthonyw
Milestone: Boost 1.44.0 Component: threads
Version: Boost 1.38.0 Severity: Problem
Keywords: get_thread_info Cc:


Compiling on Haiku with gcc 4.3.3 gives two errors with code below:

From file:

detail::thread_data_ptr get_thread_info() const;

1) include/boost/thread/detail/thread.hpp:120: error: expected ';' before 'const'

2) include/boost/thread/detail/thread.hpp:120:49: error: macro "get_thread_info" requires 2 arguments, but only 1 given

Haiku defines get_thread_info like this:


Change History

comment:1 Changed 7 years ago by tonestone57@…

That should say, compiling a program, requiring libboost_thread, on Haiku results in that error. Compiling boost thread library (libboost_thread) works.

comment:2 Changed 7 years ago by marshall

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)

Needless to say, these two don't play well together.

comment:3 Changed 7 years ago by tonestone57@…

Ok, thanks Marshall. I understand now what is going on.

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. ;-)

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,

comment:4 Changed 7 years ago by steven_watanabe

  • Status changed from new to closed
  • Resolution set to fixed

I added some macro protection in [63295].

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.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.