Skip to content

Commit cc09733

Browse files
committed
Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers.
1 parent d961318 commit cc09733

34 files changed

+62
-62
lines changed

example/snippets/regex_grep_example_4.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* using a C++ Builder closure as a callback.
1818
*/
1919

20-
#ifdef __BORLANDC__
20+
#ifdef __BORLANDC__ && !defined(__clang__)
2121

2222
#include <boost/regex.hpp>
2323
#include <string>
@@ -140,7 +140,7 @@ int main(int argc, const char** argv)
140140
return 0;
141141
}
142142

143-
#else // __BORLANDC__
143+
#else // __BORLANDC__ && !defined(__clang__)
144144

145145
int main()
146146
{

example/snippets/regex_match_example.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int process_ftp(const char* response, std::string* msg)
4949
return -1;
5050
}
5151

52-
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
52+
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550))
5353
//
5454
// problem with std::getline under MSVC6sp3
5555
istream& getline(istream& is, std::string& s)

example/snippets/regex_split_example_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ unsigned tokenise(std::list<std::string>& l, std::string& s)
3030
using namespace std;
3131

3232

33-
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
33+
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550))
3434
//
3535
// problem with std::getline under MSVC6sp3
3636
istream& getline(istream& is, std::string& s)

example/snippets/regex_token_iterator_eg_1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
using namespace std;
2424

2525

26-
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
26+
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550))
2727
//
2828
// problem with std::getline under MSVC6sp3
2929
istream& getline(istream& is, std::string& s)

example/timer/regex_timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class string_out_iterator
8989
};
9090

9191
namespace boost{
92-
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550)) || defined(__SGI_STL_PORT)
92+
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550)) || defined(__SGI_STL_PORT)
9393
//
9494
// problem with std::getline under MSVC6sp3
9595
// and C++ Builder 5.5, is this really that hard?

include/boost/regex/config.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* Borland C++ Fix/error check
2323
* this has to go *before* we include any std lib headers:
2424
*/
25-
#if defined(__BORLANDC__)
25+
#if defined(__BORLANDC__) && !defined(__clang__)
2626
# include <boost/regex/config/borland.hpp>
2727
#endif
2828
#include <boost/version.hpp>
@@ -278,7 +278,7 @@
278278
# define BOOST_REGEX_CCALL __cdecl
279279
#endif
280280

281-
#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
281+
#if defined(__BORLANDC__) && !defined(__clang__) && !defined(BOOST_DISABLE_WIN32)
282282
# define BOOST_REGEX_CALL __fastcall
283283
# define BOOST_REGEX_CCALL __stdcall
284284
#endif
@@ -378,7 +378,7 @@ if(0 == (x))\
378378

379379
#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
380380
# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
381-
&& !defined(__GNUC__) \
381+
&& !(defined(__GNUC__) || defined(__BORLANDC__) && defined(__clang__)) \
382382
&& !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
383383
&& !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
384384
# define BOOST_REGEX_HAS_MS_STACK_GUARD

include/boost/regex/config/borland.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919

20-
#if defined(__BORLANDC__)
20+
#if defined(__BORLANDC__) && !defined(__clang__)
2121
# if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
2222
// problems with std::basic_string and dll RTL:
2323
# if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)

include/boost/regex/v4/cpp_regex_traits.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
616616
// std::collate<wchar_t>::transform returns a different string!
617617
// So as a workaround, we'll truncate the string at the first NULL
618618
// which _seems_ to work....
619-
#if BOOST_WORKAROUND(__BORLANDC__, < 0x580)
619+
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x580)
620620
result.erase(result.find(charT(0)));
621621
#else
622622
//
@@ -669,7 +669,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
669669
return pos->second;
670670
}
671671
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
672-
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
672+
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
673673
std::string name(p1, p2);
674674
#else
675675
std::string name;
@@ -679,7 +679,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
679679
#endif
680680
name = lookup_default_collate_name(name);
681681
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
682-
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
682+
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
683683
if(name.size())
684684
return string_type(name.begin(), name.end());
685685
#else

include/boost/regex/v4/cregex.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ struct pred4;
231231

232232
} /* namespace BOOST_REGEX_DETAIL_NS */
233233

234-
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32)
234+
#if (defined(BOOST_MSVC) || defined(BOOST_BORLANDC)) && !defined(BOOST_DISABLE_WIN32)
235235
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
236236
typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
237237
typedef bool (__cdecl *FindFilesCallback)(const char* file);

include/boost/regex/v4/instances.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace boost{
4141
// what follows is compiler specific:
4242
//
4343

44-
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
44+
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x600)
4545

4646
#ifdef BOOST_HAS_ABI_HEADERS
4747
# include BOOST_ABI_PREFIX

0 commit comments

Comments
 (0)