Modify

Opened 7 years ago

Closed 7 years ago

#4341 closed Bugs (fixed)

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:

Description

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

From file: http://www.boost.org/doc/libs/1_38_0/boost/thread/detail/thread.hpp

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: http://haiku.it.su.se:8180/source/xref/headers/os/kernel/OS.h#348

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

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 set to fixed
  • Status changed from new to closed

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 Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anthonyw.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.