decl.hpp 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP
  2. #define BOOST_ARCHIVE_DETAIL_DECL_HPP
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. /////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8
  8. // decl.hpp
  9. //
  10. // (c) Copyright Robert Ramey 2004
  11. // Use, modification, and distribution is subject to the Boost Software
  12. // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt)
  14. // See library home page at http://www.boost.org/libs/serialization
  15. //----------------------------------------------------------------------------//
  16. // This header implements separate compilation features as described in
  17. // http://www.boost.org/more/separate_compilation.html
  18. #include <boost/config.hpp>
  19. #include <boost/preprocessor/facilities/empty.hpp>
  20. #if defined(BOOST_HAS_DECLSPEC)
  21. #if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK))
  22. #if defined(BOOST_ARCHIVE_SOURCE)
  23. #if defined(__BORLANDC__)
  24. #define BOOST_ARCHIVE_DECL(T) T __export
  25. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export
  26. #else
  27. #define BOOST_ARCHIVE_DECL(T) __declspec(dllexport) T
  28. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T
  29. #endif
  30. #else
  31. #if defined(__BORLANDC__)
  32. #define BOOST_ARCHIVE_DECL(T) T __import
  33. #else
  34. #define BOOST_ARCHIVE_DECL(T) __declspec(dllimport) T
  35. #endif
  36. #endif
  37. #if defined(BOOST_WARCHIVE_SOURCE)
  38. #if defined(__BORLANDC__)
  39. #define BOOST_WARCHIVE_DECL(T) T __export
  40. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __export
  41. #else
  42. #define BOOST_WARCHIVE_DECL(T) __declspec(dllexport) T
  43. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllexport) T
  44. #endif
  45. #else
  46. #if defined(__BORLANDC__)
  47. #define BOOST_WARCHIVE_DECL(T) T __import
  48. #else
  49. #define BOOST_WARCHIVE_DECL(T) __declspec(dllimport) T
  50. #endif
  51. #endif
  52. #if !defined(BOOST_WARCHIVE_SOURCE) && !defined(BOOST_ARCHIVE_SOURCE)
  53. #if defined(__BORLANDC__)
  54. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T __import
  55. #else
  56. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) __declspec(dllimport) T
  57. #endif
  58. #endif
  59. #endif
  60. #endif // BOOST_HAS_DECLSPEC
  61. #if ! defined(BOOST_ARCHIVE_DECL)
  62. #define BOOST_ARCHIVE_DECL(T) T
  63. #endif
  64. #if ! defined(BOOST_WARCHIVE_DECL)
  65. #define BOOST_WARCHIVE_DECL(T) T
  66. #endif
  67. #if ! defined(BOOST_ARCHIVE_OR_WARCHIVE_DECL)
  68. #define BOOST_ARCHIVE_OR_WARCHIVE_DECL(T) T
  69. #endif
  70. #endif // BOOST_ARCHIVE_DETAIL_DECL_HPP