update boost on linux
This commit is contained in:
@@ -58,6 +58,7 @@ protected:
|
||||
explicit direct_adapter_base(const Direct& d);
|
||||
typedef is_convertible<category, two_sequence> is_double;
|
||||
struct pointers {
|
||||
pointers() : beg(0), ptr(0), end(0) { }
|
||||
char_type *beg, *ptr, *end;
|
||||
};
|
||||
void init_input(mpl::true_);
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
{
|
||||
std::streamsize result = 0;
|
||||
while (result < n) {
|
||||
std::streamsize amt = iostreams::read(device_, s, n);
|
||||
std::streamsize amt = iostreams::read(device_, s + result, n - result);
|
||||
if (amt == -1)
|
||||
break;
|
||||
result += amt;
|
||||
@@ -41,6 +41,9 @@ public:
|
||||
while (result < n) {
|
||||
std::streamsize amt =
|
||||
iostreams::write(device_, s + result, n - result);
|
||||
// write errors, like EOF on read, need to be handled.
|
||||
if (amt == -1)
|
||||
break;
|
||||
result += amt;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -39,10 +39,16 @@ template< typename Ch,
|
||||
class basic_buffer {
|
||||
private:
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
#if defined(BOOST_NO_CXX11_ALLOCATOR)
|
||||
typedef typename Alloc::template rebind<Ch>::other allocator_type;
|
||||
#else
|
||||
typedef typename std::allocator_traits<Alloc>::template rebind_alloc<Ch> allocator_type;
|
||||
typedef std::allocator_traits<allocator_type> allocator_traits;
|
||||
#endif
|
||||
#else
|
||||
typedef std::allocator<Ch> allocator_type;
|
||||
#endif
|
||||
static Ch* allocate(std::streamsize buffer_size);
|
||||
public:
|
||||
basic_buffer();
|
||||
basic_buffer(std::streamsize buffer_size);
|
||||
@@ -144,10 +150,22 @@ void swap(buffer<Ch, Alloc>& lhs, buffer<Ch, Alloc>& rhs)
|
||||
template<typename Ch, typename Alloc>
|
||||
basic_buffer<Ch, Alloc>::basic_buffer() : buf_(0), size_(0) { }
|
||||
|
||||
template<typename Ch, typename Alloc>
|
||||
inline Ch* basic_buffer<Ch, Alloc>::allocate(std::streamsize buffer_size)
|
||||
{
|
||||
#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
|
||||
return static_cast<Ch*>(allocator_type().allocate(
|
||||
static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(buffer_size), 0));
|
||||
#else
|
||||
allocator_type alloc;
|
||||
return static_cast<Ch*>(allocator_traits::allocate(alloc,
|
||||
static_cast<BOOST_DEDUCED_TYPENAME allocator_traits::size_type>(buffer_size)));
|
||||
#endif
|
||||
}
|
||||
|
||||
template<typename Ch, typename Alloc>
|
||||
basic_buffer<Ch, Alloc>::basic_buffer(std::streamsize buffer_size)
|
||||
: buf_(static_cast<Ch*>(allocator_type().allocate(
|
||||
static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(buffer_size), 0))),
|
||||
: buf_(allocate(buffer_size)),
|
||||
size_(buffer_size) // Cast for SunPro 5.3.
|
||||
{ }
|
||||
|
||||
@@ -155,8 +173,14 @@ template<typename Ch, typename Alloc>
|
||||
inline basic_buffer<Ch, Alloc>::~basic_buffer()
|
||||
{
|
||||
if (buf_) {
|
||||
#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
|
||||
allocator_type().deallocate(buf_,
|
||||
static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(size_));
|
||||
#else
|
||||
allocator_type alloc;
|
||||
allocator_traits::deallocate(alloc, buf_,
|
||||
static_cast<BOOST_DEDUCED_TYPENAME allocator_traits::size_type>(size_));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +205,7 @@ void basic_buffer<Ch, Alloc>::swap(basic_buffer& rhs)
|
||||
|
||||
template<typename Ch, typename Alloc>
|
||||
buffer<Ch, Alloc>::buffer(std::streamsize buffer_size)
|
||||
: basic_buffer<Ch, Alloc>(buffer_size) { }
|
||||
: basic_buffer<Ch, Alloc>(buffer_size), ptr_(data()), eptr_(data() + buffer_size) { }
|
||||
|
||||
template<typename Ch, typename Alloc>
|
||||
inline void buffer<Ch, Alloc>::set(std::streamsize ptr, std::streamsize end)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
//------------------Normalize codecvt::length---------------------------------//
|
||||
|
||||
#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && \
|
||||
#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && !defined(__clang__) && \
|
||||
(!defined(BOOST_RWSTD_VER) || BOOST_RWSTD_VER < 0x04010300) && \
|
||||
(!defined(__MACH__) || !defined(__INTEL_COMPILER))
|
||||
/**/
|
||||
|
||||
@@ -27,7 +27,16 @@
|
||||
# else
|
||||
# define BOOST_IOSTREAMS_DECL __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
//--------------Enable dynamic linking for non-windows---------------------//
|
||||
#else // BOOST_HAS_DECLSPEC
|
||||
# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_IOSTREAMS_DYN_LINK)
|
||||
# ifdef BOOST_IOSTREAMS_SOURCE
|
||||
# define BOOST_IOSTREAMS_DECL BOOST_SYMBOL_EXPORT
|
||||
# else
|
||||
# define BOOST_IOSTREAMS_DECL BOOST_SYMBOL_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_IOSTREAMS_DECL
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Distributed under the Boost Software License, Version 1.0.(See accompanying
|
||||
* Distributed under the Boost Software License, Version 1.0.(See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
|
||||
*
|
||||
*
|
||||
* See http://www.boost.org/libs/iostreams for documentation.
|
||||
|
||||
* File: boost/iostreams/detail/execute.hpp
|
||||
@@ -11,7 +11,7 @@
|
||||
* Contact: turkanis at coderage dot com
|
||||
*
|
||||
* Defines the preprocessor symbol BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for
|
||||
* platforms that use the implementation of std::fpos from the Dinkumware
|
||||
* platforms that use the implementation of std::fpos from the Dinkumware
|
||||
* Standard Library.
|
||||
*/
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
#include <boost/config.hpp>
|
||||
|
||||
# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
|
||||
!defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU)
|
||||
!defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU) && !defined(__VXWORKS__) \
|
||||
&& !((defined(BOOST_MSVC) || defined(BOOST_CLANG)) && _MSVC_STL_VERSION >= 141)
|
||||
/**/
|
||||
|
||||
|
||||
#include <boost/iostreams/detail/ios.hpp>
|
||||
|
||||
# define BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
//------------------Locale support--------------------------------------------//
|
||||
|
||||
#ifndef BOOST_IOSTREAMS_NO_LOCALE
|
||||
# if defined(BOOST_NO_STD_LOCALE) || \
|
||||
defined(__CYGWIN__) && \
|
||||
# if defined(BOOST_NO_STD_LOCALE) && \
|
||||
( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
|
||||
/**/
|
||||
# define BOOST_IOSTREAMS_NO_LOCALE
|
||||
|
||||
@@ -478,4 +478,6 @@ BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1)
|
||||
|
||||
} } // End namespaces iostreams, boost.
|
||||
|
||||
# include <boost/iostreams/detail/config/enable_warnings.hpp>
|
||||
|
||||
#endif // #if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) ...
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <cstddef>
|
||||
#include <typeinfo>
|
||||
#include <utility> // pair.
|
||||
#include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME,
|
||||
#include <boost/core/typeinfo.hpp>
|
||||
#include <boost/iostreams/detail/char_traits.hpp> // member template friends.
|
||||
#include <boost/iostreams/detail/config/wide_streams.hpp>
|
||||
#include <boost/iostreams/detail/error.hpp>
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
|
||||
// Declared in linked_streambuf.
|
||||
void close_impl(BOOST_IOS::openmode m);
|
||||
const std::type_info& component_type() const { return typeid(T); }
|
||||
const boost::core::typeinfo& component_type() const { return BOOST_CORE_TYPEID(T); }
|
||||
void* component_impl() { return component(); }
|
||||
#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
|
||||
public:
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
#include <algorithm> // min, max.
|
||||
#include <cassert>
|
||||
#include <exception>
|
||||
#include <typeinfo>
|
||||
#include <boost/config.hpp> // Member template friends.
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/core/typeinfo.hpp>
|
||||
#include <boost/iostreams/constants.hpp>
|
||||
#include <boost/iostreams/detail/adapter/concept_adapter.hpp>
|
||||
#include <boost/iostreams/detail/buffer.hpp>
|
||||
@@ -94,7 +94,7 @@ protected:
|
||||
// Declared in linked_streambuf.
|
||||
void set_next(streambuf_type* next);
|
||||
void close_impl(BOOST_IOS::openmode m);
|
||||
const std::type_info& component_type() const { return typeid(T); }
|
||||
const boost::core::typeinfo& component_type() const { return BOOST_CORE_TYPEID(T); }
|
||||
void* component_impl() { return component(); }
|
||||
private:
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <typeinfo>
|
||||
#include <boost/config.hpp> // member template friends.
|
||||
#include <boost/core/typeinfo.hpp>
|
||||
#include <boost/iostreams/detail/char_traits.hpp>
|
||||
#include <boost/iostreams/detail/ios.hpp> // openmode.
|
||||
#include <boost/iostreams/detail/streambuf.hpp>
|
||||
@@ -91,7 +91,7 @@ protected:
|
||||
virtual bool auto_close() const = 0;
|
||||
virtual void set_auto_close(bool) = 0;
|
||||
virtual bool strict_sync() = 0;
|
||||
virtual const std::type_info& component_type() const = 0;
|
||||
virtual const boost::core::typeinfo& component_type() const = 0;
|
||||
virtual void* component_impl() = 0;
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user