summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-04-30 10:40:19 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2021-04-30 10:40:19 +0200
commitf250f6afd0be9024db716148084569b6fd6201df (patch)
treee9188eaf128f12a79479d1a7a4a2b336fa52740d /TAO/tao
parentff216a0df9679117e068903a337dc10c98ab78c5 (diff)
downloadATCD-f250f6afd0be9024db716148084569b6fd6201df.tar.gz
Removed support for ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES, only set by the config file for LynxOS178 for gcc2.96 which is ancient
* ACE/ace/README: * ACE/ace/Singleton.cpp: * ACE/ace/Singleton.h: * ACE/ace/config-lynxos-178.h: * ACE/netsvcs/lib/Log_Message_Receiver.cpp: * ACE/netsvcs/lib/Log_Message_Receiver.h: * ACE/netsvcs/lib/Server_Logging_Handler_T.cpp: * ACE/netsvcs/lib/Server_Logging_Handler_T.h: * TAO/tao/TAO_Singleton.cpp: * TAO/tao/TAO_Singleton.h:
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/TAO_Singleton.cpp23
-rw-r--r--TAO/tao/TAO_Singleton.h21
2 files changed, 8 insertions, 36 deletions
diff --git a/TAO/tao/TAO_Singleton.cpp b/TAO/tao/TAO_Singleton.cpp
index 3ca35d08ca4..58d96602e2e 100644
--- a/TAO/tao/TAO_Singleton.cpp
+++ b/TAO/tao/TAO_Singleton.cpp
@@ -27,26 +27,16 @@ TAO_Singleton<TYPE, ACE_LOCK>::dump (void)
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("TAO_Singleton<TYPE, ACE_LOCK>::dump");
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
TAOLIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %@"),
TAO_Singleton<TYPE, ACE_LOCK>::instance_i ()));
TAOLIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
#endif /* ACE_HAS_DUMP */
}
template <class TYPE, class ACE_LOCK> TAO_Singleton<TYPE, ACE_LOCK> *&
TAO_Singleton<TYPE, ACE_LOCK>::instance_i (void)
{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static TAO_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
return TAO_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
template <class TYPE, class ACE_LOCK> TYPE *
@@ -120,15 +110,12 @@ TAO_Singleton<TYPE, ACE_LOCK>::cleanup (void *param)
#endif
}
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
// Pointer to the Singleton instance.
template <class TYPE, class ACE_LOCK> TAO_Singleton<TYPE, ACE_LOCK> *
TAO_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
template <class TYPE, class ACE_LOCK> TAO_TSS_Singleton<TYPE, ACE_LOCK> *
TAO_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0;
-#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */
-
template <class TYPE, class ACE_LOCK> void
TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
@@ -136,26 +123,16 @@ TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump (void)
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("TAO_TSS_Singleton<TYPE, ACE_LOCK>::dump");
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
TAOLIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %@"),
TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ()));
TAOLIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
#endif /* ACE_HAS_DUMP */
}
template <class TYPE, class ACE_LOCK> TAO_TSS_Singleton<TYPE, ACE_LOCK> *&
TAO_TSS_Singleton<TYPE, ACE_LOCK>::instance_i (void)
{
-#if defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
- // Pointer to the Singleton instance. This works around a bug with
- // G++ and it's (mis-)handling of templates and statics...
- static TAO_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0;
-
- return singleton_;
-#else
return TAO_TSS_Singleton<TYPE, ACE_LOCK>::singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
}
template <class TYPE, class ACE_LOCK> TYPE *
diff --git a/TAO/tao/TAO_Singleton.h b/TAO/tao/TAO_Singleton.h
index 1da38566c7e..a4563cb3c81 100644
--- a/TAO/tao/TAO_Singleton.h
+++ b/TAO/tao/TAO_Singleton.h
@@ -47,29 +47,27 @@ class TAO_Singleton : public ACE_Cleanup
public:
/// Global access point to the Singleton.
- static TYPE *instance (void);
+ static TYPE *instance ();
/// Cleanup method, used by @c ace_cleanup_destroyer to destroy the
/// singleton.
virtual void cleanup (void *param = 0);
/// Dump the state of the object.
- static void dump (void);
+ static void dump ();
protected:
/// Default constructor.
- TAO_Singleton (void);
+ TAO_Singleton ();
/// Contained instance.
TYPE instance_;
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
/// Pointer to the Singleton (ACE_Cleanup) instance.
static TAO_Singleton<TYPE, ACE_LOCK> *singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
/// Get pointer to the TAO Singleton instance.
- static TAO_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
+ static TAO_Singleton<TYPE, ACE_LOCK> *&instance_i ();
};
/**
@@ -87,32 +85,29 @@ template <class TYPE, class ACE_LOCK>
class TAO_TSS_Singleton : public ACE_Cleanup,
private ACE_Copy_Disabled
{
-
public:
/// Global access point to the Singleton.
- static TYPE *instance (void);
+ static TYPE *instance ();
/// Cleanup method, used by @c ace_cleanup_destroyer to destroy the
/// singleton.
virtual void cleanup (void *param = 0);
/// Dump the state of the object.
- static void dump (void);
+ static void dump ();
protected:
/// Default constructor.
- TAO_TSS_Singleton (void);
+ TAO_TSS_Singleton ();
/// Contained instance.
ACE_TSS_TYPE (TYPE) instance_;
-#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES)
/// Pointer to the Singleton (ACE_Cleanup) instance.
static TAO_TSS_Singleton<TYPE, ACE_LOCK> *singleton_;
-#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */
/// Get pointer to the TAO TSS Singleton instance.
- static TAO_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (void);
+ static TAO_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i ();
};
TAO_END_VERSIONED_NAMESPACE_DECL