Ticket #8959: config.hpp

File config.hpp, 31.6 KB (added by smueller@…, 9 years ago)

Fixed patch to reflect proper _MSC_VER definitions

Line 
1//
2// detail/config.hpp
3// ~~~~~~~~~~~~~~~~~
4//
5// Copyright (c) 2003-2013 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#ifndef BOOST_ASIO_DETAIL_CONFIG_HPP
12#define BOOST_ASIO_DETAIL_CONFIG_HPP
13
14#if defined(BOOST_ASIO_STANDALONE)
15# define BOOST_ASIO_DISABLE_BOOST_ARRAY 1
16# define BOOST_ASIO_DISABLE_BOOST_ASSERT 1
17# define BOOST_ASIO_DISABLE_BOOST_BIND 1
18# define BOOST_ASIO_DISABLE_BOOST_CHRONO 1
19# define BOOST_ASIO_DISABLE_BOOST_DATE_TIME 1
20# define BOOST_ASIO_DISABLE_BOOST_LIMITS 1
21# define BOOST_ASIO_DISABLE_BOOST_REGEX 1
22# define BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT 1
23# define BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION 1
24# define BOOST_ASIO_DISABLE_BOOST_WORKAROUND 1
25#else // defined(BOOST_ASIO_STANDALONE)
26# include <boost/config.hpp>
27# include <boost/version.hpp>
28# define BOOST_ASIO_HAS_BOOST_CONFIG 1
29#endif // defined(BOOST_ASIO_STANDALONE)
30
31// Default to a header-only implementation. The user must specifically request
32// separate compilation by defining either BOOST_ASIO_SEPARATE_COMPILATION or
33// BOOST_ASIO_DYN_LINK (as a DLL/shared library implies separate compilation).
34#if !defined(BOOST_ASIO_HEADER_ONLY)
35# if !defined(BOOST_ASIO_SEPARATE_COMPILATION)
36# if !defined(BOOST_ASIO_DYN_LINK)
37# define BOOST_ASIO_HEADER_ONLY 1
38# endif // !defined(BOOST_ASIO_DYN_LINK)
39# endif // !defined(BOOST_ASIO_SEPARATE_COMPILATION)
40#endif // !defined(BOOST_ASIO_HEADER_ONLY)
41
42#if defined(BOOST_ASIO_HEADER_ONLY)
43# define BOOST_ASIO_DECL inline
44#else // defined(BOOST_ASIO_HEADER_ONLY)
45# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
46// We need to import/export our code only if the user has specifically asked
47// for it by defining BOOST_ASIO_DYN_LINK.
48# if defined(BOOST_ASIO_DYN_LINK)
49// Export if this is our own source, otherwise import.
50# if defined(BOOST_ASIO_SOURCE)
51# define BOOST_ASIO_DECL __declspec(dllexport)
52# else // defined(BOOST_ASIO_SOURCE)
53# define BOOST_ASIO_DECL __declspec(dllimport)
54# endif // defined(BOOST_ASIO_SOURCE)
55# endif // defined(BOOST_ASIO_DYN_LINK)
56# endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
57#endif // defined(BOOST_ASIO_HEADER_ONLY)
58
59// If BOOST_ASIO_DECL isn't defined yet define it now.
60#if !defined(BOOST_ASIO_DECL)
61# define BOOST_ASIO_DECL
62#endif // !defined(BOOST_ASIO_DECL)
63
64// Microsoft Visual C++ detection.
65#if !defined(BOOST_ASIO_MSVC)
66# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
67# define BOOST_ASIO_MSVC BOOST_MSVC
68# elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
69# define BOOST_ASIO_MSVC _MSC_VER
70# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
71#endif // defined(BOOST_ASIO_MSVC)
72
73// Clang / libc++ detection.
74#if defined(__clang__)
75# if (__cplusplus >= 201103)
76# if __has_include(<__config>)
77# include <__config>
78# if defined(_LIBCPP_VERSION)
79# define BOOST_ASIO_HAS_CLANG_LIBCXX 1
80# endif // defined(_LIBCPP_VERSION)
81# endif // __has_include(<__config>)
82# endif // (__cplusplus >= 201103)
83#endif // defined(__clang__)
84
85// Support move construction and assignment on compilers known to allow it.
86#if !defined(BOOST_ASIO_HAS_MOVE)
87# if !defined(BOOST_ASIO_DISABLE_MOVE)
88# if defined(__clang__)
89# if __has_feature(__cxx_rvalue_references__)
90# define BOOST_ASIO_HAS_MOVE 1
91# endif // __has_feature(__cxx_rvalue_references__)
92# endif // defined(__clang__)
93# if defined(__GNUC__)
94# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
95# if defined(__GXX_EXPERIMENTAL_CXX0X__)
96# define BOOST_ASIO_HAS_MOVE 1
97# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
98# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
99# endif // defined(__GNUC__)
100# if defined (BOOST_ASIO_MSVC)
101# if (BOOST_ASIO_MSVC >= 1700)
102# define BOOST_ASIO_HAS_MOVE 1
103# endif // (BOOST_ASIO_MSVC >= 1700)
104# endif // defined (BOOST_ASIO_MSVC)
105# endif // !defined(BOOST_ASIO_DISABLE_MOVE)
106#endif // !defined(BOOST_ASIO_HAS_MOVE)
107
108// If BOOST_ASIO_MOVE_CAST isn't defined, and move support is available, define
109// BOOST_ASIO_MOVE_ARG and BOOST_ASIO_MOVE_CAST to take advantage of rvalue
110// references and perfect forwarding.
111#if defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
112# define BOOST_ASIO_MOVE_ARG(type) type&&
113# define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
114# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
115#endif // defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
116
117// If BOOST_ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible
118// implementation. Note that older g++ and MSVC versions don't like it when you
119// pass a non-member function through a const reference, so for most compilers
120// we'll play it safe and stick with the old approach of passing the handler by
121// value.
122#if !defined(BOOST_ASIO_MOVE_CAST)
123# if defined(__GNUC__)
124# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
125# define BOOST_ASIO_MOVE_ARG(type) const type&
126# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
127# define BOOST_ASIO_MOVE_ARG(type) type
128# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
129# elif defined(BOOST_ASIO_MSVC)
130# if (_MSC_VER >= 1400)
131# define BOOST_ASIO_MOVE_ARG(type) const type&
132# else // (_MSC_VER >= 1400)
133# define BOOST_ASIO_MOVE_ARG(type) type
134# endif // (_MSC_VER >= 1400)
135# else
136# define BOOST_ASIO_MOVE_ARG(type) type
137# endif
138# define BOOST_ASIO_MOVE_CAST(type) static_cast<const type&>
139# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&>
140#endif // !defined(BOOST_ASIO_MOVE_CAST)
141
142// Support variadic templates on compilers known to allow it.
143#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
144# if !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
145# if defined(__clang__)
146# if __has_feature(__cxx_variadic_templates__)
147# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
148# endif // __has_feature(__cxx_variadic_templates__)
149# endif // defined(__clang__)
150# if defined(__GNUC__)
151# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
152# if defined(__GXX_EXPERIMENTAL_CXX0X__)
153# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
154# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
155# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
156# endif // defined(__GNUC__)
157# if defined(BOOST_ASIO_MSVC)
158# if (BOOST_ASIO_MSVC >= 1800)
159# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
160# endif // (BOOST_ASIO_MSVC >= 1800)
161# endif // (BOOST_ASIO_MSVC)
162# endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
163#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
164
165// Standard library support for system errors.
166# if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
167# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
168# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
169# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
170# if defined(__GNUC__)
171# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
172# if defined(__GXX_EXPERIMENTAL_CXX0X__)
173# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
174# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
175# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
176# endif // defined(__GNUC__)
177# endif // !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
178
179// Compliant C++11 compilers put noexcept specifiers on error_category members.
180#if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
181# if (BOOST_VERSION >= 105300)
182# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT
183# elif defined(__clang__)
184# if __has_feature(__cxx_noexcept__)
185# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
186# endif // __has_feature(__cxx_noexcept__)
187# elif defined(__GNUC__)
188# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
189# if defined(__GXX_EXPERIMENTAL_CXX0X__)
190# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
191# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
192# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
193# endif // defined(__GNUC__)
194# if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
195# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
196# endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
197#endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
198
199// Standard library support for arrays.
200#if !defined(BOOST_ASIO_HAS_STD_ARRAY)
201# if !defined(BOOST_ASIO_DISABLE_STD_ARRAY)
202# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
203# define BOOST_ASIO_HAS_STD_ARRAY 1
204# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
205# if defined(__GNUC__)
206# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
207# if defined(__GXX_EXPERIMENTAL_CXX0X__)
208# define BOOST_ASIO_HAS_STD_ARRAY 1
209# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
210# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
211# endif // defined(__GNUC__)
212# if defined(BOOST_ASIO_MSVC)
213# if (_MSC_VER >= 1600)
214# define BOOST_ASIO_HAS_STD_ARRAY 1
215# endif // (_MSC_VER >= 1600)
216# endif // defined(BOOST_ASIO_MSVC)
217# endif // !defined(BOOST_ASIO_DISABLE_STD_ARRAY)
218#endif // !defined(BOOST_ASIO_HAS_STD_ARRAY)
219
220// Standard library support for shared_ptr and weak_ptr.
221#if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
222# if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR)
223# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
224# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
225# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
226# if defined(__GNUC__)
227# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
228# if defined(__GXX_EXPERIMENTAL_CXX0X__)
229# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
230# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
231# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
232# endif // defined(__GNUC__)
233# if defined(BOOST_ASIO_MSVC)
234# if (_MSC_VER >= 1600)
235# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
236# endif // (_MSC_VER >= 1600)
237# endif // defined(BOOST_ASIO_MSVC)
238# endif // !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR)
239#endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
240
241// Standard library support for atomic operations.
242#if !defined(BOOST_ASIO_HAS_STD_ATOMIC)
243# if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC)
244# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
245# define BOOST_ASIO_HAS_STD_ATOMIC 1
246# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
247# if defined(__GNUC__)
248# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
249# if defined(__GXX_EXPERIMENTAL_CXX0X__)
250# define BOOST_ASIO_HAS_STD_ATOMIC 1
251# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
252# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
253# endif // defined(__GNUC__)
254# endif // !defined(BOOST_ASIO_DISABLE_STD_ATOMIC)
255#endif // !defined(BOOST_ASIO_HAS_STD_ATOMIC)
256
257// Standard library support for chrono. Some standard libraries (such as the
258// libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x
259// drafts, rather than the eventually standardised name of steady_clock.
260#if !defined(BOOST_ASIO_HAS_STD_CHRONO)
261# if !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
262# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
263# define BOOST_ASIO_HAS_STD_CHRONO 1
264# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
265# if defined(__GNUC__)
266# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
267# if defined(__GXX_EXPERIMENTAL_CXX0X__)
268# define BOOST_ASIO_HAS_STD_CHRONO 1
269# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
270# define BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
271# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
272# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
273# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
274# endif // defined(__GNUC__)
275# endif // !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
276#endif // !defined(BOOST_ASIO_HAS_STD_CHRONO)
277
278// Boost support for chrono.
279#if !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
280# if !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
281# if (BOOST_VERSION >= 104700)
282# define BOOST_ASIO_HAS_BOOST_CHRONO 1
283# endif // (BOOST_VERSION >= 104700)
284# endif // !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
285#endif // !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
286
287// Boost support for the DateTime library.
288#if !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
289# if !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
290# define BOOST_ASIO_HAS_BOOST_DATE_TIME 1
291# endif // !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
292#endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
293
294// Standard library support for addressof.
295#if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
296# if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF)
297# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
298# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
299# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
300# if defined(__GNUC__)
301# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
302# if defined(__GXX_EXPERIMENTAL_CXX0X__)
303# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
304# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
305# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
306# endif // defined(__GNUC__)
307# endif // !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF)
308#endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
309
310// Standard library support for the function class.
311#if !defined(BOOST_ASIO_HAS_STD_FUNCTION)
312# if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION)
313# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
314# define BOOST_ASIO_HAS_STD_FUNCTION 1
315# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
316# if defined(__GNUC__)
317# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
318# if defined(__GXX_EXPERIMENTAL_CXX0X__)
319# define BOOST_ASIO_HAS_STD_FUNCTION 1
320# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
321# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
322# endif // defined(__GNUC__)
323# endif // !defined(BOOST_ASIO_DISABLE_STD_FUNCTION)
324#endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION)
325
326// Standard library support for type traits.
327#if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
328# if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS)
329# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
330# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
331# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
332# if defined(__GNUC__)
333# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
334# if defined(__GXX_EXPERIMENTAL_CXX0X__)
335# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
336# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
337# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
338# endif // defined(__GNUC__)
339# endif // !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS)
340#endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
341
342// Standard library support for the cstdint header.
343#if !defined(BOOST_ASIO_HAS_CSTDINT)
344# if !defined(BOOST_ASIO_DISABLE_CSTDINT)
345# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
346# define BOOST_ASIO_HAS_CSTDINT 1
347# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
348# if defined(__GNUC__)
349# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
350# if defined(__GXX_EXPERIMENTAL_CXX0X__)
351# define BOOST_ASIO_HAS_CSTDINT 1
352# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
353# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
354# endif // defined(__GNUC__)
355# endif // !defined(BOOST_ASIO_DISABLE_CSTDINT)
356#endif // !defined(BOOST_ASIO_HAS_CSTDINT)
357
358// Windows target.
359#if !defined(BOOST_ASIO_WINDOWS)
360# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
361# define BOOST_ASIO_WINDOWS 1
362# elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
363# define BOOST_ASIO_WINDOWS 1
364# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
365#endif // !defined(BOOST_ASIO_WINDOWS)
366
367// Windows: target OS version.
368#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
369# if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
370# if defined(_MSC_VER) || defined(__BORLANDC__)
371# pragma message( \
372 "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\
373 "- add -D_WIN32_WINNT=0x0501 to the compiler command line; or\n"\
374 "- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.\n"\
375 "Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).")
376# else // defined(_MSC_VER) || defined(__BORLANDC__)
377# warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
378# warning For example, add -D_WIN32_WINNT=0x0501 to the compiler command line.
379# warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
380# endif // defined(_MSC_VER) || defined(__BORLANDC__)
381# define _WIN32_WINNT 0x0501
382# endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
383# if defined(_MSC_VER)
384# if defined(_WIN32) && !defined(WIN32)
385# if !defined(_WINSOCK2API_)
386# define WIN32 // Needed for correct types in winsock2.h
387# else // !defined(_WINSOCK2API_)
388# error Please define the macro WIN32 in your compiler options
389# endif // !defined(_WINSOCK2API_)
390# endif // defined(_WIN32) && !defined(WIN32)
391# endif // defined(_MSC_VER)
392# if defined(__BORLANDC__)
393# if defined(__WIN32__) && !defined(WIN32)
394# if !defined(_WINSOCK2API_)
395# define WIN32 // Needed for correct types in winsock2.h
396# else // !defined(_WINSOCK2API_)
397# error Please define the macro WIN32 in your compiler options
398# endif // !defined(_WINSOCK2API_)
399# endif // defined(__WIN32__) && !defined(WIN32)
400# endif // defined(__BORLANDC__)
401# if defined(__CYGWIN__)
402# if !defined(__USE_W32_SOCKETS)
403# error You must add -D__USE_W32_SOCKETS to your compiler options.
404# endif // !defined(__USE_W32_SOCKETS)
405# endif // defined(__CYGWIN__)
406#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
407
408// Windows: minimise header inclusion.
409#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
410# if !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
411# if !defined(WIN32_LEAN_AND_MEAN)
412# define WIN32_LEAN_AND_MEAN
413# endif // !defined(WIN32_LEAN_AND_MEAN)
414# endif // !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
415#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
416
417// Windows: suppress definition of "min" and "max" macros.
418#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
419# if !defined(BOOST_ASIO_NO_NOMINMAX)
420# if !defined(NOMINMAX)
421# define NOMINMAX 1
422# endif // !defined(NOMINMAX)
423# endif // !defined(BOOST_ASIO_NO_NOMINMAX)
424#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
425
426// Windows: IO Completion Ports.
427#if !defined(BOOST_ASIO_HAS_IOCP)
428# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
429# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
430# if !defined(UNDER_CE)
431# if !defined(BOOST_ASIO_DISABLE_IOCP)
432# define BOOST_ASIO_HAS_IOCP 1
433# endif // !defined(BOOST_ASIO_DISABLE_IOCP)
434# endif // !defined(UNDER_CE)
435# endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
436# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
437#endif // !defined(BOOST_ASIO_HAS_IOCP)
438
439// Linux: epoll, eventfd and timerfd.
440#if defined(__linux__)
441# include <linux/version.h>
442# if !defined(BOOST_ASIO_HAS_EPOLL)
443# if !defined(BOOST_ASIO_DISABLE_EPOLL)
444# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
445# define BOOST_ASIO_HAS_EPOLL 1
446# endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
447# endif // !defined(BOOST_ASIO_DISABLE_EPOLL)
448# endif // !defined(BOOST_ASIO_HAS_EPOLL)
449# if !defined(BOOST_ASIO_HAS_EVENTFD)
450# if !defined(BOOST_ASIO_DISABLE_EVENTFD)
451# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
452# define BOOST_ASIO_HAS_EVENTFD 1
453# endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
454# endif // !defined(BOOST_ASIO_DISABLE_EVENTFD)
455# endif // !defined(BOOST_ASIO_HAS_EVENTFD)
456# if !defined(BOOST_ASIO_HAS_TIMERFD)
457# if defined(BOOST_ASIO_HAS_EPOLL)
458# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
459# define BOOST_ASIO_HAS_TIMERFD 1
460# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
461# endif // defined(BOOST_ASIO_HAS_EPOLL)
462# endif // !defined(BOOST_ASIO_HAS_TIMERFD)
463#endif // defined(__linux__)
464
465// Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue.
466#if (defined(__MACH__) && defined(__APPLE__)) \
467 || defined(__FreeBSD__) \
468 || defined(__NetBSD__) \
469 || defined(__OpenBSD__)
470# if !defined(BOOST_ASIO_HAS_KQUEUE)
471# if !defined(BOOST_ASIO_DISABLE_KQUEUE)
472# define BOOST_ASIO_HAS_KQUEUE 1
473# endif // !defined(BOOST_ASIO_DISABLE_KQUEUE)
474# endif // !defined(BOOST_ASIO_HAS_KQUEUE)
475#endif // (defined(__MACH__) && defined(__APPLE__))
476 // || defined(__FreeBSD__)
477 // || defined(__NetBSD__)
478 // || defined(__OpenBSD__)
479
480// Solaris: /dev/poll.
481#if defined(__sun)
482# if !defined(BOOST_ASIO_HAS_DEV_POLL)
483# if !defined(BOOST_ASIO_DISABLE_DEV_POLL)
484# define BOOST_ASIO_HAS_DEV_POLL 1
485# endif // !defined(BOOST_ASIO_DISABLE_DEV_POLL)
486# endif // !defined(BOOST_ASIO_HAS_DEV_POLL)
487#endif // defined(__sun)
488
489// Serial ports.
490#if !defined(BOOST_ASIO_HAS_SERIAL_PORT)
491# if defined(BOOST_ASIO_HAS_IOCP) \
492 || !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
493# if !defined(__SYMBIAN32__)
494# if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
495# define BOOST_ASIO_HAS_SERIAL_PORT 1
496# endif // !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
497# endif // !defined(__SYMBIAN32__)
498# endif // defined(BOOST_ASIO_HAS_IOCP)
499 // || !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
500#endif // !defined(BOOST_ASIO_HAS_SERIAL_PORT)
501
502// Windows: stream handles.
503#if !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
504# if !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
505# if defined(BOOST_ASIO_HAS_IOCP)
506# define BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE 1
507# endif // defined(BOOST_ASIO_HAS_IOCP)
508# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
509#endif // !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
510
511// Windows: random access handles.
512#if !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
513# if !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
514# if defined(BOOST_ASIO_HAS_IOCP)
515# define BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE 1
516# endif // defined(BOOST_ASIO_HAS_IOCP)
517# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
518#endif // !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
519
520// Windows: object handles.
521#if !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
522# if !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
523# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
524# if !defined(UNDER_CE)
525# define BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE 1
526# endif // !defined(UNDER_CE)
527# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
528# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
529#endif // !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
530
531// Windows: OVERLAPPED wrapper.
532#if !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
533# if !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
534# if defined(BOOST_ASIO_HAS_IOCP)
535# define BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 1
536# endif // defined(BOOST_ASIO_HAS_IOCP)
537# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
538#endif // !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
539
540// POSIX: stream-oriented file descriptors.
541#if !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
542# if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
543# if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
544# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1
545# endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
546# endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
547#endif // !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
548
549// UNIX domain sockets.
550#if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
551# if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
552# if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
553# define BOOST_ASIO_HAS_LOCAL_SOCKETS 1
554# endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
555# endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
556#endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
557
558// Can use sigaction() instead of signal().
559#if !defined(BOOST_ASIO_HAS_SIGACTION)
560# if !defined(BOOST_ASIO_DISABLE_SIGACTION)
561# if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
562# define BOOST_ASIO_HAS_SIGACTION 1
563# endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
564# endif // !defined(BOOST_ASIO_DISABLE_SIGACTION)
565#endif // !defined(BOOST_ASIO_HAS_SIGACTION)
566
567// Can use signal().
568#if !defined(BOOST_ASIO_HAS_SIGNAL)
569# if !defined(BOOST_ASIO_DISABLE_SIGNAL)
570# if !defined(UNDER_CE)
571# define BOOST_ASIO_HAS_SIGNAL 1
572# endif // !defined(UNDER_CE)
573# endif // !defined(BOOST_ASIO_DISABLE_SIGNAL)
574#endif // !defined(BOOST_ASIO_HAS_SIGNAL)
575
576// Whether standard iostreams are disabled.
577#if !defined(BOOST_ASIO_NO_IOSTREAM)
578# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM)
579# define BOOST_ASIO_NO_IOSTREAM 1
580# endif // !defined(BOOST_NO_IOSTREAM)
581#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
582
583// Whether exception handling is disabled.
584#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
585# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_EXCEPTIONS)
586# define BOOST_ASIO_NO_EXCEPTIONS 1
587# endif // !defined(BOOST_NO_EXCEPTIONS)
588#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
589
590// Whether the typeid operator is supported.
591#if !defined(BOOST_ASIO_NO_TYPEID)
592# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID)
593# define BOOST_ASIO_NO_TYPEID 1
594# endif // !defined(BOOST_NO_TYPEID)
595#endif // !defined(BOOST_ASIO_NO_TYPEID)
596
597// On POSIX (and POSIX-like) platforms we need to include unistd.h in order to
598// get access to the various platform feature macros, e.g. to be able to test
599// for threads support.
600#if !defined(BOOST_ASIO_HAS_UNISTD_H)
601# if !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
602# if defined(unix) \
603 || defined(__unix) \
604 || defined(_XOPEN_SOURCE) \
605 || defined(_POSIX_SOURCE) \
606 || (defined(__MACH__) && defined(__APPLE__)) \
607 || defined(__FreeBSD__) \
608 || defined(__NetBSD__) \
609 || defined(__OpenBSD__) \
610 || defined(__linux__)
611# define BOOST_ASIO_HAS_UNISTD_H 1
612# endif
613# endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
614#endif // !defined(BOOST_ASIO_HAS_UNISTD_H)
615#if defined(BOOST_ASIO_HAS_UNISTD_H)
616# include <unistd.h>
617#endif // defined(BOOST_ASIO_HAS_UNISTD_H)
618
619// Threads.
620#if !defined(BOOST_ASIO_HAS_THREADS)
621# if !defined(BOOST_ASIO_DISABLE_THREADS)
622# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
623# define BOOST_ASIO_HAS_THREADS 1
624# elif defined(_MSC_VER) && defined(_MT)
625# define BOOST_ASIO_HAS_THREADS 1
626# elif defined(__BORLANDC__) && defined(__MT__)
627# define BOOST_ASIO_HAS_THREADS 1
628# elif defined(_POSIX_THREADS)
629# define BOOST_ASIO_HAS_THREADS 1
630# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
631# endif // !defined(BOOST_ASIO_DISABLE_THREADS)
632#endif // !defined(BOOST_ASIO_HAS_THREADS)
633
634// POSIX threads.
635#if !defined(BOOST_ASIO_HAS_PTHREADS)
636# if defined(BOOST_ASIO_HAS_THREADS)
637# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
638# define BOOST_ASIO_HAS_PTHREADS 1
639# elif defined(_POSIX_THREADS)
640# define BOOST_ASIO_HAS_PTHREADS 1
641# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
642# endif // defined(BOOST_ASIO_HAS_THREADS)
643#endif // !defined(BOOST_ASIO_HAS_PTHREADS)
644
645// Helper to prevent macro expansion.
646#define BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION
647
648// Helper to define in-class constants.
649#if !defined(BOOST_ASIO_STATIC_CONSTANT)
650# if !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
651# define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
652 BOOST_STATIC_CONSTANT(type, assignment)
653# else // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
654# define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
655 static const type assignment
656# endif // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
657#endif // !defined(BOOST_ASIO_STATIC_CONSTANT)
658
659// Boost array library.
660#if !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
661# if !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
662# define BOOST_ASIO_HAS_BOOST_ARRAY 1
663# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
664#endif // !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
665
666// Boost assert macro.
667#if !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
668# if !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
669# define BOOST_ASIO_HAS_BOOST_ASSERT 1
670# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
671#endif // !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
672
673// Boost limits header.
674#if !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
675# if !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
676# define BOOST_ASIO_HAS_BOOST_LIMITS 1
677# endif // !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
678#endif // !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
679
680// Boost throw_exception function.
681#if !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
682# if !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
683# define BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION 1
684# endif // !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
685#endif // !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
686
687// Boost regex library.
688#if !defined(BOOST_ASIO_HAS_BOOST_REGEX)
689# if !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
690# define BOOST_ASIO_HAS_BOOST_REGEX 1
691# endif // !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
692#endif // !defined(BOOST_ASIO_HAS_BOOST_REGEX)
693
694// Boost bind function.
695#if !defined(BOOST_ASIO_HAS_BOOST_BIND)
696# if !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
697# define BOOST_ASIO_HAS_BOOST_BIND 1
698# endif // !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
699#endif // !defined(BOOST_ASIO_HAS_BOOST_BIND)
700
701// Boost's BOOST_WORKAROUND macro.
702#if !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
703# if !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
704# define BOOST_ASIO_HAS_BOOST_WORKAROUND 1
705# endif // !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
706#endif // !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
707
708// Microsoft Visual C++'s secure C runtime library.
709#if !defined(BOOST_ASIO_HAS_SECURE_RTL)
710# if !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
711# if defined(BOOST_ASIO_MSVC) \
712 && (BOOST_ASIO_MSVC >= 1400) \
713 && !defined(UNDER_CE)
714# define BOOST_ASIO_HAS_SECURE_RTL 1
715# endif // defined(BOOST_ASIO_MSVC)
716 // && (BOOST_ASIO_MSVC >= 1400)
717 // && !defined(UNDER_CE)
718# endif // !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
719#endif // !defined(BOOST_ASIO_HAS_SECURE_RTL)
720
721// Handler hooking. Disabled for ancient Borland C++ and gcc compilers.
722#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
723# if !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
724# if defined(__GNUC__)
725# if (__GNUC__ >= 3)
726# define BOOST_ASIO_HAS_HANDLER_HOOKS 1
727# endif // (__GNUC__ >= 3)
728# elif !defined(__BORLANDC__)
729# define BOOST_ASIO_HAS_HANDLER_HOOKS 1
730# endif // !defined(__BORLANDC__)
731# endif // !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
732#endif // !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
733
734// Support for the __thread keyword extension.
735#if !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
736# if defined(__linux__)
737# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
738# if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
739# if !defined(__INTEL_COMPILER) && !defined(__ICL)
740# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
741# elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
742# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
743# endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
744# endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
745# endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
746# endif // defined(__linux__)
747#endif // !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
748
749// Support for POSIX ssize_t typedef.
750#if !defined(BOOST_ASIO_DISABLE_SSIZE_T)
751# if defined(__linux__) \
752 || (defined(__MACH__) && defined(__APPLE__))
753# define BOOST_ASIO_HAS_SSIZE_T 1
754# endif // defined(__linux__)
755 // || (defined(__MACH__) && defined(__APPLE__))
756#endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T)
757
758#endif // BOOST_ASIO_DETAIL_CONFIG_HPP