Boost logo

Boost-Commit :

From: chris_at_[hidden]
Date: 2008-07-09 08:35:38


Author: chris_kohlhoff
Date: 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
New Revision: 47263
URL: http://svn.boost.org/trac/boost/changeset/47263

Log:
Merged bug fixes, doc changes and examples from trunk.

........
  r47217 | chris_kohlhoff | 2008-07-08 22:30:49 +1000 (Tue, 08 Jul 2008) | 3 lines
  
  POSIX platforms are not required to define IOV_MAX, so if it's not
  available default to the stipulated minimum of 16.
........
  r47218 | chris_kohlhoff | 2008-07-08 22:31:48 +1000 (Tue, 08 Jul 2008) | 2 lines
  
  Fix SSL thread ID function to work correctly on 64-bit Windows.
........
  r47248 | chris_kohlhoff | 2008-07-09 07:56:50 +1000 (Wed, 09 Jul 2008) | 2 lines
  
  Add new type requirements.
........
  r47249 | chris_kohlhoff | 2008-07-09 08:54:38 +1000 (Wed, 09 Jul 2008) | 2 lines
  
  Add example showing how to use UNIX domain sockets with connect_pair().
........
  r47261 | chris_kohlhoff | 2008-07-09 22:00:56 +1000 (Wed, 09 Jul 2008) | 2 lines
  
  Add more UNIX domain socket examples.
........

Added:
   branches/release/libs/asio/doc/requirements/AsyncRandomAccessReadDevice.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/AsyncRandomAccessReadDevice.qbk
   branches/release/libs/asio/doc/requirements/AsyncRandomAccessWriteDevice.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/AsyncRandomAccessWriteDevice.qbk
   branches/release/libs/asio/doc/requirements/GettableSerialPortOption.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/GettableSerialPortOption.qbk
   branches/release/libs/asio/doc/requirements/RandomAccessHandleService.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/RandomAccessHandleService.qbk
   branches/release/libs/asio/doc/requirements/RawSocketService.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/RawSocketService.qbk
   branches/release/libs/asio/doc/requirements/SerialPortService.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/SerialPortService.qbk
   branches/release/libs/asio/doc/requirements/SettableSerialPortOption.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/SettableSerialPortOption.qbk
   branches/release/libs/asio/doc/requirements/SyncRandomAccessReadDevice.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/SyncRandomAccessReadDevice.qbk
   branches/release/libs/asio/doc/requirements/SyncRandomAccessWriteDevice.qbk
      - copied unchanged from r47249, /trunk/libs/asio/doc/requirements/SyncRandomAccessWriteDevice.qbk
   branches/release/libs/asio/example/local/
      - copied from r47249, /trunk/libs/asio/example/local/
   branches/release/libs/asio/example/local/Jamfile
      - copied, changed from r47249, /trunk/libs/asio/example/local/Jamfile
   branches/release/libs/asio/example/local/Jamfile.v2
      - copied, changed from r47249, /trunk/libs/asio/example/local/Jamfile.v2
   branches/release/libs/asio/example/local/connect_pair.cpp
      - copied, changed from r47249, /trunk/libs/asio/example/local/connect_pair.cpp
   branches/release/libs/asio/example/local/stream_client.cpp
      - copied unchanged from r47261, /trunk/libs/asio/example/local/stream_client.cpp
   branches/release/libs/asio/example/local/stream_server.cpp
      - copied unchanged from r47261, /trunk/libs/asio/example/local/stream_server.cpp
Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/asio/detail/socket_types.hpp | 5 +++++
   branches/release/boost/asio/ssl/detail/openssl_init.hpp | 7 +++++++
   branches/release/libs/asio/doc/reference.qbk | 9 +++++++++
   branches/release/libs/asio/doc/reference.xsl | 9 +++++++++
   branches/release/libs/asio/example/local/Jamfile | 24 ++++++++++++++++++++++++
   branches/release/libs/asio/example/local/Jamfile.v2 | 30 ++++++++++++++++++++++++++++++
   branches/release/libs/asio/example/local/connect_pair.cpp | 2 ++
   7 files changed, 86 insertions(+), 0 deletions(-)

Modified: branches/release/boost/asio/detail/socket_types.hpp
==============================================================================
--- branches/release/boost/asio/detail/socket_types.hpp (original)
+++ branches/release/boost/asio/detail/socket_types.hpp 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -188,7 +188,12 @@
 const int message_peek = MSG_PEEK;
 const int message_out_of_band = MSG_OOB;
 const int message_do_not_route = MSG_DONTROUTE;
+# if defined(IOV_MAX)
 const int max_iov_len = IOV_MAX;
+# else
+// POSIX platforms are not required to define IOV_MAX.
+const int max_iov_len = 16;
+# endif
 #endif
 const int custom_socket_option_level = 0xA5100000;
 const int enable_connection_aborted_option = 1;

Modified: branches/release/boost/asio/ssl/detail/openssl_init.hpp
==============================================================================
--- branches/release/boost/asio/ssl/detail/openssl_init.hpp (original)
+++ branches/release/boost/asio/ssl/detail/openssl_init.hpp 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -21,6 +21,7 @@
 #include <boost/asio/detail/push_options.hpp>
 #include <vector>
 #include <boost/assert.hpp>
+#include <boost/config.hpp>
 #include <boost/shared_ptr.hpp>
 #include <boost/asio/detail/pop_options.hpp>
 
@@ -87,11 +88,15 @@
   private:
     static unsigned long openssl_id_func()
     {
+#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+ return ::GetCurrentThreadId();
+#else // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
       void* id = instance()->thread_id_;
       if (id == 0)
         instance()->thread_id_ = id = &id; // Ugh.
       BOOST_ASSERT(sizeof(unsigned long) >= sizeof(void*));
       return reinterpret_cast<unsigned long>(id);
+#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
     }
 
     static void openssl_locking_func(int mode, int n,
@@ -106,8 +111,10 @@
     // Mutexes to be used in locking callbacks.
     std::vector<boost::shared_ptr<boost::asio::detail::mutex> > mutexes_;
 
+#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
     // The thread identifiers to be used by openssl.
     boost::asio::detail::tss_ptr<void> thread_id_;
+#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
   };
 
 public:

Modified: branches/release/libs/asio/doc/reference.qbk
==============================================================================
--- branches/release/libs/asio/doc/reference.qbk (original)
+++ branches/release/libs/asio/doc/reference.qbk 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -11,6 +11,8 @@
 
 [include requirements/asynchronous_operations.qbk]
 [include requirements/AcceptHandler.qbk]
+[include requirements/AsyncRandomAccessReadDevice.qbk]
+[include requirements/AsyncRandomAccessWriteDevice.qbk]
 [include requirements/AsyncReadStream.qbk]
 [include requirements/AsyncWriteStream.qbk]
 [include requirements/CompletionHandler.qbk]
@@ -21,6 +23,7 @@
 [include requirements/DatagramSocketService.qbk]
 [include requirements/DescriptorService.qbk]
 [include requirements/Endpoint.qbk]
+[include requirements/GettableSerialPortOption.qbk]
 [include requirements/GettableSocketOption.qbk]
 [include requirements/Handler.qbk]
 [include requirements/HandleService.qbk]
@@ -29,16 +32,22 @@
 [include requirements/IoObjectService.qbk]
 [include requirements/MutableBufferSequence.qbk]
 [include requirements/Protocol.qbk]
+[include requirements/RandomAccessHandleService.qbk]
+[include requirements/RawSocketService.qbk]
 [include requirements/ReadHandler.qbk]
 [include requirements/ResolveHandler.qbk]
 [include requirements/ResolverService.qbk]
+[include requirements/SerialPortService.qbk]
 [include requirements/Service.qbk]
+[include requirements/SettableSerialPortOption.qbk]
 [include requirements/SettableSocketOption.qbk]
 [include requirements/SocketAcceptorService.qbk]
 [include requirements/SocketService.qbk]
 [include requirements/StreamDescriptorService.qbk]
 [include requirements/StreamHandleService.qbk]
 [include requirements/StreamSocketService.qbk]
+[include requirements/SyncRandomAccessReadDevice.qbk]
+[include requirements/SyncRandomAccessWriteDevice.qbk]
 [include requirements/SyncReadStream.qbk]
 [include requirements/SyncWriteStream.qbk]
 [include requirements/TimeTraits.qbk]

Modified: branches/release/libs/asio/doc/reference.xsl
==============================================================================
--- branches/release/libs/asio/doc/reference.xsl (original)
+++ branches/release/libs/asio/doc/reference.xsl 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -37,6 +37,8 @@
 
 [include requirements/asynchronous_operations.qbk]
 [include requirements/AcceptHandler.qbk]
+[include requirements/AsyncRandomAccessReadDevice.qbk]
+[include requirements/AsyncRandomAccessWriteDevice.qbk]
 [include requirements/AsyncReadStream.qbk]
 [include requirements/AsyncWriteStream.qbk]
 [include requirements/CompletionHandler.qbk]
@@ -47,6 +49,7 @@
 [include requirements/DatagramSocketService.qbk]
 [include requirements/DescriptorService.qbk]
 [include requirements/Endpoint.qbk]
+[include requirements/GettableSerialPortOption.qbk]
 [include requirements/GettableSocketOption.qbk]
 [include requirements/Handler.qbk]
 [include requirements/HandleService.qbk]
@@ -55,16 +58,22 @@
 [include requirements/IoObjectService.qbk]
 [include requirements/MutableBufferSequence.qbk]
 [include requirements/Protocol.qbk]
+[include requirements/RandomAccessHandleService.qbk]
+[include requirements/RawSocketService.qbk]
 [include requirements/ReadHandler.qbk]
 [include requirements/ResolveHandler.qbk]
 [include requirements/ResolverService.qbk]
+[include requirements/SerialPortService.qbk]
 [include requirements/Service.qbk]
+[include requirements/SettableSerialPortOption.qbk]
 [include requirements/SettableSocketOption.qbk]
 [include requirements/SocketAcceptorService.qbk]
 [include requirements/SocketService.qbk]
 [include requirements/StreamDescriptorService.qbk]
 [include requirements/StreamHandleService.qbk]
 [include requirements/StreamSocketService.qbk]
+[include requirements/SyncRandomAccessReadDevice.qbk]
+[include requirements/SyncRandomAccessWriteDevice.qbk]
 [include requirements/SyncReadStream.qbk]
 [include requirements/SyncWriteStream.qbk]
 [include requirements/TimeTraits.qbk]

Copied: branches/release/libs/asio/example/local/Jamfile (from r47249, /trunk/libs/asio/example/local/Jamfile)
==============================================================================
--- /trunk/libs/asio/example/local/Jamfile (original)
+++ branches/release/libs/asio/example/local/Jamfile 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -32,3 +32,27 @@
     <mingw><*><find-library>mswsock
     $(SOCKET_LIBS)
   ;
+
+exe stream_client
+ : <lib>@boost/libs/system/build/boost_system
+ stream_client.cpp
+ : <include>$(BOOST_ROOT)
+ <include>../../../..
+ <define>BOOST_ALL_NO_LIB=1
+ <threading>multi
+ <mingw><*><find-library>ws2_32
+ <mingw><*><find-library>mswsock
+ $(SOCKET_LIBS)
+ ;
+
+exe stream_server
+ : <lib>@boost/libs/system/build/boost_system
+ stream_server.cpp
+ : <include>$(BOOST_ROOT)
+ <include>../../../..
+ <define>BOOST_ALL_NO_LIB=1
+ <threading>multi
+ <mingw><*><find-library>ws2_32
+ <mingw><*><find-library>mswsock
+ $(SOCKET_LIBS)
+ ;

Copied: branches/release/libs/asio/example/local/Jamfile.v2 (from r47249, /trunk/libs/asio/example/local/Jamfile.v2)
==============================================================================
--- /trunk/libs/asio/example/local/Jamfile.v2 (original)
+++ branches/release/libs/asio/example/local/Jamfile.v2 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -37,3 +37,33 @@
     <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
     <os>HPUX:<library>ipv6
   ;
+
+exe stream_client
+ : stream_client.cpp
+ /boost/system//boost_system
+ : <define>BOOST_ALL_NO_LIB=1
+ <threading>multi
+ <os>SOLARIS:<library>socket
+ <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0501
+ <os>NT,<toolset>gcc:<library>ws2_32
+ <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
+ <os>HPUX:<library>ipv6
+ ;
+
+exe stream_server
+ : stream_server.cpp
+ /boost/system//boost_system
+ : <define>BOOST_ALL_NO_LIB=1
+ <threading>multi
+ <os>SOLARIS:<library>socket
+ <os>SOLARIS:<library>nsl
+ <os>NT:<define>_WIN32_WINNT=0x0501
+ <os>NT,<toolset>gcc:<library>ws2_32
+ <os>NT,<toolset>gcc:<library>mswsock
+ <os>NT,<toolset>gcc-cygwin:<define>__USE_W32_SOCKETS
+ <os>HPUX,<toolset>gcc:<define>_XOPEN_SOURCE_EXTENDED
+ <os>HPUX:<library>ipv6
+ ;

Copied: branches/release/libs/asio/example/local/connect_pair.cpp (from r47249, /trunk/libs/asio/example/local/connect_pair.cpp)
==============================================================================
--- /trunk/libs/asio/example/local/connect_pair.cpp (original)
+++ branches/release/libs/asio/example/local/connect_pair.cpp 2008-07-09 08:35:37 EDT (Wed, 09 Jul 2008)
@@ -137,4 +137,6 @@
   }
 }
 
+#else // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+# error Local sockets not available on this platform.
 #endif // defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk