]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/wave/include/boost/wave/wave_config.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / wave / include / boost / wave / wave_config.hpp
CommitLineData
7c673cae
FG
1/*=============================================================================
2 Boost.Wave: A Standard compliant C++ preprocessor library
3
4 Global application configuration
5
6 http://www.boost.org/
7
8 Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost
9 Software License, Version 1.0. (See accompanying file
10 LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11=============================================================================*/
12
13#if !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)
14#define WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED
15
16#include <boost/config.hpp>
17#include <boost/detail/workaround.hpp>
18#include <boost/version.hpp>
19#include <boost/spirit/include/classic_version.hpp>
20#include <boost/wave/wave_version.hpp>
21
22///////////////////////////////////////////////////////////////////////////////
23// Define the maximal include nesting depth allowed. If this value isn't
24// defined it defaults to 1024
25//
26// To define a new initial include nesting define the following constant
27// before including this file.
28//
29#if !defined(BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH)
30#define BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH 1024
31#endif
32
33///////////////////////////////////////////////////////////////////////////////
34// Decide, whether to support variadics and placemarkers
35//
36// To implement support variadics and placemarkers define the following to
37// something not equal to zero.
38//
39#if !defined(BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS)
40#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1
41#endif
42
43///////////////////////////////////////////////////////////////////////////////
44// Decide, whether to implement a #warning directive as an extension to the
45// C++ Standard (same as #error, but emits a warning, not an error)
46//
47// To disable the implementation of #warning directives, define the following
48// constant as zero before including this file.
49//
50#if !defined(BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE)
51#define BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE 1
52#endif
53
54///////////////////////////////////////////////////////////////////////////////
55// Decide, whether to implement #pragma once
56//
57// To disable the implementation of #pragma once, define the following
58// constant as zero before including this file.
59//
60#if !defined(BOOST_WAVE_SUPPORT_PRAGMA_ONCE)
61#define BOOST_WAVE_SUPPORT_PRAGMA_ONCE 1
62#endif
63
64///////////////////////////////////////////////////////////////////////////////
65// Decide, whether to implement #pragma message("")
66//
67// To disable the implementation of #pragma message(""), define the following
68// constant as zero before including this file.
69//
70#if !defined(BOOST_WAVE_SUPPORT_PRAGMA_MESSAGE)
71#define BOOST_WAVE_SUPPORT_PRAGMA_MESSAGE 1
72#endif
73
74///////////////////////////////////////////////////////////////////////////////
75// Decide, whether to implement #include_next
76// Please note, that this is an extension to the C++ Standard.
77//
78// To disable the implementation of #include_next, define the following
79// constant as zero before including this file.
80//
81#if !defined(BOOST_WAVE_SUPPORT_INCLUDE_NEXT)
82#define BOOST_WAVE_SUPPORT_INCLUDE_NEXT 1
83#endif
84
85///////////////////////////////////////////////////////////////////////////////
86// Decide, whether to support C++11
87//
88// To implement C++11 keywords and preprocessor semantics define the following
89// to something not equal to zero.
90//
91#if !defined(BOOST_WAVE_SUPPORT_CPP0X)
92#define BOOST_WAVE_SUPPORT_CPP0X 1
93#undef BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS
94#define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1
95#endif
96
97///////////////////////////////////////////////////////////////////////////////
98// Undefine the following, to enable some MS specific language extensions:
99// __int8, __int16, __int32, __int64, __based, __declspec, __cdecl,
100// __fastcall, __stdcall, __try, __except, __finally, __leave, __inline,
101// __asm, #region, #endregion
102//
103// Note: By default this is enabled for Windows based systems, otherwise it's
104// disabled.
105#if !defined(BOOST_WAVE_SUPPORT_MS_EXTENSIONS)
106#if defined(BOOST_WINDOWS)
107#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 1
108#else
109#define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 0
110#endif
111#endif
112
113///////////////////////////////////////////////////////////////////////////////
114// Allow the message body of the #error and #warning directives to be
115// preprocessed before the diagnostic is issued.
116//
117// To disable preprocessing of the body of #error and #warning directives,
118// define the following constant as zero before including this file.
119//
120#if !defined(BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY)
121#define BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY 1
122#endif
123
124///////////////////////////////////////////////////////////////////////////////
125// Allow the #pragma directives to be returned to the caller (optionally after
126// preprocessing the body)
127//
128// To disable the library to emit unknown #pragma directives, define the
129// following constant as zero before including this file.
130//
131#if !defined(BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES)
132#define BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES 1
133#endif
134
135///////////////////////////////////////////////////////////////////////////////
136// Allow the body of a #pragma directive to be preprocessed before the
137// directive is returned to the caller.
138//
139// To disable the preprocessing of the body of #pragma directives, define the
140// following constant as zero before including this file.
141//
142#if !defined(BOOST_WAVE_PREPROCESS_PRAGMA_BODY)
143#define BOOST_WAVE_PREPROCESS_PRAGMA_BODY 1
144#endif
145
146///////////////////////////////////////////////////////////////////////////////
147// Allow to define macros with the command line syntax (-DMACRO(x)=definition)
148//
149// To disable the possibility to define macros based on the command line
150// syntax, define the following constant as zero before including this file.
151//
152#if !defined(BOOST_WAVE_ENABLE_COMMANDLINE_MACROS)
153#define BOOST_WAVE_ENABLE_COMMANDLINE_MACROS 1
154#endif
155
156///////////////////////////////////////////////////////////////////////////////
157// Define the pragma keyword to be used by the library to recognize its own
158// pragma's. If nothing else is defined, then 'wave' will be used as the
159// default keyword, i.e. the library recognizes all
160//
161// #pragma wave option [(argument)]
162//
163// and dispatches the handling to the interpret_pragma() preprocessing hook
164// function (see file: preprocessing_hooks.hpp). The arguments part of the
165// pragma is optional.
166// The BOOST_WAVE_PRAGMA_KEYWORD constant needs to be defined to
167// resolve as a string literal value.
168#if !defined(BOOST_WAVE_PRAGMA_KEYWORD)
169#define BOOST_WAVE_PRAGMA_KEYWORD "wave"
170#endif
171
172///////////////////////////////////////////////////////////////////////////////
173// Configure Wave thread support, Boost.Spirit and Boost.Pool are configured
174// based on these settings automatically
175//
176// If BOOST_WAVE_SUPPORT_THREADING is not defined, Wave will use the global
177// Boost build settings (BOOST_HAS_THREADS), if it is defined its value
178// defines, whether threading will be enabled or not (should be set to '0'
179// or '1').
180#if !defined(BOOST_WAVE_SUPPORT_THREADING)
181#if defined(BOOST_HAS_THREADS)
182#define BOOST_WAVE_SUPPORT_THREADING 1
183#else
184#define BOOST_WAVE_SUPPORT_THREADING 0
185#endif
186#endif
187
188#if BOOST_WAVE_SUPPORT_THREADING != 0
189#define BOOST_SPIRIT_THREADSAFE 1
190#define PHOENIX_THREADSAFE 1
191#else
192// disable thread support in Boost.Pool
193#define BOOST_NO_MT 1
194#endif
195
196///////////////////////////////////////////////////////////////////////////////
197// Define the string type to be used to store the token values and the file
198// names inside a file_position template class
199//
200#if !defined(BOOST_WAVE_STRINGTYPE)
201
202// VC7 isn't able to compile the flex_string class, fall back to std::string
203// CW up to 8.3 chokes as well *sigh*
204// Tru64/CXX has linker problems when using flex_string
205#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
206 BOOST_WORKAROUND(__MWERKS__, < 0x3200) || \
207 (defined(__DECCXX) && defined(__alpha)) || \
208 defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
209
210#define BOOST_WAVE_STRINGTYPE std::string
211
212#if !defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
213#define BOOST_WAVE_STRINGTYPE_USE_STDSTRING 1
214#endif
215
216#else
217
218// use the following, if you have a fast std::allocator<char>
219#define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \
220 char, std::char_traits<char>, std::allocator<char>, \
221 boost::wave::util::CowString< \
222 boost::wave::util::AllocatorStringStorage<char> \
223 > \
224 > \
225 /**/
226
227// This include is needed for the flex_string class used in the
228// BOOST_WAVE_STRINGTYPE above.
229#include <boost/wave/util/flex_string.hpp>
230
231#endif // BOOST_WORKAROUND(_MSC_VER, <= 1300) et.al.
232#endif // !defined(BOOST_WAVE_STRINGTYPE)
233
234///////////////////////////////////////////////////////////////////////////////
235// The following definition forces the Spirit tree code to use list's instead
236// of vectors, which may be more efficient on some platforms
237// #define BOOST_SPIRIT_USE_LIST_FOR_TREES
238
239///////////////////////////////////////////////////////////////////////////////
240// The following definition forces the Spirit tree code to use boost pool
241// allocators instead of the std::allocator for the vector/list's.
242// #define BOOST_SPIRIT_USE_BOOST_ALLOCATOR_FOR_TREES
243
244///////////////////////////////////////////////////////////////////////////////
245// Uncomment the following, if you need debug output, the
246// BOOST_SPIRIT_DEBUG_FLAGS_CPP constants below help to fine control the
247// amount of the generated debug output.
248//#define BOOST_SPIRIT_DEBUG
249
250///////////////////////////////////////////////////////////////////////////////
251// Debug flags for the Wave library, possible flags specified below.
252//
253// Note: These flags take effect only if the BOOST_SPIRIT_DEBUG constant
254// above is defined as well.
255#define BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR 0x0001
256#define BOOST_SPIRIT_DEBUG_FLAGS_TIME_CONVERSION 0x0002
257#define BOOST_SPIRIT_DEBUG_FLAGS_CPP_EXPR_GRAMMAR 0x0004
258#define BOOST_SPIRIT_DEBUG_FLAGS_INTLIT_GRAMMAR 0x0008
259#define BOOST_SPIRIT_DEBUG_FLAGS_CHLIT_GRAMMAR 0x0010
260#define BOOST_SPIRIT_DEBUG_FLAGS_DEFINED_GRAMMAR 0x0020
261#define BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR 0x0040
262
263#if !defined(BOOST_SPIRIT_DEBUG_FLAGS_CPP)
264#define BOOST_SPIRIT_DEBUG_FLAGS_CPP 0 // default is no debugging
265#endif
266
267///////////////////////////////////////////////////////////////////////////////
268//
269// For all recognized preprocessor statements the output parse trees
270// formatted as xml are printed. The formatted parse trees are streamed to the
271// std::ostream defined by the WAVE_DUMP_PARSE_TREE_OUT constant.
272//
273// To enable the output of these parse trees, define the following constant
274// as zero something not equal to zero before including this file.
275//
276#if !defined(BOOST_WAVE_DUMP_PARSE_TREE)
277#define BOOST_WAVE_DUMP_PARSE_TREE 0
278#endif
279#if BOOST_WAVE_DUMP_PARSE_TREE != 0 && !defined(BOOST_WAVE_DUMP_PARSE_TREE_OUT)
280#define BOOST_WAVE_DUMP_PARSE_TREE_OUT std::cerr
281#endif
282
283///////////////////////////////////////////////////////////////////////////////
284//
285// For all #if and #elif directives the preprocessed expressions are printed.
286// These expressions are streamed to the std::ostream defined by the
287// BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT constant.
288//
289// To enable the output of the preprocessed expressions, define the following
290// constant as something not equal to zero before including this file.
291//
292#if !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS)
293#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS 0
294#endif
295#if BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS != 0 && \
296 !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT)
297#define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT std::cerr
298#endif
299
300///////////////////////////////////////////////////////////////////////////////
301// Decide, whether to use the separate compilation model for the instantiation
302// of the C++ lexer objects.
303//
304// If this is defined, you should explicitly instantiate the C++ lexer
305// template with the correct parameters in a separate compilation unit of
306// your program (see the file instantiate_re2c_lexer.cpp).
307//
308// To use the lexer inclusion model, define the following constant as
309// something not equal to zero before including this file.
310//
311#if !defined(BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION)
312#define BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION 1
313#endif
314
315///////////////////////////////////////////////////////////////////////////////
316// Decide, whether to use the separate compilation model for the instantiation
317// of the grammar objects.
318//
319// If this is defined, you should explicitly instantiate the grammar
320// templates with the correct parameters in a separate compilation unit of
321// your program (see the files instantiate_cpp_grammar.cpp et.al.).
322//
323// To use the grammar inclusion model, define the following constant as
324// something not equal to zero before including this file.
325//
326#if !defined(BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION)
327#define BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION 1
328#endif
329
330///////////////////////////////////////////////////////////////////////////////
331// Decide whether to use a strict C++ lexer.
332//
333// If this is defined to something != 0, then the C++ lexers recognize the
334// strict C99/C++ basic source character set. If it is not defined or defined
335// to zero, the C++ lexers recognize the '$' character as part of identifiers.
336//
337// The default is to recognize the '$' character as part of identifiers.
338//
339#if !defined(BOOST_WAVE_USE_STRICT_LEXER)
340#define BOOST_WAVE_USE_STRICT_LEXER 0
341#endif
342
343///////////////////////////////////////////////////////////////////////////////
344// Decide, whether the serialization of the wave::context class should be
345// supported
346//
347// If this is defined to something not equal to zero the generated code will
348// expose routines allowing to store and reload the internal state of the
349// wave::context object.
350//
351// To enable the availability of the serialization functionality, define the
352// following constant as something not equal to zero before including this file.
353//
354#if !defined(BOOST_WAVE_SERIALIZATION)
355#define BOOST_WAVE_SERIALIZATION 0
356#endif
357
358///////////////////////////////////////////////////////////////////////////////
359// Decide, whether the import keyword is recognized as such
360//
361// If this is defined to something not equal to zero the Wave will recognize
362// import as a keyword (T_IMPORT token id)
363//
364#if !defined(BOOST_WAVE_SUPPORT_IMPORT_KEYWORD)
365#define BOOST_WAVE_SUPPORT_IMPORT_KEYWORD 0
366#endif
367
368///////////////////////////////////////////////////////////////////////////////
369// Decide, whether to support long long integers in the preprocessor.
370//
371// The C++ standard requires the preprocessor to use one of the following
372// types for integer literals: long or unsigned long depending on an optional
373// suffix ('u', 'l', 'ul', or 'lu')
374//
375// Sometimes it's required to preprocess integer literals bigger than that
376// (i.e. long long or unsigned long long). In this case you need to define the
377// BOOST_WAVE_SUPPORT_LONGLONG_INTEGER_LITERALS to something not equal to zero.
378//
379// This pp constant is effective only, if your target platform supports
380// long long integers (BOOST_HAS_LONG_LONG is defined).
381//
382// Please note, that this setting doesn't relate to the Wave support option
383// support_option_long_long, which enables the recognition of 'll' suffixes
384// only.
385//
386// Defining this pp constant enables the recognition of long long integers
387// even if these do not have the 'll' suffix.
388//
389#if !defined(BOOST_WAVE_SUPPORT_LONGLONG_INTEGER_LITERALS)
390#define BOOST_WAVE_SUPPORT_LONGLONG_INTEGER_LITERALS 0
391#endif
392
393namespace boost { namespace wave
394{
395#if defined(BOOST_HAS_LONG_LONG) && \
396 BOOST_WAVE_SUPPORT_LONGLONG_INTEGER_LITERALS != 0
397 typedef boost::long_long_type int_literal_type;
398 typedef boost::ulong_long_type uint_literal_type;
399#else
400 typedef long int_literal_type;
401 typedef unsigned long uint_literal_type;
402#endif
403}}
404
405///////////////////////////////////////////////////////////////////////////////
406// On some platforms Wave will not be able to properly detect whether wchar_t
407// is representing a signed or unsigned integral data type. Use the
408// configuration constants below to force wchar_t being signed or unsigned, as
409// appropriate.
410//
411// The default is to use std::numeric_limits<wchar_t>::is_signed.
412
413#define BOOST_WAVE_WCHAR_T_AUTOSELECT 1
414#define BOOST_WAVE_WCHAR_T_FORCE_SIGNED 2
415#define BOOST_WAVE_WCHAR_T_FORCE_UNSIGNED 3
416
417#if !defined(BOOST_WAVE_WCHAR_T_SIGNEDNESS)
418#define BOOST_WAVE_WCHAR_T_SIGNEDNESS BOOST_WAVE_WCHAR_T_AUTOSELECT
419#endif
420
421///////////////////////////////////////////////////////////////////////////////
422// Wave needs at least 4 parameters for phoenix actors
423#if !defined(PHOENIX_LIMIT)
424#define PHOENIX_LIMIT 6
425#endif
426#if PHOENIX_LIMIT < 6
427// boost/home/classic/spirit/classic_attribute.hpp sets PHOENIX_LIMIT to 3!
428#error "Boost.Wave: the constant PHOENIX_LIMIT must be at least defined to 6" \
429" to compile the library."
430#endif
431
432///////////////////////////////////////////////////////////////////////////////
433// Set up dll import/export options
434#if (defined(BOOST_WAVE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \
435 !defined(BOOST_WAVE_STATIC_LINK)
436
437#if defined(BOOST_WAVE_SOURCE)
438#define BOOST_WAVE_DECL BOOST_SYMBOL_EXPORT
439#define BOOST_WAVE_BUILD_DLL
440#else
441#define BOOST_WAVE_DECL BOOST_SYMBOL_IMPORT
442#endif
443
444#endif // building a shared library
445
446#ifndef BOOST_WAVE_DECL
447#define BOOST_WAVE_DECL
448#endif
449
450///////////////////////////////////////////////////////////////////////////////
451// Auto library naming
452#if BOOST_VERSION >= 103100
453// auto link features work beginning from Boost V1.31.0
454#if !defined(BOOST_WAVE_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \
455 !defined(BOOST_WAVE_NO_LIB)
456
457#define BOOST_LIB_NAME boost_wave
458
459// tell the auto-link code to select a dll when required:
460#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_WAVE_DYN_LINK)
461#define BOOST_DYN_LINK
462#endif
463
464#include <boost/config/auto_link.hpp>
465
466#endif // auto-linking disabled
467#endif // BOOST_VERSION
468
469///////////////////////////////////////////////////////////////////////////////
470// Compatibility macros
471// (ensure interface compatibility to older Wave versions)
472///////////////////////////////////////////////////////////////////////////////
473
474///////////////////////////////////////////////////////////////////////////////
475// The preprocessing hook signatures changed after the Boost V1.34.0 release
476//
477// To use the preprocessing hook signatures as released with Boost V1.34.0
478// you need to define the BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS
479// constant to something not equal zero.
480//
481// To force using the new interface define this constant to zero.
482//
483#if !defined(BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS)
484#if BOOST_VERSION < 103500 // before Boost V1.35.0
485#define BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS 1
486#else
487#define BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS 0
488#endif
489#endif
490
491#endif // !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)