/home/ntakagi/work/STLport-5.1.5/stlport/stl/config/_msvc.h

Go to the documentation of this file.
00001 /* STLport configuration file
00002  * It is internal STLport header - DO NOT include it directly
00003  * Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0, ICL
00004  */
00005 
00006 #if !defined (_STLP_COMPILER)
00007 #  define _STLP_COMPILER "Microsoft Visual Studio C++"
00008 #endif
00009 
00010 #if !defined (__ICL) && !defined (_STLP_MSVC)
00011 #  define _STLP_MSVC _MSC_VER
00012 #endif
00013 
00014 #if !defined (_STLP_MSVC_LIB)
00015 #  define _STLP_MSVC_LIB _MSC_VER
00016 #endif
00017 
00018 #if defined (__BUILDING_STLPORT) && defined (_MANAGED)
00019 /* Building a managed version of STLport is not supported because we haven't
00020  * found a good reason to support it. However, building a managed translation
00021  * unit using STLport _is_ supported.
00022  */
00023 #  error Sorry but building a managed version of STLport is not supported.
00024 #endif
00025 
00026 #if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
00027 /* This is a specific section for compilers coming with platform SDKs. Native
00028  * library coming with it is different from the one coming with commercial
00029  * MSVC compilers so there is some specific settings.
00030  */
00031 #  define _STLP_NATIVE_INCLUDE_PATH ../crt
00032 #  define _STLP_VENDOR_GLOBAL_CSTD
00033 #  define _STLP_VENDOR_TERMINATE_STD
00034 #  define _STLP_GLOBAL_NEW_HANDLER
00035 #  if (_STLP_MSVC_LIB <= 1400)
00036 /* We hope this bug will be fixed in future versions. */
00037 #    define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
00038 #  endif
00039 #endif
00040 
00041 #define _STLP_CALL __cdecl
00042 
00043 #ifndef _STLP_LONG_LONG
00044 #  define _STLP_LONG_LONG __int64
00045 #endif
00046 
00047 #define _STLP_PRAGMA_ONCE
00048 
00049 /* These switches depend on compiler flags. We are hoping here that compilers
00050  * simulating MSVC behavior use identical macros to report compilation context.
00051  * Otherwise those macros will have to be undef in specific compiler configuration
00052  * files.
00053  */
00054 #ifndef _CPPUNWIND
00055 #  define _STLP_DONT_USE_EXCEPTIONS 1
00056 #endif
00057 
00058 #ifndef _CPPRTTI
00059 #  define _STLP_NO_RTTI 1
00060 #endif
00061 
00062 #if defined (_MT) && !defined (_STLP_NO_THREADS) && !defined (_REENTRANT)
00063 #  define _REENTRANT 1
00064 #endif
00065 
00066 #if !defined (_NATIVE_WCHAR_T_DEFINED)
00067 #  define _STLP_WCHAR_T_IS_USHORT 1
00068 #endif
00069 
00070 #define _STLP_MINIMUM_IMPORT_STD
00071 #define _STLP_NO_VENDOR_STDLIB_L 1
00072 
00073 #if defined (_STLP_MSVC)
00074 
00075 #define _STLP_NORETURN_FUNCTION __declspec(noreturn)
00076 
00077 /* Full compiler version comes from boost library intrinsics.hpp header. */
00078 #  if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215)
00079 #    define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
00080 #    define _STLP_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
00081 #    define _STLP_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T)
00082 #    define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
00083 #    define _STLP_IS_POD(T) __is_pod(T)
00084 #    define _STLP_HAS_TYPE_TRAITS_INTRINSICS
00085 #  endif
00086 
00087 #  ifndef _STLP_MSVC50_COMPATIBILITY
00088 #    define _STLP_MSVC50_COMPATIBILITY   1
00089 #  endif
00090 
00091 #  define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
00092 #  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1
00093 
00094 /* # ifndef __BUILDING_STLPORT
00095  * #  define _STLP_USE_TEMPLATE_EXPORT 1
00096  * # endif
00097  */
00098 #  if (_STLP_MSVC <= 1401)
00099 #    define _STLP_STATIC_CONST_INIT_BUG   1
00100 #  endif
00101 
00104 #  if defined(UNDER_CE)
00105 /* eVCx:
00106 uncaught_exception is declared in the SDKs delivered with eVC4 (eVC3 is
00107 unknown) and they all reside in namespace 'std' there. However, they are not
00108 part of any lib so linking fails. When using VC8 to crosscompile for CE 5 on
00109 an ARMV4I, the uncaught_exception test fails, the function returns the wrong
00110 value. */
00111 #  else
00112 /* VCx:
00113 These are present at least since VC6, but the uncaught_exception() of VC6 is
00114 broken, it returns the wrong value in the unittests. 7.1 and later seem to
00115 work, 7.0 is still unknown (we assume it works until negative report). */
00116 #    if (_STLP_MSVC >= 1300)// VC7 and later
00117 #      undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
00118 #      if !defined (_STLP_DONT_USE_EXCEPTIONS)
00119 #        define _STLP_NOTHROW throw()
00120 #      endif
00121 #    endif
00122 #  endif
00123 
00124 #  if (_STLP_MSVC <= 1300)
00125 #    define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
00126 #    define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
00127 /* There is no partial spec, and MSVC breaks on simulating it for iterator_traits queries */
00128 #    define _STLP_USE_OLD_HP_ITERATOR_QUERIES
00129 #    define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
00130 #    define _STLP_NO_METHOD_SPECIALIZATION 1
00131 #    define _STLP_DEF_CONST_PLCT_NEW_BUG 1
00132 #    define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
00133 /* VC++ cannot handle default allocator argument in template constructors */
00134 #    define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
00135 #    define _STLP_NO_QUALIFIED_FRIENDS    1
00136 #    define _STLP_NO_FRIEND_TEMPLATES
00137 /* Fails to properly resolve call to sin() from within sin() */
00138 #  endif
00139 
00140 #  if (_STLP_MSVC < 1300)
00141 #    define _STLP_NO_IEC559_SUPPORT 1
00142 #  endif
00143 
00144 #  if (_STLP_MSVC < 1300) /* including MSVC 6.0 */
00145 #    define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
00146 #    define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
00147 #  endif
00148 
00149 #  if (_STLP_MSVC >= 1200)
00150 #    define _STLP_HAS_NATIVE_FLOAT_ABS 1
00151 #  endif
00152 
00153 // TODO: some eVC4 compilers report _MSC_VER 1201 or 1202, which category do they belong to?
00154 #  if (_STLP_MSVC > 1200) && (_STLP_MSVC < 1310)
00155 #    define _STLP_NO_MOVE_SEMANTIC
00156 #  endif
00157 
00158 #  if (_STLP_MSVC < 1300)
00159 /* TODO: remove this if it is handled and documented elsewhere
00160  * dums: VC6 do not handle correctly member templates of class that are explicitely
00161  * instanciated to be exported. There is a workaround, seperate the non template methods
00162  * from the template ones within 2 different classes and only export the non template one.
00163  * It is implemented for basic_string and locale at the writing of this note.
00164  * However this problem hos not  been considered as important enough to remove template member
00165  * methods for other classes. Moreover Boost (www.boost.org) required it to be granted.
00166  * The workaround is activated thanks to the _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro defined
00167  * later in this config file.
00168  */
00169 /*
00170 #    if defined (_DLL)
00171 #      define _STLP_NO_MEMBER_TEMPLATES 1
00172 #    endif
00173 */
00174 
00175 /* Boris : not defining this macro for SP5 causes other problems */
00176 /*#    if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 ) */
00177 #    define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
00178 /*#    endif */
00179 #    define _STLP_DONT_USE_BOOL_TYPEDEF 1
00180 #    define _STLP_DONT_RETURN_VOID 1
00181 #  endif
00182 
00183 /*
00184  * MSVC6 is known to have many trouble with namespace management but
00185  * MSVC .Net 2003 and 2005 also have a bug difficult to reproduce without
00186  * STLport:
00187  * namespace stlp_std {
00188  *   typedef int foo_int;
00189  * }
00190  * #include <map>
00191  * const foo_int bar = 0;
00192  *
00193  * As you can see foo is available without namespace specification as if
00194  * a using namespace stlp_std has been performed. Defining _STLP_USING_NAMESPACE_BUG
00195  * restore the expected compilation error.
00196  */
00197 #  define _STLP_USING_NAMESPACE_BUG 1
00198 
00199 #  if (_STLP_MSVC < 1300) /* MSVC 6.0 and earlier */
00200 #    define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
00201 /* defined for DEBUG and NDEBUG too, to allow user mix own debug build with STLP release library */
00202 #    define _STLP_USE_ABBREVS
00203 #  endif
00204 
00205 // TODO: what is the earliest version for this? If it is 1200, use _STLP_MSVC>=1200.
00206 #  if (_STLP_MSVC > 1100) && (_STLP_MSVC < 1300)
00207 typedef char __stl_char;
00208 #    define _STLP_DEFAULTCHAR __stl_char
00209 #  endif
00210 
00211 #  if (_STLP_MSVC < 1200) /* before VC++ 6.0 */
00212 /* #  define _STLP_NO_MEMBER_TEMPLATES 1 */
00213 #    define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS 1
00214 #    define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1
00215 #    define _STLP_QUALIFIED_SPECIALIZATION_BUG 1
00216 #    define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
00217 #    define _STLP_THROW_RETURN_BUG 1
00218 #    define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
00219 #    define _STLP_DEF_CONST_DEF_PARAM_BUG 1
00220 #  endif
00221 
00222 #  if (_STLP_MSVC < 1100 )
00223 #    ifndef _STLP_USE_NO_IOSTREAMS
00224 #      define _STLP_USE_NO_IOSTREAMS
00225 #    endif
00226 /* #  define _STLP_NESTED_TYPE_PARAM_BUG 1 */
00227 /* Debug mode does not work for 4.2 */
00228 #    if defined (_STLP_DEBUG)
00229 #      pragma message ("STLport debug mode does not work for VC++ 4.2, turning _STLP_DEBUG off ...")
00230 #      undef _STLP_DEBUG
00231 #    endif
00232 #    define _STLP_NO_BOOL            1
00233 #    define _STLP_NEED_TYPENAME      1
00234 #    define _STLP_NEED_EXPLICIT      1
00235 #    define _STLP_NEED_MUTABLE       1
00236 #    define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
00237 #    define _STLP_LIMITED_DEFAULT_TEMPLATES 1
00238 #    define _STLP_NONTEMPL_BASE_MATCH_BUG 1
00239 #    define _STLP_BROKEN_USING_DIRECTIVE  1
00240 #    define _STLP_NO_ARROW_OPERATOR 1
00241 #    define _STLP_NO_SIGNED_BUILTINS 1
00242 #    define _STLP_NO_EXCEPTION_SPEC 1
00243 #    define _STLP_HAS_NO_NAMESPACES 1
00244 #    define _STLP_NO_AT_MEMBER_FUNCTION 1
00245 #    define _STLP_NO_MEMBER_TEMPLATES 1
00246 #  endif /* 1100 */
00247 
00248 #endif /* _STLP_MSVC */
00249 
00252 #if (_STLP_MSVC_LIB >= 1400) && !defined (_STLP_USING_PLATFORM_SDK_COMPILER) && !defined(UNDER_CE)
00253 #  define _STLP_USE_SAFE_STRING_FUNCTIONS 1
00254 #endif
00255 
00256 #if (_STLP_MSVC_LIB <= 1310)
00257 #  define _STLP_VENDOR_GLOBAL_CSTD
00258 #endif
00259 
00260 #if (_STLP_MSVC_LIB >= 1300) && !defined(UNDER_CE)
00261 /* Starting with MSVC 7.0 and compilers simulating it,
00262  * we assume that the new SDK is granted:
00263  */
00264 #  define _STLP_NEW_PLATFORM_SDK 1
00265 #endif
00266 
00267 #if (_STLP_MSVC_LIB < 1300) /* including MSVC 6.0 */
00268 #  define _STLP_GLOBAL_NEW_HANDLER 1
00269 #  define _STLP_VENDOR_UNEXPECTED_STD
00270 #  define _STLP_NEW_DONT_THROW_BAD_ALLOC 1
00271 #endif
00272 
00273 #if (_STLP_MSVC_LIB < 1100)
00274 /* up to 4.2, library is in global namespace */
00275 #  define _STLP_VENDOR_GLOBAL_STD
00276 #endif
00277 
00278 #if (_STLP_MSVC_LIB <= 1010)
00279 /* "bool" is reserved in MSVC 4.1 while <yvals.h> absent, so : */
00280 #  define _STLP_NO_BAD_ALLOC
00281 #  define _STLP_HAS_NO_NEW_C_HEADERS 1
00282 #  define _STLP_NO_NEW_NEW_HEADER 1
00283 #elif (_STLP_MSVC_LIB < 1100)
00284 /* VC++ 4.2 and higher */
00285 #  define _STLP_YVALS_H 1
00286 #  define _STLP_USE_NO_IOSTREAMS 1
00287 #endif
00288 
00289 #define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
00290 #define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
00291 
00292 #if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1100)
00293 #  define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
00294 #  define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
00295 #endif
00296 
00297 #if defined (__DLL) || defined (_DLL) || defined (_RTLDLL) || defined (_AFXDLL)
00298 #  define _STLP_RUNTIME_DLL
00299 #endif
00300 #if defined (__BUILDING_STLPORT) && \
00301    (defined (_STLP_USE_DYNAMIC_LIB) || \
00302     defined (_STLP_RUNTIME_DLL) && !defined (_STLP_USE_STATIC_LIB))
00303 #  define _STLP_DLL
00304 #endif
00305 #include <stl/config/_detect_dll_or_lib.h>
00306 #undef _STLP_RUNTIME_DLL
00307 #undef _STLP_DLL
00308 
00309 #if defined (_STLP_USE_DYNAMIC_LIB)
00310 #  undef  _STLP_USE_DECLSPEC
00311 #  define _STLP_USE_DECLSPEC 1
00312 #  if (_STLP_MSVC >= 1200) && (_STLP_MSVC < 1300)
00313 #    define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 1
00314 #  endif
00315 #endif
00316 
00317 #if !defined (_STLP_IMPORT_TEMPLATE_KEYWORD)
00318 #  if !defined (_MSC_EXTENSIONS) || defined(_STLP_MSVC) && _STLP_MSVC >= 1300
00319 #    define _STLP_IMPORT_TEMPLATE_KEYWORD
00320 #  else
00321 #    define _STLP_IMPORT_TEMPLATE_KEYWORD extern
00322 #  endif
00323 #endif
00324 #define _STLP_EXPORT_TEMPLATE_KEYWORD
00325 
00326 #if defined (_STLP_MSVC) && (_STLP_MSVC < 1200)
00327 /*    only static STLport lib now works for VC 5.0 */
00328 #  undef  _STLP_USE_STATIC_LIB
00329 #  undef  _STLP_USE_DYNAMIC_LIB
00330 #  define _STLP_USE_STATIC_LIB
00331 /*    disable hook which makes template symbols to be searched for in the library */
00332 #  undef _STLP_NO_CUSTOM_IO
00333 #endif
00334 
00335 #include <stl/config/_auto_link.h>
00336 
00337 #if defined (_STLP_USING_PLATFORM_SDK_COMPILER)
00338 /* The Windows 64 bits SDK required for the moment link to bufferoverflowU.lib for
00339  * additional buffer overrun checks. Rather than require the STLport build system and
00340  * users to explicitely link with it we use the MSVC auto link feature.
00341  */
00342 #  if !defined (_STLP_DONT_USE_AUTO_LINK) || defined (__BUILDING_STLPORT)
00343 #    pragma comment (lib, "bufferoverflowU.lib")
00344 #    if defined (_STLP_VERBOSE_AUTO_LINK)
00345 #      pragma message ("STLport: Auto linking to bufferoverflowU.lib")
00346 #    endif
00347 #  endif
00348 #endif
00349 
00350 /* Local Variables:
00351  * mode:C++
00352  * End:
00353  */



Generated on Mon Mar 10 15:32:46 2008 by  doxygen 1.5.1