diff -rupN boost_1_43_0/boost/asio/basic_socket_iostream.hpp boost_vms_1_43_0/boost/asio/basic_socket_iostream.hpp
|
old
|
new
|
|
| 34 | 34 | #include <boost/asio/basic_socket_streambuf.hpp> |
| 35 | 35 | #include <boost/asio/stream_socket_service.hpp> |
| 36 | 36 | |
| | 37 | #include <istream> |
| | 38 | #include <ostream> |
| | 39 | |
| 37 | 40 | #if !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY) |
| 38 | 41 | #define BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY 5 |
| 39 | 42 | #endif // !defined(BOOST_ASIO_SOCKET_IOSTREAM_MAX_ARITY) |
diff -rupN boost_1_43_0/boost/asio/detail/buffer_sequence_adapter.hpp boost_vms_1_43_0/boost/asio/detail/buffer_sequence_adapter.hpp
|
old
|
new
|
protected:
|
| 43 | 43 | buf.len = boost::asio::buffer_size(buffer); |
| 44 | 44 | } |
| 45 | 45 | #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| | 46 | #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| | 47 | typedef __iovec64 native_buffer_type; |
| | 48 | #else |
| 46 | 49 | typedef iovec native_buffer_type; |
| | 50 | #endif |
| 47 | 51 | |
| 48 | 52 | static void init_iov_base(void*& base, void* addr) |
| 49 | 53 | { |
| … |
… |
protected:
|
| 56 | 60 | base = static_cast<T>(addr); |
| 57 | 61 | } |
| 58 | 62 | |
| 59 | | static void init_native_buffer(iovec& iov, |
| | 63 | static void init_native_buffer(native_buffer_type& iov, |
| 60 | 64 | const boost::asio::mutable_buffer& buffer) |
| 61 | 65 | { |
| 62 | 66 | init_iov_base(iov.iov_base, boost::asio::buffer_cast<void*>(buffer)); |
| 63 | 67 | iov.iov_len = boost::asio::buffer_size(buffer); |
| 64 | 68 | } |
| 65 | 69 | |
| 66 | | static void init_native_buffer(iovec& iov, |
| | 70 | static void init_native_buffer(native_buffer_type& iov, |
| 67 | 71 | const boost::asio::const_buffer& buffer) |
| 68 | 72 | { |
| 69 | 73 | init_iov_base(iov.iov_base, const_cast<void*>( |
diff -rupN boost_1_43_0/boost/asio/detail/null_signal_blocker.hpp boost_vms_1_43_0/boost/asio/detail/null_signal_blocker.hpp
|
old
|
new
|
|
| 21 | 21 | #include <boost/config.hpp> |
| 22 | 22 | #include <boost/asio/detail/pop_options.hpp> |
| 23 | 23 | |
| 24 | | #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS) |
| | 24 | #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS) || defined(__VMS) |
| 25 | 25 | |
| 26 | 26 | #include <boost/asio/detail/noncopyable.hpp> |
| 27 | 27 | |
diff -rupN boost_1_43_0/boost/asio/detail/posix_thread.hpp boost_vms_1_43_0/boost/asio/detail/posix_thread.hpp
|
old
|
new
|
namespace boost {
|
| 37 | 37 | namespace asio { |
| 38 | 38 | namespace detail { |
| 39 | 39 | |
| 40 | | extern "C" void* boost_asio_detail_posix_thread_function(void* arg); |
| | 40 | // Make identifier shorter as VMS compiler complain on on |
| | 41 | extern "C" void* boost_asio_detail_pthread_func(void* arg); |
| 41 | 42 | |
| 42 | 43 | class posix_thread |
| 43 | 44 | : private noncopyable |
| … |
… |
public:
|
| 50 | 51 | { |
| 51 | 52 | std::auto_ptr<func_base> arg(new func<Function>(f)); |
| 52 | 53 | int error = ::pthread_create(&thread_, 0, |
| 53 | | boost_asio_detail_posix_thread_function, arg.get()); |
| | 54 | boost_asio_detail_pthread_func, arg.get()); |
| 54 | 55 | if (error != 0) |
| 55 | 56 | { |
| 56 | 57 | boost::system::system_error e( |
| … |
… |
public:
|
| 80 | 81 | } |
| 81 | 82 | |
| 82 | 83 | private: |
| 83 | | friend void* boost_asio_detail_posix_thread_function(void* arg); |
| | 84 | friend void* boost_asio_detail_pthread_func(void* arg); |
| 84 | 85 | |
| 85 | 86 | class func_base |
| 86 | 87 | { |
| … |
… |
private:
|
| 112 | 113 | bool joined_; |
| 113 | 114 | }; |
| 114 | 115 | |
| 115 | | inline void* boost_asio_detail_posix_thread_function(void* arg) |
| | 116 | inline void* boost_asio_detail_pthread_func(void* arg) |
| 116 | 117 | { |
| 117 | 118 | std::auto_ptr<posix_thread::func_base> f( |
| 118 | 119 | static_cast<posix_thread::func_base*>(arg)); |
diff -rupN boost_1_43_0/boost/asio/detail/select_interrupter.hpp boost_vms_1_43_0/boost/asio/detail/select_interrupter.hpp
|
old
|
new
|
|
| 21 | 21 | #include <boost/config.hpp> |
| 22 | 22 | #include <boost/asio/detail/pop_options.hpp> |
| 23 | 23 | |
| 24 | | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| | 24 | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) || defined(__VMS) |
| 25 | 25 | # include <boost/asio/detail/socket_select_interrupter.hpp> |
| 26 | 26 | #else |
| 27 | 27 | # include <boost/asio/detail/eventfd_select_interrupter.hpp> |
| … |
… |
namespace boost {
|
| 32 | 32 | namespace asio { |
| 33 | 33 | namespace detail { |
| 34 | 34 | |
| 35 | | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| | 35 | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) || defined(__VMS) |
| 36 | 36 | typedef socket_select_interrupter select_interrupter; |
| 37 | 37 | #elif defined(BOOST_ASIO_HAS_EVENTFD) |
| 38 | 38 | typedef eventfd_select_interrupter select_interrupter; |
diff -rupN boost_1_43_0/boost/asio/detail/signal_blocker.hpp boost_vms_1_43_0/boost/asio/detail/signal_blocker.hpp
|
old
|
new
|
|
| 21 | 21 | #include <boost/config.hpp> |
| 22 | 22 | #include <boost/asio/detail/pop_options.hpp> |
| 23 | 23 | |
| 24 | | #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS) |
| | 24 | #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS) || defined(__VMS) |
| | 25 | // vms does not have pthread_sigmask |
| 25 | 26 | # include <boost/asio/detail/null_signal_blocker.hpp> |
| 26 | 27 | #elif defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 27 | 28 | # include <boost/asio/detail/win_signal_blocker.hpp> |
| … |
… |
namespace boost {
|
| 35 | 36 | namespace asio { |
| 36 | 37 | namespace detail { |
| 37 | 38 | |
| 38 | | #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS) |
| | 39 | #if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS) || defined(__VMS) |
| 39 | 40 | typedef null_signal_blocker signal_blocker; |
| 40 | 41 | #elif defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 41 | 42 | typedef win_signal_blocker signal_blocker; |
diff -rupN boost_1_43_0/boost/asio/detail/socket_ops.hpp boost_vms_1_43_0/boost/asio/detail/socket_ops.hpp
|
old
|
new
|
|
| 31 | 31 | #include <boost/asio/error.hpp> |
| 32 | 32 | #include <boost/asio/detail/socket_types.hpp> |
| 33 | 33 | |
| | 34 | #ifdef __VMS |
| | 35 | #include <unistd.h> |
| | 36 | #endif |
| | 37 | |
| 34 | 38 | namespace boost { |
| 35 | 39 | namespace asio { |
| 36 | 40 | namespace detail { |
| … |
… |
namespace socket_ops {
|
| 38 | 42 | |
| 39 | 43 | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 40 | 44 | struct msghdr { int msg_namelen; }; |
| | 45 | #elif defined(__VMS) |
| | 46 | # if __INITIAL_POINTER_SIZE == 64 |
| | 47 | typedef struct __msghdr64 msghdr; |
| | 48 | # endif // pointer size |
| 41 | 49 | #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 42 | 50 | |
| 43 | 51 | #if defined(__hpux) |
| … |
… |
template <typename SockLenType>
|
| 75 | 83 | inline socket_type call_accept(SockLenType msghdr::*, |
| 76 | 84 | socket_type s, socket_addr_type* addr, std::size_t* addrlen) |
| 77 | 85 | { |
| | 86 | #ifdef __VMS |
| | 87 | size_t tmp_addrlen = addrlen ? *addrlen : 0; |
| | 88 | #else |
| 78 | 89 | SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0; |
| | 90 | #endif |
| 79 | 91 | socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0); |
| 80 | 92 | if (addrlen) |
| 81 | 93 | *addrlen = (std::size_t)tmp_addrlen; |
| … |
… |
inline void init_buf_iov_base(T& base, v
|
| 206 | 218 | |
| 207 | 219 | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 208 | 220 | typedef WSABUF buf; |
| 209 | | #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| | 221 | #elif defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| | 222 | typedef __iovec64 buf; |
| | 223 | #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) || defined(__VMS) |
| 210 | 224 | typedef iovec buf; |
| 211 | 225 | #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 212 | 226 | |
| … |
… |
inline void init_buf(buf& b, const void*
|
| 226 | 240 | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 227 | 241 | b.buf = static_cast<char*>(const_cast<void*>(data)); |
| 228 | 242 | b.len = static_cast<u_long>(size); |
| | 243 | #elif defined(__VMS) |
| | 244 | b.iov_base = reinterpret_cast<char *>(const_cast<void *>(data)); |
| | 245 | b.iov_len = static_cast<u_long>(size); |
| 229 | 246 | #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 230 | 247 | init_buf_iov_base(b.iov_base, const_cast<void*>(data)); |
| 231 | 248 | b.iov_len = size; |
| … |
… |
inline int call_getsockopt(SockLenType m
|
| 469 | 486 | socket_type s, int level, int optname, |
| 470 | 487 | void* optval, std::size_t* optlen) |
| 471 | 488 | { |
| | 489 | #ifdef __VMS |
| | 490 | size_t tmp_optlen = *optlen; |
| | 491 | #else |
| 472 | 492 | SockLenType tmp_optlen = (SockLenType)*optlen; |
| | 493 | #endif |
| 473 | 494 | int result = ::getsockopt(s, level, optname, (char*)optval, &tmp_optlen); |
| 474 | 495 | *optlen = (std::size_t)tmp_optlen; |
| 475 | 496 | return result; |
| … |
… |
template <typename SockLenType>
|
| 558 | 579 | inline int call_getpeername(SockLenType msghdr::*, |
| 559 | 580 | socket_type s, socket_addr_type* addr, std::size_t* addrlen) |
| 560 | 581 | { |
| | 582 | #ifdef __VMS |
| | 583 | size_t tmp_addrlen = addrlen ? *addrlen : 0; |
| | 584 | #else |
| 561 | 585 | SockLenType tmp_addrlen = (SockLenType)*addrlen; |
| | 586 | #endif |
| 562 | 587 | int result = ::getpeername(s, addr, &tmp_addrlen); |
| 563 | 588 | *addrlen = (std::size_t)tmp_addrlen; |
| 564 | 589 | return result; |
| … |
… |
template <typename SockLenType>
|
| 579 | 604 | inline int call_getsockname(SockLenType msghdr::*, |
| 580 | 605 | socket_type s, socket_addr_type* addr, std::size_t* addrlen) |
| 581 | 606 | { |
| | 607 | #ifdef __VMS |
| | 608 | size_t tmp_addrlen = addrlen ? *addrlen : 0; |
| | 609 | #else |
| 582 | 610 | SockLenType tmp_addrlen = (SockLenType)*addrlen; |
| | 611 | #endif |
| 583 | 612 | int result = ::getsockname(s, addr, &tmp_addrlen); |
| 584 | 613 | *addrlen = (std::size_t)tmp_addrlen; |
| 585 | 614 | return result; |
| … |
… |
inline int getsockname(socket_type s, so
|
| 596 | 625 | return result; |
| 597 | 626 | } |
| 598 | 627 | |
| 599 | | inline int ioctl(socket_type s, long cmd, ioctl_arg_type* arg, |
| | 628 | #ifdef __VMS |
| | 629 | #pragma __required_pointer_size __save |
| | 630 | #pragma __required_pointer_size __short |
| | 631 | typedef char *short_char_ptr; |
| | 632 | typedef ioctl_arg_type *short_ioctl_arg_type_ptr; |
| | 633 | #pragma __required_pointer_size __restore |
| | 634 | #else |
| | 635 | #endif |
| | 636 | |
| | 637 | inline int ioctl(socket_type s, long cmd, ioctl_arg_type *arg, |
| 600 | 638 | boost::system::error_code& ec) |
| 601 | 639 | { |
| 602 | 640 | clear_error(ec); |
| 603 | 641 | #if defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 604 | 642 | int result = error_wrapper(::ioctlsocket(s, cmd, arg), ec); |
| 605 | 643 | #else // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| | 644 | #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| | 645 | // |
| | 646 | // Under OpenVMS ioctl can be used with 32 bit pointer only |
| | 647 | // so we place the value on stack (which is promissed to be 32 bit) |
| | 648 | // and call ioctl and then update value if changed. |
| | 649 | // |
| | 650 | // All asio ioctl use ioctl_arg_type and not something bigger |
| | 651 | // (at least in OpenVMS) |
| | 652 | // |
| | 653 | ioctl_arg_type tmp = arg ? * arg : 0; |
| | 654 | short_ioctl_arg_type_ptr short_arg = 0; |
| | 655 | if(arg) |
| | 656 | short_arg = &tmp; |
| | 657 | int result = error_wrapper(::ioctl(s, cmd, short_arg ), ec); |
| | 658 | if(arg && tmp!=*arg) |
| | 659 | *arg=tmp; |
| | 660 | #else |
| 606 | 661 | int result = error_wrapper(::ioctl(s, cmd, arg), ec); |
| | 662 | #endif |
| 607 | 663 | #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) |
| 608 | 664 | if (result >= 0) |
| 609 | 665 | clear_error(ec); |
| … |
… |
inline const char* inet_ntop(int af, con
|
| 791 | 847 | if (result != 0 && af == AF_INET6 && scope_id != 0) |
| 792 | 848 | { |
| 793 | 849 | using namespace std; // For strcat and sprintf. |
| | 850 | #if !defined(__VMS) || (defined(__INITIAL_POINTER_SIZE) && __INITIAL_POINTER_SIZE != 64) |
| 794 | 851 | char if_name[IF_NAMESIZE + 1] = "%"; |
| | 852 | #else // __VMS |
| | 853 | char if_name_buf[IF_NAMESIZE + 1] = "%"; |
| | 854 | short_char_ptr if_name = (short_char_ptr)if_name_buf; |
| | 855 | #endif |
| 795 | 856 | const in6_addr_type* ipv6_address = static_cast<const in6_addr_type*>(src); |
| 796 | 857 | bool is_link_local = IN6_IS_ADDR_LINKLOCAL(ipv6_address); |
| 797 | 858 | if (!is_link_local || if_indextoname(scope_id, if_name + 1) == 0) |
| … |
… |
inline int inet_pton(int af, const char*
|
| 878 | 939 | { |
| 879 | 940 | in6_addr_type* ipv6_address = static_cast<in6_addr_type*>(dest); |
| 880 | 941 | bool is_link_local = IN6_IS_ADDR_LINKLOCAL(ipv6_address); |
| 881 | | if (is_link_local) |
| | 942 | if (is_link_local) { |
| | 943 | #if !defined(__VMS) || (defined(__INITIAL_POINTER_SIZE) && __INITIAL_POINTER_SIZE != 64) |
| 882 | 944 | *scope_id = if_nametoindex(if_name + 1); |
| | 945 | #else |
| | 946 | short_char_ptr tmp = (short_char_ptr)_malloc32(strlen(if_name + 1)+1); |
| | 947 | if(!tmp) throw std::bad_alloc(); |
| | 948 | strcpy(tmp,(if_name + 1)); |
| | 949 | *scope_id = if_nametoindex(tmp); |
| | 950 | free(tmp); |
| | 951 | #endif |
| | 952 | } |
| 883 | 953 | if (*scope_id == 0) |
| 884 | 954 | *scope_id = atoi(if_name + 1); |
| 885 | 955 | } |
| … |
… |
inline boost::system::error_code transla
|
| 1777 | 1847 | } |
| 1778 | 1848 | } |
| 1779 | 1849 | |
| | 1850 | #if defined(__VMS) && defined(getaddrinfo) |
| | 1851 | # undef getaddrinfo |
| | 1852 | #endif |
| | 1853 | |
| 1780 | 1854 | inline boost::system::error_code getaddrinfo(const char* host, |
| 1781 | 1855 | const char* service, const addrinfo_type* hints, addrinfo_type** result, |
| 1782 | 1856 | boost::system::error_code& ec) |
| … |
… |
inline boost::system::error_code getaddr
|
| 1805 | 1879 | #elif defined(__MACH__) && defined(__APPLE__) |
| 1806 | 1880 | int error = getaddrinfo_emulation(host, service, hints, result); |
| 1807 | 1881 | return ec = translate_addrinfo_error(error); |
| | 1882 | #elif defined(__VMS) |
| | 1883 | #if __INITIAL_POINTER_SIZE == 64 |
| | 1884 | int error = ::__getaddrinfo64(host, service, hints, result); |
| | 1885 | #else |
| | 1886 | #undef getaddrinfo |
| | 1887 | int error = ::getaddrinfo(host, service, hints, result); |
| | 1888 | #endif |
| | 1889 | return ec = translate_addrinfo_error(error); |
| 1808 | 1890 | #else |
| 1809 | 1891 | int error = ::getaddrinfo(host, service, hints, result); |
| 1810 | 1892 | return ec = translate_addrinfo_error(error); |
diff -rupN boost_1_43_0/boost/asio/detail/socket_types.hpp boost_vms_1_43_0/boost/asio/detail/socket_types.hpp
|
old
|
new
|
|
| 98 | 98 | # include <sys/ioctl.h> |
| 99 | 99 | # include <sys/poll.h> |
| 100 | 100 | # include <sys/types.h> |
| 101 | | # if defined(__hpux) && !defined(__HP_aCC) |
| | 101 | # if defined(__hpux) && !defined(__HP_aCC) || defined(__VMS) |
| 102 | 102 | # include <sys/time.h> |
| 103 | 103 | # else |
| 104 | 104 | # include <sys/select.h> |
| 105 | 105 | # endif |
| 106 | 106 | # include <sys/socket.h> |
| 107 | 107 | # include <sys/uio.h> |
| | 108 | # ifndef __VMS |
| 108 | 109 | # include <sys/un.h> |
| | 110 | # endif |
| 109 | 111 | # include <netinet/in.h> |
| 110 | 112 | # include <netinet/tcp.h> |
| 111 | 113 | # include <arpa/inet.h> |
| … |
… |
typedef in6_addr in6_addr_type;
|
| 187 | 189 | typedef ipv6_mreq in6_mreq_type; |
| 188 | 190 | typedef sockaddr_in6 sockaddr_in6_type; |
| 189 | 191 | typedef sockaddr_storage sockaddr_storage_type; |
| | 192 | #ifndef __VMS |
| 190 | 193 | typedef sockaddr_un sockaddr_un_type; |
| 191 | | typedef addrinfo addrinfo_type; |
| | 194 | #endif |
| | 195 | #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| | 196 | typedef __addrinfo64 addrinfo_type; |
| | 197 | #else |
| | 198 | typedef addrinfo addrinfo_type; |
| | 199 | #endif |
| 192 | 200 | typedef int ioctl_arg_type; |
| 193 | 201 | typedef uint32_t u_long_type; |
| 194 | 202 | typedef uint16_t u_short_type; |
diff -rupN boost_1_43_0/boost/asio/local/basic_endpoint.hpp boost_vms_1_43_0/boost/asio/local/basic_endpoint.hpp
|
old
|
new
|
|
| 32 | 32 | #include <boost/asio/detail/throw_error.hpp> |
| 33 | 33 | |
| 34 | 34 | #if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS) |
| 35 | | # if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) |
| | 35 | # if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) && !defined(__VMS) |
| 36 | 36 | # define BOOST_ASIO_HAS_LOCAL_SOCKETS 1 |
| 37 | 37 | # endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) |
| 38 | 38 | #endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS) |
diff -rupN boost_1_43_0/boost/asio/posix/stream_descriptor_service.hpp boost_vms_1_43_0/boost/asio/posix/stream_descriptor_service.hpp
|
old
|
new
|
|
| 27 | 27 | #include <boost/asio/detail/service_base.hpp> |
| 28 | 28 | |
| 29 | 29 | #if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR) |
| 30 | | # if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) |
| | 30 | # if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) && !defined(__VMS) |
| 31 | 31 | # define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1 |
| 32 | 32 | # endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) |
| 33 | 33 | #endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR) |
diff -rupN boost_1_43_0/boost/asio/serial_port_base.hpp boost_vms_1_43_0/boost/asio/serial_port_base.hpp
|
old
|
new
|
|
| 27 | 27 | |
| 28 | 28 | #if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT) |
| 29 | 29 | # if defined(BOOST_ASIO_HAS_IOCP) \ |
| 30 | | || !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) |
| | 30 | || !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) && !defined(__VMS) |
| 31 | 31 | # define BOOST_ASIO_HAS_SERIAL_PORT 1 |
| 32 | 32 | # endif // defined(BOOST_ASIO_HAS_IOCP) |
| 33 | 33 | #endif // !defined(BOOST_ASIO_DISABLE_STREAM_HANDLE) |
diff -rupN boost_1_43_0/libs/asio/test/buffered_read_stream.cpp boost_vms_1_43_0/libs/asio/test/buffered_read_stream.cpp
|
old
|
new
|
void test_sync_operations()
|
| 93 | 93 | boost::asio::buffer(read_buf), error); |
| 94 | 94 | |
| 95 | 95 | BOOST_CHECK(bytes_read == 0); |
| | 96 | #ifdef __VMS |
| | 97 | // OS bug |
| | 98 | BOOST_CHECK(error == boost::asio::error::eof || error == boost::system::errc::broken_pipe); |
| | 99 | #else |
| 96 | 100 | BOOST_CHECK(error == boost::asio::error::eof); |
| | 101 | #endif |
| 97 | 102 | |
| 98 | 103 | client_socket.close(error); |
| 99 | 104 | } |
| … |
… |
void handle_read(const boost::system::er
|
| 126 | 131 | void handle_read_eof(const boost::system::error_code& e, |
| 127 | 132 | std::size_t bytes_transferred) |
| 128 | 133 | { |
| | 134 | #ifdef __VMS |
| | 135 | // OS bug |
| | 136 | BOOST_CHECK(e == boost::asio::error::eof || e == boost::system::errc::broken_pipe); |
| | 137 | #else |
| 129 | 138 | BOOST_CHECK(e == boost::asio::error::eof); |
| | 139 | #endif |
| 130 | 140 | BOOST_CHECK(bytes_transferred == 0); |
| 131 | 141 | } |
| 132 | 142 | |
diff -rupN boost_1_43_0/libs/asio/test/buffered_stream.cpp boost_vms_1_43_0/libs/asio/test/buffered_stream.cpp
|
old
|
new
|
void test_sync_operations()
|
| 95 | 95 | boost::asio::buffer(read_buf), error); |
| 96 | 96 | |
| 97 | 97 | BOOST_CHECK(bytes_read == 0); |
| | 98 | #ifdef __VMS |
| | 99 | // OS bug |
| | 100 | BOOST_CHECK(error == boost::asio::error::eof || error == boost::system::errc::broken_pipe); |
| | 101 | #else |
| 98 | 102 | BOOST_CHECK(error == boost::asio::error::eof); |
| 99 | | |
| | 103 | #endif |
| 100 | 104 | client_socket.close(error); |
| 101 | 105 | } |
| 102 | 106 | |
| … |
… |
void handle_read(const boost::system::er
|
| 133 | 137 | void handle_read_eof(const boost::system::error_code& e, |
| 134 | 138 | std::size_t bytes_transferred) |
| 135 | 139 | { |
| | 140 | #ifdef __VMS |
| | 141 | // OS bug |
| | 142 | BOOST_CHECK(e == boost::asio::error::eof || e == boost::system::errc::broken_pipe); |
| | 143 | #else |
| 136 | 144 | BOOST_CHECK(e == boost::asio::error::eof); |
| | 145 | #endif |
| 137 | 146 | BOOST_CHECK(bytes_transferred == 0); |
| 138 | 147 | } |
| 139 | 148 | |
diff -rupN boost_1_43_0/libs/asio/test/buffered_write_stream.cpp boost_vms_1_43_0/libs/asio/test/buffered_write_stream.cpp
|
old
|
new
|
void test_sync_operations()
|
| 95 | 95 | boost::asio::buffer(read_buf), error); |
| 96 | 96 | |
| 97 | 97 | BOOST_CHECK(bytes_read == 0); |
| | 98 | #ifdef __VMS |
| | 99 | // OS bug |
| | 100 | BOOST_CHECK(error == boost::asio::error::eof || error == boost::system::errc::broken_pipe); |
| | 101 | #else |
| 98 | 102 | BOOST_CHECK(error == boost::asio::error::eof); |
| | 103 | #endif |
| 99 | 104 | |
| 100 | 105 | client_socket.close(error); |
| 101 | 106 | } |
| … |
… |
void handle_read(const boost::system::er
|
| 133 | 138 | void handle_read_eof(const boost::system::error_code& e, |
| 134 | 139 | std::size_t bytes_transferred) |
| 135 | 140 | { |
| | 141 | #ifdef __VMS |
| | 142 | // OS bug |
| | 143 | BOOST_CHECK(e == boost::asio::error::eof || e == boost::system::errc::broken_pipe); |
| | 144 | #else |
| 136 | 145 | BOOST_CHECK(e == boost::asio::error::eof); |
| | 146 | #endif |
| 137 | 147 | BOOST_CHECK(bytes_transferred == 0); |
| 138 | 148 | } |
| 139 | 149 | |
diff -rupN boost_1_43_0/libs/asio/test/ip/tcp.cpp boost_vms_1_43_0/libs/asio/test/ip/tcp.cpp
|
old
|
new
|
void handle_read_eof(const boost::system
|
| 359 | 359 | size_t bytes_transferred, bool* called) |
| 360 | 360 | { |
| 361 | 361 | *called = true; |
| | 362 | #ifdef __VMS |
| | 363 | // OpenVMS recvmsg / sendmsg repots sometimes broken_pipe |
| | 364 | // instead of eof... Bad but this is OS's bug |
| | 365 | BOOST_CHECK(err == boost::asio::error::eof || err == boost::system::errc::broken_pipe); |
| | 366 | #else |
| 362 | 367 | BOOST_CHECK(err == boost::asio::error::eof); |
| | 368 | #endif |
| 363 | 369 | BOOST_CHECK(bytes_transferred == 0); |
| 364 | 370 | } |
| 365 | 371 | |