Index: boost/config/platform/linux.hpp =================================================================== --- boost/config/platform/linux.hpp (revision 57877) +++ boost/config/platform/linux.hpp (working copy) @@ -40,6 +40,11 @@ # define BOOST_NO_SWPRINTF # endif + // Comeau C++ (como) on linux does not have C99 functions + // (used in test, program_options) +# define BOOST_NO_SNPRINTF +# define BOOST_NO_VSNPRINTF + #endif // Index: boost/test/impl/execution_monitor.ipp =================================================================== --- boost/test/impl/execution_monitor.ipp (revision 57877) +++ boost/test/impl/execution_monitor.ipp (working copy) @@ -198,6 +198,10 @@ #include #endif +#if defined(BOOST_NO_VSNPRINTF) +using ::boost::unit_test::ut_detail::vsnprintf; +#endif + #include //____________________________________________________________________________// Index: boost/test/impl/debug.ipp =================================================================== --- boost/test/impl/debug.ipp (revision 57877) +++ boost/test/impl/debug.ipp (working copy) @@ -108,6 +108,10 @@ #endif +#if defined(BOOST_NO_SNPRINTF) +using ::boost::unit_test::ut_detail::snprintf; +#endif + #include //____________________________________________________________________________// Index: boost/test/detail/workaround.hpp =================================================================== --- boost/test/detail/workaround.hpp (revision 57877) +++ boost/test/detail/workaround.hpp (working copy) @@ -20,7 +20,7 @@ // STL #include // for std::distance - +#include // for sprintf, vsprintf #include //____________________________________________________________________________// @@ -48,6 +48,31 @@ using std::distance; #endif +// snprintf, vsnprintf workaround for Comeau C/C++ toolset +#if defined(__COMO__) + +# if defined(BOOST_NO_SNPRINTF) +int snprintf(char *s, size_t /*maxlen*/, const char *format, ...) +{ + va_list arg; + int retval; + va_start(arg, format); + retval = std::vsprintf(s, format, arg); + va_end(arg); + return retval; +} +# endif + +# if defined(BOOST_NO_VSNPRINTF) +int vsnprintf(char *s, size_t maxlen, const char *format, va_list arg) +{ + return std::vsprintf(s, format, arg); +} +# endif + +#endif + + template inline void ignore_unused_variable_warning(const T&) {} } // namespace ut_detail