1 | // |
2 | // detail/push_options.hpp |
3 | // ~~~~~~~~~~~~~~~~~~~~~~~ |
4 | // |
5 | // Copyright (c) 2003-2024 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 | # if !defined(BOOST_ASIO_DISABLE_VISIBILITY) |
28 | # pragma GCC visibility push (default) |
29 | # endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY) |
30 | # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) |
31 | |
32 | # pragma push_macro ("emit") |
33 | # undef emit |
34 | |
35 | # pragma push_macro ("signal") |
36 | # undef signal |
37 | |
38 | # pragma push_macro ("slot") |
39 | # undef slot |
40 | |
41 | #elif defined(__clang__) |
42 | |
43 | // Clang |
44 | |
45 | # if defined(__OBJC__) |
46 | # if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1) |
47 | # if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND) |
48 | # if !defined(Protocol) && !defined(id) |
49 | # define Protocol cpp_Protocol |
50 | # define id cpp_id |
51 | # define BOOST_ASIO_OBJC_WORKAROUND |
52 | # endif |
53 | # endif |
54 | # endif |
55 | # endif |
56 | |
57 | # if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) |
58 | # if !defined(BOOST_ASIO_DISABLE_VISIBILITY) |
59 | # pragma GCC visibility push (default) |
60 | # endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY) |
61 | # endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) |
62 | |
63 | # pragma GCC diagnostic push |
64 | # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" |
65 | # if (__clang_major__ >= 6) |
66 | # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" |
67 | # endif // (__clang_major__ >= 6) |
68 | |
69 | # pragma push_macro ("emit") |
70 | # undef emit |
71 | |
72 | # pragma push_macro ("signal") |
73 | # undef signal |
74 | |
75 | # pragma push_macro ("slot") |
76 | # undef slot |
77 | |
78 | #elif defined(__GNUC__) |
79 | |
80 | // GNU C++ |
81 | |
82 | # if defined(__MINGW32__) || defined(__CYGWIN__) |
83 | # pragma pack (push, 8) |
84 | # endif |
85 | |
86 | # if defined(__OBJC__) |
87 | # if !defined(__APPLE_CC__) || (__APPLE_CC__ <= 1) |
88 | # if !defined(BOOST_ASIO_DISABLE_OBJC_WORKAROUND) |
89 | # if !defined(Protocol) && !defined(id) |
90 | # define Protocol cpp_Protocol |
91 | # define id cpp_id |
92 | # define BOOST_ASIO_OBJC_WORKAROUND |
93 | # endif |
94 | # endif |
95 | # endif |
96 | # endif |
97 | |
98 | # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) |
99 | # if !defined(BOOST_ASIO_DISABLE_VISIBILITY) |
100 | # pragma GCC visibility push (default) |
101 | # endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY) |
102 | # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) |
103 | |
104 | # pragma GCC diagnostic push |
105 | # pragma GCC diagnostic ignored "-Wnon-virtual-dtor" |
106 | # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4) |
107 | # pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" |
108 | # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4) |
109 | # if (__GNUC__ >= 7) |
110 | # pragma GCC diagnostic ignored "-Wimplicit-fallthrough" |
111 | # endif // (__GNUC__ >= 7) |
112 | |
113 | # pragma push_macro ("emit") |
114 | # undef emit |
115 | |
116 | # pragma push_macro ("signal") |
117 | # undef signal |
118 | |
119 | # pragma push_macro ("slot") |
120 | # undef slot |
121 | |
122 | #elif defined(__KCC) |
123 | |
124 | // Kai C++ |
125 | |
126 | #elif defined(__sgi) |
127 | |
128 | // SGI MIPSpro C++ |
129 | |
130 | #elif defined(__DECCXX) |
131 | |
132 | // Compaq Tru64 Unix cxx |
133 | |
134 | #elif defined(__ghs) |
135 | |
136 | // Greenhills C++ |
137 | |
138 | #elif defined(__BORLANDC__) && !defined(__clang__) |
139 | |
140 | // Borland C++ |
141 | |
142 | # pragma option push -a8 -b -Ve- -Vx- -w-inl -vi- |
143 | # pragma nopushoptwarn |
144 | # pragma nopackwarning |
145 | # if !defined(__MT__) |
146 | # error Multithreaded RTL must be selected. |
147 | # endif // !defined(__MT__) |
148 | |
149 | #elif defined(__MWERKS__) |
150 | |
151 | // Metrowerks CodeWarrior |
152 | |
153 | #elif defined(__SUNPRO_CC) |
154 | |
155 | // Sun Workshop Compiler C++ |
156 | |
157 | #elif defined(__HP_aCC) |
158 | |
159 | // HP aCC |
160 | |
161 | #elif defined(__MRC__) || defined(__SC__) |
162 | |
163 | // MPW MrCpp or SCpp |
164 | |
165 | #elif defined(__IBMCPP__) |
166 | |
167 | // IBM Visual Age |
168 | |
169 | #elif defined(_MSC_VER) |
170 | |
171 | // Microsoft Visual C++ |
172 | // |
173 | // Must remain the last #elif since some other vendors (Metrowerks, for example) |
174 | // also #define _MSC_VER |
175 | # pragma warning (disable:4103) |
176 | # pragma warning (push) |
177 | # pragma warning (disable:4619) // suppress 'there is no warning number XXXX' |
178 | # pragma warning (disable:4127) |
179 | # pragma warning (disable:4180) |
180 | # pragma warning (disable:4244) |
181 | # pragma warning (disable:4265) |
182 | # pragma warning (disable:4355) |
183 | # pragma warning (disable:4510) |
184 | # pragma warning (disable:4512) |
185 | # pragma warning (disable:4610) |
186 | # pragma warning (disable:4675) |
187 | # if (_MSC_VER < 1600) |
188 | // Visual Studio 2008 generates spurious warnings about unused parameters. |
189 | # pragma warning (disable:4100) |
190 | # endif // (_MSC_VER < 1600) |
191 | # if defined(_M_IX86) && defined(_Wp64) |
192 | // The /Wp64 option is broken. If you want to check 64 bit portability, use a |
193 | // 64 bit compiler! |
194 | # pragma warning (disable:4311) |
195 | # pragma warning (disable:4312) |
196 | # endif // defined(_M_IX86) && defined(_Wp64) |
197 | # pragma pack (push, 8) |
198 | // Note that if the /Og optimisation flag is enabled with MSVC6, the compiler |
199 | // has a tendency to incorrectly optimise away some calls to member template |
200 | // functions, even though those functions contain code that should not be |
201 | // optimised away! Therefore we will always disable this optimisation option |
202 | // for the MSVC6 compiler. |
203 | # if (_MSC_VER < 1300) |
204 | # pragma optimize ("g", off) |
205 | # endif |
206 | # if !defined(_MT) |
207 | # error Multithreaded RTL must be selected. |
208 | # endif // !defined(_MT) |
209 | |
210 | # if defined(__cplusplus_cli) || defined(__cplusplus_winrt) |
211 | # if !defined(BOOST_ASIO_DISABLE_CLR_WORKAROUND) |
212 | # if !defined(generic) |
213 | # define generic cpp_generic |
214 | # define BOOST_ASIO_CLR_WORKAROUND |
215 | # endif |
216 | # endif |
217 | # endif |
218 | |
219 | # pragma push_macro ("emit") |
220 | # undef emit |
221 | |
222 | # pragma push_macro ("signal") |
223 | # undef signal |
224 | |
225 | # pragma push_macro ("slot") |
226 | # undef slot |
227 | |
228 | #endif |
229 | |