Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2008-05-27 13:05:23


Author: igaztanaga
Date: 2008-05-27 13:05:22 EDT (Tue, 27 May 2008)
New Revision: 45816
URL: http://svn.boost.org/trac/boost/changeset/45816

Log:
Ticket #1921: interprocess shared_memory example needs patch (provided)
Text files modified:
   trunk/boost/interprocess/detail/math_functions.hpp | 2 ++
   trunk/libs/interprocess/example/doc_file_mapping.cpp | 1 -
   trunk/libs/interprocess/example/doc_message_queueA.cpp | 2 --
   trunk/libs/interprocess/example/doc_shared_memory.cpp | 1 -
   trunk/libs/interprocess/example/doc_shared_memory2.cpp | 3 ++-
   5 files changed, 4 insertions(+), 5 deletions(-)

Modified: trunk/boost/interprocess/detail/math_functions.hpp
==============================================================================
--- trunk/boost/interprocess/detail/math_functions.hpp (original)
+++ trunk/boost/interprocess/detail/math_functions.hpp 2008-05-27 13:05:22 EDT (Tue, 27 May 2008)
@@ -16,6 +16,8 @@
 #ifndef BOOST_INTERPROCESS_DETAIL_MATH_FUNCTIONS_HPP
 #define BOOST_INTERPROCESS_DETAIL_MATH_FUNCTIONS_HPP
 
+#include <boost/static_assert.hpp>
+
 namespace boost {
 namespace interprocess {
 namespace detail {

Modified: trunk/libs/interprocess/example/doc_file_mapping.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_file_mapping.cpp (original)
+++ trunk/libs/interprocess/example/doc_file_mapping.cpp 2008-05-27 13:05:22 EDT (Tue, 27 May 2008)
@@ -56,7 +56,6 @@
       std::cout << ex.what() << std::endl;
       return 1;
    }
- std::remove("file.bin");
    return 0;
 }
 //]

Modified: trunk/libs/interprocess/example/doc_message_queueA.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_message_queueA.cpp (original)
+++ trunk/libs/interprocess/example/doc_message_queueA.cpp 2008-05-27 13:05:22 EDT (Tue, 27 May 2008)
@@ -35,11 +35,9 @@
       }
    }
    catch(interprocess_exception &ex){
- message_queue::remove("message_queue");
       std::cout << ex.what() << std::endl;
       return 1;
    }
- message_queue::remove("message_queue");
 
    return 0;
 }

Modified: trunk/libs/interprocess/example/doc_shared_memory.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_shared_memory.cpp (original)
+++ trunk/libs/interprocess/example/doc_shared_memory.cpp 2008-05-27 13:05:22 EDT (Tue, 27 May 2008)
@@ -38,7 +38,6 @@
       std::cout << ex.what() << std::endl;
       return 1;
    }
- shared_memory_object::remove("shared_memory");
    return 0;
 }
 //]

Modified: trunk/libs/interprocess/example/doc_shared_memory2.cpp
==============================================================================
--- trunk/libs/interprocess/example/doc_shared_memory2.cpp (original)
+++ trunk/libs/interprocess/example/doc_shared_memory2.cpp 2008-05-27 13:05:22 EDT (Tue, 27 May 2008)
@@ -33,12 +33,13 @@
          }
       }
       std::cout << "Test successful!" << std::endl;
+ shared_memory_object::remove("shared_memory");
    }
    catch(interprocess_exception &ex){
       std::cout << "Unexpected exception: " << ex.what() << std::endl;
+ shared_memory_object::remove("shared_memory");
       return 1;
    }
-
    return 0;
 }
 //]


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