[6916] Fixed typos in spell checking code.
[getmangos.git] / dep / ACE_wrappers / ace / config-g++-common.h
blob8ac8eb9748f455e0f89acd18ec3cd2bb1096f8e4
1 // -*- C++ -*-
2 //
3 // $Id: config-g++-common.h 82495 2008-08-04 07:23:01Z johnnyw $
5 // This configuration file is designed to be included by another,
6 // specific configuration file. It provides config information common
7 // to all g++ platforms, including egcs.
9 #ifndef ACE_GNUG_COMMON_H
10 #define ACE_GNUG_COMMON_H
11 #include /**/ "ace/pre.h"
13 #define ACE_HAS_CPLUSPLUS_HEADERS
14 #define ACE_HAS_STDCPP_STL_INCLUDES
15 #define ACE_HAS_TEMPLATE_TYPEDEFS
16 #define ACE_HAS_STANDARD_CPP_LIBRARY 1
17 #define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR
18 #define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
19 #define ACE_TEMPLATES_REQUIRE_SOURCE
21 #if ( __GNUC__ == 2 && __GNUC_MINOR__ < 97 )
22 // gcc 2.97 and lower use old iostreams
23 # define ACE_USES_OLD_IOSTREAMS
24 #endif /* __GNUC__ >= 2.97 */
26 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
27 # define ACE_EXPLICIT_TEMPLATE_DESTRUCTOR_TAKES_ARGS
28 #endif /* __GNUC__ >= 3.4 */
30 #if (__GNUC__ < 3)
31 # define ACE_LACKS_MEMBER_TEMPLATES
32 #endif /* __GNUC__ < 3 */
34 // __EXCEPTIONS is defined with -fexceptions, the egcs default. It
35 // is not defined with -fno-exceptions, the ACE default for g++.
36 // ACE_HAS_EXCEPTIONS is defined in
37 // include/makeinclude/wrapper_macros.GNU, so this really isn't
38 // necessary. Just in case . . .
39 #if defined (__EXCEPTIONS) && !defined (ACE_HAS_EXCEPTIONS)
40 # define ACE_HAS_EXCEPTIONS
41 #endif /* __EXCEPTIONS && ! ACE_HAS_EXCEPTIONS */
43 #if defined (ACE_HAS_EXCEPTIONS)
44 # define ACE_NEW_THROWS_EXCEPTIONS
45 # if (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
46 // Versions of g++ prior to 3.3 had a buggy operator // new(nothrow)[]().
47 # define ACE_HAS_NEW_NOTHROW
48 # endif /* __GNUC__ >= 3.3 */
49 #endif /* ACE_HAS_EXCEPTIONS */
51 #if (defined (i386) || defined (__i386__)) && !defined (ACE_SIZEOF_LONG_DOUBLE)
52 # define ACE_SIZEOF_LONG_DOUBLE 12
53 #endif /* i386 */
55 #if !defined (__MINGW32__) && (defined (i386) || defined (__i386__))
56 // If running an Intel, assume that it's a Pentium so that
57 // ACE_OS::gethrtime () can use the RDTSC instruction. If running a
58 // 486 or lower, be sure to comment this out. (If not running an
59 // Intel CPU, this #define will not be seen because of the i386
60 // protection, so it can be ignored.)
61 # define ACE_HAS_PENTIUM
62 #endif /* i386 */
64 #if (defined (ACE_HAS_PENTIUM) || defined (__amd64__) || defined (__x86_64__))
65 # define ACE_HAS_INTEL_ASSEMBLY
66 #endif
68 // GNU g++ >= 4.x implements "#pragma once".
69 #if (__GNUC__ < 4) && !defined (ACE_LACKS_PRAGMA_ONCE)
70 // We define it with a -D with make depend.
71 # define ACE_LACKS_PRAGMA_ONCE
72 #endif /* ! ACE_LACKS_PRAGMA_ONCE */
74 // Take advantage of G++ (>= 4.x) visibility attributes to generate
75 // improved shared library binaries.
76 #if (__GNUC__ >= 4) && !defined (__MINGW32__)
78 # if defined (ACE_HAS_CUSTOM_EXPORT_MACROS) && ACE_HAS_CUSTOM_EXPORT_MACROS == 0
79 # undef ACE_HAS_CUSTOM_EXPORT_MACROS
80 # if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS)
81 # undef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS
82 # endif /* ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
83 # define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 0
84 # else
85 # ifndef ACE_HAS_CUSTOM_EXPORT_MACROS
86 # define ACE_HAS_CUSTOM_EXPORT_MACROS
87 # endif /* !ACE_HAS_CUSTOM_EXPORT_MACROS */
88 # define ACE_Proper_Export_Flag __attribute__ ((visibility("default")))
89 # define ACE_Proper_Import_Flag __attribute__ ((visibility("default")))
91 # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
92 // Sadly, G++ 4.x silently ignores visibility attributes on
93 // template instantiations, which breaks singletons.
94 // As a workaround, we use the GCC visibility pragmas.
95 // And to make them fit in a macro, we use C99's _Pragma()
96 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17470
97 // This has been fixed in GCC 4.1.1 with FC6 but not with SuSE 10.2
98 // that gets shipped with GCC 4.1.2 so we assume that with GCC 4.2
99 // this will be fixed on the head. With FC6 just set this define yourself
100 # ifndef ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS
101 # define ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1
102 # endif
103 # endif
105 # if defined (ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS) && ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS == 1
106 # define ACE_EXPORT_SINGLETON_DECLARATION(T) template class ACE_Proper_Export_Flag T
107 # define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) template class ACE_Proper_Export_Flag SINGLETON_TYPE <CLASS, LOCK>;
108 # else /* ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
109 # define ACE_EXPORT_SINGLETON_DECLARATION(T) \
110 _Pragma ("GCC visibility push(default)") \
111 template class T \
112 _Pragma ("GCC visibility pop")
113 # define ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) \
114 _Pragma ("GCC visibility push(default)") \
115 template class SINGLETON_TYPE<CLASS, LOCK>; \
116 _Pragma ("GCC visibility pop")
117 # endif /* ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS */
119 // Note that the "__extension__" is needed to prevent g++ from issuing
120 // an error when using its "-pedantic" command line flag.
121 # define ACE_IMPORT_SINGLETON_DECLARATION(T) __extension__ extern template class T
122 # define ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) __extension__ extern template class SINGLETON_TYPE<CLASS, LOCK>;
124 # endif /* ACE_HAS_CUSTOM_EXPORT_MACROS == 0 */
125 #endif /* __GNU__ >= 4 */
127 #if defined (ACE_HAS_GNU_REPO)
128 // -frepo causes unresolved symbols of basic_string left- and
129 // right-shift operators with ACE_HAS_STRING_CLASS.
130 # if defined (ACE_HAS_STRING_CLASS)
131 # undef ACE_HAS_STRING_CLASS
132 # endif /* ACE_HAS_STRING_CLASS */
133 #endif /* ! ACE_HAS_GNU_REPO */
135 #include /**/ "ace/post.h"
136 #endif /* ACE_GNUG_COMMON_H */