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