]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/system/detail/system_category_message_win32.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / system / detail / system_category_message_win32.hpp
index 6cdec2d68e68dd24269924b3380445e5d710bd82..e5f544ccd977a313813aadfd98a2b96c1b78a576 100644 (file)
@@ -10,6 +10,7 @@
 //
 // See library home page at http://www.boost.org/libs/system
 
+#include <boost/system/detail/snprintf.hpp>
 #include <boost/winapi/error_handling.hpp>
 #include <boost/winapi/character_code_conversion.hpp>
 #include <boost/winapi/local_memory.hpp>
@@ -27,35 +28,12 @@ namespace system
 namespace detail
 {
 
-#if ( defined(_MSC_VER) && _MSC_VER < 1900 ) || ( defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) )
-
 inline char const * unknown_message_win32( int ev, char * buffer, std::size_t len )
 {
-# if defined( BOOST_MSVC )
-#  pragma warning( push )
-#  pragma warning( disable: 4996 )
-# endif
-
-    _snprintf( buffer, len - 1, "Unknown error (%d)", ev );
-
-    buffer[ len - 1 ] = 0;
+    detail::snprintf( buffer, len, "Unknown error (%d)", ev );
     return buffer;
-
-# if defined( BOOST_MSVC )
-#  pragma warning( pop )
-# endif
 }
 
-#else
-
-inline char const * unknown_message_win32( int ev, char * buffer, std::size_t len )
-{
-    std::snprintf( buffer, len, "Unknown error (%d)", ev );
-    return buffer;
-}
-
-#endif
-
 inline boost::winapi::UINT_ message_cp_win32()
 {
 #if defined(BOOST_SYSTEM_USE_UTF8)