2 // detail/push_options.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com)
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)
17 #elif defined(__DMC__)
21 #elif defined(__INTEL_COMPILER) || defined(__ICL) \
22 || defined(__ICC) || defined(__ECC)
26 # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
27 # pragma GCC visibility push (default)
28 # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
30 #elif defined(__clang__)
34 # if defined(__OBJC__)
35 # if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
36 # if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
37 # if !defined(Protocol) && !defined(id)
38 # define Protocol cpp_Protocol
40 # define BOOST_ASIO_OBJC_WORKAROUND
46 # if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
47 # pragma GCC visibility push (default)
48 # endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
50 #elif defined(__GNUC__)
54 # if defined(__MINGW32__) || defined(__CYGWIN__)
55 # pragma pack (push, 8)
58 # if defined(__OBJC__)
59 # if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1)
60 # if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND)
61 # if !defined(Protocol) && !defined(id)
62 # define Protocol cpp_Protocol
64 # define BOOST_ASIO_OBJC_WORKAROUND
70 # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
71 # pragma GCC visibility push (default)
72 # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
82 #elif defined(__DECCXX)
84 // Compaq Tru64 Unix cxx
90 #elif defined(__BORLANDC__)
94 # pragma option push -a8 -b -Ve- -Vx- -w-inl -vi-
95 # pragma nopushoptwarn
96 # pragma nopackwarning
98 # error Multithreaded RTL must be selected.
99 # endif // !defined(__MT__)
101 #elif defined(__MWERKS__)
103 // Metrowerks CodeWarrior
105 #elif defined(__SUNPRO_CC)
107 // Sun Workshop Compiler C++
109 #elif defined(__HP_aCC)
113 #elif defined(__MRC__) || defined(__SC__)
117 #elif defined(__IBMCPP__)
121 #elif defined(_MSC_VER)
123 // Microsoft Visual C++
125 // Must remain the last #elif since some other vendors (Metrowerks, for example)
126 // also #define _MSC_VER
128 # pragma warning (disable:4103)
129 # pragma warning (push)
130 # pragma warning (disable:4127)
131 # pragma warning (disable:4180)
132 # pragma warning (disable:4244)
133 # pragma warning (disable:4355)
134 # pragma warning (disable:4510)
135 # pragma warning (disable:4512)
136 # pragma warning (disable:4610)
137 # pragma warning (disable:4675)
138 # if defined(_M_IX86) && defined(_Wp64)
139 // The /Wp64 option is broken. If you want to check 64 bit portability, use a
141 # pragma warning (disable:4311)
142 # pragma warning (disable:4312)
143 # endif // defined(_M_IX86) && defined(_Wp64)
144 # pragma pack (push, 8)
145 // Note that if the /Og optimisation flag is enabled with MSVC6, the compiler
146 // has a tendency to incorrectly optimise away some calls to member template
147 // functions, even though those functions contain code that should not be
148 // optimised away! Therefore we will always disable this optimisation option
149 // for the MSVC6 compiler.
150 # if (_MSC_VER < 1300)
151 # pragma optimize ("g", off)
154 # error Multithreaded RTL must be selected.
155 # endif // !defined(_MT)
157 # if defined(__cplusplus_cli) || defined(__cplusplus_winrt)
158 # if !defined(BOOST_ASIO_DISABLE_CLR_WORKAROUND)
159 # if !defined(generic)
160 # define generic cpp_generic
161 # define BOOST_ASIO_CLR_WORKAROUND