diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-28 10:13:10 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-11-28 10:13:10 +0100 |
commit | a1fa973ae766fb43fd095577cee78e58669b61bf (patch) | |
tree | 7ab0d2fb9d7dd58cbd73a2bf68b0475d5488be40 | |
parent | 776c0f398c88ac855c7a3d32ccc0a48e6b802f46 (diff) | |
download | ATCD-a1fa973ae766fb43fd095577cee78e58669b61bf.tar.gz |
Cleanup for gcc <= 4.8 which don't support C++11
* ACE/ace/OS_NS_dlfcn.inl:
* ACE/ace/Stack_Trace.cpp:
* ACE/ace/Time_Value.inl:
* ACE/ace/config-aix-5.x.h:
* ACE/ace/config-g++-common.h:
* ACE/ace/config-icc-common.h:
* ACE/ace/config-macosx-leopard.h:
* ACE/ace/config-macosx-tiger.h:
* ACE/ace/config-macros.h:
* ACE/ace/config-sunos5.5.h:
* ACE/ace/os_include/os_dlfcn.h:
* TAO/orbsvcs/orbsvcs/Notify/MonitorControlExt/MC_Default_Factory.h:
* TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h:
* TAO/tao/SystemException.h:
-rw-r--r-- | ACE/ace/OS_NS_dlfcn.inl | 9 | ||||
-rw-r--r-- | ACE/ace/Stack_Trace.cpp | 2 | ||||
-rw-r--r-- | ACE/ace/Time_Value.inl | 2 | ||||
-rw-r--r-- | ACE/ace/config-aix-5.x.h | 5 | ||||
-rw-r--r-- | ACE/ace/config-g++-common.h | 40 | ||||
-rw-r--r-- | ACE/ace/config-icc-common.h | 24 | ||||
-rw-r--r-- | ACE/ace/config-macosx-leopard.h | 6 | ||||
-rw-r--r-- | ACE/ace/config-macosx-tiger.h | 6 | ||||
-rw-r--r-- | ACE/ace/config-macros.h | 8 | ||||
-rw-r--r-- | ACE/ace/config-sunos5.5.h | 4 | ||||
-rw-r--r-- | ACE/ace/os_include/os_dlfcn.h | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/MonitorControlExt/MC_Default_Factory.h | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h | 2 | ||||
-rw-r--r-- | TAO/tao/SystemException.h | 4 |
14 files changed, 15 insertions, 105 deletions
diff --git a/ACE/ace/OS_NS_dlfcn.inl b/ACE/ace/OS_NS_dlfcn.inl index db5e15f57ab..99b0109ffc0 100644 --- a/ACE/ace/OS_NS_dlfcn.inl +++ b/ACE/ace/OS_NS_dlfcn.inl @@ -55,11 +55,7 @@ ACE_OS::dlclose (ACE_SHLIB_HANDLE handle) return -1; if (desc.ref_count > 1) return 0; -# if defined(__GNUC__) || __cplusplus >= 199707L ACE_OSCALL_RETURN (::shl_unload (handle), int, -1); -# else - ACE_OSCALL_RETURN (::cxxshl_unload (handle), int, -1); -# endif /* aC++ vs. Hp C++ */ #else ACE_UNUSED_ARG (handle); ACE_NOTSUP_RETURN (-1); @@ -138,12 +134,7 @@ ACE_OS::dlopen (const ACE_TCHAR *fname, ACE_WIN32CALL_RETURN (ACE_TEXT_LoadLibrary (fname), ACE_SHLIB_HANDLE, 0); # elif defined (__hpux) - -# if defined(__GNUC__) || __cplusplus >= 199707L ACE_OSCALL_RETURN (::shl_load(fname, mode, 0L), ACE_SHLIB_HANDLE, 0); -# else - ACE_OSCALL_RETURN (::cxxshl_load(fname, mode, 0L), ACE_SHLIB_HANDLE, 0); -# endif /* aC++ vs. Hp C++ */ # elif defined (ACE_VXWORKS) && !defined (__RTP__) ACE_UNUSED_ARG (mode); MODULE* handle = 0; diff --git a/ACE/ace/Stack_Trace.cpp b/ACE/ace/Stack_Trace.cpp index d4be2196252..2aa29079757 100644 --- a/ACE/ace/Stack_Trace.cpp +++ b/ACE/ace/Stack_Trace.cpp @@ -66,7 +66,7 @@ ACE_Stack_Trace::generate_trace (ssize_t starting_frame_offset, size_t num_frame ACE_OS::strcpy (&this->buf_[0], UNABLE_TO_GET_TRACE); } -#elif (defined(__GLIBC__) || defined(ACE_HAS_EXECINFO_H)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) +#elif (defined(__GLIBC__) || defined(ACE_HAS_EXECINFO_H)) // This is the code for glibc # include <execinfo.h> diff --git a/ACE/ace/Time_Value.inl b/ACE/ace/Time_Value.inl index 1c7fc2c44b8..2471feda67f 100644 --- a/ACE/ace/Time_Value.inl +++ b/ACE/ace/Time_Value.inl @@ -57,7 +57,7 @@ ACE_Time_Value::set (time_t sec, suseconds_t usec) // ACE_OS_TRACE ("ACE_Time_Value::set"); this->tv_.tv_sec = sec; this->tv_.tv_usec = usec; -#if __GNUC__ && !(__GNUC__ == 3 && __GNUC_MINOR__ == 4) +#if __GNUC__ if ((__builtin_constant_p(sec) & __builtin_constant_p(usec)) && (sec >= 0 && usec >= 0 && usec < ACE_ONE_SECOND_IN_USECS)) diff --git a/ACE/ace/config-aix-5.x.h b/ACE/ace/config-aix-5.x.h index 5969745ee4f..6fbc666de25 100644 --- a/ACE/ace/config-aix-5.x.h +++ b/ACE/ace/config-aix-5.x.h @@ -94,11 +94,6 @@ # define ACE_HAS_SSIZE_T -# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 0)) -// We have to explicitly instantiate static template members prior to g++ 4.1 -# define ACE_HAS_EXPLICIT_STATIC_TEMPLATE_MEMBER_INSTANTIATION -#endif /* g++ prior to 4.1 */ - # if !defined (ACE_MT_SAFE) || ACE_MT_SAFE != 0 // ACE_MT_SAFE is #defined below, for all compilers. # if !defined (_REENTRANT) diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h index a4c945249e4..360074a6bde 100644 --- a/ACE/ace/config-g++-common.h +++ b/ACE/ace/config-g++-common.h @@ -21,15 +21,8 @@ #define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 #define ACE_TEMPLATES_REQUIRE_SOURCE -#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS -#endif /* __GNUC__ >= 3.4 */ - #define ACE_NEW_THROWS_EXCEPTIONS -#if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) -// Versions of g++ prior to 3.3 had a buggy operator // new(nothrow)[](). -# define ACE_HAS_NEW_NOTHROW -#endif /* __GNUC__ >= 3.3 */ +#define ACE_HAS_NEW_NOTHROW #if __cplusplus >= 201103L # define ACE_HAS_CPP11 @@ -100,9 +93,9 @@ # define ACE_LACKS_PRAGMA_ONCE #endif /* ! ACE_LACKS_PRAGMA_ONCE */ -// Take advantage of G++ (>= 4.x) visibility attributes to generate +// Take advantage of g++ visibility attributes to generate // improved shared library binaries. -#if (__GNUC__ >= 4) && !defined (__MINGW32__) && !defined (ACE_HAS_CEGCC) +#if !defined (__MINGW32__) && !defined (ACE_HAS_CEGCC) # if defined (ACE_HAS_CUSTOM_EXPORT_MACROS) && ACE_HAS_CUSTOM_EXPORT_MACROS == 0 # undef ACE_HAS_CUSTOM_EXPORT_MACROS @@ -121,18 +114,8 @@ # define ACE_Proper_Import_Flag __attribute__ ((visibility("default"))) # endif /* !ACE_Proper_Import_Flag */ -# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) -// Sadly, G++ 4.x silently ignores visibility attributes on -// template instantiations, which breaks singletons. -// As a workaround, we use the GCC visibility pragmas. -// And to make them fit in a macro, we use C99's _Pragma() -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470 -// This has been fixed in GCC 4.1.1 with FC6 but not with SuSE 10.2 -// that gets shipped with GCC 4.1.2 so we assume that with GCC 4.2 -// this will be fixed on the head. With FC6 just set this define yourself -# ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS -# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1 -# endif +# ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS +# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1 # endif # if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS) && ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS == 1 @@ -158,18 +141,10 @@ # endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */ #endif /* __GNU__ >= 4 */ -// GCC >= 4.1 provides __sync_XXXX builtins for use in atomic operations -// although the builtins are provided globally they are not supported on all platforms #if defined (ACE_HAS_THREADS) -#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) # if defined (__powerpc__) // The builtins seem to be provided for all powerpc platforms # define ACE_HAS_GCC_ATOMIC_BUILTINS 1 -# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 1) && (__GNUC_PATCHLEVEL__ == 1)) -// PPU GCC 4.1.1 doesn't have builtin atomic ops for size 1/2 -# define ACE_LACKS_GCC_ATOMIC_BUILTINS_2 -# define ACE_LACKS_GCC_ATOMIC_BUILTINS_1 -# endif # endif # if defined (__ia64) // The builtins seem to be provided for the IA64 platforms @@ -179,12 +154,9 @@ // The builtin's are provided also for 64bit linux # define ACE_HAS_GCC_ATOMIC_BUILTINS 1 # endif -#endif #endif /* ACE_HAS_THREADS */ -#if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)) -# define ACE_GCC_NO_RETURN __attribute__ ((__noreturn__)) -#endif +#define ACE_GCC_NO_RETURN __attribute__ ((__noreturn__)) #include /**/ "ace/post.h" #endif /* ACE_GNUG_COMMON_H */ diff --git a/ACE/ace/config-icc-common.h b/ACE/ace/config-icc-common.h index 4bf08172167..4fab19823d6 100644 --- a/ACE/ace/config-icc-common.h +++ b/ACE/ace/config-icc-common.h @@ -23,18 +23,8 @@ # define ACE_Proper_Export_Flag __attribute__ ((visibility("default"))) # define ACE_Proper_Import_Flag __attribute__ ((visibility("default"))) -# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) -// Sadly, G++ 4.x silently ignores visibility attributes on -// template instantiations, which breaks singletons. -// As a workaround, we use the GCC visibility pragmas. -// And to make them fit in a macro, we use C99's _Pragma() -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470 -// This has been fixed in GCC 4.1.1 with FC6 but not with SuSE 10.2 -// that gets shipped with GCC 4.1.2 so we assume that with GCC 4.2 -// this will be fixed on the head. With FC6 just set this define yourself -# ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS -# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1 -# endif +# ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS +# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1 # endif # if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS) && ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS == 1 @@ -92,17 +82,7 @@ // We assume that Intel C++ 15 and higher do have correct C++11 support when // it runs with GCC 4.7 or higher emulation mode #if (__INTEL_COMPILER > 1400) && defined (__INTEL_CXX11_MODE__) -# if (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) # define ACE_HAS_CPP11 -# endif -#endif - -// Intel C++ 14 Update 2 has correct C++11 support when it runs with GCC 4.7 -// or higher emulation mode -#if (__INTEL_COMPILER == 1400) && (__INTEL_COMPILER_UPDATE >= 2) && defined (__INTEL_CXX11_MODE__) -# if (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) -# define ACE_HAS_CPP11 -# endif #endif #include /**/ "ace/post.h" diff --git a/ACE/ace/config-macosx-leopard.h b/ACE/ace/config-macosx-leopard.h index 722a0f3280c..be7627c39a3 100644 --- a/ACE/ace/config-macosx-leopard.h +++ b/ACE/ace/config-macosx-leopard.h @@ -16,13 +16,7 @@ #endif /* ! __ACE_INLINE__ */ #if !defined (ACE_SIZEOF_LONG_DOUBLE) -# if (__GNUC__ == 3 && __GNUC_MINOR__ == 3) - // Size of long double in GCC 3.3 is 8. -# define ACE_SIZEOF_LONG_DOUBLE 8 -# else // Else, the compiler is GCC4 - // For GCC4, the size is 16. # define ACE_SIZEOF_LONG_DOUBLE 16 -# endif // GCC 3.3 #endif // ACE_SIZEOF_LONG_DOUBLE #if defined (__GNUG__) diff --git a/ACE/ace/config-macosx-tiger.h b/ACE/ace/config-macosx-tiger.h index 1e39c828392..24c6e2d3917 100644 --- a/ACE/ace/config-macosx-tiger.h +++ b/ACE/ace/config-macosx-tiger.h @@ -9,13 +9,7 @@ #endif /* ! __ACE_INLINE__ */ #if !defined (ACE_SIZEOF_LONG_DOUBLE) -# if (__GNUC__ == 3 && __GNUC_MINOR__ == 3) - // Size of long double in GCC 3.3 is 8. -# define ACE_SIZEOF_LONG_DOUBLE 8 -# else // Else, the compiler is GCC4 - // For GCC4, the size is 16. # define ACE_SIZEOF_LONG_DOUBLE 16 -# endif // GCC 3.3 #endif // ACE_SIZEOF_LONG_DOUBLE #if defined (__GNUG__) diff --git a/ACE/ace/config-macros.h b/ACE/ace/config-macros.h index 5989d2cc6d8..58038c36d65 100644 --- a/ACE/ace/config-macros.h +++ b/ACE/ace/config-macros.h @@ -254,9 +254,9 @@ // ============================================================================ #if !defined (ACE_UNUSED_ARG) -# if defined (__GNUC__) && ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))) || (defined (__BORLANDC__) && defined (__clang__)) +# if defined (__GNUC__) || (defined (__BORLANDC__) && defined (__clang__)) # define ACE_UNUSED_ARG(a) (void) (a) -# elif defined (__GNUC__) || defined (ghs) || defined (__hpux) || defined (__DECCXX) || defined (__rational__) || defined (__USLC__) || defined (ACE_RM544) || defined (__DCC__) || defined (__PGI) +# elif defined (ghs) || defined (__hpux) || defined (__DECCXX) || defined (__rational__) || defined (__USLC__) || defined (ACE_RM544) || defined (__DCC__) || defined (__PGI) // Some compilers complain about "statement with no effect" with (a). // This eliminates the warnings, and no code is generated for the null // conditional statement. @note that may only be true if -O is enabled, @@ -266,9 +266,9 @@ #define ACE_UNUSED_ID(identifier) template <class T> inline void ACE_UNUSED_ARG(const T& ACE_UNUSED_ID(t)) { } -# else /* ghs || __GNUC__ || ..... */ +# else /* ghs ..... */ # define ACE_UNUSED_ARG(a) (a) -# endif /* ghs || __GNUC__ || ..... */ +# endif /* ghs ..... */ #endif /* !ACE_UNUSED_ARG */ #if defined (_MSC_VER) || defined (ghs) || defined (__DECCXX) || defined(__BORLANDC__) || defined (ACE_RM544) || defined (__USLC__) || defined (__DCC__) || defined (__PGI) || (defined (__HP_aCC) && (__HP_aCC < 39000 || __HP_aCC >= 60500)) || defined (__IAR_SYSTEMS_ICC__) diff --git a/ACE/ace/config-sunos5.5.h b/ACE/ace/config-sunos5.5.h index d6313d754b6..9eb343cdef0 100644 --- a/ACE/ace/config-sunos5.5.h +++ b/ACE/ace/config-sunos5.5.h @@ -109,10 +109,6 @@ # endif /* _REENTRANT */ # endif /* !ACE_MT_SAFE */ -# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 3)) -# define ACE_LACKS_STD_WSTRING 1 -# endif - #else /* ! __SUNPRO_CC && ! __GNUG__ */ # ifdef __cplusplus /* Let it slide for C compilers. */ # error unsupported compiler in ace/config-sunos5.5.h diff --git a/ACE/ace/os_include/os_dlfcn.h b/ACE/ace/os_include/os_dlfcn.h index 5bba90e8200..d13d5ca5ce7 100644 --- a/ACE/ace/os_include/os_dlfcn.h +++ b/ACE/ace/os_include/os_dlfcn.h @@ -27,11 +27,7 @@ #endif /* !ACE_LACKS_DLFCN_H */ #if defined (__hpux) -# if defined(__GNUC__) || __cplusplus >= 199707L -# include /**/ <dl.h> -# else -# include /**/ <cxxdl.h> -# endif /* (g++ || HP aC++) vs. HP C++ */ +# include /**/ <dl.h> #endif /* __hpux */ #if defined (ACE_VXWORKS) && !defined (__RTP__) diff --git a/TAO/orbsvcs/orbsvcs/Notify/MonitorControlExt/MC_Default_Factory.h b/TAO/orbsvcs/orbsvcs/Notify/MonitorControlExt/MC_Default_Factory.h index 67021c98ab8..f27157372ac 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/MonitorControlExt/MC_Default_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Notify/MonitorControlExt/MC_Default_Factory.h @@ -36,11 +36,9 @@ class TAO_Notify_MC_Ext_Export TAO_MC_Default_Factory: public TAO_Notify_Default_Factory { public: -#if !defined (__GNUC__) || (__GNUC__ >= 3) /// Instruct the compiler that we want the create /// methods from the base class as well using TAO_Notify_Default_Factory::create; -#endif /* !__GNUC__ || __GNUC__ >= 3 */ /// Create the channel factory. virtual void create (TAO_Notify_EventChannelFactory*& factory, diff --git a/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h index d8e61bda16b..8e47d1fb080 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Notify/RT_Factory.h @@ -38,11 +38,9 @@ public: /// Destructor virtual ~TAO_Notify_RT_Factory (); -#if !defined (__GNUC__) || (__GNUC__ >= 3) /// Instruct the compiler that we want the create /// methods from the base class as well using TAO_Notify_Default_Factory::create; -#endif /* !__GNUC__ || __GNUC__ >= 3 */ /// Create StructuredProxyPushSupplier virtual void create (TAO_Notify_StructuredProxyPushSupplier*& proxy); diff --git a/TAO/tao/SystemException.h b/TAO/tao/SystemException.h index 9a1da6ec170..937c045e5ad 100644 --- a/TAO/tao/SystemException.h +++ b/TAO/tao/SystemException.h @@ -27,13 +27,9 @@ #include "tao/Exception.h" #ifndef TAO_Exception_Export -# if (__GNUC__ > 3) -// Exceptions found in DLL A but potentially thrown in DLL B must -// always be exported. # define TAO_Exception_Export ACE_Proper_Export_Flag # else # define TAO_Exception_Export TAO_Export -# endif /* __GNUC__ > 3*/ #endif /* !TAO_Exception_Export */ #ifdef THREAD_CANCELLED |