Ticket #3558: como-snprintf-svnprintf-ticket-3558.patch
File como-snprintf-svnprintf-ticket-3558.patch, 2.5 KB (added by , 13 years ago) |
---|
-
boost/config/platform/linux.hpp
40 40 # define BOOST_NO_SWPRINTF 41 41 # endif 42 42 43 // Comeau C++ (como) on linux does not have C99 functions 44 // (used in test, program_options) 45 # define BOOST_NO_SNPRINTF 46 # define BOOST_NO_VSNPRINTF 47 43 48 #endif 44 49 45 50 // -
boost/test/impl/execution_monitor.ipp
198 198 #include <errno.h> 199 199 #endif 200 200 201 #if defined(BOOST_NO_VSNPRINTF) 202 using ::boost::unit_test::ut_detail::vsnprintf; 203 #endif 204 201 205 #include <boost/test/detail/suppress_warnings.hpp> 202 206 203 207 //____________________________________________________________________________// -
boost/test/impl/debug.ipp
108 108 109 109 #endif 110 110 111 #if defined(BOOST_NO_SNPRINTF) 112 using ::boost::unit_test::ut_detail::snprintf; 113 #endif 114 111 115 #include <boost/test/detail/suppress_warnings.hpp> 112 116 113 117 //____________________________________________________________________________// -
boost/test/detail/workaround.hpp
20 20 21 21 // STL 22 22 #include <iterator> // for std::distance 23 23 #include <cstdio> // for sprintf, vsprintf 24 24 #include <boost/test/detail/suppress_warnings.hpp> 25 25 26 26 //____________________________________________________________________________// … … 48 48 using std::distance; 49 49 #endif 50 50 51 // snprintf, vsnprintf workaround for Comeau C/C++ toolset 52 #if defined(__COMO__) 53 54 # if defined(BOOST_NO_SNPRINTF) 55 int snprintf(char *s, size_t /*maxlen*/, const char *format, ...) 56 { 57 va_list arg; 58 int retval; 59 va_start(arg, format); 60 retval = std::vsprintf(s, format, arg); 61 va_end(arg); 62 return retval; 63 } 64 # endif 65 66 # if defined(BOOST_NO_VSNPRINTF) 67 int vsnprintf(char *s, size_t maxlen, const char *format, va_list arg) 68 { 69 return std::vsprintf(s, format, arg); 70 } 71 # endif 72 73 #endif 74 75 51 76 template <class T> inline void ignore_unused_variable_warning(const T&) {} 52 77 53 78 } // namespace ut_detail