]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Boost.Wave: A Standard compliant C++ preprocessor library | |
3 | Persistent application configuration | |
b32b8144 | 4 | |
7c673cae FG |
5 | http://www.boost.org/ |
6 | ||
7 | Copyright (c) 2001-2012 Hartmut Kaiser. Distributed under the Boost | |
8 | Software License, Version 1.0. (See accompanying file | |
9 | LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
10 | =============================================================================*/ | |
11 | ||
12 | #define BOOST_WAVE_SOURCE 1 | |
13 | ||
14 | // disable stupid compiler warnings | |
15 | #include <boost/config/warning_disable.hpp> | |
16 | ||
7c673cae FG |
17 | #include <boost/preprocessor/stringize.hpp> |
18 | ||
19 | #include <boost/wave/wave_config.hpp> | |
20 | #include <boost/wave/wave_config_constant.hpp> | |
21 | ||
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | namespace boost { namespace wave { | |
24 | ||
25 | /////////////////////////////////////////////////////////////////////////// | |
26 | // Call this function to test the configuration of the calling application | |
27 | // against the configuration of the linked library. | |
b32b8144 FG |
28 | BOOST_WAVE_DECL bool |
29 | test_configuration(unsigned int config, char const* pragma_keyword, | |
7c673cae FG |
30 | char const* string_type_str) |
31 | { | |
32 | if (NULL == pragma_keyword || NULL == string_type_str) | |
33 | return false; | |
34 | ||
35 | using namespace std;; // some systems have strcmp in namespace std | |
36 | if (config != BOOST_WAVE_CONFIG || | |
37 | strcmp(pragma_keyword, BOOST_WAVE_PRAGMA_KEYWORD) || | |
38 | strcmp(string_type_str, BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE)))) | |
39 | { | |
40 | return false; | |
b32b8144 | 41 | } |
7c673cae FG |
42 | return true; |
43 | } | |
44 | ||
45 | /////////////////////////////////////////////////////////////////////////////// | |
46 | }} // namespace boost::wave | |
47 |