Fixes for FreeBSD

This commit is contained in:
Vinnie Falco
2013-09-27 07:14:20 -07:00
parent 54dc7017e1
commit 0048efea8d
4 changed files with 15 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ public:
void write (std::string const& s)
{
if (! s.empty())
write (&s.front(),
write (&s[0],
std::distance (s.begin(), s.end()));
}

View File

@@ -147,7 +147,7 @@ public:
m_parser.request()->body ());
s.resize (body.size ());
boost::asio::buffer_copy (
boost::asio::buffer (&s.front(),
boost::asio::buffer (&s[0],
s.size()), body.data());
return s;
}
@@ -482,7 +482,7 @@ public:
// count will drop to zero and the buffer will be freed.
//
boost::asio::async_write (*m_socket,
boost::asio::const_buffers_1 (&buf->front(), buf->size()),
boost::asio::const_buffers_1 (&(*buf)[0], buf->size()),
m_strand.wrap (boost::bind (&Peer::handle_write,
Ptr (this), boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred,

View File

@@ -213,6 +213,9 @@ std::istream& operator>> (std::istream& is,
namespace std {
template <typename>
struct hash;
/** Specialization for hash. */
template <class Traits>
struct hash <ripple::IdentifierType <Traits> >
@@ -244,6 +247,9 @@ private:
//------------------------------------------------------------------------------
template <typename>
struct equal_to;
/** Specialization for equal_to. */
template <class Traits>
struct equal_to <ripple::IdentifierType <Traits> >

View File

@@ -500,6 +500,9 @@ std::ostream& operator<< (std::ostream& out, const base_uint<BITS>& u)
namespace std {
template <typename>
struct hash;
/** Specialization for hash. */
template<unsigned int BITS>
struct hash <ripple::base_uint <BITS> >
@@ -530,6 +533,9 @@ private:
//------------------------------------------------------------------------------
template <typename>
struct equal_to;
/** Specialization for equal_to. */
template <unsigned int BITS>
struct equal_to <ripple::base_uint <BITS> >