summaryrefslogtreecommitdiff
path: root/libs/wave/src/wave_config_constant.cpp
blob: 86a9f829e1b9f9f0b50597ad33af2f3994c1a8ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*=============================================================================
    Boost.Wave: A Standard compliant C++ preprocessor library
    Persistent application configuration
    
    http://www.boost.org/

    Copyright (c) 2001-2011 Hartmut Kaiser. Distributed under the Boost
    Software License, Version 1.0. (See accompanying file
    LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/

#define BOOST_WAVE_SOURCE 1

// disable stupid compiler warnings
#include <boost/config/warning_disable.hpp>

#include <cstring>
#include <boost/preprocessor/stringize.hpp>

#include <boost/wave/wave_config.hpp>
#include <boost/wave/wave_config_constant.hpp>

///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace wave {

    ///////////////////////////////////////////////////////////////////////////
    //  Call this function to test the configuration of the calling application
    //  against the configuration of the linked library.
    BOOST_WAVE_DECL bool 
    test_configuration(unsigned int config, char const* pragma_keyword, 
        char const* string_type_str)
    {
        if (NULL == pragma_keyword || NULL == string_type_str)
            return false;

        using namespace std;;   // some systems have strcmp in namespace std
        if (config != BOOST_WAVE_CONFIG ||
            strcmp(pragma_keyword, BOOST_WAVE_PRAGMA_KEYWORD) ||
            strcmp(string_type_str, BOOST_PP_STRINGIZE((BOOST_WAVE_STRINGTYPE))))
        {
            return false;
        } 
        return true;
    }

///////////////////////////////////////////////////////////////////////////////
}}  // namespace boost::wave