push_options.hpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. //
  2. // detail/push_options.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // No header guard
  11. #if defined(__COMO__)
  12. // Comeau C++
  13. #elif defined(__DMC__)
  14. // Digital Mars C++
  15. #elif defined(__INTEL_COMPILER) || defined(__ICL) \
  16. || defined(__ICC) || defined(__ECC)
  17. // Intel C++
  18. #elif defined(__GNUC__)
  19. // GNU C++
  20. # if defined(__MINGW32__) || defined(__CYGWIN__)
  21. # pragma pack (push, 8)
  22. # endif
  23. # if defined(__OBJC__)
  24. # if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
  25. # if !defined(ASIO_DISABLE_OBJC_WORKAROUND)
  26. # if !defined(Protocol) && !defined(id)
  27. # define Protocol cpp_Protocol
  28. # define id cpp_id
  29. # define ASIO_OBJC_WORKAROUND
  30. # endif
  31. # endif
  32. # endif
  33. # endif
  34. #elif defined(__KCC)
  35. // Kai C++
  36. #elif defined(__sgi)
  37. // SGI MIPSpro C++
  38. #elif defined(__DECCXX)
  39. // Compaq Tru64 Unix cxx
  40. #elif defined(__ghs)
  41. // Greenhills C++
  42. #elif defined(__BORLANDC__)
  43. // Borland C++
  44. # pragma option push -a8 -b -Ve- -Vx- -w-inl -vi-
  45. # pragma nopushoptwarn
  46. # pragma nopackwarning
  47. # if !defined(__MT__)
  48. # error Multithreaded RTL must be selected.
  49. # endif // !defined(__MT__)
  50. #elif defined(__MWERKS__)
  51. // Metrowerks CodeWarrior
  52. #elif defined(__SUNPRO_CC)
  53. // Sun Workshop Compiler C++
  54. #elif defined(__HP_aCC)
  55. // HP aCC
  56. #elif defined(__MRC__) || defined(__SC__)
  57. // MPW MrCpp or SCpp
  58. #elif defined(__IBMCPP__)
  59. // IBM Visual Age
  60. #elif defined(_MSC_VER)
  61. // Microsoft Visual C++
  62. //
  63. // Must remain the last #elif since some other vendors (Metrowerks, for example)
  64. // also #define _MSC_VER
  65. # pragma warning (disable:4103)
  66. # pragma warning (push)
  67. # pragma warning (disable:4127)
  68. # pragma warning (disable:4244)
  69. # pragma warning (disable:4355)
  70. # pragma warning (disable:4512)
  71. # pragma warning (disable:4675)
  72. # if defined(_M_IX86) && defined(_Wp64)
  73. // The /Wp64 option is broken. If you want to check 64 bit portability, use a
  74. // 64 bit compiler!
  75. # pragma warning (disable:4311)
  76. # pragma warning (disable:4312)
  77. # endif // defined(_M_IX86) && defined(_Wp64)
  78. # pragma pack (push, 8)
  79. // Note that if the /Og optimisation flag is enabled with MSVC6, the compiler
  80. // has a tendency to incorrectly optimise away some calls to member template
  81. // functions, even though those functions contain code that should not be
  82. // optimised away! Therefore we will always disable this optimisation option
  83. // for the MSVC6 compiler.
  84. # if (_MSC_VER < 1300)
  85. # pragma optimize ("g", off)
  86. # endif
  87. # if !defined(_MT)
  88. # error Multithreaded RTL must be selected.
  89. # endif // !defined(_MT)
  90. #endif