Boost logo

Boost-Commit :

From: bdawes_at_[hidden]
Date: 2007-10-23 09:00:18


Author: bemandawes
Date: 2007-10-23 09:00:18 EDT (Tue, 23 Oct 2007)
New Revision: 40352
URL: http://svn.boost.org/trac/boost/changeset/40352

Log:
Rename posix, windows, Linux, and cygwin namespaces to conform with C++ std.
Text files modified:
   trunk/boost/system/error_code.hpp | 53 ++++++++++++++++++++++++---------------
   trunk/libs/system/doc/reference.html | 16 ++++++------
   trunk/libs/system/src/error_code.cpp | 2
   3 files changed, 41 insertions(+), 30 deletions(-)

Modified: trunk/boost/system/error_code.hpp
==============================================================================
--- trunk/boost/system/error_code.hpp (original)
+++ trunk/boost/system/error_code.hpp 2007-10-23 09:00:18 EDT (Tue, 23 Oct 2007)
@@ -49,9 +49,8 @@
 
     // portable error_conditions -------------------------------------------//
 
- namespace posix
+ namespace posix_error
     {
-
       enum posix_errno
       {
         success = 0,
@@ -135,9 +134,13 @@
         wrong_protocol_type = EPROTOTYPE
       };
 
- } // namespace posix
+ } // namespace posix_error
+
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+ namespace posix = posix_error;
+# endif
 
- template<> struct is_error_condition_enum<posix::posix_errno>
+ template<> struct is_error_condition_enum<posix_error::posix_errno>
       { static const bool value = true; };
 
     // class error_category ------------------------------------------------//
@@ -398,9 +401,9 @@
         + reinterpret_cast<std::size_t>(&ec.category());
     }
 
- // make_* functions for posix::posix_errno -----------------------------//
+ // make_* functions for posix_error::posix_errno -----------------------------//
 
- namespace posix
+ namespace posix_error
     {
       // explicit conversion:
       inline error_code make_error_code( posix_errno e )
@@ -478,7 +481,7 @@
 
 # ifdef __CYGWIN__
 
- namespace cygwin
+ namespace cygwin_error
     {
       enum cygwin_errno
       {
@@ -486,12 +489,12 @@
         no_package = ENOPKG,
         no_share = ENOSHARE
       };
- } // namespace cygwin
+ } // namespace cygwin_error
 
- template<> struct is_error_code_enum<cygwin::cygwin_errno>
+ template<> struct is_error_code_enum<cygwin_error::cygwin_errno>
       { static const bool value = true; };
 
- namespace cygwin
+ namespace cygwin_error
     {
       inline error_code make_error_code( cygwin_errno e )
         { return error_code( e, system_category ); }
@@ -499,9 +502,9 @@
 
 # elif defined(linux) || defined(__linux) || defined(__linux__)
 
- namespace Linux // linux lowercase name preempted by use as predefined macro
+ namespace linux_error
     {
- enum linux_error
+ enum linux_errno
       {
         advertise_error = EADV,
         bad_exchange = EBADE,
@@ -556,14 +559,18 @@
         unattached = EUNATCH,
         unclean = EUCLEAN
       };
- } // namespace Linux
+ } // namespace linux_error
 
- template<> struct is_error_code_enum<Linux::linux_error>
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+ namespace Linux = linux_error;
+# endif
+
+ template<> struct is_error_code_enum<linux_error::linux_error_code>
       { static const bool value = true; };
 
- namespace Linux
+ namespace linux_error
     {
- inline error_code make_error_code( linux_error e )
+ inline error_code make_error_code( linux_error_code e )
         { return error_code( e, system_category ); }
     }
 
@@ -580,9 +587,9 @@
     //
     // error_code( ::GetLastError(), system_category )
 
- namespace windows
+ namespace windows_error
     {
- enum windows_error
+ enum windows_error_code
       {
         success = 0,
         // These names and values are based on Windows winerror.h
@@ -646,12 +653,16 @@
 
     } // namespace windows
 
- template<> struct is_error_code_enum<windows::windows_error>
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
+ namespace windows = windows_error;
+# endif
+
+ template<> struct is_error_code_enum<windows_error::windows_error_code>
       { static const bool value = true; };
 
- namespace windows
+ namespace windows_error
     {
- inline error_code make_error_code( windows_error e )
+ inline error_code make_error_code( windows_error_code e )
         { return error_code( e, system_category ); }
     }
 

Modified: trunk/libs/system/doc/reference.html
==============================================================================
--- trunk/libs/system/doc/reference.html (original)
+++ trunk/libs/system/doc/reference.html 2007-10-23 09:00:18 EDT (Tue, 23 Oct 2007)
@@ -89,7 +89,7 @@
       struct is_error_condition_enum { static const bool value = false; };
 
     // portable error_conditions
- namespace posix
+ namespace posix_error
     {
       enum posix_errno
       {
@@ -174,9 +174,9 @@
         wrong_protocol_type //EPROTOTYPE
       };
 
- } // namespace posix
+ } // namespace posix_error
 
- template<> struct is_error_condition_enum<posix::posix_errno>&lt;posix::posix_errno&gt;
+ template<> struct is_error_condition_enum<posix::posix_errno>&lt;posix_error::posix_errno&gt;
       { static const bool value = true; };
 
     bool operator==( const error_code &amp; lhs, const error_code &amp; rhs );
@@ -192,8 +192,8 @@
     bool operator&lt;( const error_code &amp; lhs, const error_code &amp; rhs );
     bool operator&lt;( const error_condition &amp; lhs, const error_condition &amp; rhs );
 
- error_code make_error_code( posix::posix_errno e );
- error_condition make_error_condition( posix::posix_errno e );
+ error_code make_error_code( posix_error::posix_errno e );
+ error_condition make_error_condition( posix_error::posix_errno e );
 
     template &lt;class charT, class traits&gt;
       std::basic_ostream&lt;charT,traits&gt;&amp;
@@ -607,11 +607,11 @@
   &nbsp; || (lhs.category() == rhs.category() &amp;&amp; lhs.value() &lt; rhs.value())</code>.</p>
   <p><i>Throws: </i>Nothing.</p>
 </blockquote>
-<pre>error_code make_error_code( posix::posix_errno e );</pre>
+<pre>error_code make_error_code( posix_error::posix_errno e );</pre>
 <blockquote>
   <p><i>Returns:</i> <code>error_code( e, posix_category)</code>.</p>
 </blockquote>
-<pre>error_condition make_error_condition( posix::posix_errno e );</pre>
+<pre>error_condition make_error_condition( posix_error::posix_errno e );</pre>
 <blockquote>
   <p><i>Returns:</i> <code>error_condition( e, posix_category)</code>.</p>
 </blockquote>
@@ -699,7 +699,7 @@
 <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a></p>
 
 <p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->September 19, 2007<!--webbot bot="Timestamp" endspan i-checksum="38025" --> </font>
+<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->October 23, 2007<!--webbot bot="Timestamp" endspan i-checksum="30853" --> </font>
 </p>
 
 </body>

Modified: trunk/libs/system/src/error_code.cpp
==============================================================================
--- trunk/libs/system/src/error_code.cpp (original)
+++ trunk/libs/system/src/error_code.cpp 2007-10-23 09:00:18 EDT (Tue, 23 Oct 2007)
@@ -30,7 +30,7 @@
 #include <cassert>
 
 using namespace boost::system;
-using namespace boost::system::posix;
+using namespace boost::system::posix_error;
 
 #include <cstring> // for strerror/strerror_r
 


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