Index: boost/thread/detail/config.hpp =================================================================== --- boost/thread/detail/config.hpp (revision 59433) +++ boost/thread/detail/config.hpp (working copy) @@ -53,6 +53,8 @@ # else # define BOOST_THREAD_DECL # endif +#elif defined(BOOST_HAS_VISIBILITY) +# define BOOST_THREAD_DECL __attribute__ ((visibility("default"))) #else # define BOOST_THREAD_DECL #endif // BOOST_HAS_DECLSPEC Index: boost/thread/exceptions.hpp =================================================================== --- boost/thread/exceptions.hpp (revision 59433) +++ boost/thread/exceptions.hpp (working copy) @@ -24,10 +24,10 @@ namespace boost { - class thread_interrupted + class BOOST_THREAD_DECL thread_interrupted {}; - class thread_exception: + class BOOST_THREAD_DECL thread_exception: public std::exception { protected: @@ -55,7 +55,7 @@ int m_sys_err; }; - class condition_error: + class BOOST_THREAD_DECL condition_error: public std::exception { public: @@ -66,7 +66,7 @@ }; - class lock_error: + class BOOST_THREAD_DECL lock_error: public thread_exception { public: @@ -87,7 +87,7 @@ } }; - class thread_resource_error: + class BOOST_THREAD_DECL thread_resource_error: public thread_exception { public: @@ -109,7 +109,7 @@ }; - class unsupported_thread_option: + class BOOST_THREAD_DECL unsupported_thread_option: public thread_exception { public: @@ -131,7 +131,7 @@ }; - class invalid_thread_argument: + class BOOST_THREAD_DECL invalid_thread_argument: public thread_exception { public: @@ -153,7 +153,7 @@ }; - class thread_permission_error: + class BOOST_THREAD_DECL thread_permission_error: public thread_exception { public: Index: boost/config/compiler/gcc.hpp =================================================================== --- boost/config/compiler/gcc.hpp (revision 59433) +++ boost/config/compiler/gcc.hpp (working copy) @@ -94,7 +94,18 @@ #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) #define BOOST_HAS_NRVO #endif + // +// gcc visibility +// +#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) +# define BOOST_HAS_VISIBILITY +#endif + + + + +// // RTTI and typeinfo detection is possible post gcc-4.3: // #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403