
Gennadiy Rozental wrote:
"David Deakins" <ddeakins@veeco.com> wrote in message
- The Windows CE CRT does not support _set_se_translator or _set_invalid_parameter_handler.
There already workarounds in place for different compilers for missing symbols above. Can you try to fit in with additional conditions instead of extra ifdefs inside the code
My apologies for not studying the code more carefully. I have attached a new version of the patch following the existing method for handling these missing symbols.
- The Windows CE CRT supplies _vsnprintf instead of vsnprintf.
This one applied
- The Windows CE CRT does not support errno.
What does it support instead?
It only provides the Win32 GetLastError() method for this functionality. I have revised the patch to reflect this. Thanks, -Dave Index: execution_monitor.ipp =================================================================== --- execution_monitor.ipp (revision 40282) +++ execution_monitor.ipp (working copy) @@ -65,7 +65,7 @@ # include <stdint.h> #endif -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300 ) +# if BOOST_WORKAROUND(BOOST_MSVC, < 1300 ) || defined(UNDER_CE) typedef void* uintptr_t; # endif @@ -101,7 +101,7 @@ # include <crtdbg.h> # endif -# if !BOOST_WORKAROUND(_MSC_VER, >= 1400 ) +# if !BOOST_WORKAROUND(_MSC_VER, >= 1400 ) || defined(UNDER_CE) typedef void* _invalid_parameter_handler; @@ -113,7 +113,7 @@ # endif -# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) || defined(UNDER_CE) namespace { void _set_se_translator( void* ) {} } @@ -141,7 +141,9 @@ #endif +#ifndef UNDER_CE #include <errno.h> +#endif #include <boost/test/detail/suppress_warnings.hpp> @@ -158,7 +160,8 @@ #ifdef __BORLANDC__ # define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) ) #elif BOOST_WORKAROUND(_MSC_VER, <= 1310) || \ - BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) + BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) || \ + defined(UNDER_CE) # define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) ) #else # define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) ) @@ -968,10 +971,12 @@ } detail::system_signal_exception SSE( this ); + + int ret_val = 0; __try { __try { - return detail::do_invoke( m_custom_translators , F ); + ret_val = detail::do_invoke( m_custom_translators , F ); } __except( SSE( GetExceptionCode(), GetExceptionInformation() ) ) { throw SSE; @@ -986,7 +991,7 @@ } } - return 0; + return ret_val; } //____________________________________________________________________________// @@ -1094,9 +1099,14 @@ // ************************************************************************** // system_error::system_error() +#ifdef UNDER_CE +: p_errno( GetLastError() ) +#else : p_errno( errno ) +#endif {} + //____________________________________________________________________________// } // namespace boost