File indexing completed on 2025-01-18 09:30:47
0001
0002
0003
0004
0005
0006 #ifndef BOOST_EXCEPTION_F0EE17BE6C1211DE87FF459155D89593
0007 #define BOOST_EXCEPTION_F0EE17BE6C1211DE87FF459155D89593
0008
0009 #include <boost/exception/info.hpp>
0010 #include <errno.h>
0011 #include <string.h>
0012
0013 #ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
0014 #if __GNUC__*100+__GNUC_MINOR__>301
0015 #pragma GCC system_header
0016 #endif
0017 #ifdef __clang__
0018 #pragma clang system_header
0019 #endif
0020 #ifdef _MSC_VER
0021 #pragma warning(push,1)
0022 #pragma warning(disable:4996)
0023 #endif
0024 #endif
0025
0026 namespace
0027 boost
0028 {
0029 typedef error_info<struct errinfo_errno_,int> errinfo_errno;
0030
0031
0032
0033
0034
0035
0036
0037 inline
0038 std::string
0039 to_string( errinfo_errno const & e )
0040 {
0041 std::ostringstream tmp;
0042 int v=e.value();
0043 tmp << '[' << error_info_name(e) << "] = " << v << ", \"" << strerror(v) << "\"\n";
0044 return tmp.str();
0045 }
0046 }
0047
0048 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
0049 #pragma warning(pop)
0050 #endif
0051 #endif