Opened 7 years ago

Closed 7 years ago

#4341 closed Bugs (fixed)

get_thread_info error

Reported by: tonestone57@… Owned by: Anthony Williams
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:

Attachments (0)

Change History (4)

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 Clow

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

Resolution: fixed
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Anthony Williams.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.