summaryrefslogtreecommitdiff
path: root/ACE/ace/config-g++-common.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-01-17 15:11:53 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-01-17 15:11:53 +0000
commitd98387765c24fbdee7d192d55b5cc0474cefa937 (patch)
tree7f33d67d0e2a8ca0f06e24d56cebe15cf61f26a3 /ACE/ace/config-g++-common.h
parent1414d93ac966117048240016cb6532ffc665f265 (diff)
downloadATCD-d98387765c24fbdee7d192d55b5cc0474cefa937.tar.gz
Wed Jan 17 15:10:12 UTC 2007 Johnny willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/config-g++-common.h')
-rw-r--r--ACE/ace/config-g++-common.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/ACE/ace/config-g++-common.h b/ACE/ace/config-g++-common.h
index 2fef303fa45..c975918cbb6 100644
--- a/ACE/ace/config-g++-common.h
+++ b/ACE/ace/config-g++-common.h
@@ -71,6 +71,10 @@
# if defined (ACE_HAS_CUSTOM_EXPORT_MACROS) && ACE_HAS_CUSTOM_EXPORT_MACROS == 0
# undef ACE_HAS_CUSTOM_EXPORT_MACROS
+# if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS)
+# undef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS
+# endif /* ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
+# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 0
# else
# ifndef ACE_HAS_CUSTOM_EXPORT_MACROS
# define ACE_HAS_CUSTOM_EXPORT_MACROS
@@ -78,7 +82,7 @@
# define ACE_Proper_Export_Flag __attribute__ ((visibility("default")))
# define ACE_Proper_Import_Flag
-# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
+# 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.
@@ -87,10 +91,10 @@
// 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
+# ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS
+# define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1
+# endif
# endif
-# endif
# if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS) && ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS == 1
# define ACE_EXPORT_SINGLETON_DECLARATION(T) template class ACE_Proper_Export_Flag T
@@ -108,8 +112,8 @@
// Note that the "__extension__" is needed to prevent g++ from issuing
// an error when using its "-pedantic" command line flag.
-# define ACE_IMPORT_SINGLETON_DECLARATION(T) __extension__ extern template class T
-# define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) __extension__ extern template class SINGLETON_TYPE<CLASS, LOCK>;
+# define ACE_IMPORT_SINGLETON_DECLARATION(T) __extension__ extern template class T
+# define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) __extension__ extern template class SINGLETON_TYPE<CLASS, LOCK>;
# endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */
#endif /* __GNU__ >= 4 */