diff --git a/include/boost/regex/config.hpp b/include/boost/regex/config.hpp index 806ead59..12a68965 100644 --- a/include/boost/regex/config.hpp +++ b/include/boost/regex/config.hpp @@ -59,6 +59,9 @@ # include # include # include +# ifndef BOOST_NO_STD_LOCALE +# include +# endif #else // // C build, @@ -223,7 +226,11 @@ using std::distance; #endif #if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) -# include +# define BOOST_LIB_NAME "boost_regex" +# ifdef BOOST_REGEX_DYN_LINK +# define BOOST_DYN_LINK +# endif +# include #endif /***************************************************************************** @@ -612,3 +619,4 @@ BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info(); #endif + diff --git a/include/boost/regex/config/cstring.hpp b/include/boost/regex/config/cstring.hpp index dcc480d7..76809274 100644 --- a/include/boost/regex/config/cstring.hpp +++ b/include/boost/regex/config/cstring.hpp @@ -33,23 +33,29 @@ namespace std{ -#ifndef BOOST_NO_STDC_NAMESPACE -extern "C"{ +#ifdef __BORLANDC__ +#pragma option push -w-8008 -w-8066 -w-8004 #endif +#ifdef BOOST_NO_STDC_NAMESPACE + // Any function that is a macro is converted into an inline function: #ifdef memcmp -inline int (memcmp)(const void * p1, const void * p2, size_t s) +inline int boost_memcmp(const void * p1, const void * p2, size_t s) { return memcmp(p1, p2, s); } #undef memcmp +inline int memcmp(const void * p1, const void * p2, size_t s) +{ return boost_memcmp(p1, p2, s); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::memcmp; #endif #ifdef memcpy -inline void *(memcpy)(void * p1, const void *p2, size_t s) +inline void *boost_memcpy(void * p1, const void *p2, size_t s) { return memcpy(p1, p2, s); } #undef memcpy +inline void *memcpy(void * p1, const void *p2, size_t s) +{ return boost_memcpy(p1, p2, s); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::memcpy; #endif @@ -63,121 +69,151 @@ using ::memmove; #endif #ifdef memset -inline void *(memset)(void *p, int a, size_t b) +inline void *(boost_memset)(void *p, int a, size_t b) { return memset(p,a,b); } #undef memset +inline void *(memset)(void *p, int a, size_t b) +{ return boost_memset(p,a,b); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::memset; #endif #ifdef strcat -inline char *(strcat)(char *p1, const char *p2) +inline char *(boost_strcat)(char *p1, const char *p2) { return strcat(p1,p2); } #undef strcat +inline char *(strcat)(char *p1, const char *p2) +{ return boost_strcat(p1,p2); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::strcat; #endif #ifdef strcmp -inline int (strcmp)(const char *p1, const char *p2) +inline int (boost_strcmp)(const char *p1, const char *p2) { return strcmp(p1,p2); } #undef strcmp +inline int (strcmp)(const char *p1, const char *p2) +{ return boost_strcmp(p1,p2); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::strcmp; #endif #ifdef strcoll -inline int (strcoll)(const char *p1, const char *p2) +inline int (boost_strcoll) (const char *p1, const char *p2) { return strcoll(p1,p2); } #undef strcoll +inline int (strcoll) (const char *p1, const char *p2) +{ return boost_strcoll(p1,p2); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::strcoll; #endif #ifdef strcpy -inline char *(strcpy)(char *p1, const char *p2) +inline char *(boost_strcpy)(char *p1, const char *p2) { return strcpy(p1,p2); } #undef strcpy +inline char *(strcpy)(char *p1, const char *p2) +{ return boost_strcpy(p1,p2); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::strcpy; #endif #ifdef strlen -inline size_t (strlen)(const char *p) +inline size_t (boost_strlen)(const char *p) { return strlen(p); } #undef strlen +inline size_t (strlen)(const char *p) +{ return boost_strlen(p); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::strlen; #endif #ifdef strxfrm -inline size_t (strxfrm)(char *p1, const char *p2, size_t s) +inline size_t (boost_strxfrm)(char *p1, const char *p2, size_t s) { return strxfrm(p1,p2,s); } #undef strxfrm +inline size_t (strxfrm)(char *p1, const char *p2, size_t s) +{ return boost_strxfrm(p1,p2,s); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::strxfrm; #endif #ifdef isalnum -inline int (isalnum)(int i) +inline int (boost_isalnum)(int i) { return isalnum(i); } #undef isalnum +inline int (isalnum)(int i) +{ return boost_isalnum(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isalnum; #endif #ifdef isalpha -inline int (isalpha)(int i) +inline int (boost_isalpha)(int i) { return isalpha(i); } #undef isalpha +inline int (isalpha)(int i) +{ return boost_isalpha(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isalpha; #endif #ifdef iscntrl -inline int (iscntrl)(int i) +inline int (boost_iscntrl)(int i) { return iscntrl(i); } #undef iscntrl +inline int (iscntrl)(int i) +{ return boost_iscntrl(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iscntrl; #endif #ifdef isdigit -inline int (isdigit)(int i) +inline int (boost_isdigit)(int i) { return isdigit(i); } #undef isdigit +inline int (isdigit)(int i) +{ return boost_isdigit(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isdigit; #endif #ifdef isgraph -inline int (isgraph)(int i) +inline int (boost_isgraph)(int i) { return isgraph(i); } #undef isgraph +inline int (isgraph)(int i) +{ return boost_isgraph(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isgraph; #endif #ifdef islower -inline int (islower)(int i) +inline int (boost_islower)(int i) { return islower(i); } #undef islower +inline int (islower)(int i) +{ return boost_islower(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::islower; #endif #ifdef isprint -inline int (isprint)(int i) +inline int (boost_isprint)(int i) { return isprint(i); } #undef isprint +inline int (isprint)(int i) +{ return boost_isprint(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isprint; #endif #ifdef ispunct -inline int (ispunct)(int i) +inline int (boost_ispunct)(int i) { return ispunct(i); } #undef ispunct +inline int (ispunct)(int i) +{ return boost_ispunct(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::ispunct; #endif @@ -185,6 +221,9 @@ using ::ispunct; #ifdef isspace inline int (isspace)(int i) { return isspace(i); } +#undef isspace +inline int (boost_isspace)(int i) +{ return boost_isspace(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isspace; #endif @@ -201,28 +240,62 @@ using ::isupper; inline int (isxdigit)(int i) { return isxdigit(i); } #undef isxdigit +inline int (boost_isxdigit)(int i) +{ return boost_isxdigit(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::isxdigit; #endif #ifdef tolower -inline int (tolower)(int i) +inline int (boost_tolower)(int i) { return tolower(i); } #undef tolower +inline int (tolower)(int i) +{ return boost_tolower(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::tolower; #endif #ifdef toupper -inline int (toupper)(int i) +inline int (boost_toupper)(int i) { return toupper(i); } #undef toupper +inline int (toupper)(int i) +{ return boost_toupper(i); } #elif defined(BOOST_NO_STDC_NAMESPACE) using ::toupper; #endif -#ifndef BOOST_NO_STDC_NAMESPACE -} // extern "C" +#ifdef __BORLANDC__ +#pragma option pop +#endif + +#else + +#undef memcmp +#undef memcpy +#undef memmove +#undef memset +#undef strcat +#undef strcmp +#undef strcoll +#undef strcpy +#undef strlen +#undef strxfrm +#undef isalnum +#undef isalpha +#undef iscntrl +#undef isdigit +#undef isgraph +#undef islower +#undef isprint +#undef ispunct +#undef isspace +#undef isupper +#undef isxdigit +#undef tolower +#undef toupper + #endif } // namespace std diff --git a/include/boost/regex/pattern_except.hpp b/include/boost/regex/pattern_except.hpp index 9fdad69c..6c050373 100644 --- a/include/boost/regex/pattern_except.hpp +++ b/include/boost/regex/pattern_except.hpp @@ -29,8 +29,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC @@ -54,9 +54,8 @@ public: ~bad_expression() throw(); }; - -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/basic_regex.hpp b/include/boost/regex/v4/basic_regex.hpp index 1c121251..3ab54297 100644 --- a/include/boost/regex/v4/basic_regex.hpp +++ b/include/boost/regex/v4/basic_regex.hpp @@ -24,8 +24,8 @@ #ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP #define BOOST_REGEX_V4_BASIC_REGEX_HPP -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -388,8 +388,8 @@ public: } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/cregex.hpp b/include/boost/regex/v4/cregex.hpp index db01056a..8358b866 100644 --- a/include/boost/regex/v4/cregex.hpp +++ b/include/boost/regex/v4/cregex.hpp @@ -29,8 +29,8 @@ #endif #include -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif /* include these defs only for POSIX compatablity */ @@ -160,20 +160,15 @@ typedef enum REG_E_UNKNOWN = 18 /* unknown error */ } reg_errcode_t; +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif #ifdef __cplusplus } // extern "C" } // namespace #endif - -#ifdef __BORLANDC__ - #if __BORLANDC__ > 0x520 - #pragma option pop - #endif -#endif - - // // C++ high level wrapper goes here: // @@ -182,12 +177,8 @@ typedef enum #include namespace boost{ -#ifdef __BORLANDC__ - #if __BORLANDC__ == 0x530 - #pragma option push -a4 -b - #elif __BORLANDC__ > 0x530 - #pragma option push -a8 -b - #endif +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif class RegEx; @@ -273,8 +264,8 @@ public: friend struct re_detail::pred4; }; -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/fileiter.hpp b/include/boost/regex/v4/fileiter.hpp index eaf18ba2..0ddf8488 100644 --- a/include/boost/regex/v4/fileiter.hpp +++ b/include/boost/regex/v4/fileiter.hpp @@ -82,8 +82,8 @@ using std::list; namespace boost{ namespace re_detail{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif struct _fi_find_data @@ -102,12 +102,6 @@ _fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindF bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData); bool _fi_FindClose(_fi_find_handle hFindFile); -#ifdef __BORLANDC__ - #if __BORLANDC__ > 0x520 - #pragma option pop - #endif -#endif - } // namespace re_detail } // namespace boost @@ -130,14 +124,6 @@ bool _fi_FindClose(_fi_find_handle hFindFile); namespace boost{ namespace re_detail{ -#ifdef __BORLANDC__ - #if __BORLANDC__ == 0x530 - #pragma option push -a4 -b - #elif __BORLANDC__ > 0x530 - #pragma option push -a8 -b - #endif -#endif - #ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile class BOOST_REGEX_DECL mapfile @@ -424,8 +410,8 @@ inline bool operator < (const directory_iterator&, const directory_iterator&) return false; } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif diff --git a/include/boost/regex/v4/instances.hpp b/include/boost/regex/v4/instances.hpp index d0238226..bcee1b9b 100644 --- a/include/boost/regex/v4/instances.hpp +++ b/include/boost/regex/v4/instances.hpp @@ -43,7 +43,9 @@ namespace boost{ #ifdef __BORLANDC__ -#pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif # ifndef BOOST_REGEX_INSTANTIATE # pragma option push -Jgx @@ -55,7 +57,9 @@ template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >; # pragma option pop # endif -#pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif #elif defined(BOOST_MSVC) || defined(__GNUC__) diff --git a/include/boost/regex/v4/iterator_traits.hpp b/include/boost/regex/v4/iterator_traits.hpp index 42f22241..7ab19eca 100644 --- a/include/boost/regex/v4/iterator_traits.hpp +++ b/include/boost/regex/v4/iterator_traits.hpp @@ -23,8 +23,8 @@ #ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP #define BOOST_REGEX_V4_ITERATOR_TRAITS_HPP -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -99,8 +99,8 @@ struct regex_iterator_traits : public std::iterator_traits {}; } // namespace re_detail } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/match_results.hpp b/include/boost/regex/v4/match_results.hpp index 951660ea..3a0d7030 100644 --- a/include/boost/regex/v4/match_results.hpp +++ b/include/boost/regex/v4/match_results.hpp @@ -23,8 +23,8 @@ #ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP #define BOOST_REGEX_V4_MATCH_RESULTS_HPP -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -313,8 +313,8 @@ std::ostream& operator << (std::ostream& os, } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/mem_block_cache.hpp b/include/boost/regex/v4/mem_block_cache.hpp index 75e1928e..62dfe397 100644 --- a/include/boost/regex/v4/mem_block_cache.hpp +++ b/include/boost/regex/v4/mem_block_cache.hpp @@ -25,8 +25,8 @@ #include #include -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -90,8 +90,8 @@ extern mem_block_cache block_cache; } } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index 6d8f68bb..7fea54de 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/boost/regex/v4/perl_matcher.hpp @@ -19,8 +19,8 @@ #include #include -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8026 -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -426,6 +426,10 @@ private: } // namespace re_detail +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif + } // namespace boost // @@ -439,8 +443,4 @@ private: // this one has to be last: #include -#ifdef __BORLANDC__ - #pragma option pop -#endif - #endif diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp index 38e00776..e5d26ff2 100644 --- a/include/boost/regex/v4/perl_matcher_common.hpp +++ b/include/boost/regex/v4/perl_matcher_common.hpp @@ -24,8 +24,12 @@ #ifndef BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP #define BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif + #ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 -w-8066 -w-8008 +# pragma option push -w-8008 -w-8066 #endif namespace boost{ @@ -789,5 +793,8 @@ bool perl_matcher::find_restart_lit #ifdef __BORLANDC__ # pragma option pop #endif +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif #endif diff --git a/include/boost/regex/v4/perl_matcher_non_recursive.hpp b/include/boost/regex/v4/perl_matcher_non_recursive.hpp index fd20fc7f..9e8929c5 100644 --- a/include/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -26,8 +26,11 @@ #include +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif #ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 -w-8066 -w-8008 +#pragma option push -w-8008 -w-8066 -w-8004 #endif namespace boost{ @@ -1156,7 +1159,7 @@ bool perl_matcher::unwind_long_set_ saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: - if(r) + if(r) { destroy_single_repeat(); return true; @@ -1194,7 +1197,7 @@ bool perl_matcher::unwind_long_set_ } if(position == last) { - // can't repeat any more, remove the pushed state: + // can't repeat any more, remove the pushed state: destroy_single_repeat(); if(rep->can_be_null & mask_skip) return true; @@ -1234,7 +1237,10 @@ bool perl_matcher::unwind_non_greed } // namespace boost #ifdef __BORLANDC__ -# pragma option pop +#pragma option pop +#endif +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/perl_matcher_recursive.hpp b/include/boost/regex/v4/perl_matcher_recursive.hpp index c51bc701..a237290f 100644 --- a/include/boost/regex/v4/perl_matcher_recursive.hpp +++ b/include/boost/regex/v4/perl_matcher_recursive.hpp @@ -24,8 +24,11 @@ #ifndef BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP #define BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif #ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 -w-8066 -w-8008 +#pragma option push -w-8008 -w-8066 -w-8004 #endif namespace boost{ @@ -683,9 +686,11 @@ bool perl_matcher::backtrack_till_m } // namespace re_detail } // namespace boost - #ifdef __BORLANDC__ -# pragma option pop +#pragma option pop +#endif +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/regbase.hpp b/include/boost/regex/v4/regbase.hpp index 8a9f4952..792dc8a7 100644 --- a/include/boost/regex/v4/regbase.hpp +++ b/include/boost/regex/v4/regbase.hpp @@ -23,8 +23,8 @@ #ifndef BOOST_REGEX_V4_REGBASE_HPP #define BOOST_REGEX_V4_REGBASE_HPP -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -145,8 +145,8 @@ namespace regex_constants{ } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/regex_compile.hpp b/include/boost/regex/v4/regex_compile.hpp index 36ce2fd0..a999656b 100644 --- a/include/boost/regex/v4/regex_compile.hpp +++ b/include/boost/regex/v4/regex_compile.hpp @@ -25,10 +25,14 @@ #define BOOST_REGEX_COMPILE_HPP namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8004 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif - namespace re_detail{ +#ifdef __BORLANDC__ +#pragma option push -w-8004 +#endif + +namespace re_detail{ template @@ -2160,9 +2164,11 @@ void BOOST_REGEX_CALL reg_expression::fail(unsigned in _flags &= ~regex_constants::failbit; } - #ifdef __BORLANDC__ - #pragma option pop +#pragma option pop +#endif +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_cstring.hpp b/include/boost/regex/v4/regex_cstring.hpp index 99495024..f2896f79 100644 --- a/include/boost/regex/v4/regex_cstring.hpp +++ b/include/boost/regex/v4/regex_cstring.hpp @@ -34,10 +34,6 @@ namespace boost{ namespace re_detail{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -#endif - // // start by defining some template function aliases for C API functions: // @@ -119,10 +115,6 @@ inline void BOOST_REGEX_CALL re_strfree(charT* p) delete[] p; } -#ifdef __BORLANDC__ - #pragma option pop -#endif - } // namespace re_detail } // namespace boost diff --git a/include/boost/regex/v4/regex_format.hpp b/include/boost/regex/v4/regex_format.hpp index e0331c26..105a4560 100644 --- a/include/boost/regex/v4/regex_format.hpp +++ b/include/boost/regex/v4/regex_format.hpp @@ -28,8 +28,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8037 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif // @@ -143,6 +143,9 @@ OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out, const charT*& fmt, match_flag_type flags, const traits_type& traits_inst) { +#ifdef __BORLANDC__ +#pragma option push -w-8037 +#endif const charT* fmt_end = fmt; while(*fmt_end) ++ fmt_end; @@ -424,6 +427,9 @@ default_opt: } return out; +#ifdef __BORLANDC__ +#pragma option pop +#endif } #if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE) @@ -520,8 +526,8 @@ std::basic_string regex_format(const match_results& return result; } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_grep.hpp b/include/boost/regex/v4/regex_grep.hpp index a1b382dc..c15c0c13 100644 --- a/include/boost/regex/v4/regex_grep.hpp +++ b/include/boost/regex/v4/regex_grep.hpp @@ -26,11 +26,10 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8037 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif - // // regex_grep: // find all non-overlapping matches within the sequence first last: @@ -138,8 +137,8 @@ inline unsigned int regex_grep(bool (*foo)(const match_results @@ -98,8 +98,8 @@ kmp_info* kmp_compile(iterator first, iterator last, charT, Trans transla return pinfo; } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namepsace re_detail diff --git a/include/boost/regex/v4/regex_match.hpp b/include/boost/regex/v4/regex_match.hpp index 4c4eef89..9b0da41d 100644 --- a/include/boost/regex/v4/regex_match.hpp +++ b/include/boost/regex/v4/regex_match.hpp @@ -36,8 +36,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8026 -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif // @@ -169,8 +169,8 @@ inline bool regex_match(const std::basic_string& s, #endif -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_merge.hpp b/include/boost/regex/v4/regex_merge.hpp index f2286533..a2805b71 100644 --- a/include/boost/regex/v4/regex_merge.hpp +++ b/include/boost/regex/v4/regex_merge.hpp @@ -28,8 +28,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8037 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif template @@ -72,8 +72,8 @@ inline std::basic_string regex_merge(const std::basic_string& s, return regex_replace(s, e, fmt, flags); } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_raw_buffer.hpp b/include/boost/regex/v4/regex_raw_buffer.hpp index 79ae72be..8e9987c6 100644 --- a/include/boost/regex/v4/regex_raw_buffer.hpp +++ b/include/boost/regex/v4/regex_raw_buffer.hpp @@ -32,8 +32,8 @@ namespace boost{ namespace re_detail{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif struct empty_padding{}; @@ -241,8 +241,8 @@ void* BOOST_REGEX_CALL raw_storage::insert(size_type pos, size_type n return result; } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace re_detail diff --git a/include/boost/regex/v4/regex_replace.hpp b/include/boost/regex/v4/regex_replace.hpp index 37383da2..7aced606 100644 --- a/include/boost/regex/v4/regex_replace.hpp +++ b/include/boost/regex/v4/regex_replace.hpp @@ -28,8 +28,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8037 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif template @@ -81,8 +81,8 @@ std::basic_string regex_replace(const std::basic_string& s, return result; } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_search.hpp b/include/boost/regex/v4/regex_search.hpp index 7c8b9289..d806c2d4 100644 --- a/include/boost/regex/v4/regex_search.hpp +++ b/include/boost/regex/v4/regex_search.hpp @@ -26,8 +26,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc -w-8037 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif template @@ -187,8 +187,8 @@ inline bool regex_search(const std::basic_string& s, #endif -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_split.hpp b/include/boost/regex/v4/regex_split.hpp index a21c6034..16c66e97 100644 --- a/include/boost/regex/v4/regex_split.hpp +++ b/include/boost/regex/v4/regex_split.hpp @@ -27,8 +27,8 @@ namespace boost{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace re_detail{ @@ -142,8 +142,8 @@ inline std::size_t regex_split(OutputIterator out, return regex_split(out, s, re_detail::get_default_expression(charT(0)), match_default, UINT_MAX); } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/regex_stack.hpp b/include/boost/regex/v4/regex_stack.hpp index eb28cace..b9fd3e1f 100644 --- a/include/boost/regex/v4/regex_stack.hpp +++ b/include/boost/regex/v4/regex_stack.hpp @@ -35,8 +35,8 @@ namespace boost{ namespace re_detail{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif // @@ -60,7 +60,7 @@ private: T* end; // last item T* last; // end of storage }; - + // // empty base member optimisation: struct data : public allocator_type @@ -208,8 +208,8 @@ jstack::~jstack() } } -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace re_detail diff --git a/include/boost/regex/v4/regex_synch.hpp b/include/boost/regex/v4/regex_synch.hpp index c3e4a9f3..ac8ff7cf 100644 --- a/include/boost/regex/v4/regex_synch.hpp +++ b/include/boost/regex/v4/regex_synch.hpp @@ -46,8 +46,8 @@ namespace boost{ namespace re_detail{ -#ifdef __BORLANDC__ - #pragma option push -a8 -b -Vx -Ve -pc +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif void BOOST_REGEX_CALL re_init_threads(); @@ -197,8 +197,8 @@ BOOST_REGEX_DECL extern unsigned int re_lock_count; #endif // BOOST_HAS_THREADS -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace re_detail diff --git a/include/boost/regex/v4/regex_token_iterator.hpp b/include/boost/regex/v4/regex_token_iterator.hpp index 1211f2a8..242d9095 100644 --- a/include/boost/regex/v4/regex_token_iterator.hpp +++ b/include/boost/regex/v4/regex_token_iterator.hpp @@ -40,6 +40,14 @@ namespace boost{ +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif +#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +# pragma warning(push) +# pragma warning(disable:4700) +#endif + template @@ -543,18 +543,6 @@ private: #if !defined(BOOST_NO_STD_LOCALE) -} // namspace boost - -#ifdef __BORLANDC__ - #pragma option pop -#endif -#include -#ifdef __BORLANDC__ - #pragma option push -a4 -b -Ve -pc -#endif - -namespace boost{ - namespace re_detail { @@ -806,8 +794,8 @@ class regex_traits : public cpp_regex_traits #error No default localisation model defined #endif -#ifdef __BORLANDC__ - #pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif } // namespace boost diff --git a/include/boost/regex/v4/states.hpp b/include/boost/regex/v4/states.hpp index 3cc79e84..b9948f97 100644 --- a/include/boost/regex/v4/states.hpp +++ b/include/boost/regex/v4/states.hpp @@ -23,8 +23,8 @@ #ifndef BOOST_REGEX_V4_STATES_HPP #define BOOST_REGEX_V4_STATES_HPP -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -226,8 +226,8 @@ iterator BOOST_REGEX_CALL re_is_set_member(iterator next, } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif diff --git a/include/boost/regex/v4/sub_match.hpp b/include/boost/regex/v4/sub_match.hpp index b67dd3ac..d67ab4eb 100644 --- a/include/boost/regex/v4/sub_match.hpp +++ b/include/boost/regex/v4/sub_match.hpp @@ -23,8 +23,8 @@ #ifndef BOOST_REGEX_V4_SUB_MATCH_HPP #define BOOST_REGEX_V4_SUB_MATCH_HPP -#ifdef __BORLANDC__ -# pragma option push -a8 -b -Vx -Ve -pc -w-8027 +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX #endif namespace boost{ @@ -330,8 +330,8 @@ sub_match::operator unsigned int()const } // namespace boost -#ifdef __BORLANDC__ -# pragma option pop +#ifdef BOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX #endif #endif