Merge pull request #328 from eldiener/develop

Further changes for Embarcadero C++ clang-based compilers
This commit is contained in:
jzmaddock
2020-04-07 21:56:04 +01:00
committed by GitHub
4 changed files with 34 additions and 38 deletions

View File

@ -9,18 +9,38 @@
// CodeGear C++ compiler setup:
//
// versions check:
// last known and checked version is 0x740
#if (__CODEGEARC__ > 0x740)
# if defined(BOOST_ASSERT_CONFIG)
# error "boost: Unknown compiler version - please run the configure tests and report the results"
# else
# pragma message( "boost: Unknown compiler version - please run the configure tests and report the results")
# endif
#endif
#ifdef __clang__ // Clang enhanced Windows compiler
# include "clang.hpp"
# define BOOST_NO_CXX11_THREAD_LOCAL
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
// 32 functions are missing from the current RTL in cwchar, so it really can not be used even if it exists
# define BOOST_NO_CWCHAR
# ifndef __MT__ /* If compiling in single-threaded mode, assume there is no CXX11_HDR_ATOMIC */
# define BOOST_NO_CXX11_HDR_ATOMIC
# endif
#define BOOST_NO_FENV_H /* temporarily disable this until we can link against fegetround fesetround feholdexcept */
#define BOOST_NO_CXX11_HDR_EXCEPTION /* Reported this bug to Embarcadero with the latest C++ Builder Rio release */
/* temporarily disable this until we can link against fegetround fesetround feholdexcept */
#define BOOST_NO_FENV_H
/* Reported this bug to Embarcadero with the latest C++ Builder Rio release */
#define BOOST_NO_CXX11_HDR_EXCEPTION
//
// check for exception handling support:
@ -103,33 +123,16 @@
#endif /* defined(BOOST_EMBTC) */
#if defined(BOOST_EMBTC_WINDOWS)
// About TR1 headers and features:
// BOOST_HAS_TR1_*-style definitions are placed in "boost\tr1\detail\config.hpp",
// because there, they will always be found, but here, they may be not check.
// // This is needed to allow 64-bit integers in cstdint.hpp
//# define BOOST_HAS_MS_INT64
#if !defined(_chdir)
#define _chdir(x) chdir(x)
#endif
//# define BOOST_HAS_RVALUE_REFS
#if !defined(_dup2)
#define _dup2(x,y) dup2(x,y)
#endif
// // Boost.Fusion should not use its preprocessed templates,
// // due to we can use its variadic cpp11 templates. If that
// // macro is not defined it tries to use both at the same time
// // giving a redefinition error.
//# define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
// // Bcc64 don't have this <fenv.h> header
//# define BOOST_NO_FENV_H
// // This is not necessary with the last versions of bcc64
//# if !defined(__FUNC__)
//# define __FUNC__ __func__
//# endif
// FVTODO: This was uncommended with 1_55 - prolly worth testing this by uncommenting it.
// Dinkumware on Win32 and Win64 platforms has <cstdint>
// # define BOOST_HAS_STDINT_H
#endif /* BOOST_EMBTC_WINDOWS */
#endif
# undef BOOST_COMPILER
# define BOOST_COMPILER "Embarcadero-Clang C++ version " BOOST_STRINGIZE(__CODEGEARC__) " clang: " __clang_version__
@ -150,16 +153,6 @@
# pragma warn -8104 // static members with ctors not threadsafe
# pragma warn -8105 // reference member in class without ctors
#endif
//
// versions check:
// last known and checked version is 0x621
#if (__CODEGEARC__ > 0x740)
# if defined(BOOST_ASSERT_CONFIG)
# error "boost: Unknown compiler version - please run the configure tests and report the results"
# else
# pragma message( "boost: Unknown compiler version - please run the configure tests and report the results")
# endif
#endif
// CodeGear C++ Builder 2009
#if (__CODEGEARC__ <= 0x613)

View File

@ -35,7 +35,7 @@
#endif
//
// ensure that visibility macros are always defined, thus symplifying use
// ensure that visibility macros are always defined, thus simplifying use
//
#ifndef BOOST_SYMBOL_EXPORT
# define BOOST_SYMBOL_EXPORT

View File

@ -98,7 +98,7 @@
#endif
#include <typeinfo>
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (defined(__ghs__) && !_HAS_NAMESPACE) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \
&& !defined(__VXWORKS__)
&& !defined(__VXWORKS__) && !defined(BOOST_EMBTC_WINDOWS)
# define BOOST_NO_STD_TYPEINFO
#endif
#endif

View File

@ -18,6 +18,9 @@ int test()
{
wchar_t c1[2] = { 0 };
wchar_t c2[2] = { 0 };
char c3[2] = { 0 };
mbstate_t mb = mbstate_t();
if(!mbsinit(&mb) || mbrlen(c3,1,&mb)) return -1;
if(wcscmp(c1,c2) || wcslen(c1)) return -1;
//wcscpy(c1,c2);
wcsxfrm(c1,c2,0);