• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Boost.Wave: A Standard compliant C++ preprocessor library
3     Persistent application configuration
4 
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 
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.
28     BOOST_WAVE_DECL bool
test_configuration(unsigned int config,char const * pragma_keyword,char const * string_type_str)29     test_configuration(unsigned int config, char const* pragma_keyword,
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;
41         }
42         return true;
43     }
44 
45 ///////////////////////////////////////////////////////////////////////////////
46 }}  // namespace boost::wave
47 
48