Ticket #4479: system.patch

File system.patch, 2.3 KB (added by artyomtnk@…, 12 years ago)
  • boost/system/error_code.hpp

    diff -rupN boost_1_43_0/boost/system/error_code.hpp boost_vms_1_43_0/boost/system/error_code.hpp
    old new namespace boost  
    463463
    464464    inline std::size_t hash_value( const error_code & ec )
    465465    {
     466      #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64
     467      return static_cast<std::size_t>(ec.value())
     468        + reinterpret_cast<long long int>(&ec.category());
     469      #else
    466470      return static_cast<std::size_t>(ec.value())
    467471        + reinterpret_cast<std::size_t>(&ec.category());
     472      #endif
    468473    }
    469474
    470475    //  make_* functions for errc::errc_t  -----------------------------//
  • boost/system/system_error.hpp

    diff -rupN boost_1_43_0/boost/system/system_error.hpp boost_vms_1_43_0/boost/system/system_error.hpp
    old new namespace boost  
    6161      {
    6262        try
    6363        {
    64           m_what = this->std::runtime_error::what();
     64          #ifdef __VMS
     65          // Workaround for standard library bug, it may return NULL pointer
     66          char const *tmp = this->std::runtime_error::what();
     67          m_what = tmp ? tmp : "";
     68          #else
     69          m_what = this->std::runtime_error::what();
     70          #endif
    6571          if ( m_error_code )
    6672          {
    6773            if ( !m_what.empty() ) m_what += ": ";
  • libs/system/src/error_code.cpp

    diff -rupN boost_1_43_0/libs/system/src/error_code.cpp boost_vms_1_43_0/libs/system/src/error_code.cpp
    old new namespace  
    189189    case EILSEQ: return make_error_condition( illegal_byte_sequence );
    190190    case EINPROGRESS: return make_error_condition( operation_in_progress );
    191191    case EINTR: return make_error_condition( interrupted );
     192    #ifndef __VMS
    192193    case EINVAL: return make_error_condition( invalid_argument );
     194    #endif
    193195    case EIO: return make_error_condition( io_error );
    194196    case EISCONN: return make_error_condition( already_connected );
    195197    case EISDIR: return make_error_condition( is_a_directory );