Ticket #3743: broken_support.diff

File broken_support.diff, 15.1 KB (added by arvid@…, 13 years ago)

compiler support patch

  • boost/asio/impl/write.ipp

     
    7070  return bytes_transferred;
    7171}
    7272
     73#ifndef BOOST_NO_IOSTREAM
    7374template <typename SyncWriteStream, typename Allocator,
    7475    typename CompletionCondition>
    7576std::size_t write(SyncWriteStream& s,
     
    102103  boost::asio::detail::throw_error(ec);
    103104  return bytes_transferred;
    104105}
     106#endif // BOOST_NO_IOSTREAM
    105107
    106108namespace detail
    107109{
     
    213215  async_write(s, buffers, transfer_all(), handler);
    214216}
    215217
     218#ifndef BOOST_NO_IOSTREAM
    216219namespace detail
    217220{
    218221  template <typename AsyncWriteStream, typename Allocator,
     
    287290{
    288291  async_write(s, b, transfer_all(), handler);
    289292}
     293#endif // BOOST_NO_IOSTREAM
    290294
    291295} // namespace asio
    292296} // namespace boost
  • boost/asio/impl/read.ipp

     
    7575  return bytes_transferred;
    7676}
    7777
     78#ifndef BOOST_NO_IOSTREAM
    7879template <typename SyncReadStream, typename Allocator,
    7980    typename CompletionCondition>
    8081std::size_t read(SyncReadStream& s,
     
    121122  boost::asio::detail::throw_error(ec);
    122123  return bytes_transferred;
    123124}
     125#endif // BOOST_NO_IOSTREAM
    124126
    125127namespace detail
    126128{
     
    232234  async_read(s, buffers, transfer_all(), handler);
    233235}
    234236
     237#ifndef BOOST_NO_IOSTREAM
    235238namespace detail
    236239{
    237240  template <typename AsyncReadStream, typename Allocator,
     
    340343{
    341344  async_read(s, b, transfer_all(), handler);
    342345}
     346#endif // BOOST_NO_IOSTREAM
    343347
    344348} // namespace asio
    345349} // namespace boost
  • boost/asio/impl/io_service.ipp

     
    1818#include <boost/asio/detail/push_options.hpp>
    1919
    2020#include <boost/asio/detail/push_options.hpp>
    21 #include <limits>
     21#include <boost/limits.hpp>
    2222#include <boost/asio/detail/pop_options.hpp>
    2323
    2424#include <boost/asio/detail/dev_poll_reactor.hpp>
  • boost/asio/detail/reactive_socket_service.hpp

     
    275275      return false;
    276276    }
    277277
     278#ifndef SIOCATMARK
     279    int value = sockatmark(impl.socket_);
     280    if (value == -1) ec = boost::system::error_code(errno
     281        , boost::system::get_system_category());
     282    return ec ? false : value != 0;
     283#else
    278284    boost::asio::detail::ioctl_arg_type value = 0;
    279285    socket_ops::ioctl(impl.socket_, SIOCATMARK, &value, ec);
    280286#if defined(ENOTTY)
     
    282288      ec = boost::asio::error::not_socket;
    283289#endif // defined(ENOTTY)
    284290    return ec ? false : value != 0;
     291#endif
    285292  }
    286293
    287294  // Determine the number of bytes available for reading.
  • boost/asio/detail/handler_alloc_helpers.hpp

     
    3232template <typename Handler>
    3333inline void* allocate(std::size_t s, Handler* h)
    3434{
    35 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
     35#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
     36  || __GNUC__ < 3
    3637  return ::operator new(s);
    3738#else
    3839  using namespace boost::asio;
     
    4344template <typename Handler>
    4445inline void deallocate(void* p, std::size_t s, Handler* h)
    4546{
    46 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
     47#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
     48  || __GNUC__ < 3
    4749  ::operator delete(p);
    4850#else
    4951  using namespace boost::asio;
  • boost/asio/detail/consuming_buffers.hpp

     
    2020#include <boost/asio/detail/push_options.hpp>
    2121#include <algorithm>
    2222#include <cstddef>
    23 #include <limits>
     23#include <boost/limits.hpp>
    2424#include <boost/config.hpp>
    2525#include <boost/iterator/iterator_facade.hpp>
    2626#include <boost/asio/detail/pop_options.hpp>
  • boost/asio/detail/handler_invoke_helpers.hpp

     
    3131template <typename Function, typename Context>
    3232inline void invoke(const Function& function, Context* context)
    3333{
    34 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
     34#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \
     35  || __GNUC__ < 3
    3536  Function tmp(function);
    3637  tmp();
    3738#else
  • boost/asio/detail/socket_types.hpp

     
    163166const int invalid_socket = -1;
    164167const int socket_error_retval = -1;
    165168const int max_addr_v4_str_len = INET_ADDRSTRLEN;
     169#ifndef INET6_ADDRSTRLEN
     170const int max_addr_v6_str_len = 256;
     171#else
    166172const int max_addr_v6_str_len = INET6_ADDRSTRLEN + 1 + IF_NAMESIZE;
     173#endif
    167174typedef sockaddr socket_addr_type;
    168175typedef in_addr in4_addr_type;
    169176# if defined(__hpux)
  • boost/asio/detail/timer_queue.hpp

     
    2020#include <boost/asio/detail/push_options.hpp>
    2121#include <cstddef>
    2222#include <functional>
    23 #include <limits>
     23#include <boost/limits.hpp>
    2424#include <memory>
    2525#include <vector>
    2626#include <boost/config.hpp>
  • boost/asio/basic_streambuf.hpp

     
    2020#include <boost/asio/detail/push_options.hpp>
    2121#include <algorithm>
    2222#include <cstring>
    23 #include <limits>
     23#include <boost/limits.hpp>
    2424#include <memory>
    2525#include <stdexcept>
    2626#include <streambuf>
  • boost/asio/write.hpp

     
    2222#include <boost/config.hpp>
    2323#include <boost/asio/detail/pop_options.hpp>
    2424
     25#ifndef BOOST_NO_IOSTREAM
    2526#include <boost/asio/basic_streambuf.hpp>
     27#endif
    2628#include <boost/asio/error.hpp>
    2729
    2830namespace boost {
     
    195197 *     s, b,
    196198 *     boost::asio::transfer_all()); @endcode
    197199 */
     200#ifndef BOOST_NO_IOSTREAM
    198201template <typename SyncWriteStream, typename Allocator>
    199202std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b);
     203#endif
    200204
    201205/// Write a certain amount of data to a stream before returning.
    202206/**
     
    233237 *
    234238 * @throws boost::system::system_error Thrown on failure.
    235239 */
     240#ifndef BOOST_NO_IOSTREAM
    236241template <typename SyncWriteStream, typename Allocator,
    237242    typename CompletionCondition>
    238243std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
    239244    CompletionCondition completion_condition);
     245#endif
    240246
    241247/// Write a certain amount of data to a stream before returning.
    242248/**
     
    274280 * @returns The number of bytes written. If an error occurs, returns the total
    275281 * number of bytes successfully transferred prior to the error.
    276282 */
     283#ifndef BOOST_NO_IOSTREAM
    277284template <typename SyncWriteStream, typename Allocator,
    278285    typename CompletionCondition>
    279286std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
    280287    CompletionCondition completion_condition, boost::system::error_code& ec);
     288#endif
    281289
    282290/*@}*/
    283291/**
     
    449457 * the handler will be performed in a manner equivalent to using
    450458 * boost::asio::io_service::post().
    451459 */
     460#ifndef BOOST_NO_IOSTREAM
    452461template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
    453462void async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
    454463    WriteHandler handler);
     464#endif
    455465
    456466/// Start an asynchronous operation to write a certain amount of data to a
    457467/// stream.
     
    505515 * the handler will be performed in a manner equivalent to using
    506516 * boost::asio::io_service::post().
    507517 */
     518#ifndef BOOST_NO_IOSTREAM
    508519template <typename AsyncWriteStream, typename Allocator,
    509520    typename CompletionCondition, typename WriteHandler>
    510521void async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
    511522    CompletionCondition completion_condition, WriteHandler handler);
     523#endif
    512524
    513525/*@}*/
    514526
  • boost/asio/read.hpp

     
    2222#include <boost/config.hpp>
    2323#include <boost/asio/detail/pop_options.hpp>
    2424
     25#ifndef BOOST_NO_IOSTREAM
    2526#include <boost/asio/basic_streambuf.hpp>
     27#endif
    2628#include <boost/asio/error.hpp>
    2729
    2830namespace boost {
     
    194196 *     s, b,
    195197 *     boost::asio::transfer_all()); @endcode
    196198 */
     199#ifndef BOOST_NO_IOSTREAM
    197200template <typename SyncReadStream, typename Allocator>
    198201std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b);
     202#endif
    199203
    200204/// Attempt to read a certain amount of data from a stream before returning.
    201205/**
     
    230234 *
    231235 * @throws boost::system::system_error Thrown on failure.
    232236 */
     237#ifndef BOOST_NO_IOSTREAM
    233238template <typename SyncReadStream, typename Allocator,
    234239    typename CompletionCondition>
    235240std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
    236241    CompletionCondition completion_condition);
     242#endif
    237243
    238244/// Attempt to read a certain amount of data from a stream before returning.
    239245/**
     
    269275 * @returns The number of bytes read. If an error occurs, returns the total
    270276 * number of bytes successfully transferred prior to the error.
    271277 */
     278#ifndef BOOST_NO_IOSTREAM
    272279template <typename SyncReadStream, typename Allocator,
    273280    typename CompletionCondition>
    274281std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
    275282    CompletionCondition completion_condition, boost::system::error_code& ec);
     283#endif
    276284
    277285/*@}*/
    278286/**
     
    456464 *     boost::asio::transfer_all(),
    457465 *     handler); @endcode
    458466 */
     467#ifndef BOOST_NO_IOSTREAM
    459468template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
    460469void async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
    461470    ReadHandler handler);
     471#endif
    462472
    463473/// Start an asynchronous operation to read a certain amount of data from a
    464474/// stream.
     
    511521 * the handler will be performed in a manner equivalent to using
    512522 * boost::asio::io_service::post().
    513523 */
     524#ifndef BOOST_NO_IOSTREAM
    514525template <typename AsyncReadStream, typename Allocator,
    515526    typename CompletionCondition, typename ReadHandler>
    516527void async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
    517528    CompletionCondition completion_condition, ReadHandler handler);
     529#endif
    518530
    519531/*@}*/
    520532
  • boost/asio/ip/address_v4.hpp

     
    281281 *
    282282 * @relates boost::asio::ip::address_v4
    283283 */
     284#ifndef BOOST_NO_IOSTREAM
    284285template <typename Elem, typename Traits>
    285286std::basic_ostream<Elem, Traits>& operator<<(
    286287    std::basic_ostream<Elem, Traits>& os, const address_v4& addr)
     
    299300      os << os.widen(*i);
    300301  return os;
    301302}
     303#endif
    302304
    303305} // namespace ip
    304306} // namespace asio
  • boost/asio/ip/address_v6.hpp

     
    395395 *
    396396 * @relates boost::asio::ip::address_v6
    397397 */
     398#ifndef BOOST_NO_IOSTREAM
    398399template <typename Elem, typename Traits>
    399400std::basic_ostream<Elem, Traits>& operator<<(
    400401    std::basic_ostream<Elem, Traits>& os, const address_v6& addr)
     
    413414      os << os.widen(*i);
    414415  return os;
    415416}
     417#endif
    416418
    417419} // namespace ip
    418420} // namespace asio
  • boost/asio/ip/basic_endpoint.hpp

     
    2121#include <boost/throw_exception.hpp>
    2222#include <boost/detail/workaround.hpp>
    2323#include <cstring>
     24#ifndef BOOST_NO_IOSTREAM
    2425#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
    2526# include <ostream>
    2627#endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
    2728#include <sstream>
     29#endif // BOOST_NO_IOSTREAM
    2830#include <boost/asio/detail/pop_options.hpp>
    2931
    3032#include <boost/asio/error.hpp>
     
    309311 *
    310312 * @relates boost::asio::ip::basic_endpoint
    311313 */
     314#ifndef BOOST_NO_IOSTREAM
    312315#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
    313316template <typename InternetProtocol>
    314317std::ostream& operator<<(std::ostream& os,
     
    367370  return os;
    368371}
    369372#endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
     373#endif // BOOST_NO_IOSTREAM
    370374
    371375} // namespace ip
    372376} // namespace asio
  • boost/asio/ip/address.hpp

     
    262262 *
    263263 * @relates boost::asio::ip::address
    264264 */
     265#ifndef BOOST_NO_IOSTREAM
    265266template <typename Elem, typename Traits>
    266267std::basic_ostream<Elem, Traits>& operator<<(
    267268    std::basic_ostream<Elem, Traits>& os, const address& addr)
     
    269270  os << addr.to_string();
    270271  return os;
    271272}
     273#endif
    272274
    273275} // namespace ip
    274276} // namespace asio
  • boost/asio/ip/tcp.hpp

     
    1717
    1818#include <boost/asio/detail/push_options.hpp>
    1919
     20#include <boost/config.hpp>
    2021#include <boost/asio/basic_socket_acceptor.hpp>
     22#ifndef BOOST_NO_IOSTREAM
    2123#include <boost/asio/basic_socket_iostream.hpp>
     24#endif
    2225#include <boost/asio/basic_stream_socket.hpp>
    2326#include <boost/asio/ip/basic_endpoint.hpp>
    2427#include <boost/asio/ip/basic_resolver.hpp>
     
    9497  typedef basic_resolver<tcp> resolver;
    9598
    9699  /// The TCP iostream type.
     100#ifndef BOOST_NO_IOSTREAM
    97101  typedef basic_socket_iostream<tcp> iostream;
     102#endif
    98103
    99104  /// Socket option for disabling the Nagle algorithm.
    100105  /**
  • boost/asio/time_traits.hpp

     
    4343  /// Get the current time.
    4444  static time_type now()
    4545  {
     46#ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
    4647    return boost::posix_time::microsec_clock::universal_time();
     48#else
     49    return boost::posix_time::second_clock::universal_time();
     50#endif
    4751  }
    4852
    4953  /// Add a duration to a time.