Ticket #2309: thread_interrupted.patch

File thread_interrupted.patch, 2.6 KB (added by Scott Bailey <Bailey@…>, 13 years ago)

created vs Boost v 1.42.0 to add visibility to boost::thread's exceptions

  • boost/thread/detail/config.hpp

     
    5353#   else
    5454#       define BOOST_THREAD_DECL
    5555#   endif
     56#elif defined(BOOST_HAS_VISIBILITY)
     57#   define BOOST_THREAD_DECL __attribute__ ((visibility("default")))
    5658#else
    5759#   define BOOST_THREAD_DECL
    5860#endif // BOOST_HAS_DECLSPEC
  • boost/thread/exceptions.hpp

     
    2424namespace boost
    2525{
    2626
    27     class thread_interrupted
     27    class BOOST_THREAD_DECL thread_interrupted
    2828    {};
    2929
    30     class thread_exception:
     30    class BOOST_THREAD_DECL thread_exception:
    3131        public std::exception
    3232    {
    3333    protected:
     
    5555        int m_sys_err;
    5656    };
    5757
    58     class condition_error:
     58    class BOOST_THREAD_DECL condition_error:
    5959        public std::exception
    6060    {
    6161    public:
     
    6666    };
    6767   
    6868
    69     class lock_error:
     69    class BOOST_THREAD_DECL lock_error:
    7070        public thread_exception
    7171    {
    7272    public:
     
    8787        }
    8888    };
    8989
    90     class thread_resource_error:
     90    class BOOST_THREAD_DECL thread_resource_error:
    9191        public thread_exception
    9292    {
    9393    public:
     
    109109   
    110110    };
    111111
    112     class unsupported_thread_option:
     112    class BOOST_THREAD_DECL unsupported_thread_option:
    113113        public thread_exception
    114114    {
    115115    public:
     
    131131   
    132132    };
    133133
    134     class invalid_thread_argument:
     134    class BOOST_THREAD_DECL invalid_thread_argument:
    135135        public thread_exception
    136136    {
    137137    public:
     
    153153   
    154154    };
    155155
    156     class thread_permission_error:
     156    class BOOST_THREAD_DECL thread_permission_error:
    157157        public thread_exception
    158158    {
    159159    public:
  • boost/config/compiler/gcc.hpp

     
    9494#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
    9595#define BOOST_HAS_NRVO
    9696#endif
     97
    9798//
     99// gcc visibility
     100//
     101#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
     102# define BOOST_HAS_VISIBILITY
     103#endif
     104
     105
     106
     107
     108//
    98109// RTTI and typeinfo detection is possible post gcc-4.3:
    99110//
    100111#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403