diff --git a/ChangeLog b/ChangeLog index 235f7ec..38e9e2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,7 +42,11 @@ CHANGELOG recognized as part of identifiers). - Added the possibility to testwave to extract a tagged comment based on a preprocessor constant (testwave V0.4.0). - +- Made the predefined_macros_grammar thread safe. +- Added dll support for the generated Wave libraries. +- Added the const_iterator based exlicit instantiations for the Re2C lexer to + the built Wave library and dll. + Boost V1.33.1 - Version 1.2.1 - Fixed bug reported as Sourceforge bug 1274584. diff --git a/build/Jamfile b/build/Jamfile index 8bde981..42ab1e7 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -24,37 +24,40 @@ SOURCES = instantiate_cpp_exprgrammar lib boost_wave : ../src/$(SOURCES).cpp : # build requirements - [ common-names ] # magic for install and auto-link features + common-variant-tag # magic for install and auto-link features $(BOOST_ROOT) $(BOOST_ROOT) - <*>off # workaround for compiler bug + <*>off # workaround for compiler bug <*>off cpp_re.cpp : debug release # build variants ; -#dll boost_wave -# : ../src/$(SOURCES).cpp -# : # build requirements -# [ common-names ] # magic for install and auto-link features -# BOOST_WAVE_DYN_LINK=1 # tell source we're building dll's -# dynamic # build only for dynamic runtimes -# $(BOOST_ROOT) -# $(BOOST_ROOT) -# : debug release # build variants -# ; +dll boost_wave + : ../src/$(SOURCES).cpp + : # build requirements + common-variant-tag # magic for install and auto-link features + BOOST_ALL_DYN_LINK=1 # tell source we're building dll's + dynamic # build only for dynamic runtimes + $(BOOST_ROOT) + $(BOOST_ROOT) + <*>off # workaround for compiler bug + <*>off + cpp_re.cpp + : debug release # build variants + ; install wave lib : boost_wave -# boost_wave + boost_wave ; -stage stage/lib : boost_wave # boost_wave +stage stage/lib : boost_wave boost_wave : # copy to a path rooted at BOOST_ROOT: $(BOOST_ROOT) # make sure the names of the libraries are correctly named: - [ common-names ] + common-variant-tag # add this target to the "stage" and "all" pseudo-targets: stage all diff --git a/include/boost/wave/cpp_context.hpp b/include/boost/wave/cpp_context.hpp index f3ce2a8..7ab09c8 100644 --- a/include/boost/wave/cpp_context.hpp +++ b/include/boost/wave/cpp_context.hpp @@ -32,6 +32,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -296,4 +301,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_CONTEXT_HPP_907485E2_6649_4A87_911B_7F7225F3E5B8_INCLUDED) diff --git a/include/boost/wave/cpp_exceptions.hpp b/include/boost/wave/cpp_exceptions.hpp index aa52f15..c180df7 100644 --- a/include/boost/wave/cpp_exceptions.hpp +++ b/include/boost/wave/cpp_exceptions.hpp @@ -19,6 +19,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // helper macro for throwing exceptions #if !defined(BOOST_WAVE_THROW) @@ -301,4 +306,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_EXCEPTIONS_HPP_5190E447_A781_4521_A275_5134FF9917D7_INCLUDED) diff --git a/include/boost/wave/cpp_iteration_context.hpp b/include/boost/wave/cpp_iteration_context.hpp index 7c9152d..2fba88f 100644 --- a/include/boost/wave/cpp_iteration_context.hpp +++ b/include/boost/wave/cpp_iteration_context.hpp @@ -23,6 +23,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -193,4 +198,9 @@ struct iteration_context } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_ITERATION_CONTEXT_HPP_00312288_9DDB_4668_AFE5_25D3994FD095_INCLUDED) diff --git a/include/boost/wave/cpplexer/convert_trigraphs.hpp b/include/boost/wave/cpplexer/convert_trigraphs.hpp index 3ec2e45..e52623e 100644 --- a/include/boost/wave/cpplexer/convert_trigraphs.hpp +++ b/include/boost/wave/cpplexer/convert_trigraphs.hpp @@ -12,8 +12,14 @@ #if !defined(CONVERT_TRIGRAPHS_HK050403_INCLUDED) #define CONVERT_TRIGRAPHS_HK050403_INCLUDED +#include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -22,7 +28,7 @@ namespace impl { /////////////////////////////////////////////////////////////////////////////// // -// +// Test, whether the given string represents a valid trigraph sequence // /////////////////////////////////////////////////////////////////////////////// template @@ -125,6 +131,11 @@ convert_trigraphs(StringT const &value, int line, int column, } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CONVERT_TRIGRAPHS_HK050403_INCLUDED) diff --git a/include/boost/wave/cpplexer/cpp_lex_interface.hpp b/include/boost/wave/cpplexer/cpp_lex_interface.hpp index a8231f3..64f9093 100644 --- a/include/boost/wave/cpplexer/cpp_lex_interface.hpp +++ b/include/boost/wave/cpplexer/cpp_lex_interface.hpp @@ -13,9 +13,21 @@ #if !defined(CPP_LEX_INTERFACE_HPP_E83F52A4_90AC_4FBE_A9A7_B65F7F94C497_INCLUDED) #define CPP_LEX_INTERFACE_HPP_E83F52A4_90AC_4FBE_A9A7_B65F7F94C497_INCLUDED +#include #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -32,7 +44,7 @@ template < typename IteratorT, typename PositionT = boost::wave::util::file_position_type > -struct new_lexer_gen +struct BOOST_WAVE_DECL new_lexer_gen { // The NewLexer function allows the opaque generation of a new lexer object. // It is coupled to the token type to allow to decouple the lexer/token @@ -78,4 +90,9 @@ struct lex_input_interface } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_LEX_INTERFACE_HPP_E83F52A4_90AC_4FBE_A9A7_B65F7F94C497_INCLUDED) diff --git a/include/boost/wave/cpplexer/cpp_lex_iterator.hpp b/include/boost/wave/cpplexer/cpp_lex_iterator.hpp index ca0c276..6edcb21 100644 --- a/include/boost/wave/cpplexer/cpp_lex_iterator.hpp +++ b/include/boost/wave/cpplexer/cpp_lex_iterator.hpp @@ -20,12 +20,18 @@ #include #include +#include #include #include #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + #if 0 != __COMO_VERSION__ #define BOOST_WAVE_EOF_PREFIX static #else @@ -167,6 +173,11 @@ public: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #undef BOOST_WAVE_EOF_PREFIX #endif // !defined(CPP_LEX_ITERATOR_HPP_AF0C37E3_CBD8_4F33_A225_51CF576FA61F_INCLUDED) diff --git a/include/boost/wave/cpplexer/cpp_lex_token.hpp b/include/boost/wave/cpplexer/cpp_lex_token.hpp index 6e220b3..398f214 100644 --- a/include/boost/wave/cpplexer/cpp_lex_token.hpp +++ b/include/boost/wave/cpplexer/cpp_lex_token.hpp @@ -18,6 +18,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -112,4 +117,9 @@ operator<< (std::ostream &stream, lex_token const &object) } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_TOKEN_HPP_53A13BD2_FBAA_444B_9B8B_FCB225C2BBA8_INCLUDED) diff --git a/include/boost/wave/cpplexer/cpplexer_exceptions.hpp b/include/boost/wave/cpplexer/cpplexer_exceptions.hpp index 3506e6b..8b887ea 100644 --- a/include/boost/wave/cpplexer/cpplexer_exceptions.hpp +++ b/include/boost/wave/cpplexer/cpplexer_exceptions.hpp @@ -18,6 +18,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // helper macro for throwing exceptions #if !defined(BOOST_WAVE_LEXER_THROW) @@ -195,4 +200,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPPLEXER_EXCEPTIONS_HPP_1A09DE1A_6D1F_4091_AF7F_5F13AB0D31AB_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/aq.hpp b/include/boost/wave/cpplexer/re2clex/aq.hpp index c5a4c98..ee59d31 100644 --- a/include/boost/wave/cpplexer/re2clex/aq.hpp +++ b/include/boost/wave/cpplexer/re2clex/aq.hpp @@ -12,8 +12,14 @@ #if !defined(AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED) #define AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED +#include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -39,14 +45,20 @@ int aq_serve(aq_queue q, aq_stdelement *e); int aq_pop(aq_queue q); #define AQ_EMPTY(q) (q->size == 0) #define AQ_FULL(q) (q->size == q->max_size) -aq_queue aq_create(void); -void aq_terminate(aq_queue q); int aq_grow(aq_queue q); +BOOST_WAVE_DECL aq_queue aq_create(void); +BOOST_WAVE_DECL void aq_terminate(aq_queue q); + /////////////////////////////////////////////////////////////////////////////// } // namespace re2clex } // namespace cpplexer } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/cpp_re.hpp b/include/boost/wave/cpplexer/re2clex/cpp_re.hpp index dcc7284..2652cea 100644 --- a/include/boost/wave/cpplexer/re2clex/cpp_re.hpp +++ b/include/boost/wave/cpplexer/re2clex/cpp_re.hpp @@ -13,8 +13,20 @@ #if !defined(CPP_RE_HPP_B76C4F5E_63E9_4B8A_9975_EC32FA6BF027_INCLUDED) #define CPP_RE_HPP_B76C4F5E_63E9_4B8A_9975_EC32FA6BF027_INCLUDED +#include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -23,7 +35,7 @@ namespace re2clex { /////////////////////////////////////////////////////////////////////////////// // The scanner function to call whenever a new token is requested -boost::wave::token_id scan(Scanner *s); +BOOST_WAVE_DECL boost::wave::token_id scan(Scanner *s); /////////////////////////////////////////////////////////////////////////////// } // namespace re2clex @@ -31,4 +43,9 @@ boost::wave::token_id scan(Scanner *s); } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_RE_HPP_B76C4F5E_63E9_4B8A_9975_EC32FA6BF027_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp b/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp index 4dacbc9..0340824 100644 --- a/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp +++ b/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp @@ -38,6 +38,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -337,7 +342,7 @@ token_cache::string_type> const // It is coupled to the iterator type to allow to decouple the lexer/iterator // configurations at compile time. // -// This function is declared inside the cpp_slex_token.hpp file, which is +// This function is declared inside the cpp_lex_token.hpp file, which is // referenced by the source file calling the lexer and the source file, which // instantiates the lex_functor. But is is defined here, so it will be // instantiated only while compiling the source file, which instantiates the @@ -366,4 +371,9 @@ new_lexer_gen::new_lexer(IteratorT const &first, } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_RE2C_LEXER_HPP_B81A2629_D5B1_4944_A97D_60254182B9A8_INCLUDED) diff --git a/include/boost/wave/cpplexer/re2clex/scanner.hpp b/include/boost/wave/cpplexer/re2clex/scanner.hpp index 49f8be0..1a43463 100644 --- a/include/boost/wave/cpplexer/re2clex/scanner.hpp +++ b/include/boost/wave/cpplexer/re2clex/scanner.hpp @@ -12,8 +12,14 @@ #if !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED) #define SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED +#include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -56,4 +62,9 @@ typedef struct Scanner { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(SCANNER_HPP_F4FB01EB_E75C_4537_A146_D34B9895EF37_INCLUDED) diff --git a/include/boost/wave/cpplexer/token_cache.hpp b/include/boost/wave/cpplexer/token_cache.hpp index 4bead0f..b869680 100644 --- a/include/boost/wave/cpplexer/token_cache.hpp +++ b/include/boost/wave/cpplexer/token_cache.hpp @@ -11,8 +11,14 @@ #if !defined(TOKEN_CACHE_HPP_4D2320B7_1D56_4113_A114_397E70FA438C_INCLUDED) #define TOKEN_CACHE_HPP_4D2320B7_1D56_4113_A114_397E70FA438C_INCLUDED +#include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -56,4 +62,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(TOKEN_CACHE_HPP_4D2320B7_1D56_4113_A114_397E70FA438C_INCLUDED) diff --git a/include/boost/wave/cpplexer/validate_universal_char.hpp b/include/boost/wave/cpplexer/validate_universal_char.hpp index 3aaa389..564bfdf 100644 --- a/include/boost/wave/cpplexer/validate_universal_char.hpp +++ b/include/boost/wave/cpplexer/validate_universal_char.hpp @@ -14,9 +14,15 @@ #include +#include #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -311,4 +317,9 @@ typename StringT::size_type pos = name.find_first_of('\\'); } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(VALIDATE_UNIVERSAL_CHAR_HPP_55F1B811_CD76_4C72_8344_CBC69CF3B339_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_chlit_grammar.hpp b/include/boost/wave/grammars/cpp_chlit_grammar.hpp index 075f30d..d479180 100644 --- a/include/boost/wave/grammars/cpp_chlit_grammar.hpp +++ b/include/boost/wave/grammars/cpp_chlit_grammar.hpp @@ -29,6 +29,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // Reusable grammar to parse a C++ style character literal @@ -332,4 +337,9 @@ parse_info hit = } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_CHLIT_GRAMMAR_HPP_9527D349_6592_449A_A409_42A001E6C64C_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_defined_grammar.hpp b/include/boost/wave/grammars/cpp_defined_grammar.hpp index 21f111f..6c25f4c 100644 --- a/include/boost/wave/grammars/cpp_defined_grammar.hpp +++ b/include/boost/wave/grammars/cpp_defined_grammar.hpp @@ -34,6 +34,11 @@ #endif // SPIRIT_VERSION >= 0x1700 #endif // !defined(spirit_append_actor) +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -173,4 +178,9 @@ defined_grammar_gen::parse_operator_defined ( } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_DEFINED_GRAMMAR_HPP_F48287B2_DC67_40A8_B4A1_800EFBD67869_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp b/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp index 44480c5..f913cdd 100644 --- a/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_defined_grammar_gen.hpp @@ -11,6 +11,8 @@ #if !defined(CPP_DEFINED_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED) #define CPP_DEFINED_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED +#include + #include #include @@ -18,19 +20,30 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { namespace grammars { template -struct defined_grammar_gen +struct BOOST_WAVE_DECL defined_grammar_gen { typedef typename LexIteratorT::token_type token_type; typedef std::list > token_sequence_type; -// The parse_operator_define function is instantiated manually twice to +// The parse_operator_defined function is instantiated manually twice to // simplify the explicit specialization of this template. This way the user // has only to specify one template parameter (the lexer iterator type) to // correctly formulate the required explicit specialization. @@ -60,4 +73,9 @@ struct defined_grammar_gen } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_DEFINED_GRAMMAR_GEN_HPP_825BE9F5_98A3_400D_A97C_AD76B3B08632_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_expression_grammar.hpp b/include/boost/wave/grammars/cpp_expression_grammar.hpp index d9855c7..b9efeeb 100644 --- a/include/boost/wave/grammars/cpp_expression_grammar.hpp +++ b/include/boost/wave/grammars/cpp_expression_grammar.hpp @@ -46,6 +46,11 @@ #endif // SPIRIT_VERSION >= 0x1700 #endif // !defined(spirit_append_actor) +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // Encapsulation of the grammar for evaluation of constant preprocessor @@ -732,4 +737,9 @@ expression_grammar_gen::evaluate( } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_EXPRESSION_GRAMMAR_HPP_099CD1A4_A6C0_44BE_8F24_0B00F5BE5674_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp b/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp index 6cf4bae..3d7987d 100644 --- a/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_expression_grammar_gen.hpp @@ -11,10 +11,22 @@ #if !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED) #define CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED +#include +#include + #include #include -#include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif /////////////////////////////////////////////////////////////////////////////// namespace boost { @@ -32,7 +44,7 @@ namespace grammars { /////////////////////////////////////////////////////////////////////////////// template -struct expression_grammar_gen { +struct BOOST_WAVE_DECL expression_grammar_gen { typedef TokenT token_type; typedef std::list > @@ -50,4 +62,9 @@ struct expression_grammar_gen { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_EXPRESSION_GRAMMAR_GEN_HPP_42399258_6CDC_4101_863D_5C7D95B5A6CA_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_expression_value.hpp b/include/boost/wave/grammars/cpp_expression_value.hpp index 91d794d..9b87ea2 100644 --- a/include/boost/wave/grammars/cpp_expression_value.hpp +++ b/include/boost/wave/grammars/cpp_expression_value.hpp @@ -15,6 +15,13 @@ #include #endif // defined(BOOST_SPIRIT_DEBUG) +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -849,4 +856,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_EXPRESSION_VALUE_HPP_452FE66D_8754_4107_AF1E_E42255A0C18A_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_grammar.hpp b/include/boost/wave/grammars/cpp_grammar.hpp index ef08cdc..809456e 100644 --- a/include/boost/wave/grammars/cpp_grammar.hpp +++ b/include/boost/wave/grammars/cpp_grammar.hpp @@ -30,6 +30,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -177,7 +182,7 @@ struct cpp_grammar : using namespace boost::wave; using namespace boost::wave::util; - // save the rule id's for later use + // set the rule id's for later use pp_statement.set_id(BOOST_WAVE_PP_STATEMENT_ID); include_file.set_id(BOOST_WAVE_INCLUDE_FILE_ID); system_include_file.set_id(BOOST_WAVE_SYSINCLUDE_FILE_ID); @@ -680,4 +685,9 @@ cpp_grammar_gen::parse_cpp_grammar ( } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_GRAMMAR_HPP_FEAEBC2E_2734_428B_A7CA_85E5A415E23E_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_grammar_gen.hpp b/include/boost/wave/grammars/cpp_grammar_gen.hpp index 2cdcbbb..fb4233b 100644 --- a/include/boost/wave/grammars/cpp_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_grammar_gen.hpp @@ -11,11 +11,22 @@ #if !defined(CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED) #define CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED -#include - #include #include +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -61,7 +72,7 @@ namespace grammars { /////////////////////////////////////////////////////////////////////////////// template -struct cpp_grammar_gen +struct BOOST_WAVE_DECL cpp_grammar_gen { typedef LexIteratorT iterator_type; typedef typename LexIteratorT::token_type token_type; @@ -79,4 +90,9 @@ struct cpp_grammar_gen } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_GRAMMAR_GEN_HPP_80CB8A59_5411_4E45_B406_62531A12FB99_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_intlit_grammar.hpp b/include/boost/wave/grammars/cpp_intlit_grammar.hpp index 619b391..6f5b14b 100644 --- a/include/boost/wave/grammars/cpp_intlit_grammar.hpp +++ b/include/boost/wave/grammars/cpp_intlit_grammar.hpp @@ -36,6 +36,11 @@ #endif // SPIRIT_VERSION >= 0x1700 #endif // !defined(spirit_append_actor) +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // Reusable grammar for parsing of C++ style integer literals @@ -179,4 +184,9 @@ parse_info hit = } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_INTLIT_GRAMMAR_HPP_2E1E70B1_F15C_4132_8554_10A231B0D91C_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp b/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp index 8864916..bc0eed6 100644 --- a/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp +++ b/include/boost/wave/grammars/cpp_literal_grammar_gen.hpp @@ -11,6 +11,19 @@ #if !defined(CPP_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED) #define CPP_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -26,7 +39,7 @@ namespace grammars { // /////////////////////////////////////////////////////////////////////////////// template -struct intlit_grammar_gen { +struct BOOST_WAVE_DECL intlit_grammar_gen { static unsigned long evaluate(TokenT const &tok, bool &is_unsigned); }; @@ -41,7 +54,7 @@ struct intlit_grammar_gen { // /////////////////////////////////////////////////////////////////////////////// template -struct chlit_grammar_gen { +struct BOOST_WAVE_DECL chlit_grammar_gen { static unsigned int evaluate(TokenT const &tok); }; @@ -51,4 +64,9 @@ struct chlit_grammar_gen { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_LITERAL_GRAMMAR_GEN_HPP_67794A6C_468A_4AAB_A757_DEDDB182F5A0_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_predef_macros_gen.hpp b/include/boost/wave/grammars/cpp_predef_macros_gen.hpp index a421bc9..13603a8 100644 --- a/include/boost/wave/grammars/cpp_predef_macros_gen.hpp +++ b/include/boost/wave/grammars/cpp_predef_macros_gen.hpp @@ -15,22 +15,30 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { namespace grammars { /////////////////////////////////////////////////////////////////////////////// -// -// store parser_id's of all rules of the predefined_macros_grammar here -// for later access +// +// Here are the node id's of the different node of the cpp_grammar // /////////////////////////////////////////////////////////////////////////////// -struct predefined_macros_grammar_rule_ids { - std::size_t plain_define_id; // #define - std::size_t macro_parameters_id; - std::size_t macro_definition_id; -}; +#define BOOST_WAVE_PLAIN_DEFINE_ID 5 +#define BOOST_WAVE_MACRO_PARAMETERS_ID 6 +#define BOOST_WAVE_MACRO_DEFINITION_ID 7 /////////////////////////////////////////////////////////////////////////////// // @@ -46,28 +54,23 @@ struct predefined_macros_grammar_rule_ids { /////////////////////////////////////////////////////////////////////////////// template -struct predefined_macros_grammar_gen +struct BOOST_WAVE_DECL predefined_macros_grammar_gen { typedef LexIteratorT iterator_type; -// the parser_id's of all rules of the cpp_grammar are stored here -// note: these are valid only after the first call to parse_cpp_grammar - static predefined_macros_grammar_rule_ids rule_ids; - // parse the cpp_grammar and return the resulting parse tree static boost::spirit::tree_parse_info parse_predefined_macro (iterator_type const &first, iterator_type const &last); }; -/////////////////////////////////////////////////////////////////////////////// -// definitions of the static members -template -predefined_macros_grammar_rule_ids - predefined_macros_grammar_gen::rule_ids; - /////////////////////////////////////////////////////////////////////////////// } // namespace grammars } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_PREDEF_MACROS_GEN_HPP_CADB6D2C_76A4_4988_83E1_EFFC6902B9A2_INCLUDED) diff --git a/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp b/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp index b7b7d67..25c0cb1 100644 --- a/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp +++ b/include/boost/wave/grammars/cpp_predef_macros_grammar.hpp @@ -21,6 +21,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -41,9 +46,10 @@ struct predefined_macros_grammar : struct definition { // 'normal' (parse_tree generating) rule type - typedef boost::spirit::rule rule_t; + typedef boost::spirit::rule + rule_type; - rule_t plain_define, macro_definition, macro_parameters; + rule_type plain_define, macro_definition, macro_parameters; definition(predefined_macros_grammar const &self) { @@ -52,10 +58,10 @@ struct predefined_macros_grammar : using namespace boost::wave; using namespace boost::wave::util; - // save the rule id's for later use - self.rule_ids.plain_define_id = plain_define.id().to_long(); - self.rule_ids.macro_parameters_id = macro_parameters.id().to_long(); - self.rule_ids.macro_definition_id = macro_definition.id().to_long(); + // set the rule id's for later use + plain_define.set_id(BOOST_WAVE_PLAIN_DEFINE_ID); + macro_parameters.set_id(BOOST_WAVE_MACRO_PARAMETERS_ID); + macro_definition.set_id(BOOST_WAVE_MACRO_DEFINITION_ID); // recognizes command line defined macro syntax, i.e. // -DMACRO @@ -111,14 +117,11 @@ struct predefined_macros_grammar : } // start rule of this grammar - rule_t const& start() const + rule_type const& start() const { return plain_define; } }; - predefined_macros_grammar_rule_ids &rule_ids; - - predefined_macros_grammar(predefined_macros_grammar_rule_ids &rule_ids_) - : rule_ids(rule_ids_) + predefined_macros_grammar() { BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR_NAME(*this, "predefined_macros_grammar", TRACE_PREDEF_MACROS_GRAMMAR); @@ -149,7 +152,7 @@ boost::spirit::tree_parse_info predefined_macros_grammar_gen::parse_predefined_macro ( LexIteratorT const &first, LexIteratorT const &last) { - predefined_macros_grammar g(rule_ids); + predefined_macros_grammar g; return boost::spirit::pt_parse (first, last, g); } @@ -160,4 +163,9 @@ predefined_macros_grammar_gen::parse_predefined_macro ( } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_PREDEF_MACROS_GRAMMAR_HPP_53858C9A_C202_4D60_AD92_DC9CAE4DBB43_INCLUDED) diff --git a/include/boost/wave/language_support.hpp b/include/boost/wave/language_support.hpp index 5a4f401..8b02d9f 100644 --- a/include/boost/wave/language_support.hpp +++ b/include/boost/wave/language_support.hpp @@ -13,6 +13,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -205,4 +210,9 @@ set_support_options(language_support language, language_support option) } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(LANGUAGE_SUPPORT_HPP_93EDD057_2DEF_44BC_BC9F_FDABB9F51AFA_INCLUDED) diff --git a/include/boost/wave/preprocessing_hooks.hpp b/include/boost/wave/preprocessing_hooks.hpp index 76edf0b..10a52f4 100644 --- a/include/boost/wave/preprocessing_hooks.hpp +++ b/include/boost/wave/preprocessing_hooks.hpp @@ -11,8 +11,14 @@ #if !defined(PREPROCESSING_HOOKS_HPP_338DE478_A13C_4B63_9BA9_041C917793B8_INCLUDED) #define PREPROCESSING_HOOKS_HPP_338DE478_A13C_4B63_9BA9_041C917793B8_INCLUDED +#include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -279,4 +285,9 @@ struct default_preprocessing_hooks { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(PREPROCESSING_HOOKS_HPP_338DE478_A13C_4B63_9BA9_041C917793B8_INCLUDED) diff --git a/include/boost/wave/token_ids.hpp b/include/boost/wave/token_ids.hpp index 7f0616f..ce3208a 100644 --- a/include/boost/wave/token_ids.hpp +++ b/include/boost/wave/token_ids.hpp @@ -18,6 +18,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // Allow external redefinition of the token identifiers to use #if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED) @@ -685,5 +690,10 @@ static char const *tok_names[] = { #endif // #if !defined(BOOST_WAVE_TOKEN_IDS_DEFINED) +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(TOKEN_IDS_HPP_414E9A58_F079_4789_8AFF_513815CE475B_INCLUDED) diff --git a/include/boost/wave/util/cpp_ifblock.hpp b/include/boost/wave/util/cpp_ifblock.hpp index a45ed0b..f31c650 100644 --- a/include/boost/wave/util/cpp_ifblock.hpp +++ b/include/boost/wave/util/cpp_ifblock.hpp @@ -12,6 +12,12 @@ #define CPP_IFBLOCK_HPP_D4676B36_00C5_41F4_BC9F_9CBBAE3B8006_INCLUDED #include +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif /////////////////////////////////////////////////////////////////////////////// namespace boost { @@ -144,4 +150,9 @@ protected: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_IFBLOCK_HPP_D4676B36_00C5_41F4_BC9F_9CBBAE3B8006_INCLUDED) diff --git a/include/boost/wave/util/cpp_include_paths.hpp b/include/boost/wave/util/cpp_include_paths.hpp index dbbf2da..4463c08 100644 --- a/include/boost/wave/util/cpp_include_paths.hpp +++ b/include/boost/wave/util/cpp_include_paths.hpp @@ -16,10 +16,15 @@ #include #include +#include + #include #include -#include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif /////////////////////////////////////////////////////////////////////////////// namespace boost { @@ -254,4 +259,9 @@ void include_paths::set_current_directory(char const *path_) } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_include_paths_HPP_AF620DA4_B3D2_4221_AD91_8A1ABFFB6944_INCLUDED) diff --git a/include/boost/wave/util/cpp_iterator.hpp b/include/boost/wave/util/cpp_iterator.hpp index 5babb4d..a6b963f 100644 --- a/include/boost/wave/util/cpp_iterator.hpp +++ b/include/boost/wave/util/cpp_iterator.hpp @@ -47,6 +47,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -167,13 +172,11 @@ typename ContextT::token_sequence_type macrodefinition; bool has_parameters = false; boost::wave::util::retrieve_macroname(*hit.trees.begin(), - predef_macros_type::rule_ids.plain_define_id, macroname, act_pos); + BOOST_WAVE_PLAIN_DEFINE_ID, macroname, act_pos); has_parameters = boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(), - predef_macros_type::rule_ids.macro_parameters_id, macroparameters, - token_type()); + BOOST_WAVE_MACRO_PARAMETERS_ID, macroparameters, token_type()); boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(), - predef_macros_type::rule_ids.macro_definition_id, macrodefinition, - token_type()); + BOOST_WAVE_MACRO_DEFINITION_ID, macrodefinition, token_type()); // If no macrodefinition is given, and the macro string does not end with a // '=', then the macro should be defined with the value '1' @@ -1805,4 +1808,9 @@ public: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_ITERATOR_HPP_175CA88F_7273_43FA_9039_BCF7459E1F29_INCLUDED) diff --git a/include/boost/wave/util/cpp_macromap.hpp b/include/boost/wave/util/cpp_macromap.hpp index d6f5258..c4f18a4 100644 --- a/include/boost/wave/util/cpp_macromap.hpp +++ b/include/boost/wave/util/cpp_macromap.hpp @@ -42,6 +42,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -1677,4 +1682,9 @@ macromap::reset_macromap() } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_MACROMAP_HPP_CB8F51B0_A3F0_411C_AEF4_6FF631B8B414_INCLUDED) diff --git a/include/boost/wave/util/cpp_macromap_predef.hpp b/include/boost/wave/util/cpp_macromap_predef.hpp index c1c22f9..3cfc95b 100644 --- a/include/boost/wave/util/cpp_macromap_predef.hpp +++ b/include/boost/wave/util/cpp_macromap_predef.hpp @@ -19,6 +19,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // This file contains the definition of functions needed for the management @@ -250,4 +255,9 @@ namespace predefined_macros { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_MACROMAP_PREDEF_HPP_HK041119) diff --git a/include/boost/wave/util/cpp_macromap_utils.hpp b/include/boost/wave/util/cpp_macromap_utils.hpp index c0bb541..d2d5bc6 100644 --- a/include/boost/wave/util/cpp_macromap_utils.hpp +++ b/include/boost/wave/util/cpp_macromap_utils.hpp @@ -18,6 +18,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // This file contains the definition of several token sequence analyse @@ -521,4 +526,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(CPP_MACROMAP_UTIL_HPP_HK041119) diff --git a/include/boost/wave/util/eat_whitespace.hpp b/include/boost/wave/util/eat_whitespace.hpp index f83fe89..dc0d5b0 100644 --- a/include/boost/wave/util/eat_whitespace.hpp +++ b/include/boost/wave/util/eat_whitespace.hpp @@ -16,6 +16,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -183,5 +188,10 @@ eat_whitespace::whitespace(TokenT &token, bool &skipped_newline) } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(EAT_WHITESPACE_HPP_4CE9AD17_F82D_4AB2_A117_555DF0DCC801_INCLUDED) diff --git a/include/boost/wave/util/file_position.hpp b/include/boost/wave/util/file_position.hpp index 2fd3fcd..e89d512 100644 --- a/include/boost/wave/util/file_position.hpp +++ b/include/boost/wave/util/file_position.hpp @@ -20,6 +20,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -167,4 +172,9 @@ namespace spirit { } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(FILE_POSITION_H_52BDEDF7_DAD3_4F24_802F_E66BB8098F68_INCLUDED) diff --git a/include/boost/wave/util/flex_string.hpp b/include/boost/wave/util/flex_string.hpp index 1a2b6b8..cf90eae 100644 --- a/include/boost/wave/util/flex_string.hpp +++ b/include/boost/wave/util/flex_string.hpp @@ -84,6 +84,11 @@ class StoragePolicy #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -2336,4 +2341,9 @@ flex_string::npos = (typename flex_string::size_type)( } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // FLEX_STRING_INC_ diff --git a/include/boost/wave/util/functor_input.hpp b/include/boost/wave/util/functor_input.hpp index 8777601..a0afa51 100644 --- a/include/boost/wave/util/functor_input.hpp +++ b/include/boost/wave/util/functor_input.hpp @@ -13,6 +13,12 @@ #include #include +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif /////////////////////////////////////////////////////////////////////////////// namespace boost { @@ -140,4 +146,9 @@ struct functor_input { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(FUNCTOR_INPUT_HPP_ED3A4C21_8F8A_453F_B438_08214FAC106A_INCLUDED) diff --git a/include/boost/wave/util/insert_whitespace_detection.hpp b/include/boost/wave/util/insert_whitespace_detection.hpp index cdb73b4..92f43a5 100644 --- a/include/boost/wave/util/insert_whitespace_detection.hpp +++ b/include/boost/wave/util/insert_whitespace_detection.hpp @@ -15,6 +15,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -329,4 +334,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(INSERT_WHITESPACE_DETECTION_HPP_765EF77B_0513_4967_BDD6_6A38148C4C96_INCLUDED) diff --git a/include/boost/wave/util/interpret_pragma.hpp b/include/boost/wave/util/interpret_pragma.hpp index c075a3d..e5fd978 100644 --- a/include/boost/wave/util/interpret_pragma.hpp +++ b/include/boost/wave/util/interpret_pragma.hpp @@ -40,6 +40,11 @@ #endif // SPIRIT_VERSION >= 0x1700 #endif // !defined(spirit_append_actor) +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -141,4 +146,9 @@ interpret_pragma(ContextT &ctx, typename ContextT::token_type const &act_token, } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(INTERPRET_PRAGMA_HPP_B1F2315E_C5CE_4ED1_A343_0EF548B7942A_INCLUDED) diff --git a/include/boost/wave/util/iteration_context.hpp b/include/boost/wave/util/iteration_context.hpp index e33f42c..f3bc417 100644 --- a/include/boost/wave/util/iteration_context.hpp +++ b/include/boost/wave/util/iteration_context.hpp @@ -18,6 +18,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -69,4 +74,9 @@ private: } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(ITERATION_CONTEXT_HPP_9556CD16_F11E_4ADC_AC8B_FB9A174BE664_INCLUDED) diff --git a/include/boost/wave/util/macro_definition.hpp b/include/boost/wave/util/macro_definition.hpp index 9a9ee07..0b3b1ca 100644 --- a/include/boost/wave/util/macro_definition.hpp +++ b/include/boost/wave/util/macro_definition.hpp @@ -17,6 +17,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -126,4 +131,9 @@ struct macro_definition { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(MACRO_DEFINITION_HPP_D68A639E_2DA5_4E9C_8ACD_CFE6B903831E_INCLUDED) diff --git a/include/boost/wave/util/macro_helpers.hpp b/include/boost/wave/util/macro_helpers.hpp index 876be66..d36a3e9 100644 --- a/include/boost/wave/util/macro_helpers.hpp +++ b/include/boost/wave/util/macro_helpers.hpp @@ -16,6 +16,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -245,4 +250,9 @@ namespace impl { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(MACRO_HELPERS_HPP_931BBC99_EBFA_4692_8FBE_B555998C2C39_INCLUDED) diff --git a/include/boost/wave/util/pattern_parser.hpp b/include/boost/wave/util/pattern_parser.hpp index 47e3fbb..52eed86 100644 --- a/include/boost/wave/util/pattern_parser.hpp +++ b/include/boost/wave/util/pattern_parser.hpp @@ -14,6 +14,12 @@ #define BOOST_SPIRIT_PATTERN_PARSER_HPP #include +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif /////////////////////////////////////////////////////////////////////////////// namespace boost { @@ -52,4 +58,9 @@ namespace util { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // defined(BOOST_SPIRIT_PATTERN_PARSER_HPP) diff --git a/include/boost/wave/util/symbol_table.hpp b/include/boost/wave/util/symbol_table.hpp index c985b1b..85b787f 100644 --- a/include/boost/wave/util/symbol_table.hpp +++ b/include/boost/wave/util/symbol_table.hpp @@ -12,6 +12,12 @@ #define SYMBOL_TABLE_HPP_32B0F7C6_3DD6_4113_95A5_E16516C6F45A_INCLUDED #include +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif /////////////////////////////////////////////////////////////////////////////// namespace boost { @@ -37,4 +43,9 @@ struct symbol_table } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(SYMBOL_TABLE_HPP_32B0F7C6_3DD6_4113_95A5_E16516C6F45A_INCLUDED) diff --git a/include/boost/wave/util/time_conversion_helper.hpp b/include/boost/wave/util/time_conversion_helper.hpp index 843e5f4..4a92495 100644 --- a/include/boost/wave/util/time_conversion_helper.hpp +++ b/include/boost/wave/util/time_conversion_helper.hpp @@ -12,6 +12,8 @@ #define TIME_CONVERSION_HELPER_HPP_DA97E389_1797_43BA_82AE_B071064B3EF4_INCLUDED #include + +#include #include #include #if SPIRIT_VERSION >= 0x1700 @@ -29,6 +31,11 @@ #endif // SPIRIT_VERSION >= 0x1700 #endif // !defined(spirit_append_actor) +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -144,4 +151,9 @@ using namespace time_conversion; } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(TIME_CONVERSION_HELPER_HPP_DA97E389_1797_43BA_82AE_B071064B3EF4_INCLUDED) diff --git a/include/boost/wave/util/transform_iterator.hpp b/include/boost/wave/util/transform_iterator.hpp index 3ba2a2a..8f1c646 100644 --- a/include/boost/wave/util/transform_iterator.hpp +++ b/include/boost/wave/util/transform_iterator.hpp @@ -11,6 +11,7 @@ #if !defined(TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED) #define TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED +#include #include #if BOOST_ITERATOR_ADAPTORS_VERSION >= 0x0200 #include @@ -18,6 +19,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -155,4 +161,9 @@ namespace impl { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(TRANSFORM_ITERATOR_HPP_D492C659_88C7_4258_8C42_192F9AE80EC0_INCLUDED) diff --git a/include/boost/wave/util/unput_queue_iterator.hpp b/include/boost/wave/util/unput_queue_iterator.hpp index dbca155..cbaaf25 100644 --- a/include/boost/wave/util/unput_queue_iterator.hpp +++ b/include/boost/wave/util/unput_queue_iterator.hpp @@ -19,6 +19,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -452,4 +457,9 @@ namespace impl { } // namespace wave } // namespace boost +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // !defined(UNPUT_QUEUE_ITERATOR_HPP_76DA23D0_4893_4AD5_ABCC_6CED7CFB89BC_INCLUDED) diff --git a/include/boost/wave/wave_config.hpp b/include/boost/wave/wave_config.hpp index ca60a41..28a0ac7 100644 --- a/include/boost/wave/wave_config.hpp +++ b/include/boost/wave/wave_config.hpp @@ -294,6 +294,25 @@ #error "Wave needs PHOENIX_LIMIT to be set at least to 4!" #endif +/////////////////////////////////////////////////////////////////////////////// +// Set up dll import/export options +#if defined(BOOST_HAS_DECLSPEC) && \ + (defined(BOOST_WAVE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ + !defined(BOOST_WAVE_STATIC_LINK) + +#if defined(BOOST_WAVE_SOURCE) +#define BOOST_WAVE_DECL __declspec(dllexport) +#define BOOST_WAVE_BUILD_DLL +#else +#define BOOST_WAVE_DECL __declspec(dllimport) +#endif + +#endif // building a shared library + +#ifndef BOOST_WAVE_DECL +#define BOOST_WAVE_DECL +#endif + /////////////////////////////////////////////////////////////////////////////// // Auto library naming #if BOOST_VERSION >= 103100 @@ -308,6 +327,10 @@ #define BOOST_DYN_LINK #endif +#ifdef BOOST_WAVE_DIAG +#define BOOST_LIB_DIAGNOSTIC +#endif + #include #endif // auto-linking disabled diff --git a/src/cpplexer/re2clex/aq.cpp b/src/cpplexer/re2clex/aq.cpp index d60ef7b..6fc26b2 100644 --- a/src/cpplexer/re2clex/aq.cpp +++ b/src/cpplexer/re2clex/aq.cpp @@ -8,14 +8,20 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #include -#include - #include // configuration data #include +#include + +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace wave { @@ -218,3 +224,9 @@ void aq_terminate(aq_queue q) } // namespace cpplexer } // namespace wave } // namespace boost + +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + diff --git a/src/cpplexer/re2clex/cpp_re.cpp b/src/cpplexer/re2clex/cpp_re.cpp index ba2dad1..3555ab8 100644 --- a/src/cpplexer/re2clex/cpp_re.cpp +++ b/src/cpplexer/re2clex/cpp_re.cpp @@ -12,6 +12,7 @@ have some easier way to parse strings instead of files (done) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #include #include @@ -20,7 +21,7 @@ #include #include -#include +#include // configuration data #if defined(BOOST_HAS_UNISTD_H) #include @@ -36,6 +37,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// #if defined(BOOST_MSVC) #pragma warning (disable: 4101) // 'foo' : unreferenced local variable @@ -418,3 +424,8 @@ boost::wave::token_id scan(Scanner *s) #undef YYMARKER #undef YYFILL +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + diff --git a/src/cpplexer/re2clex/cpp_re.inc b/src/cpplexer/re2clex/cpp_re.inc index c9503e4..0cc4214 100644 --- a/src/cpplexer/re2clex/cpp_re.inc +++ b/src/cpplexer/re2clex/cpp_re.inc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.9.10 on Sat Nov 19 12:37:00 2005 */ +/* Generated by re2c 0.9.10 on Sun Nov 20 20:57:28 2005 */ #line 1 "cpp.re" /*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library diff --git a/src/cpplexer/re2clex/strict_cpp_re.inc b/src/cpplexer/re2clex/strict_cpp_re.inc index 1d9c82a..7bab40d 100644 --- a/src/cpplexer/re2clex/strict_cpp_re.inc +++ b/src/cpplexer/re2clex/strict_cpp_re.inc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.9.10 on Sat Nov 19 12:37:17 2005 */ +/* Generated by re2c 0.9.10 on Sun Nov 20 20:57:27 2005 */ #line 1 "strict_cpp.re" /*============================================================================= Boost.Wave: A Standard compliant C++ preprocessor library diff --git a/src/instantiate_cpp_exprgrammar.cpp b/src/instantiate_cpp_exprgrammar.cpp index 737c894..9e8ee32 100644 --- a/src/instantiate_cpp_exprgrammar.cpp +++ b/src/instantiate_cpp_exprgrammar.cpp @@ -7,6 +7,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 @@ -19,6 +20,17 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// // // Explicit instantiation of the expression_grammar_gen template with the @@ -32,5 +44,10 @@ typedef boost::wave::cpplexer::lex_token<> token_type; template struct boost::wave::grammars::expression_grammar_gen; +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_cpp_grammar.cpp b/src/instantiate_cpp_grammar.cpp index 4746dd6..2015702 100644 --- a/src/instantiate_cpp_grammar.cpp +++ b/src/instantiate_cpp_grammar.cpp @@ -7,6 +7,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 @@ -18,6 +19,17 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + +// suppress warnings about dependent classes not being exported from the dll +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable : 4251 4231 4660) +#endif + /////////////////////////////////////////////////////////////////////////////// // // Explicit instantiation of the cpp_grammar_gen template with the correct @@ -32,5 +44,10 @@ typedef boost::wave::cpplexer::lex_iterator< lexer_type; template struct boost::wave::grammars::cpp_grammar_gen; +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_cpp_literalgrs.cpp b/src/instantiate_cpp_literalgrs.cpp index c634b47..4669643 100644 --- a/src/instantiate_cpp_literalgrs.cpp +++ b/src/instantiate_cpp_literalgrs.cpp @@ -7,6 +7,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 @@ -20,6 +21,11 @@ #include #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // Explicit instantiation of the intlit_grammar_gen and chlit_grammar_gen @@ -33,5 +39,10 @@ typedef boost::wave::cpplexer::lex_token<> token_type; template struct boost::wave::grammars::intlit_grammar_gen; template struct boost::wave::grammars::chlit_grammar_gen; +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_defined_grammar.cpp b/src/instantiate_defined_grammar.cpp index 7ba6854..4dbc7d8 100644 --- a/src/instantiate_defined_grammar.cpp +++ b/src/instantiate_defined_grammar.cpp @@ -7,6 +7,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 @@ -18,6 +19,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // Explicit instantiation of the defined_grammar_gen template @@ -32,5 +38,10 @@ typedef boost::wave::cpplexer::lex_iterator< lexer_type; template struct boost::wave::grammars::defined_grammar_gen; +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_predef_macros.cpp b/src/instantiate_predef_macros.cpp index 4427326..0165581 100644 --- a/src/instantiate_predef_macros.cpp +++ b/src/instantiate_predef_macros.cpp @@ -7,6 +7,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 @@ -18,6 +19,11 @@ #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // Explicit instantiation of the predefined_macros_grammar_gen template @@ -32,5 +38,10 @@ typedef boost::wave::cpplexer::lex_iterator< lexer_type; template struct boost::wave::grammars::predefined_macros_grammar_gen; +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif + #endif // #if BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION != 0 diff --git a/src/instantiate_re2c_lexer.cpp b/src/instantiate_re2c_lexer.cpp index e522cd5..6302d4d 100644 --- a/src/instantiate_re2c_lexer.cpp +++ b/src/instantiate_re2c_lexer.cpp @@ -9,6 +9,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include // configuration data #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 @@ -24,6 +25,11 @@ // program. #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // This instantiates the correct 'new_lexer' function, which generates the @@ -43,5 +49,12 @@ template struct boost::wave::cpplexer::new_lexer_gen< BOOST_WAVE_STRINGTYPE::iterator>; +template struct boost::wave::cpplexer::new_lexer_gen< + BOOST_WAVE_STRINGTYPE::const_iterator>; + +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 diff --git a/src/instantiate_re2c_lexer_str.cpp b/src/instantiate_re2c_lexer_str.cpp index a504f32..fdb3f6c 100644 --- a/src/instantiate_re2c_lexer_str.cpp +++ b/src/instantiate_re2c_lexer_str.cpp @@ -9,6 +9,7 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#define BOOST_WAVE_SOURCE 1 #include // configuration data #if BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 @@ -24,6 +25,11 @@ // program. #include +// this must occur after all of the includes and before any code appears +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_PREFIX +#endif + /////////////////////////////////////////////////////////////////////////////// // // If you've used another iterator type as std::string::iterator, you have to @@ -43,5 +49,11 @@ /////////////////////////////////////////////////////////////////////////////// template struct boost::wave::cpplexer::new_lexer_gen; +template struct boost::wave::cpplexer::new_lexer_gen; + +// the suffix header occurs after all of the code +#ifdef BOOST_HAS_ABI_HEADERS +#include BOOST_ABI_SUFFIX +#endif #endif // BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION != 0 diff --git a/test/build/Jamfile b/test/build/Jamfile index c207a3b..8e2dfed 100644 --- a/test/build/Jamfile +++ b/test/build/Jamfile @@ -55,8 +55,6 @@ template wave-lexer-test <*>off std::locale-support : -# static -# single debug # build variants ; @@ -75,8 +73,23 @@ template wave-test <*>off std::locale-support : -# static -# single + debug # build variants + ; + +template wave-test-dll + : + ../../build/boost_wave # sources + ../../../program_options/build/boost_program_options + ../../../filesystem/build/boost_filesystem + : + $(BOOST_ROOT) + $(BOOST_ROOT) + <*>off # workaround for compiler bug + <*>off + std::locale-support + BOOST_ALL_DYN_LINK=1 + dynamic + : debug # build variants ; @@ -85,6 +98,25 @@ template wave-test # test-suite wave : + # test the wave preprocessing component (dll version) + [ + run + # sources +