borland.hpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. *
  3. * Copyright (c) 1998-2002
  4. * John Maddock
  5. *
  6. * Use, modification and distribution are subject to the
  7. * Boost Software License, Version 1.0. (See accompanying file
  8. * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. *
  10. */
  11. /*
  12. * LOCATION: see http://www.boost.org for most recent version.
  13. * FILE boost/regex/config/borland.hpp
  14. * VERSION see <boost/version.hpp>
  15. * DESCRIPTION: regex borland-specific config setup.
  16. */
  17. #if defined(__BORLANDC__) && !defined(__clang__)
  18. # if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
  19. // problems with std::basic_string and dll RTL:
  20. # if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
  21. # ifdef BOOST_REGEX_BUILD_DLL
  22. # error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
  23. # else
  24. # pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!")
  25. # endif
  26. # endif
  27. # ifndef _RTLDLL
  28. // this is harmless for a staic link:
  29. # define _RWSTD_COMPILE_INSTANTIATE
  30. # endif
  31. // external templates cause problems for some reason:
  32. # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
  33. # endif
  34. # if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL)
  35. // C++ Builder 4 and earlier, we can't tell whether we should be using
  36. // the VCL runtime or not, do a static link instead:
  37. # define BOOST_REGEX_STATIC_LINK
  38. # endif
  39. //
  40. // VCL support:
  41. // if we're building a console app then there can't be any VCL (can there?)
  42. # if !defined(__CONSOLE__) && !defined(_NO_VCL)
  43. # define BOOST_REGEX_USE_VCL
  44. # endif
  45. //
  46. // if this isn't Win32 then don't automatically select link
  47. // libraries:
  48. //
  49. # ifndef _Windows
  50. # ifndef BOOST_REGEX_NO_LIB
  51. # define BOOST_REGEX_NO_LIB
  52. # endif
  53. # ifndef BOOST_REGEX_STATIC_LINK
  54. # define BOOST_REGEX_STATIC_LINK
  55. # endif
  56. # endif
  57. #if __BORLANDC__ < 0x600
  58. //
  59. // string workarounds:
  60. //
  61. #include <cstring>
  62. #undef strcmp
  63. #undef strcpy
  64. #endif
  65. #endif