Ticket #5771: warning in basic_binary_iprimitive.hpp.patch
File warning in basic_binary_iprimitive.hpp.patch, 1.4 KB (added by , 11 years ago) |
---|
-
basic_binary_iprimitive.hpp
143 143 void 144 144 load_binary(void *address, std::size_t count); 145 145 }; 146 #if defined(_MSC_VER) && (_MSC_VER >= 1400) //VC 8.0 + 147 # define BOOST_sgetn_safe( buf, count ) _Sgetn_s( buf, count, count ) 148 #else 149 # define BOOST_sgetn_safe( buf, count ) sgetn( buf, count ) 150 #endif 146 151 147 152 template<class Archive, class Elem, class Tr> 148 153 inline void … … 157 162 ); 158 163 std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem)); 159 164 std::streamsize scount = m_sb.sgetn( 165 std::streamsize scount = m_sb.BOOST_sgetn_safe( 160 166 static_cast<Elem *>(address), 161 167 s 162 168 ); … … 173 179 // archive_exception(archive_exception::stream_error) 174 180 // ); 175 181 Elem t; 176 scount = m_sb. sgetn(& t, 1);182 scount = m_sb.BOOST_sgetn_safe(& t, 1); 177 183 if(scount != 1) 178 184 boost::serialization::throw_exception( 179 185 archive_exception(archive_exception::input_stream_error) … … 181 187 std::memcpy(static_cast<char*>(address) + (count - s), &t, s); 182 188 } 183 189 } 190 #undef BOOST_sgetn_safe 184 191 185 192 } // namespace archive 186 193 } // namespace boost