Ticket #6688: export_symbols.diff

File export_symbols.diff, 1.2 KB (added by arvid@…, 11 years ago)

patch to support exporting symbols in compilers other than msvc

  • detail/config.hpp

     
    2828#if defined(BOOST_ASIO_HEADER_ONLY)
    2929# define BOOST_ASIO_DECL inline
    3030#else // defined(BOOST_ASIO_HEADER_ONLY)
    31 # if defined(BOOST_HAS_DECLSPEC)
    3231// We need to import/export our code only if the user has specifically asked
    3332// for it by defining BOOST_ASIO_DYN_LINK.
    34 #  if defined(BOOST_ASIO_DYN_LINK)
     33# if defined(BOOST_ASIO_DYN_LINK)
    3534// Export if this is our own source, otherwise import.
    36 #   if defined(BOOST_ASIO_SOURCE)
    37 #    define BOOST_ASIO_DECL __declspec(dllexport)
    38 #   else // defined(BOOST_ASIO_SOURCE)
    39 #    define BOOST_ASIO_DECL __declspec(dllimport)
    40 #   endif // defined(BOOST_ASIO_SOURCE)
    41 #  endif // defined(BOOST_ASIO_DYN_LINK)
    42 # endif // defined(BOOST_HAS_DECLSPEC)
     35#  if defined(BOOST_ASIO_SOURCE)
     36#   define BOOST_ASIO_DECL BOOST_SYMBOL_EXPORT
     37#  else // defined(BOOST_ASIO_SOURCE)
     38#   define BOOST_ASIO_DECL BOOST_SYMBOL_IMPORT
     39#  endif // defined(BOOST_ASIO_SOURCE)
     40# endif // defined(BOOST_ASIO_DYN_LINK)
    4341#endif // defined(BOOST_ASIO_HEADER_ONLY)
    4442
    4543// If BOOST_ASIO_DECL isn't defined yet define it now.