diff --git a/test/adaptive_node_pool_test.cpp b/test/adaptive_node_pool_test.cpp index 3caae18..13afdb4 100644 --- a/test/adaptive_node_pool_test.cpp +++ b/test/adaptive_node_pool_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS -#include #include "node_pool_test.hpp" #include #include @@ -26,5 +25,3 @@ int main () return 0; } - -#include diff --git a/test/adaptive_pool_test.cpp b/test/adaptive_pool_test.cpp index 59c7f97..37e0ec4 100644 --- a/test/adaptive_pool_test.cpp +++ b/test/adaptive_pool_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS -#include #include #include #include @@ -67,5 +66,3 @@ int main () return 0; } - -#include diff --git a/test/allocexcept_test.cpp b/test/allocexcept_test.cpp index 696b279..de5a328 100644 --- a/test/allocexcept_test.cpp +++ b/test/allocexcept_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -92,4 +91,3 @@ int main () return 0; } -#include diff --git a/test/anonymous_shared_memory_test.cpp b/test/anonymous_shared_memory_test.cpp index cdff6e6..2672ec5 100644 --- a/test/anonymous_shared_memory_test.cpp +++ b/test/anonymous_shared_memory_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -50,5 +49,3 @@ int main () } return 0; } - -#include diff --git a/test/boost_use_windows_h.cpp b/test/boost_use_windows_h.cpp index 2fb1a61..e03b6dc 100644 --- a/test/boost_use_windows_h.cpp +++ b/test/boost_use_windows_h.cpp @@ -10,7 +10,6 @@ #define _WIN32_WINNT 0x0501 #define BOOST_USE_WINDOWS_H -#include #include #ifdef BOOST_INTERPROCESS_WINDOWS @@ -34,5 +33,3 @@ int main() } #endif - -#include diff --git a/test/bufferstream_test.cpp b/test/bufferstream_test.cpp index 6b6cb24..70e3e7b 100644 --- a/test/bufferstream_test.cpp +++ b/test/bufferstream_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -141,4 +140,3 @@ int main () return 0; } -#include diff --git a/test/cached_adaptive_pool_test.cpp b/test/cached_adaptive_pool_test.cpp index ee5b86c..bcc7876 100644 --- a/test/cached_adaptive_pool_test.cpp +++ b/test/cached_adaptive_pool_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS -#include #include #include #include @@ -69,5 +68,3 @@ int main () return 0; } - -#include diff --git a/test/cached_node_allocator_test.cpp b/test/cached_node_allocator_test.cpp index 8ffa0f0..6c0ee4a 100644 --- a/test/cached_node_allocator_test.cpp +++ b/test/cached_node_allocator_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -63,5 +62,3 @@ int main () return 1; return 0; } - -#include diff --git a/test/condition_any_test.cpp b/test/condition_any_test.cpp index 8349fed..d2711f1 100644 --- a/test/condition_any_test.cpp +++ b/test/condition_any_test.cpp @@ -8,8 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include #include #include #include @@ -30,5 +28,3 @@ int main () return 0; } - -#include diff --git a/test/condition_test.cpp b/test/condition_test.cpp index 089c0a6..024716c 100644 --- a/test/condition_test.cpp +++ b/test/condition_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -36,5 +35,3 @@ int main () return 0; } - -#include diff --git a/test/data_test.cpp b/test/data_test.cpp index 450031b..391ebd6 100644 --- a/test/data_test.cpp +++ b/test/data_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -93,5 +92,3 @@ int main () shared_memory_object::remove(shMemName); return 0; } - -#include diff --git a/test/deque_test.cpp b/test/deque_test.cpp index 4b3ee3c..07046a6 100644 --- a/test/deque_test.cpp +++ b/test/deque_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -308,5 +307,3 @@ int main () return 0; } - -#include diff --git a/test/enable_shared_from_this_test.cpp b/test/enable_shared_from_this_test.cpp index 342e0a7..83bedca 100644 --- a/test/enable_shared_from_this_test.cpp +++ b/test/enable_shared_from_this_test.cpp @@ -10,7 +10,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -93,5 +92,3 @@ int main() shared_memory_object::remove(process_name.c_str()); return boost::report_errors(); } - -#include diff --git a/test/file_lock_test.cpp b/test/file_lock_test.cpp index 6dcfd92..9bce20a 100644 --- a/test/file_lock_test.cpp +++ b/test/file_lock_test.cpp @@ -7,8 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include -#include #include #include #include @@ -77,4 +75,3 @@ int main () return 0; } -#include diff --git a/test/file_mapping_test.cpp b/test/file_mapping_test.cpp index c3ce161..2b39195 100644 --- a/test/file_mapping_test.cpp +++ b/test/file_mapping_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include //std::streamoff #include //std::ofstream, std::ifstream #include @@ -160,5 +159,3 @@ int main () file_mapping::remove(get_filename().c_str()); return 0; } - -#include diff --git a/test/flat_map_index_allocation_test.cpp b/test/flat_map_index_allocation_test.cpp index 41476ab..75c4de9 100644 --- a/test/flat_map_index_allocation_test.cpp +++ b/test/flat_map_index_allocation_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include "named_allocation_test_template.hpp" @@ -21,5 +20,3 @@ int main () return 0; } - -#include diff --git a/test/flat_tree_test.cpp b/test/flat_tree_test.cpp index bd4af0f..04f0aa8 100644 --- a/test/flat_tree_test.cpp +++ b/test/flat_tree_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -198,5 +197,3 @@ int main() return 0; } - -#include diff --git a/test/intermodule_singleton_test.cpp b/test/intermodule_singleton_test.cpp index 915a9fe..048720d 100644 --- a/test/intermodule_singleton_test.cpp +++ b/test/intermodule_singleton_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -326,5 +325,3 @@ int main () return 0; } - -#include diff --git a/test/intrusive_ptr_test.cpp b/test/intrusive_ptr_test.cpp index f3e4812..32f0d3a 100644 --- a/test/intrusive_ptr_test.cpp +++ b/test/intrusive_ptr_test.cpp @@ -9,7 +9,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -542,5 +541,3 @@ int main() return boost::report_errors(); } - -#include diff --git a/test/iset_index_allocation_test.cpp b/test/iset_index_allocation_test.cpp index 42d03ff..2e431a0 100644 --- a/test/iset_index_allocation_test.cpp +++ b/test/iset_index_allocation_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include #include "named_allocation_test_template.hpp" @@ -20,5 +19,3 @@ int main () return 0; } - -#include diff --git a/test/iunordered_set_index_allocation_test.cpp b/test/iunordered_set_index_allocation_test.cpp index 5e8e966..01eb64d 100644 --- a/test/iunordered_set_index_allocation_test.cpp +++ b/test/iunordered_set_index_allocation_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include "named_allocation_test_template.hpp" @@ -21,5 +20,3 @@ int main () return 0; } - -#include diff --git a/test/list_test.cpp b/test/list_test.cpp index 4ecf55a..00f03a3 100644 --- a/test/list_test.cpp +++ b/test/list_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -59,5 +58,3 @@ int main () return 0; } - -#include diff --git a/test/managed_mapped_file_test.cpp b/test/managed_mapped_file_test.cpp index 8185e56..cfc9d26 100644 --- a/test/managed_mapped_file_test.cpp +++ b/test/managed_mapped_file_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #if defined(BOOST_INTERPROCESS_MAPPED_FILES) @@ -235,5 +234,3 @@ int main() } #endif//#if defined(BOOST_INTERPROCESS_MAPPED_FILES) - -#include diff --git a/test/managed_shared_memory_test.cpp b/test/managed_shared_memory_test.cpp index df85082..b136413 100644 --- a/test/managed_shared_memory_test.cpp +++ b/test/managed_shared_memory_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -212,5 +211,3 @@ int main () shared_memory_object::remove(ShmemName); return 0; } - -#include diff --git a/test/managed_windows_shared_memory_test.cpp b/test/managed_windows_shared_memory_test.cpp index aa01119..3e6fa44 100644 --- a/test/managed_windows_shared_memory_test.cpp +++ b/test/managed_windows_shared_memory_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #ifdef BOOST_INTERPROCESS_WINDOWS @@ -148,5 +147,3 @@ int main() } #endif - -#include diff --git a/test/managed_xsi_shared_memory_test.cpp b/test/managed_xsi_shared_memory_test.cpp index 1492596..f8e7ec0 100644 --- a/test/managed_xsi_shared_memory_test.cpp +++ b/test/managed_xsi_shared_memory_test.cpp @@ -8,12 +8,10 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) -#include #include #include #include @@ -170,5 +168,3 @@ int main() } #endif //#ifndef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS - -#include diff --git a/test/map_index_allocation_test.cpp b/test/map_index_allocation_test.cpp index 27078f4..d1f081a 100644 --- a/test/map_index_allocation_test.cpp +++ b/test/map_index_allocation_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// #define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS -#include #include #include "named_allocation_test_template.hpp" @@ -21,5 +20,3 @@ int main () return 0; } - -#include diff --git a/test/mapped_file_test.cpp b/test/mapped_file_test.cpp index 9d19977..0d70dfb 100644 --- a/test/mapped_file_test.cpp +++ b/test/mapped_file_test.cpp @@ -7,9 +7,10 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// +#include + #if defined(BOOST_INTERPROCESS_MAPPED_FILES) -#include #include #include #include @@ -88,8 +89,6 @@ int main () return 0; } -#include - #else //#if !defined(BOOST_INTERPROCESS_MAPPED_FILES) int main() diff --git a/test/memory_algorithm_test.cpp b/test/memory_algorithm_test.cpp index 9210640..bc55791 100644 --- a/test/memory_algorithm_test.cpp +++ b/test/memory_algorithm_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -87,5 +86,3 @@ int main () shared_memory_object::remove(shMemName); return 0; } - -#include diff --git a/test/message_queue_test.cpp b/test/message_queue_test.cpp index fe76cad..bccf2bf 100644 --- a/test/message_queue_test.cpp +++ b/test/message_queue_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -373,4 +372,3 @@ int main () return 0; } -#include diff --git a/test/mutex_test.cpp b/test/mutex_test.cpp index e3bd482..4b47e33 100644 --- a/test/mutex_test.cpp +++ b/test/mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include "mutex_test_template.hpp" @@ -33,5 +32,3 @@ int main () test::test_all_mutex(); return 0; } - -#include diff --git a/test/mutex_timeout_test.cpp b/test/mutex_timeout_test.cpp index 7dc4df5..e4c70d2 100644 --- a/test/mutex_timeout_test.cpp +++ b/test/mutex_timeout_test.cpp @@ -13,7 +13,6 @@ #define BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS 1000 #include -#include #include #include #include "mutex_test_template.hpp" @@ -26,5 +25,3 @@ int main () return 0; } - -#include diff --git a/test/named_condition_any_test.cpp b/test/named_condition_any_test.cpp index 500cb18..9033c4a 100644 --- a/test/named_condition_any_test.cpp +++ b/test/named_condition_any_test.cpp @@ -8,8 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include #include #include #include @@ -186,4 +184,3 @@ int main () return 0; } -#include diff --git a/test/named_condition_test.cpp b/test/named_condition_test.cpp index 6aa9c78..74e2da9 100644 --- a/test/named_condition_test.cpp +++ b/test/named_condition_test.cpp @@ -8,8 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include #include #include #include @@ -185,5 +183,3 @@ int main () named_mutex::remove(test::add_to_process_id_name("named_mutex")); return 0; } - -#include diff --git a/test/named_construct_test.cpp b/test/named_construct_test.cpp index 834a993..a67048c 100644 --- a/test/named_construct_test.cpp +++ b/test/named_construct_test.cpp @@ -7,8 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include -#include #include // intrusive/detail #include @@ -193,4 +191,3 @@ int main () } //] -#include diff --git a/test/named_mutex_test.cpp b/test/named_mutex_test.cpp index 11c7f1c..9b9fc19 100644 --- a/test/named_mutex_test.cpp +++ b/test/named_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include "mutex_test_template.hpp" @@ -34,5 +33,3 @@ int main () named_mutex::remove(test::get_process_id_name()); return 0; } - -#include diff --git a/test/named_recursive_mutex_test.cpp b/test/named_recursive_mutex_test.cpp index 376c1e3..fa53cd2 100644 --- a/test/named_recursive_mutex_test.cpp +++ b/test/named_recursive_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -37,5 +36,3 @@ int main () return 0; } -#include - diff --git a/test/named_semaphore_test.cpp b/test/named_semaphore_test.cpp index 5708797..dbad25e 100644 --- a/test/named_semaphore_test.cpp +++ b/test/named_semaphore_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -120,4 +119,3 @@ int main () return 0; } -#include diff --git a/test/named_sharable_mutex_test.cpp b/test/named_sharable_mutex_test.cpp index 9721ab0..a1f0aaf 100644 --- a/test/named_sharable_mutex_test.cpp +++ b/test/named_sharable_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include "mutex_test_template.hpp" #include "sharable_mutex_test_template.hpp" #include "named_creation_template.hpp" @@ -99,5 +98,3 @@ int main () named_sharable_mutex::remove(test::get_process_id_name()); return 0; } - -#include diff --git a/test/named_upgradable_mutex_test.cpp b/test/named_upgradable_mutex_test.cpp index c0d2bcd..e24d3f8 100644 --- a/test/named_upgradable_mutex_test.cpp +++ b/test/named_upgradable_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include "mutex_test_template.hpp" #include "sharable_mutex_test_template.hpp" #include "named_creation_template.hpp" @@ -99,5 +98,3 @@ int main () named_upgradable_mutex::remove(test::get_process_id_name()); return 0; } - -#include diff --git a/test/node_allocator_test.cpp b/test/node_allocator_test.cpp index 4ff7097..1d279d1 100644 --- a/test/node_allocator_test.cpp +++ b/test/node_allocator_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -62,5 +61,3 @@ int main () return 1; return 0; } - -#include diff --git a/test/node_pool_test.cpp b/test/node_pool_test.cpp index 149bd7f..e7f6401 100644 --- a/test/node_pool_test.cpp +++ b/test/node_pool_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include "node_pool_test.hpp" #include @@ -25,5 +24,3 @@ int main () return 0; } - -#include diff --git a/test/null_index_test.cpp b/test/null_index_test.cpp index e0f2340..f1a0925 100644 --- a/test/null_index_test.cpp +++ b/test/null_index_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -47,5 +46,3 @@ int main () shared_memory_object::remove(test::get_process_id_name()); return 0; } - -#include diff --git a/test/offset_ptr_test.cpp b/test/offset_ptr_test.cpp index bece39b..8e89ac7 100644 --- a/test/offset_ptr_test.cpp +++ b/test/offset_ptr_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -291,62 +290,3 @@ int main() test_pointer_plus_bits(); return ::boost::report_errors(); } - -#include - -/* -//Offset ptr benchmark -#include -#include -#include -#include -#include -#include -#include - -template inline - Ty accumulate2(InIt First, InIt Last, Ty Val) - { // return sum of Val and all in [First, Last) - for (; First != Last; ++First) //First = First + 1) - Val = Val + *First; - return (Val); - } - -template -void time_test(const Vector& vec, std::size_t iterations, const char* label) { - // assert(!vec.empty()) - boost::timer t; - typename Vector::const_iterator first = vec.begin(); - typename Vector::value_type result(0); - while (iterations != 0) { - result = accumulate2(first, first + vec.size(), result); - --iterations; - } - std::cout << label << t.elapsed() << " " << result << std::endl; -} - -int main() -{ - using namespace boost::interprocess; - typedef allocator alloc_t; - - std::size_t n = 0x1 << 26; - std::size_t file_size = n * sizeof(double) + 1000000; - - { - shared_memory_object::remove("MyMappedFile"); - managed_shared_memory segment(open_or_create, "MyMappedFile", file_size); - shared_memory_object::remove("MyMappedFile"); - alloc_t alloc_inst(segment.get_segment_manager()); - vector v0(n, double(42.42), alloc_inst); - time_test(v0, 10, "iterator shared: "); - } - { - std::vector v1(n, double(42.42)); - time_test(v1, 10, "iterator non-shared: "); - } - return 0; -} - -*/ diff --git a/test/private_adaptive_pool_test.cpp b/test/private_adaptive_pool_test.cpp index 55868a0..b946d70 100644 --- a/test/private_adaptive_pool_test.cpp +++ b/test/private_adaptive_pool_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -62,5 +61,3 @@ int main () return 1; return 0; } - -#include diff --git a/test/private_node_allocator_test.cpp b/test/private_node_allocator_test.cpp index 4690f83..5498394 100644 --- a/test/private_node_allocator_test.cpp +++ b/test/private_node_allocator_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -62,5 +61,3 @@ int main () return 1; return 0; } - -#include diff --git a/test/recursive_mutex_test.cpp b/test/recursive_mutex_test.cpp index 8bec034..0c10b21 100644 --- a/test/recursive_mutex_test.cpp +++ b/test/recursive_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #if defined(BOOST_INTERPROCESS_WINDOWS) #include @@ -38,5 +37,3 @@ int main () return 0; } - -#include diff --git a/test/robust_emulation_test.cpp b/test/robust_emulation_test.cpp index 98a64e0..7c47efd 100644 --- a/test/robust_emulation_test.cpp +++ b/test/robust_emulation_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include "robust_mutex_test.hpp" #include #include @@ -18,5 +17,3 @@ int main(int argc, char *argv[]) return test::robust_mutex_test < ipcdetail::robust_spin_mutex >(argc, argv); } - -#include diff --git a/test/robust_recursive_emulation_test.cpp b/test/robust_recursive_emulation_test.cpp index bc14076..ebdc238 100644 --- a/test/robust_recursive_emulation_test.cpp +++ b/test/robust_recursive_emulation_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include "robust_mutex_test.hpp" #include #include @@ -19,5 +18,3 @@ int main(int argc, char *argv[]) return test::robust_mutex_test < ipcdetail::robust_spin_mutex >(argc, argv); } - -#include diff --git a/test/segment_manager_test.cpp b/test/segment_manager_test.cpp index 1b42c8c..a440def 100644 --- a/test/segment_manager_test.cpp +++ b/test/segment_manager_test.cpp @@ -1,3 +1,13 @@ +////////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2004-2019. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/interprocess for documentation. +// +////////////////////////////////////////////////////////////////////////////// + #include #include #include diff --git a/test/semaphore_test.cpp b/test/semaphore_test.cpp index 54913ce..b236f1f 100644 --- a/test/semaphore_test.cpp +++ b/test/semaphore_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -66,5 +65,3 @@ int main () test::test_all_mutex(); return 0; } - -#include diff --git a/test/sharable_mutex_test.cpp b/test/sharable_mutex_test.cpp index b273154..06da689 100644 --- a/test/sharable_mutex_test.cpp +++ b/test/sharable_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include "mutex_test_template.hpp" #include "sharable_mutex_test_template.hpp" #include @@ -27,5 +26,3 @@ int main () return 0; } - -#include diff --git a/test/shared_memory_mapping_test.cpp b/test/shared_memory_mapping_test.cpp index a3b0f10..dcf7922 100644 --- a/test/shared_memory_mapping_test.cpp +++ b/test/shared_memory_mapping_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include diff --git a/test/shared_memory_test.cpp b/test/shared_memory_test.cpp index 0723e38..f01cfd1 100644 --- a/test/shared_memory_test.cpp +++ b/test/shared_memory_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -83,5 +82,3 @@ int main () shared_memory_object::remove(ShmName); return 0; } - -#include diff --git a/test/shared_ptr_test.cpp b/test/shared_ptr_test.cpp index 1785845..cef0e96 100644 --- a/test/shared_ptr_test.cpp +++ b/test/shared_ptr_test.cpp @@ -10,7 +10,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -611,5 +610,3 @@ int main() test_alias(); } -#include - diff --git a/test/slist_test.cpp b/test/slist_test.cpp index 2f20748..b0a3132 100644 --- a/test/slist_test.cpp +++ b/test/slist_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -59,5 +58,3 @@ int main () return 1; } -#include - diff --git a/test/stable_vector_test.cpp b/test/stable_vector_test.cpp index b341bc0..56040c8 100644 --- a/test/stable_vector_test.cpp +++ b/test/stable_vector_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -68,5 +67,3 @@ int main() return 0; } - -#include diff --git a/test/string_test.cpp b/test/string_test.cpp index 15399be..2abed75 100644 --- a/test/string_test.cpp +++ b/test/string_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -286,4 +285,3 @@ int main() return 0; } -#include diff --git a/test/tree_test.cpp b/test/tree_test.cpp index 4619052..53bc654 100644 --- a/test/tree_test.cpp +++ b/test/tree_test.cpp @@ -7,7 +7,6 @@ // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -195,5 +194,3 @@ int main () return 0; } - -#include diff --git a/test/unique_ptr_test.cpp b/test/unique_ptr_test.cpp index b9e24dd..f0aa483 100644 --- a/test/unique_ptr_test.cpp +++ b/test/unique_ptr_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -138,5 +137,3 @@ int main() shared_memory_object::remove(process_name.c_str()); return 0; } - -#include diff --git a/test/unordered_test.cpp b/test/unordered_test.cpp index e8995e0..d65a6fc 100644 --- a/test/unordered_test.cpp +++ b/test/unordered_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include "get_process_id_name.hpp" @@ -96,5 +95,3 @@ int main() bip::shared_memory_object::remove(bip::test::get_process_id_name()); return 0; } - -#include diff --git a/test/upgradable_mutex_test.cpp b/test/upgradable_mutex_test.cpp index 94bc315..e43deef 100644 --- a/test/upgradable_mutex_test.cpp +++ b/test/upgradable_mutex_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include "mutex_test_template.hpp" #include "sharable_mutex_test_template.hpp" #include @@ -169,5 +168,3 @@ int main () return 0; } - -#include diff --git a/test/user_buffer_test.cpp b/test/user_buffer_test.cpp index 32670af..7f06e7f 100644 --- a/test/user_buffer_test.cpp +++ b/test/user_buffer_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -255,5 +254,3 @@ int main () return 0; } - -#include diff --git a/test/vector_test.cpp b/test/vector_test.cpp index 6a3931c..87c976f 100644 --- a/test/vector_test.cpp +++ b/test/vector_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -99,5 +98,3 @@ int main() return 0; } - -#include diff --git a/test/vectorstream_test.cpp b/test/vectorstream_test.cpp index d20b82a..a028b69 100644 --- a/test/vectorstream_test.cpp +++ b/test/vectorstream_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #include #include @@ -181,5 +180,3 @@ int main () } return 0; } - -#include diff --git a/test/windows_shared_dir_func.cpp b/test/windows_shared_dir_func.cpp index 135f246..081d558 100644 --- a/test/windows_shared_dir_func.cpp +++ b/test/windows_shared_dir_func.cpp @@ -8,12 +8,9 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include -#ifdef BOOST_INTERPROCESS_WINDOWS - -#define BOOST_INTERPROCESS_WINDOWS +#ifdef BOOST_WINDOWS //Force user-defined get_shared_dir #define BOOST_INTERPROCESS_SHARED_DIR_FUNC @@ -51,15 +48,17 @@ int main () ipcdetail::get_shared_dir(shared_dir); std::string shm_path(shared_dir); + shm_path += "/"; shm_path += shm_name; int ret = 0; shared_memory_object::remove(shm_name); { - shared_memory_object shm(create_only, shm_name, read_write); + { + shared_memory_object shm(create_only, shm_name, read_write); + } - shm_path += shm_name; - int ret = ipcdetail::invalid_file() == ipcdetail::open_existing_file(shm_path.c_str(), read_only) ? + ret = ipcdetail::invalid_file() == ipcdetail::open_existing_file(shm_path.c_str(), read_only) ? 1 : 0; if(ret) { @@ -79,6 +78,4 @@ int main() return 0; } -#endif //#ifdef BOOST_INTERPROCESS_WINDOWS - -#include +#endif //#ifdef BOOST_WINDOWS diff --git a/test/windows_shared_memory_mapping_test.cpp b/test/windows_shared_memory_mapping_test.cpp index 582b2ba..4ae8ee7 100644 --- a/test/windows_shared_memory_mapping_test.cpp +++ b/test/windows_shared_memory_mapping_test.cpp @@ -8,10 +8,9 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include -#ifdef BOOST_INTERPROCESS_WINDOWS +#ifdef BOOST_WINDOWS #include #include @@ -135,4 +134,3 @@ int main() #endif -#include diff --git a/test/windows_shared_memory_test.cpp b/test/windows_shared_memory_test.cpp index 6a235bb..172f2d3 100644 --- a/test/windows_shared_memory_test.cpp +++ b/test/windows_shared_memory_test.cpp @@ -8,10 +8,9 @@ // ////////////////////////////////////////////////////////////////////////////// -#include -#include +#include -#ifdef BOOST_INTERPROCESS_WINDOWS +#ifdef BOOST_WINDOWS #include #include @@ -75,6 +74,4 @@ int main() return 0; } -#endif //#ifdef BOOST_INTERPROCESS_WINDOWS - -#include +#endif //#ifdef BOOST_WINDOWS diff --git a/test/xsi_shared_memory_mapping_test.cpp b/test/xsi_shared_memory_mapping_test.cpp index 24d0df0..8ae1623 100644 --- a/test/xsi_shared_memory_mapping_test.cpp +++ b/test/xsi_shared_memory_mapping_test.cpp @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////////////////////// -#include #include #if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) @@ -135,5 +134,3 @@ int main() } #endif //BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS - -#include