Ticket #2114: boost_symbol_export.patch
File boost_symbol_export.patch, 16.9 KB (added by , 14 years ago) |
---|
-
boost/thread/detail/config.hpp
45 45 # endif 46 46 #endif 47 47 48 #if defined(BOOST_HAS_DECLSPEC) 49 # if defined(BOOST_THREAD_BUILD_DLL) //Build dll 50 # define BOOST_THREAD_DECL __declspec(dllexport) 51 # elif defined(BOOST_THREAD_USE_DLL) //Use dll 52 # define BOOST_THREAD_DECL __declspec(dllimport) 53 # else 54 # define BOOST_THREAD_DECL 55 # endif 48 #if defined(BOOST_THREAD_BUILD_DLL) //Build dll 49 # define BOOST_THREAD_DECL BOOST_SYMBOL_EXPORT 50 #elif defined(BOOST_THREAD_USE_DLL) //Use dll 51 # define BOOST_THREAD_DECL BOOST_SYMBOL_IMPORT 56 52 #else 57 # define BOOST_THREAD_DECL58 #endif // BOOST_HAS_DECLSPEC53 # define BOOST_THREAD_DECL 54 #endif 59 55 60 56 // 61 57 // Automatically link to the correct build variant where possible. -
boost/serialization/config.hpp
27 27 #undef BOOST_SERIALIZATION_DECL 28 28 #endif 29 29 30 #ifdef BOOST_HAS_DECLSPEC // defined in config system31 30 // we need to import/export our code only if the user has specifically 32 31 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost 33 32 // libraries to be dynamically linked, or BOOST_SERIALIZATION_DYN_LINK … … 38 37 #endif 39 38 // export if this is our own source, otherwise import: 40 39 #if defined(BOOST_SERIALIZATION_SOURCE) 41 #if defined(__BORLANDC__) 42 #define BOOST_SERIALIZATION_DECL(T) T __export 43 #else 44 #define BOOST_SERIALIZATION_DECL(T) __declspec(dllexport) T 45 #endif 40 #define BOOST_SERIALIZATION_DECL(T) BOOST_SYMBOL_EXPORT T 46 41 #else 47 #if defined(__BORLANDC__) 48 #define BOOST_SERIALIZATION_DECL(T) T __import 49 #else 50 #define BOOST_SERIALIZATION_DECL(T) __declspec(dllimport) T 51 #endif 42 #define BOOST_SERIALIZATION_DECL(T) BOOST_SYMBOL_IMPORT T 52 43 #endif // defined(BOOST_SERIALIZATION_SOURCE) 53 44 #endif // defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK) 54 #endif // BOOST_HAS_DECLSPEC55 45 56 46 // if BOOST_SERIALIZATION_DECL isn't defined yet define it now: 57 47 #ifndef BOOST_SERIALIZATION_DECL -
boost/math/tr1.hpp
20 20 21 21 #endif // __cplusplus 22 22 23 #ifdef BOOST_HAS_DECLSPEC // defined in config system24 23 // we need to import/export our code only if the user has specifically 25 24 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost 26 25 // libraries to be dynamically linked, or BOOST_MATH_TR1_DYN_LINK … … 28 27 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_MATH_TR1_DYN_LINK) 29 28 // export if this is our own source, otherwise import: 30 29 #ifdef BOOST_MATH_TR1_SOURCE 31 # define BOOST_MATH_TR1_DECL __declspec(dllexport)30 # define BOOST_MATH_TR1_DECL BOOST_SYMBOL_EXPORT 32 31 #else 33 # define BOOST_MATH_TR1_DECL __declspec(dllimport)32 # define BOOST_MATH_TR1_DECL BOOST_SYMBOL_IMPORT 34 33 #endif // BOOST_MATH_TR1_SOURCE 35 34 #endif // DYN_LINK 36 #endif // BOOST_HAS_DECLSPEC37 35 // 38 36 // if BOOST_MATH_TR1_DECL isn't defined yet define it now: 39 37 #ifndef BOOST_MATH_TR1_DECL -
boost/signals/detail/config.hpp
17 17 18 18 #include <boost/config.hpp> 19 19 20 #ifdef BOOST_HAS_DECLSPEC 21 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SIGNALS_DYN_LINK) 22 # ifdef BOOST_SIGNALS_SOURCE 23 # define BOOST_SIGNALS_DECL __declspec(dllexport) 24 # else 25 # define BOOST_SIGNALS_DECL __declspec(dllimport) 26 # endif // BOOST_SIGNALS_SOURCE 27 # endif // DYN_LINK 28 #endif // BOOST_HAS_DECLSPEC 20 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SIGNALS_DYN_LINK) 21 # ifdef BOOST_SIGNALS_SOURCE 22 # define BOOST_SIGNALS_DECL BOOST_SYMBOL_EXPORT 23 # else 24 # define BOOST_SIGNALS_DECL BOOST_SYMBOL_IMPORT 25 # endif // BOOST_SIGNALS_SOURCE 26 #endif // DYN_LINK 29 27 30 28 #ifndef BOOST_SIGNALS_DECL 31 29 # define BOOST_SIGNALS_DECL -
boost/wave/wave_config.hpp
402 402 403 403 /////////////////////////////////////////////////////////////////////////////// 404 404 // Set up dll import/export options 405 #if defined(BOOST_HAS_DECLSPEC) && \ 406 (defined(BOOST_WAVE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ 405 #if (defined(BOOST_WAVE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ 407 406 !defined(BOOST_WAVE_STATIC_LINK) 408 407 409 408 #if defined(BOOST_WAVE_SOURCE) 410 #define BOOST_WAVE_DECL __declspec(dllexport)409 #define BOOST_WAVE_DECL BOOST_SYMBOL_EXPORT 411 410 #define BOOST_WAVE_BUILD_DLL 412 411 #else 413 #define BOOST_WAVE_DECL __declspec(dllimport)412 #define BOOST_WAVE_DECL BOOST_SYMBOL_IMPORT 414 413 #endif 415 414 416 415 #endif // building a shared library -
boost/regex/config.hpp
180 180 * 181 181 ****************************************************************************/ 182 182 183 #if defined (BOOST_HAS_DECLSPEC)&& (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)183 #if defined BOOST_SYMBOL_EXPORT && (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK) 184 184 # if defined(BOOST_REGEX_SOURCE) 185 # define BOOST_REGEX_DECL __declspec(dllexport)185 # define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT 186 186 # define BOOST_REGEX_BUILD_DLL 187 187 # else 188 # define BOOST_REGEX_DECL __declspec(dllimport)188 # define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT 189 189 # endif 190 190 #endif 191 191 -
boost/filesystem/config.hpp
70 70 # error Dynamic linking Boost.Filesystem does not work for Borland; use static linking instead 71 71 # endif 72 72 73 #ifdef BOOST_HAS_DECLSPEC // defined in config system74 73 // we need to import/export our code only if the user has specifically 75 74 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost 76 75 // libraries to be dynamically linked, or BOOST_FILESYSTEM_DYN_LINK … … 78 77 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_FILESYSTEM_DYN_LINK) 79 78 // export if this is our own source, otherwise import: 80 79 #ifdef BOOST_FILESYSTEM_SOURCE 81 # define BOOST_FILESYSTEM_DECL __declspec(dllexport)80 # define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_EXPORT 82 81 #else 83 # define BOOST_FILESYSTEM_DECL __declspec(dllimport)82 # define BOOST_FILESYSTEM_DECL BOOST_SYMBOL_IMPORT 84 83 #endif // BOOST_FILESYSTEM_SOURCE 85 84 #endif // DYN_LINK 86 #endif // BOOST_HAS_DECLSPEC87 85 // 88 86 // if BOOST_FILESYSTEM_DECL isn't defined yet define it now: 89 87 #ifndef BOOST_FILESYSTEM_DECL -
boost/config.hpp
56 56 // get config suffix code: 57 57 #include <boost/config/suffix.hpp> 58 58 59 //shared libraries symbols export/import 60 #include <boost/config/dso.hpp> 61 59 62 #endif // BOOST_CONFIG_HPP 60 63 61 64 -
boost/iostreams/detail/config/dyn_link.hpp
20 20 21 21 //------------------Enable dynamic linking on windows-------------------------// 22 22 23 #ifdef BOOST_HAS_DECLSPEC 24 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK) 25 # ifdef BOOST_IOSTREAMS_SOURCE 26 # define BOOST_IOSTREAMS_DECL __declspec(dllexport) 27 # else 28 # define BOOST_IOSTREAMS_DECL __declspec(dllimport) 29 # endif 23 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK) 24 # ifdef BOOST_IOSTREAMS_SOURCE 25 # define BOOST_IOSTREAMS_DECL BOOST_SYMBOL_EXPORT 26 # else 27 # define BOOST_IOSTREAMS_DECL BOOST_SYMBOL_IMPORT 30 28 # endif 31 #endif 29 #endif 32 30 33 31 #ifndef BOOST_IOSTREAMS_DECL 34 32 # define BOOST_IOSTREAMS_DECL -
boost/python/detail/config.hpp
74 74 # define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1 75 75 # endif 76 76 77 # if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 78 # if defined(BOOST_PYTHON_SOURCE) 79 # define BOOST_PYTHON_DECL __attribute__ ((visibility("default"))) 80 # define BOOST_PYTHON_BUILD_DLL 81 # else 82 # define BOOST_PYTHON_DECL 83 # endif 84 # define BOOST_PYTHON_DECL_FORWARD 85 # define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((visibility("default"))) 86 # elif (defined(_WIN32) || defined(__CYGWIN__)) 87 # if defined(BOOST_PYTHON_SOURCE) 88 # define BOOST_PYTHON_DECL __declspec(dllexport) 89 # define BOOST_PYTHON_BUILD_DLL 90 # else 91 # define BOOST_PYTHON_DECL __declspec(dllimport) 92 # endif 93 # endif 77 # if defined(BOOST_PYTHON_SOURCE) 78 # define BOOST_PYTHON_BUILD_DLL 79 # define BOOST_PYTHON_DECL BOOST_SYMBOL_EXPORT 80 # define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT 81 # define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT 82 # else 83 # define BOOST_PYTHON_DECL BOOST_SYMBOL_IMPORT 84 # define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT 85 # define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT 86 #endif 94 87 95 88 #endif 96 89 -
boost/mpi/config.hpp
80 80 * * 81 81 *****************************************************************************/ 82 82 83 #if defined(BOOST_HAS_DECLSPEC) &&(defined(BOOST_MPI_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_MPI_STATIC_LINK)83 #if (defined(BOOST_MPI_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_MPI_STATIC_LINK) 84 84 # if defined(BOOST_MPI_SOURCE) 85 # define BOOST_MPI_DECL __declspec(dllexport)85 # define BOOST_MPI_DECL BOOST_SYMBOL_EXPORT 86 86 # define BOOST_MPI_BUILD_DLL 87 87 # else 88 # define BOOST_MPI_DECL __declspec(dllimport)88 # define BOOST_MPI_DECL BOOST_SYMBOL_IMPORT 89 89 # endif 90 90 #endif 91 91 -
boost/date_time/compiler_config.hpp
118 118 * 119 119 */ 120 120 121 #ifdef BOOST_HAS_DECLSPEC // defined in config system 122 // we need to import/export our code only if the user has specifically 123 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost 124 // libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK 125 // if they want just this one to be dynamically liked: 126 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK) 127 // export if this is our own source, otherwise import: 128 # ifdef BOOST_DATE_TIME_SOURCE 129 # define BOOST_DATE_TIME_DECL __declspec(dllexport) 130 # else 131 # define BOOST_DATE_TIME_DECL __declspec(dllimport) 132 # endif // BOOST_DATE_TIME_SOURCE 133 # endif // DYN_LINK 134 #endif // BOOST_HAS_DECLSPEC 121 // we need to import/export our code only if the user has specifically 122 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost 123 // libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK 124 // if they want just this one to be dynamically liked: 125 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK) 126 // export if this is our own source, otherwise import: 127 # ifdef BOOST_DATE_TIME_SOURCE 128 # define BOOST_DATE_TIME_DECL BOOST_SYMBOL_EXPORT 129 # else 130 # define BOOST_DATE_TIME_DECL BOOST_SYMBOL_IMPORT 131 # endif // BOOST_DATE_TIME_SOURCE 132 #endif // DYN_LINK 135 133 // 136 134 // if BOOST_WHATEVER_DECL isn't defined yet define it now: 137 135 #ifndef BOOST_DATE_TIME_DECL -
boost/graph/graphviz.hpp
24 24 #include <boost/graph/adjacency_list.hpp> 25 25 #include <boost/dynamic_property_map.hpp> 26 26 27 #ifdef BOOST_HAS_DECLSPEC 28 # if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK) 29 # ifdef BOOST_GRAPH_SOURCE 30 # define BOOST_GRAPH_DECL __declspec(dllexport) 31 # else 32 # define BOOST_GRAPH_DECL __declspec(dllimport) 33 # endif // BOOST_GRAPH_SOURCE 34 # endif // DYN_LINK 35 #endif // BOOST_HAS_DECLSPEC 27 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_GRAPH_DYN_LINK) 28 # ifdef BOOST_GRAPH_SOURCE 29 # define BOOST_GRAPH_DECL BOOST_SYMBOL_EXPORT 30 # else 31 # define BOOST_GRAPH_DECL BOOST_SYMBOL_IMPORT 32 # endif // BOOST_GRAPH_SOURCE 33 #endif // DYN_LINK 36 34 37 35 #ifndef BOOST_GRAPH_DECL 38 36 # define BOOST_GRAPH_DECL -
boost/program_options/config.hpp
33 33 34 34 #endif // BOOST_VERSION 35 35 36 /////////////////////////////////////////////////////////////////////////////// 37 // Windows DLL suport 38 #ifdef BOOST_HAS_DECLSPEC 36 39 37 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROGRAM_OPTIONS_DYN_LINK) 40 38 // export if this is our own source, otherwise import: 41 39 #ifdef BOOST_PROGRAM_OPTIONS_SOURCE 42 # define BOOST_PROGRAM_OPTIONS_DECL __declspec(dllexport)40 # define BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_EXPORT 43 41 #else 44 # define BOOST_PROGRAM_OPTIONS_DECL __declspec(dllimport)42 # define BOOST_PROGRAM_OPTIONS_DECL BOOST_SYMBOL_IMPORT 45 43 #endif // BOOST_PROGRAM_OPTIONS_SOURCE 46 44 #endif // DYN_LINK 47 #endif // BOOST_HAS_DECLSPEC48 45 49 46 #ifndef BOOST_PROGRAM_OPTIONS_DECL 50 47 #define BOOST_PROGRAM_OPTIONS_DECL -
boost/config/dso.hpp
1 #if !defined BOOST_CONFIG_DYNAMIC_SHARED_OBJECT_SYMBOL_EXPORT_IMPORT_HPP 2 #define BOOST_CONFIG_DYNAMIC_SHARED_OBJECT_SYMBOL_EXPORT_IMPORT_HPP 3 4 //note: for gcc -fvisibility=hidden or -fvisibility=ms-compat flags 5 //should be passed to compiler 6 7 #if defined __GNUC__ && __GNUC__ >= 4 8 9 # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) 10 # define BOOST_SYMBOL_HIDE __attribute__((visibility("hidden"))) 11 # define BOOST_SYMBOL_IMPORT 12 # define BOOST_SYMBOL_FORWARD_EXPORT 13 # define BOOST_SYMBOL_FORWARD_IMPORT 14 # define BOOST_EXCEPTION_EXPORT BOOST_SYMBOL_EXPORT 15 # define BOOST_EXCEPTION_IMPORT BOOST_SYMBOL_EXPORT 16 17 #elif defined _MSC_VER || defined __BORLANDC__ 18 19 # define BOOST_SYMBOL_EXPORT __declspec(dllexport) 20 # define BOOST_SYMBOL_HIDE 21 # define BOOST_SYMBOL_IMPORT __declspec(dllimport) 22 # define BOOST_SYMBOL_FORWARD_EXPORT BOOST_SYMBOL_EXPORT 23 # define BOOST_SYMBOL_FORWARD_IMPORT BOOST_SYMBOL_IMPORT 24 # define BOOST_EXCEPTION_EXPORT BOOST_SYMBOL_EXPORT 25 # define BOOST_EXCEPTION_IMPORT BOOST_SYMBOL_IMPORT 26 27 #endif 28 29 30 #if !defined BOOST_SYMBOL_EXPORT 31 # define BOOST_SYMBOL_EXPORT 32 # define BOOST_SYMBOL_HIDE 33 # define BOOST_SYMBOL_IMPORT 34 # define BOOST_SYMBOL_FORWARD_EXPORT 35 # define BOOST_SYMBOL_FORWARD_IMPORT 36 # define BOOST_EXCEPTION_EXPORT 37 # define BOOST_EXCEPTION_IMPORT 38 # define BOOST_SYMBOL_FORWARD_EXPORT 39 # define BOOST_SYMBOL_FORWARD_IMPORT 40 #endif 41 42 43 #endif 44 -
boost/system/config.hpp
31 31 //# error Dynamic linking Boost.System does not work for Borland; use static linking instead 32 32 //# endif 33 33 34 #ifdef BOOST_HAS_DECLSPEC // defined in config system35 34 // we need to import/export our code only if the user has specifically 36 35 // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost 37 36 // libraries to be dynamically linked, or BOOST_SYSTEM_DYN_LINK … … 39 38 #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK) 40 39 // export if this is our own source, otherwise import: 41 40 #ifdef BOOST_SYSTEM_SOURCE 42 # define BOOST_SYSTEM_DECL __declspec(dllexport)41 # define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT 43 42 #else 44 # define BOOST_SYSTEM_DECL __declspec(dllimport)43 # define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT 45 44 #endif // BOOST_SYSTEM_SOURCE 46 45 #endif // DYN_LINK 47 #endif // BOOST_HAS_DECLSPEC48 46 // 49 47 // if BOOST_SYSTEM_DECL isn't defined yet define it now: 50 48 #ifndef BOOST_SYSTEM_DECL