diff options
author | Adam Mitz <mitza@ociweb.com> | 2016-08-24 15:40:44 -0500 |
---|---|---|
committer | Adam Mitz <mitza@ociweb.com> | 2016-08-24 15:40:44 -0500 |
commit | 411929ec7d2550f289eb1a2f045f2fc6651cb002 (patch) | |
tree | 29ce85fd3f080d75c3f1914a70d5f94148a63635 | |
parent | c6a04b11d5e960451861a5d51d469dc48376a05f (diff) | |
download | ATCD-411929ec7d2550f289eb1a2f045f2fc6651cb002.tar.gz |
*_SINGLETON_DECLARE needs to appear in .cpp files, not .h.
This prevents multiple definition of typeinfo symbols during linking,
only seen on arm-linux-gnueabihf-g++ but the code is invalid C++ on
all platforms.
-rw-r--r-- | ACE/ace/Based_Pointer_Repository.cpp | 3 | ||||
-rw-r--r-- | ACE/ace/Based_Pointer_Repository.h | 5 | ||||
-rw-r--r-- | ACE/ace/UUID.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/UUID.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/AV_Core.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/LookupManager.h | 2 |
8 files changed, 9 insertions, 11 deletions
diff --git a/ACE/ace/Based_Pointer_Repository.cpp b/ACE/ace/Based_Pointer_Repository.cpp index 6ec16f555ca..75727e234a8 100644 --- a/ACE/ace/Based_Pointer_Repository.cpp +++ b/ACE/ace/Based_Pointer_Repository.cpp @@ -119,5 +119,8 @@ ACE_Based_Pointer_Repository::unbind (void *addr) ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX); +ACE_SINGLETON_DECLARE (ACE_Singleton, + ACE_Based_Pointer_Repository, + ACE_SYNCH_RW_MUTEX) ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Based_Pointer_Repository.h b/ACE/ace/Based_Pointer_Repository.h index 00b6d2c4f6b..1dbb5a20ac1 100644 --- a/ACE/ace/Based_Pointer_Repository.h +++ b/ACE/ace/Based_Pointer_Repository.h @@ -76,11 +76,6 @@ private: // ---------------------------------- -/// Declare a process wide singleton -ACE_SINGLETON_DECLARE (ACE_Singleton, - ACE_Based_Pointer_Repository, - ACE_SYNCH_RW_MUTEX) - /// Provide a Singleton access point to the based pointer repository. typedef ACE_Singleton<ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX> ACE_BASED_POINTER_REPOSITORY; diff --git a/ACE/ace/UUID.cpp b/ACE/ace/UUID.cpp index dbac895fb8a..5a97c584b04 100644 --- a/ACE/ace/UUID.cpp +++ b/ACE/ace/UUID.cpp @@ -15,6 +15,8 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL +ACE_SINGLETON_DECLARE (ACE_Singleton, ACE_Utils::UUID_Generator, ACE_SYNCH_MUTEX) + namespace ACE_Utils { // NIL version of the UUID diff --git a/ACE/ace/UUID.h b/ACE/ace/UUID.h index 1e9671214d1..b2308aae9d7 100644 --- a/ACE/ace/UUID.h +++ b/ACE/ace/UUID.h @@ -275,8 +275,6 @@ namespace ACE_Utils UUID_GENERATOR; } -ACE_SINGLETON_DECLARE (ACE_Singleton, ACE_Utils::UUID_Generator, ACE_SYNCH_MUTEX) - ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) diff --git a/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp b/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp index 5c6b24a29bc..0501c79730a 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp +++ b/TAO/orbsvcs/orbsvcs/AV/AV_Core.cpp @@ -1150,4 +1150,6 @@ TAO_AV_Core::get_control_flowname(const char *flowname) template ACE_Singleton<TAO_AV_Core, ACE_Null_Mutex> *ACE_Singleton<TAO_AV_Core, ACE_Null_Mutex>::singleton_; #endif /* ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ +TAO_AV_SINGLETON_DECLARE (ACE_Singleton, TAO_AV_Core, ACE_Null_Mutex) + TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/AV/AV_Core.h b/TAO/orbsvcs/orbsvcs/AV/AV_Core.h index 4fea5b533cf..98a0ab923e7 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AV_Core.h +++ b/TAO/orbsvcs/orbsvcs/AV/AV_Core.h @@ -162,8 +162,6 @@ TAO_END_VERSIONED_NAMESPACE_DECL ACE_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_AV_SINGLETON_DECLARE (ACE_Singleton, TAO_AV_Core, ACE_Null_Mutex) - typedef ACE_Singleton<TAO_AV_Core, ACE_Null_Mutex> TAO_AV_CORE; ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp b/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp index f78102f88ef..0ab38637907 100644 --- a/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp +++ b/TAO/orbsvcs/tests/Notify/lib/LookupManager.cpp @@ -222,3 +222,5 @@ TAO_Notify_Tests_LookupManager::resolve (CosNotifyFilter::FilterAdmin_var& filte #if defined (ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION) template ACE_Singleton<TAO_Notify_Tests_LookupManager, TAO_SYNCH_MUTEX> *ACE_Singleton<TAO_Notify_Tests_LookupManager, TAO_SYNCH_MUTEX>::singleton_; #endif /*ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION */ + +TAO_NOTIFY_TEST_SINGLETON_DECLARE (ACE_Singleton, TAO_Notify_Tests_LookupManager, TAO_SYNCH_MUTEX) diff --git a/TAO/orbsvcs/tests/Notify/lib/LookupManager.h b/TAO/orbsvcs/tests/Notify/lib/LookupManager.h index 6b1db928a77..5d86943f979 100644 --- a/TAO/orbsvcs/tests/Notify/lib/LookupManager.h +++ b/TAO/orbsvcs/tests/Notify/lib/LookupManager.h @@ -105,8 +105,6 @@ protected: TAO_Notify_Tests_Priority_Mapping *priority_mapping_; }; -TAO_NOTIFY_TEST_SINGLETON_DECLARE (ACE_Singleton, TAO_Notify_Tests_LookupManager, TAO_SYNCH_MUTEX) - typedef ACE_Singleton<TAO_Notify_Tests_LookupManager, TAO_SYNCH_MUTEX> _TAO_Notify_Tests_LookupManager; #define LOOKUP_MANAGER _TAO_Notify_Tests_LookupManager::instance() |