Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / asio / detail / push_options.hpp
1 //
2 // detail/push_options.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2017 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
11 // No header guard
12
13 #if defined(__COMO__)
14
15 // Comeau C++
16
17 #elif defined(__DMC__)
18
19 // Digital Mars C++
20
21 #elif defined(__INTEL_COMPILER) || defined(__ICL) \
22   || defined(__ICC) || defined(__ECC)
23
24 // Intel C++
25
26 # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
27 #  pragma GCC visibility push (default)
28 # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
29
30 #elif defined(__clang__)
31
32 // Clang
33
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
39 #     define id cpp_id
40 #     define BOOST_ASIO_OBJC_WORKAROUND
41 #    endif
42 #   endif
43 #  endif
44 # endif
45
46 # if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
47 #  pragma GCC visibility push (default)
48 # endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
49
50 #elif defined(__GNUC__)
51
52 // GNU C++
53
54 # if defined(__MINGW32__) || defined(__CYGWIN__)
55 #  pragma pack (push, 8)
56 # endif
57
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
63 #     define id cpp_id
64 #     define BOOST_ASIO_OBJC_WORKAROUND
65 #    endif
66 #   endif
67 #  endif
68 # endif
69
70 # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
71 #  pragma GCC visibility push (default)
72 # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
73
74 #elif defined(__KCC)
75
76 // Kai C++
77
78 #elif defined(__sgi)
79
80 // SGI MIPSpro C++
81
82 #elif defined(__DECCXX)
83
84 // Compaq Tru64 Unix cxx
85
86 #elif defined(__ghs)
87
88 // Greenhills C++
89
90 #elif defined(__BORLANDC__)
91
92 // Borland C++
93
94 # pragma option push -a8 -b -Ve- -Vx- -w-inl -vi-
95 # pragma nopushoptwarn
96 # pragma nopackwarning
97 # if !defined(__MT__)
98 #  error Multithreaded RTL must be selected.
99 # endif // !defined(__MT__)
100
101 #elif defined(__MWERKS__)
102
103 // Metrowerks CodeWarrior
104
105 #elif defined(__SUNPRO_CC)
106
107 // Sun Workshop Compiler C++
108
109 #elif defined(__HP_aCC)
110
111 // HP aCC
112
113 #elif defined(__MRC__) || defined(__SC__)
114
115 // MPW MrCpp or SCpp
116
117 #elif defined(__IBMCPP__)
118
119 // IBM Visual Age
120
121 #elif defined(_MSC_VER)
122
123 // Microsoft Visual C++
124 //
125 // Must remain the last #elif since some other vendors (Metrowerks, for example)
126 // also #define _MSC_VER
127
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
140 // 64 bit compiler!
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)
152 # endif
153 # if !defined(_MT)
154 #  error Multithreaded RTL must be selected.
155 # endif // !defined(_MT)
156
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
162 #   endif
163 #  endif
164 # endif
165
166 #endif