diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-04-30 10:40:19 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-04-30 10:40:19 +0200 |
commit | f250f6afd0be9024db716148084569b6fd6201df (patch) | |
tree | e9188eaf128f12a79479d1a7a4a2b336fa52740d /ACE | |
parent | ff216a0df9679117e068903a337dc10c98ab78c5 (diff) | |
download | ATCD-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 'ACE')
-rw-r--r-- | ACE/ace/README | 2 | ||||
-rw-r--r-- | ACE/ace/Singleton.cpp | 56 | ||||
-rw-r--r-- | ACE/ace/Singleton.h | 10 | ||||
-rw-r--r-- | ACE/ace/config-lynxos-178.h | 1 | ||||
-rw-r--r-- | ACE/netsvcs/lib/Log_Message_Receiver.cpp | 14 | ||||
-rw-r--r-- | ACE/netsvcs/lib/Log_Message_Receiver.h | 3 | ||||
-rw-r--r-- | ACE/netsvcs/lib/Server_Logging_Handler_T.cpp | 5 | ||||
-rw-r--r-- | ACE/netsvcs/lib/Server_Logging_Handler_T.h | 2 |
8 files changed, 1 insertions, 92 deletions
diff --git a/ACE/ace/README b/ACE/ace/README index 71bee35fd9f..a810442d1f5 100644 --- a/ACE/ace/README +++ b/ACE/ace/README @@ -943,8 +943,6 @@ ACE_LACKS_SIGINFO_H Platform lacks the siginfo.h ACE_LACKS_SOCKETPAIR Platform lacks the socketpair() call (e.g., SCO UNIX) -ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES Compiler doesn't support - static data member templates ACE_LACKS_STRCASECMP Compiler/platform lacks strcasecmp() (e.g., DG/UX, UNIXWARE, VXWORKS) diff --git a/ACE/ace/Singleton.cpp b/ACE/ace/Singleton.cpp index 758c647d10b..69d8ec64136 100644 --- a/ACE/ace/Singleton.cpp +++ b/ACE/ace/Singleton.cpp @@ -32,26 +32,16 @@ ACE_Singleton<TYPE, ACE_LOCK>::dump () #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Singleton<TYPE, ACE_LOCK>::dump"); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), ACE_Singleton<TYPE, ACE_LOCK>::instance_i ())); ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_DUMP */ } template <class TYPE, class ACE_LOCK> ACE_Singleton<TYPE, ACE_LOCK> *& ACE_Singleton<TYPE, ACE_LOCK>::instance_i () { -#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 ACE_Singleton<TYPE, ACE_LOCK> *singleton_ = 0; - - return singleton_; -#else return ACE_Singleton<TYPE, ACE_LOCK>::singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ } template <class TYPE, class ACE_LOCK> TYPE * @@ -145,14 +135,12 @@ ACE_Singleton<TYPE, ACE_LOCK>::close () } } -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) // Pointer to the Singleton instance. template <class TYPE, class ACE_LOCK> ACE_Singleton<TYPE, ACE_LOCK> * ACE_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; template <class TYPE, class ACE_LOCK> ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> * ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; -#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */ template <class TYPE, class ACE_LOCK> void ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump () @@ -160,11 +148,9 @@ ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump () #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::dump"); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i ())); ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_DUMP */ } @@ -172,15 +158,7 @@ template <class TYPE, class ACE_LOCK> ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *& ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::instance_i () { -#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 ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *singleton_ = 0; - - return singleton_; -#else return ACE_Unmanaged_Singleton<TYPE, ACE_LOCK>::singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ } template <class TYPE, class ACE_LOCK> TYPE * @@ -255,26 +233,16 @@ ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump () #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_TSS_Singleton<TYPE, ACE_LOCK>::dump"); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ())); ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_DUMP */ } template <class TYPE, class ACE_LOCK> ACE_TSS_Singleton<TYPE, ACE_LOCK> *& ACE_TSS_Singleton<TYPE, ACE_LOCK>::instance_i () { -#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 ACE_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0; - - return singleton_; -#else return ACE_TSS_Singleton<TYPE, ACE_LOCK>::singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ } template <class TYPE, class ACE_LOCK> TYPE * @@ -348,11 +316,9 @@ ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::dump () #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::dump"); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i ())); ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_DUMP */ } @@ -360,15 +326,7 @@ template <class TYPE, class ACE_LOCK> ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *& ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::instance_i () { -#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 ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *singleton_ = 0; - - return singleton_; -#else return ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ } template <class TYPE, class ACE_LOCK> TYPE * @@ -435,7 +393,6 @@ ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::close () singleton->cleanup (); } -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) // Pointer to the Singleton instance. template <class TYPE, class ACE_LOCK> ACE_TSS_Singleton <TYPE, ACE_LOCK> * ACE_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; @@ -443,15 +400,12 @@ ACE_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; template <class TYPE, class ACE_LOCK> ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> * ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK>::singleton_ = 0; -#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */ /*************************************************************************/ -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) // Pointer to the Singleton instance. template <class TYPE, class ACE_LOCK> ACE_DLL_Singleton_T<TYPE, ACE_LOCK> * ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::singleton_ = 0; -#endif /* !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) */ template <class TYPE, class ACE_LOCK> void ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::dump () @@ -459,11 +413,9 @@ ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::dump () #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::dump"); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("instance_ = %x"), ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::instance_i ())); ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_DUMP */ } @@ -473,15 +425,7 @@ ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::instance_i () { ACE_TRACE ("ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::instance_i"); -#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 ACE_DLL_Singleton_T<TYPE, ACE_LOCK> *singleton_ = 0; - - return singleton_; -#else return ACE_DLL_Singleton_T<TYPE, ACE_LOCK>::singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ } template <class TYPE, class ACE_LOCK> TYPE * diff --git a/ACE/ace/Singleton.h b/ACE/ace/Singleton.h index 6fe66a19239..41a954dc22a 100644 --- a/ACE/ace/Singleton.h +++ b/ACE/ace/Singleton.h @@ -100,10 +100,8 @@ protected: /// Contained instance. TYPE instance_; -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) /// Pointer to the Singleton (ACE_Cleanup) instance. static ACE_Singleton<TYPE, ACE_LOCK> *singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ /// Get pointer to the Singleton instance. static ACE_Singleton<TYPE, ACE_LOCK> *&instance_i (); @@ -146,10 +144,8 @@ protected: /// Default constructor. ACE_Unmanaged_Singleton (); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) /// Pointer to the Singleton (ACE_Cleanup) instance. static ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ /// Get pointer to the Singleton instance. static ACE_Unmanaged_Singleton<TYPE, ACE_LOCK> *&instance_i (); @@ -200,10 +196,8 @@ protected: void operator= (const ACE_TSS_Singleton<TYPE,ACE_LOCK> &) = delete; ACE_TSS_Singleton (const ACE_TSS_Singleton<TYPE,ACE_LOCK> &) = delete; -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) /// Pointer to the Singleton (ACE_Cleanup) instance. static ACE_TSS_Singleton<TYPE, ACE_LOCK> *singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ /// Get pointer to the TSS Singleton instance. static ACE_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (); @@ -242,10 +236,8 @@ protected: /// Default constructor. ACE_Unmanaged_TSS_Singleton (); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) /// Pointer to the Singleton (ACE_Cleanup) instance. static ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ /// Get pointer to the Singleton instance. static ACE_Unmanaged_TSS_Singleton<TYPE, ACE_LOCK> *&instance_i (); @@ -309,10 +301,8 @@ protected: /// Contained instance. TYPE instance_; -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) /// Pointer to the Singleton instance. static ACE_DLL_Singleton_T<TYPE, ACE_LOCK> *singleton_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ /// Get pointer to the singleton instance. static ACE_DLL_Singleton_T<TYPE, ACE_LOCK> *&instance_i (); diff --git a/ACE/ace/config-lynxos-178.h b/ACE/ace/config-lynxos-178.h index 680aaa78297..623c968d5e1 100644 --- a/ACE/ace/config-lynxos-178.h +++ b/ACE/ace/config-lynxos-178.h @@ -44,7 +44,6 @@ #define ACE_LACKS_REGEX_H #define ACE_LACKS_RENAME #define ACE_LACKS_SNPRINTF -#define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES #define ACE_LACKS_STRTOK_R #define ACE_LACKS_SYS_SELECT_H #define ACE_LACKS_TEMPNAM diff --git a/ACE/netsvcs/lib/Log_Message_Receiver.cpp b/ACE/netsvcs/lib/Log_Message_Receiver.cpp index 2d77d86bf40..a5a611183cb 100644 --- a/ACE/netsvcs/lib/Log_Message_Receiver.cpp +++ b/ACE/netsvcs/lib/Log_Message_Receiver.cpp @@ -36,12 +36,8 @@ Static_Log_Message_Receiver<ACE_SYNCH_USE>::log_output (const ACE_TCHAR *hostnam } } -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) template<ACE_SYNCH_DECL> ACE_SYNCH_MUTEX_T Log_Message_Receiver_Impl<ACE_SYNCH_USE>::copy_lock_; -#else -static ACE_SYNCH_MUTEX global_copy_lock_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ template<ACE_SYNCH_DECL> Log_Message_Receiver_Impl<ACE_SYNCH_USE>::Log_Message_Receiver_Impl (void) @@ -63,12 +59,7 @@ Log_Message_Receiver_Impl<ACE_SYNCH_USE>::attach (Log_Message_Receiver_Impl<ACE_ ACE_ASSERT (body != 0); #if defined (ACE_HAS_THREADS) -# if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, guard, copy_lock_, 0); -# else - // Use the "body"s print lock as copy lock. - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, global_copy_lock_, 0); -# endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_THREADS */ ++body->count_; return body; @@ -80,12 +71,7 @@ Log_Message_Receiver_Impl<ACE_SYNCH_USE>::detach (Log_Message_Receiver_Impl<ACE_ ACE_ASSERT (body != 0); #if defined (ACE_HAS_THREADS) -# if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ACE_GUARD (ACE_SYNCH_MUTEX_T, guard, copy_lock_); -# else - // Use the "body"s print lock as copy lock. - ACE_GUARD (ACE_SYNCH_MUTEX, guard, global_copy_lock_); -# endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #endif /* ACE_HAS_THREADS */ if (body->count_-- == 0) delete body; diff --git a/ACE/netsvcs/lib/Log_Message_Receiver.h b/ACE/netsvcs/lib/Log_Message_Receiver.h index fe67a61a1d0..d9891a84e16 100644 --- a/ACE/netsvcs/lib/Log_Message_Receiver.h +++ b/ACE/netsvcs/lib/Log_Message_Receiver.h @@ -193,9 +193,8 @@ protected: ACE_SYNCH_MUTEX_T print_lock_; private: -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) static ACE_SYNCH_MUTEX_T copy_lock_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ + void operator= (const Log_Message_Receiver_Impl<ACE_SYNCH_USE> &) = delete; Log_Message_Receiver_Impl (const Log_Message_Receiver_Impl<ACE_SYNCH_USE> &) = delete; }; diff --git a/ACE/netsvcs/lib/Server_Logging_Handler_T.cpp b/ACE/netsvcs/lib/Server_Logging_Handler_T.cpp index ab985a40324..a76b7cba727 100644 --- a/ACE/netsvcs/lib/Server_Logging_Handler_T.cpp +++ b/ACE/netsvcs/lib/Server_Logging_Handler_T.cpp @@ -9,11 +9,9 @@ #include "Server_Logging_Handler_T.h" #include "ace/Signal.h" -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) // Track number of requests. template <ACE_PEER_STREAM_1, class COUNTER, ACE_SYNCH_DECL, class LMR> COUNTER ACE_Server_Logging_Handler_T<ACE_PEER_STREAM_2, COUNTER, ACE_SYNCH_USE, LMR>::request_count_ = (COUNTER) 0; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ template <ACE_PEER_STREAM_1, class COUNTER, ACE_SYNCH_DECL, class LMR> ACE_Server_Logging_Handler_T<ACE_PEER_STREAM_2, COUNTER, ACE_SYNCH_USE, LMR>::ACE_Server_Logging_Handler_T @@ -195,7 +193,6 @@ ACE_Server_Logging_Handler_T<ACE_PEER_STREAM_2, COUNTER, ACE_SYNCH_USE, LMR>::ha // Use ACE_NTOHL to get around bug in egcs 2.91.6x. length = ACE_NTOHL (length); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) ++this->request_count_; u_long count = this->request_count_; @@ -204,8 +201,6 @@ ACE_Server_Logging_Handler_T<ACE_PEER_STREAM_2, COUNTER, ACE_SYNCH_USE, LMR>::ha count, length)); -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ - // Perform the actual <recv> this time. ssize_t n = this->peer ().recv_n ((void *) &lp, length); diff --git a/ACE/netsvcs/lib/Server_Logging_Handler_T.h b/ACE/netsvcs/lib/Server_Logging_Handler_T.h index 8597b8f6981..ccc4bb2b685 100644 --- a/ACE/netsvcs/lib/Server_Logging_Handler_T.h +++ b/ACE/netsvcs/lib/Server_Logging_Handler_T.h @@ -61,10 +61,8 @@ protected: /// called from derived classes open method. int open_common (void); -#if !defined (ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES) /// Count the number of logging records that arrive. static COUNTER request_count_; -#endif /* ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES */ #if !defined (__GNUG__) /** |