diff options
Diffstat (limited to 'stlport/stlport/stl/config')
-rw-r--r-- | stlport/stlport/stl/config/_auto_link.h | 61 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_detect_dll_or_lib.h | 74 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_epilog.h | 29 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_feedback.h | 43 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_msvc.h | 265 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_native_headers.h | 50 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_prolog.h | 43 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_warnings_off.h | 51 | ||||
-rw-r--r-- | stlport/stlport/stl/config/_windows.h | 291 |
9 files changed, 907 insertions, 0 deletions
diff --git a/stlport/stlport/stl/config/_auto_link.h b/stlport/stlport/stl/config/_auto_link.h new file mode 100644 index 0000000..8898c55 --- /dev/null +++ b/stlport/stlport/stl/config/_auto_link.h @@ -0,0 +1,61 @@ +/* We do not use auto link feature when: + * - user asked not to use it (_STLP_DONT_USE_AUTO_LINK) + * - STLport is used only as a STL library (_STLP_NO_IOSTREAMS || _STLP_USE_NO_IOSTREAMS) + * - we are building a C translation unit, STLport is a C++ Standard library implementation + */ +#if !defined (__BUILDING_STLPORT) && !defined (_STLP_DONT_USE_AUTO_LINK) && \ + !defined (_STLP_NO_IOSTREAMS) && !defined (_STLP_USE_NO_IOSTREAMS) && \ + defined (__cplusplus) + +# define _STLP_STRINGIZE(X) _STLP_STRINGIZE_AUX(X) +# define _STLP_STRINGIZE_AUX(X) #X + +# if defined (_STLP_DEBUG) +# define _STLP_LIB_OPTIM_MODE "stld" +# elif defined (_DEBUG) +# define _STLP_LIB_OPTIM_MODE "d" +# else +# define _STLP_LIB_OPTIM_MODE "" +# endif + +# if defined (_STLP_LIB_NAME_MOTIF) +# define _STLP_LIB_MOTIF "_"_STLP_LIB_NAME_MOTIF +# else +# define _STLP_LIB_MOTIF "" +# endif + +# if defined (_STLP_USE_DYNAMIC_LIB) +# if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) +# define _STLP_LIB_TYPE "_x" +# else +# define _STLP_LIB_TYPE "" +# endif +# else +# if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) +# define _STLP_LIB_TYPE "_statix" +# else +# define _STLP_LIB_TYPE "_static" +# endif +# endif + +# if defined (_STLP_USE_DYNAMIC_LIB) +# define _STLP_VERSION_STR "."_STLP_STRINGIZE(_STLPORT_MAJOR)"."_STLP_STRINGIZE(_STLPORT_MINOR) +# else +# define _STLP_VERSION_STR "" +# endif + +# define _STLP_STLPORT_LIB "stlport"_STLP_LIB_OPTIM_MODE""_STLP_LIB_TYPE""_STLP_LIB_MOTIF""_STLP_VERSION_STR".lib" + +# if defined (_STLP_VERBOSE) +# pragma message ("STLport: Auto linking to "_STLP_STLPORT_LIB) +# endif +# pragma comment (lib, _STLP_STLPORT_LIB) + +# undef _STLP_STLPORT_LIB +# undef _STLP_LIB_OPTIM_MODE +# undef _STLP_LIB_TYPE +# undef _STLP_STRINGIZE_AUX +# undef _STLP_STRINGIZE + +#endif /* _STLP_DONT_USE_AUTO_LINK */ + diff --git a/stlport/stlport/stl/config/_detect_dll_or_lib.h b/stlport/stlport/stl/config/_detect_dll_or_lib.h new file mode 100644 index 0000000..a062e69 --- /dev/null +++ b/stlport/stlport/stl/config/_detect_dll_or_lib.h @@ -0,0 +1,74 @@ +/* File used to define macros: + * _STLP_USE_DYNAMIC_LIB: To signal use STLport as a dll or build of the + * STLport dlls. + * _STLP_USE_STATIC_LIB: To signal use of STLport as a static lib or build of + * the STLport static libs. + * _STLP_USING_CROSS_NATIVE_RUNTIME_LIB: Signal that we are using a native runtime + * in a version different from the STLport one. + * If _STLP_USE_DYNAMIC_LIB or _STLP_USE_STATIC_LIB is alreday defined it means that + * user forces use of a specific version. In this case _STLP_USING_CROSS_NATIVE_RUNTIME_LIB + * will surely be defined otherwise there is no need to force macro defines. + * + * Before including this file the compiler must define: + * _STLP_DLL: If we are building a dll + * _STLP_RUNTIME_DLL: If we are using native runtime as a dll + */ +#if defined (__BUILDING_STLPORT) +# undef _STLP_USE_DYNAMIC_LIB +# undef _STLP_USE_STATIC_LIB +# if defined (_STLP_DLL) +/* We are building the STLport dll */ +# define _STLP_USE_DYNAMIC_LIB +# if !defined (_STLP_RUNTIME_DLL) +# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB +# endif +# else +# define _STLP_USE_STATIC_LIB +# if defined (_STLP_RUNTIME_DLL) +# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB +# endif +# endif +#else +# if !defined (_STLP_NO_IOSTREAMS) +/* STLport use only depend on _STLP_RUNTIME_DLL as we are replacing + * the native runtime. + */ +# if defined (_STLP_RUNTIME_DLL) +# if !defined (_STLP_USE_STATIC_LIB) +# if !defined (_STLP_USE_DYNAMIC_LIB) +# define _STLP_USE_DYNAMIC_LIB +# endif +# else +/* The user is forcing use of STLport as a dynamic library. We signal it so + * that the STLport namespace will be modify to report such a combination + * and force the user to link with the rebuilt STLport library. + */ +# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB +# endif +# else +# if !defined(_STLP_USE_DYNAMIC_LIB) +# if !defined (_STLP_USE_STATIC_LIB) +# define _STLP_USE_STATIC_LIB +# endif +# else +/* Idem previous remark but the user forces use of the static native runtime. + */ +# define _STLP_USING_CROSS_NATIVE_RUNTIME_LIB +# endif +# endif +# else +/* If we do not build and use STLport libs we consider that we are in a static lib + * mode as only dynamic lib needs additional export/import specifier. + */ +# define _STLP_USE_STATIC_LIB +# endif +#endif + +/* we don't have a static native runtime library on evc3/evc4 */ +#ifdef _STLP_WCE +# undef _STLP_USING_CROSS_NATIVE_RUNTIME_LIB +#endif + +#if !defined (_STLP_USE_DYNAMIC_LIB) && !defined (_STLP_USE_STATIC_LIB) +# error Unknown STLport usage config (dll/lib?) +#endif diff --git a/stlport/stlport/stl/config/_epilog.h b/stlport/stlport/stl/config/_epilog.h new file mode 100644 index 0000000..30d1e24 --- /dev/null +++ b/stlport/stlport/stl/config/_epilog.h @@ -0,0 +1,29 @@ +#if defined (_STLP_MSVC) || defined (__ICL) + +# pragma warning (pop) +# pragma pack (pop) + +#elif defined (__BORLANDC__) + +# pragma option pop +# pragma option -w-pow // -w-8062 Previous options and warnings not restored + +#elif defined (__sgi) && !defined (__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) + +# pragma reset woff 1174 +# pragma reset woff 1375 +# pragma reset woff 1209 +/* from iterator_base.h */ +# pragma reset woff 1183 + +#elif defined (__DECCXX) + +# ifdef __PRAGMA_ENVIRONMENT +# pragma __environment __restore +# endif + +#elif defined (__IBMCPP__) + +# pragma info(restore) + +#endif diff --git a/stlport/stlport/stl/config/_feedback.h b/stlport/stlport/stl/config/_feedback.h new file mode 100644 index 0000000..0171ca5 --- /dev/null +++ b/stlport/stlport/stl/config/_feedback.h @@ -0,0 +1,43 @@ +/* Helper header to give feedback about build environment configuration + * thanks to #pragma message directives. + */ + +#if defined (_STLP_VERBOSE) +# define _STLP_VERBOSE_MODE_SUPPORTED + +# if defined (_STLP_COMPILER) +# pragma message (_STLP_COMPILER) +# endif + +# if defined (_STLP_NO_RTTI) +# pragma message ("STLport: RTTI support -> Disabled") +# else +# pragma message ("STLport: RTTI support -> Enabled") +# endif + +# if defined (_STLP_HAS_NO_EXCEPTIONS) +# pragma message ("STLport: Exception support -> Disabled") +# else +# pragma message ("STLport: Exception support -> Enabled") +# endif + +# if defined (_STLP_THREADS) +# pragma message ("STLport: Threading model -> Multi") +# else +# pragma message ("STLport: Threading model -> Mono") +# endif + +# if defined (_STLP_USE_DYNAMIC_LIB) +# pragma message ("STLport: Library model -> Dynamic") +# else +# pragma message ("STLport: Library model -> Static") +# endif + +# if defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) +# if defined (_STLP_USE_DYNAMIC_LIB) +# pragma message ("STLport: Native library model -> Static") +# else +# pragma message ("STLport: Native library model -> Dynamic") +# endif +# endif +#endif diff --git a/stlport/stlport/stl/config/_msvc.h b/stlport/stlport/stl/config/_msvc.h new file mode 100644 index 0000000..418d018 --- /dev/null +++ b/stlport/stlport/stl/config/_msvc.h @@ -0,0 +1,265 @@ +/* STLport configuration file + * It is internal STLport header - DO NOT include it directly + * Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0, ICL + */ + +#if !defined (_STLP_COMPILER) +# define _STLP_COMPILER "Microsoft Visual Studio C++" +#endif + +#if !defined (__ICL) && !defined (_STLP_MSVC) +# define _STLP_MSVC _MSC_VER +#endif + +#if !defined (_STLP_MSVC_LIB) +# define _STLP_MSVC_LIB _MSC_VER +#endif + +#if defined (__BUILDING_STLPORT) && defined (_MANAGED) +/* Building a managed version of STLport is not supported because we haven't + * found a good reason to support it. However, building a managed translation + * unit using STLport _is_ supported. + */ +# error Sorry but building a managed version of STLport is not supported. +#endif + +#if defined (_STLP_USING_PLATFORM_SDK_COMPILER) +/* This is a specific section for compilers coming with platform SDKs. Native + * library coming with it is different from the one coming with commercial + * MSVC compilers so there is some specific settings. + */ +# define _STLP_NATIVE_INCLUDE_PATH ../crt +# define _STLP_VENDOR_GLOBAL_CSTD +# define _STLP_VENDOR_TERMINATE_STD +# define _STLP_GLOBAL_NEW_HANDLER +# if (_STLP_MSVC_LIB <= 1400) +/* We hope this bug will be fixed in future versions. */ +# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1 +# endif +#endif + +#define _STLP_CALL __cdecl + +#ifndef _STLP_LONG_LONG +# define _STLP_LONG_LONG __int64 +#endif + +#define _STLP_PRAGMA_ONCE + +/* These switches depend on compiler flags. We are hoping here that compilers + * simulating MSVC behavior use identical macros to report compilation context. + * Otherwise those macros will have to be undef in specific compiler configuration + * files. + */ +#ifndef _CPPUNWIND +# define _STLP_DONT_USE_EXCEPTIONS 1 +#endif + +#ifndef _CPPRTTI +# define _STLP_NO_RTTI 1 +#endif + +#if defined (_MT) && !defined (_STLP_NO_THREADS) +# define _STLP_THREADS 1 +#endif + +#if !defined (_NATIVE_WCHAR_T_DEFINED) +# define _STLP_WCHAR_T_IS_USHORT 1 +#endif + +#define _STLP_NO_VENDOR_STDLIB_L 1 + +#if defined (_STLP_MSVC) + +# if (_STLP_MSVC < 1200) +# error Microsoft Visual C++ compilers before version 6 (SP5) are not supported. +# endif + +# define _STLP_NORETURN_FUNCTION __declspec(noreturn) + +/* Full compiler version comes from boost library intrinsics.hpp header. */ +# if defined (_MSC_FULL_VER) && (_MSC_FULL_VER >= 140050215) +# define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define _STLP_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T) +# define _STLP_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) +# define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define _STLP_IS_POD(T) __is_pod(T) +# define _STLP_HAS_TYPE_TRAITS_INTRINSICS +# endif + +# ifndef _STLP_MSVC50_COMPATIBILITY +# define _STLP_MSVC50_COMPATIBILITY 1 +# endif + +# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1 +# define _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1 +# define _STLP_NO_STATIC_CONST_DEFINITION 1 + +/* # ifndef __BUILDING_STLPORT + * # define _STLP_USE_TEMPLATE_EXPORT 1 + * # endif + */ + +/** Note: the macro _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT is defined +unconditionally and undef'ed here when applicable. */ +# if defined (UNDER_CE) +/* eVCx: +uncaught_exception is declared in the SDKs delivered with eVC4 (eVC3 is +unknown) and they all reside in namespace 'std' there. However, they are not +part of any lib so linking fails. When using VC8 to crosscompile for CE 5 on +an ARMV4I, the uncaught_exception test fails, the function returns the wrong +value. */ +/* All eVCs up to at least VC8/CE5 have a broken new operator that + returns null instead of throwing bad_alloc. */ +# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1 +# else +/* VCx: +These are present at least since VC6, but the uncaught_exception() of VC6 is +broken, it returns the wrong value in the unittests. 7.1 and later seem to +work, 7.0 is still unknown (we assume it works until negative report). */ +# if (_STLP_MSVC >= 1300)// VC7 and later +# undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT +# endif +# if (_STLP_MSVC < 1300) +# define _STLP_NOTHROW +# endif +# endif + +# if (_STLP_MSVC <= 1300) +# define _STLP_STATIC_CONST_INIT_BUG 1 +# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 +/* There is no partial spec, and MSVC breaks on simulating it for iterator_traits queries */ +# define _STLP_USE_OLD_HP_ITERATOR_QUERIES +# define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER +# define _STLP_NO_METHOD_SPECIALIZATION 1 +# define _STLP_DEF_CONST_PLCT_NEW_BUG 1 +# define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1 +/* VC++ cannot handle default allocator argument in template constructors */ +# define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS +# define _STLP_NO_QUALIFIED_FRIENDS 1 +# endif + +# if (_STLP_MSVC < 1300) /* including MSVC 6.0 */ +# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 +# define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1 +# endif + +# define _STLP_HAS_NATIVE_FLOAT_ABS 1 + +// TODO: some eVC4 compilers report _MSC_VER 1201 or 1202, which category do they belong to? +# if (_STLP_MSVC > 1200) && (_STLP_MSVC < 1310) +# define _STLP_NO_MOVE_SEMANTIC +# endif + +# if (_STLP_MSVC < 1300) +/* TODO: remove this if it is handled and documented elsewhere + * dums: VC6 do not handle correctly member templates of class that are explicitely + * instanciated to be exported. There is a workaround, seperate the non template methods + * from the template ones within 2 different classes and only export the non template one. + * It is implemented for basic_string and locale at the writing of this note. + * However this problem hos not been considered as important enough to remove template member + * methods for other classes. Moreover Boost (www.boost.org) required it to be granted. + * The workaround is activated thanks to the _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro defined + * later in this config file. + */ +/* +# if defined (_DLL) +# define _STLP_NO_MEMBER_TEMPLATES 1 +# endif +*/ + +/* Boris : not defining this macro for SP5 causes other problems */ +/*# if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 ) */ +# define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1 +/*# endif */ +# define _STLP_DONT_USE_BOOL_TYPEDEF 1 +# define _STLP_DONT_RETURN_VOID 1 +# endif + +# if (_STLP_MSVC < 1300) /* MSVC 6.0 and earlier */ +# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 +/* defined for DEBUG and NDEBUG too, to allow user mix own debug build with STLP release library */ +# define _STLP_USE_ABBREVS +# endif + +#endif /* _STLP_MSVC */ + +/* The desktop variants starting with VC8 have a set of more secure replacements + * for the error-prone string handling functions of the C standard lib. */ +/* When user do not consider 'unsafe' string functions as deprecated using _CRT_SECURE_NO_DEPRECATE + * macro we use 'unsafe' functions for performance reasons. */ +#if (_STLP_MSVC_LIB >= 1400) && !defined (_STLP_USING_PLATFORM_SDK_COMPILER) && !defined (UNDER_CE) && \ + !defined (_CRT_SECURE_NO_DEPRECATE) +# define _STLP_USE_SAFE_STRING_FUNCTIONS 1 +#endif + +#if (_STLP_MSVC_LIB <= 1310) +# define _STLP_VENDOR_GLOBAL_CSTD +#endif + +#if (_STLP_MSVC_LIB >= 1300) && !defined(UNDER_CE) +/* Starting with MSVC 7.0 and compilers simulating it, + * we assume that the new SDK is granted: + */ +# define _STLP_NEW_PLATFORM_SDK 1 +#endif + +#if (_STLP_MSVC_LIB < 1300) /* including MSVC 6.0 */ +# define _STLP_GLOBAL_NEW_HANDLER 1 +# define _STLP_VENDOR_UNEXPECTED_STD +# define _STLP_NEW_DONT_THROW_BAD_ALLOC 1 +#endif + +#define _STLP_EXPORT_DECLSPEC __declspec(dllexport) +#define _STLP_IMPORT_DECLSPEC __declspec(dllimport) +#define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport) +#define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport) + +#if defined (__DLL) || defined (_DLL) || defined (_RTLDLL) || defined (_AFXDLL) +# define _STLP_RUNTIME_DLL +#endif +#if defined (__BUILDING_STLPORT) && \ + (defined (_STLP_USE_DYNAMIC_LIB) || \ + defined (_STLP_RUNTIME_DLL) && !defined (_STLP_USE_STATIC_LIB)) +# define _STLP_DLL +#endif +#include <stl/config/_detect_dll_or_lib.h> +#undef _STLP_RUNTIME_DLL +#undef _STLP_DLL + +#if defined (_STLP_USE_DYNAMIC_LIB) +# undef _STLP_USE_DECLSPEC +# define _STLP_USE_DECLSPEC 1 +# if defined (_STLP_MSVC) && (_STLP_MSVC < 1300) +# define _STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND 1 +# endif +#endif + +#if !defined (_STLP_IMPORT_TEMPLATE_KEYWORD) +# if !defined (_MSC_EXTENSIONS) || defined (_STLP_MSVC) && (_STLP_MSVC >= 1300) +# define _STLP_IMPORT_TEMPLATE_KEYWORD +# else +# define _STLP_IMPORT_TEMPLATE_KEYWORD extern +# endif +#endif +#define _STLP_EXPORT_TEMPLATE_KEYWORD + +#include <stl/config/_auto_link.h> + +#if defined (_STLP_USING_PLATFORM_SDK_COMPILER) +/* The Windows 64 bits SDK required for the moment link to bufferoverflowU.lib for + * additional buffer overrun checks. Rather than require the STLport build system and + * users to explicitely link with it we use the MSVC auto link feature. + */ +# if !defined (_STLP_DONT_USE_AUTO_LINK) || defined (__BUILDING_STLPORT) +# pragma comment (lib, "bufferoverflowU.lib") +# if defined (_STLP_VERBOSE) +# pragma message ("STLport: Auto linking to bufferoverflowU.lib") +# endif +# endif +#endif + +#if defined (_STLP_MSVC) +# include <stl/config/_feedback.h> +#endif diff --git a/stlport/stlport/stl/config/_native_headers.h b/stlport/stlport/stl/config/_native_headers.h new file mode 100644 index 0000000..f1f4bc9 --- /dev/null +++ b/stlport/stlport/stl/config/_native_headers.h @@ -0,0 +1,50 @@ + /* + * + * Copyright (c) 2006 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#if !defined (_STLP_MAKE_HEADER) +# define _STLP_MAKE_HEADER(path, header) <path/header> +#endif + +#if !defined (_STLP_NATIVE_HEADER) +# if !defined (_STLP_NATIVE_INCLUDE_PATH) +# define _STLP_NATIVE_INCLUDE_PATH ../include +# endif +# define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header) +#endif + +/* For some compilers, C headers like <stdio.h> are located in separate directory */ +#if !defined (_STLP_NATIVE_C_HEADER) +# if !defined (_STLP_NATIVE_C_INCLUDE_PATH) +# define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +# endif +# define _STLP_NATIVE_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_C_INCLUDE_PATH,header) +#endif + +/* For some compilers, C-library headers like <cstdio> are located in separate directory */ +#if !defined (_STLP_NATIVE_CPP_C_HEADER) +# if !defined (_STLP_NATIVE_CPP_C_INCLUDE_PATH) +# define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +# endif +# define _STLP_NATIVE_CPP_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_C_INCLUDE_PATH,header) +#endif + +/* Some compilers locate basic C++ runtime support headers (<new>, <typeinfo>, <exception>) in separate directory */ +#if !defined ( _STLP_NATIVE_CPP_RUNTIME_HEADER ) +# if !defined (_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH) +# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +# endif +# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH,header) +#endif diff --git a/stlport/stlport/stl/config/_prolog.h b/stlport/stlport/stl/config/_prolog.h new file mode 100644 index 0000000..a16a794 --- /dev/null +++ b/stlport/stlport/stl/config/_prolog.h @@ -0,0 +1,43 @@ + +#if defined (_STLP_MSVC) || defined (__ICL) + +# pragma warning (push) +# include <stl/config/_warnings_off.h> +/* We are forcing the alignment to guaranty that libraries are use + * with the same alignment as the one use to build them. + */ +# if !defined (_WIN64) +# pragma pack(push, 8) +# else +# pragma pack(push, 16) +# endif + +#elif defined (__BORLANDC__) + +# pragma option push +# pragma option -Vx- -Ve- -a8 -b -pc +# include <stl/config/_warnings_off.h> + +#elif defined (__sgi) && !defined (__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) + +# pragma set woff 1209 +# pragma set woff 1174 +# pragma set woff 1375 +/* from iterator_base.h */ +# pragma set woff 1183 + +#elif defined (__DECCXX) + +# ifdef __PRAGMA_ENVIRONMENT +# pragma __environment __save +# pragma __environment __header_defaults +# endif + +#elif defined (__IBMCPP__) +/* supress EDC3130: A constant is being used as a conditional expression */ +# pragma info(nocnd) +#elif defined (__WATCOMCPLUSPLUS__) +# pragma warning 604 10 /* must lookahead to determine... */ +# pragma warning 594 10 /* resolved as declaration/type */ +# pragma warning 595 10 /* resolved as an expression */ +#endif diff --git a/stlport/stlport/stl/config/_warnings_off.h b/stlport/stlport/stl/config/_warnings_off.h new file mode 100644 index 0000000..77e9815 --- /dev/null +++ b/stlport/stlport/stl/config/_warnings_off.h @@ -0,0 +1,51 @@ +/* This header turns off warnings that STLport headers generate for compiled + * user code. + */ + +#if defined (_STLP_MSVC) +# if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) || \ + defined (_STLP_SIGNAL_RUNTIME_COMPATIBILITY) || defined (_STLP_CHECK_RUNTIME_COMPATIBILITY) +/* + * 31/07/2004: dums - now that we do not export the basic_string class anymore but only a base class + * we have to disable this warning as the string are used as data members type of many iostream classes. + */ +# pragma warning ( disable : 4251 ) // ignore template classes being exported in .dll's +# endif + +# if (_STLP_MSVC < 1300) // VC6, eVC3, eVC4 +# pragma warning( disable : 4097 ) // typedef-name used as based class of (...) +# pragma warning( disable : 4231 ) // non standard extension : 'extern' before template instanciation +# pragma warning( disable : 4244 ) // implicit conversion: possible loss of data +# pragma warning( disable : 4284 ) // for -> operator +//This warning is necessary because of the native platform headers: +# pragma warning( disable : 4290 ) // c++ exception specification ignored +# pragma warning( disable : 4514 ) // unreferenced inline function has been removed +# pragma warning( disable : 4660 ) // template-class specialization '...' is already instantiated +# pragma warning( disable : 4701 ) // local variable '...' may be used without having been initialized +# pragma warning( disable : 4710 ) // function (...) not inlined +# pragma warning( disable : 4786 ) // identifier truncated to 255 characters +# endif + +# if (_STLP_MSVC < 1400) +# pragma warning( disable : 4511 ) // copy constructor cannot be generated +# endif + +//Pool of common warnings for all MSVC supported versions: +//Many are only useful if warning level is set to 4. +# pragma warning( disable : 4100 ) // unreferenced formal parameter +# pragma warning( disable : 4127 ) // conditional expression is constant +# pragma warning( disable : 4146 ) // unary minus operator applied to unsigned type, result still unsigned +# pragma warning( disable : 4245 ) // conversion from 'enum ' to 'unsigned int', signed/unsigned mismatch +# pragma warning( disable : 4355 ) // this used in base member initializer list (used in rope implementation) +# pragma warning( disable : 4510 ) // default constructor cannot be generated +# pragma warning( disable : 4512 ) // assignment operator could not be generated +# pragma warning( disable : 4571 ) // catch(...) blocks compiled with /EHs do not catch or re-throw Structured Exceptions +# pragma warning( disable : 4610 ) // struct '...' can never be instantiated - user defined construtor required +#elif defined (__BORLANDC__) +# pragma option -w-ccc // -w-8008 Condition is always true OR Condition is always false +# pragma option -w-inl // -w-8027 Functions containing reserved words are not expanded inline +# pragma option -w-ngu // -w-8041 Negating unsigned value +# pragma option -w-pow // -w-8062 Previous options and warnings not restored +# pragma option -w-rch // -w-8066 Unreachable code +# pragma option -w-par // -w-8057 Parameter 'parameter' is never used +#endif diff --git a/stlport/stlport/stl/config/_windows.h b/stlport/stlport/stl/config/_windows.h new file mode 100644 index 0000000..6b42e11 --- /dev/null +++ b/stlport/stlport/stl/config/_windows.h @@ -0,0 +1,291 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * Copyright (c) 2003 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_INTERNAL_WINDOWS_H +#define _STLP_INTERNAL_WINDOWS_H + +#if !defined (_STLP_PLATFORM) +# define _STLP_PLATFORM "Windows" +#endif + +#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN) +# if defined (_MIPSEB) +# define _STLP_BIG_ENDIAN 1 +# endif +# if defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \ + defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \ + defined (__alpha__) +# define _STLP_LITTLE_ENDIAN 1 +# endif +# if defined (__ia64__) + /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */ +# if defined (__BIG_ENDIAN__) +# define _STLP_BIG_ENDIAN 1 +# else +# define _STLP_LITTLE_ENDIAN 1 +# endif +# endif +#endif /* _STLP_BIG_ENDIAN */ + +#if !defined (_STLP_WINDOWS_H_INCLUDED) +# define _STLP_WINDOWS_H_INCLUDED +# if defined (__BUILDING_STLPORT) +# include <stl/config/_native_headers.h> +/* Here we define _STLP_OUTERMOST_HEADER_ID to avoid indirect inclusion + * of STLport stuffs from C/C++ Standard headers exposed by STLport + * as configuration is not yet completed. */ +# if !defined (_STLP_OUTERMOST_HEADER_ID) +# define _STLP_OUTERMOST_HEADER_ID 0x100 +# endif +# if !defined (WIN32_LEAN_AND_MEAN) +# define WIN32_LEAN_AND_MEAN +# endif +# if !defined (VC_EXTRALEAN) +# define VC_EXTRALEAN +# endif +/* Don't let windows.h define its min and max macros. */ +# if !defined (NOMINMAX) +# define NOMINMAX +# endif +# if !defined (STRICT) +# define STRICT +# endif +# if defined (_STLP_USE_MFC) +# include <afx.h> +# else +# include <windows.h> +# endif +# if (_STLP_OUTERMOST_HEADER_ID == 0x100) +# undef _STLP_OUTERMOST_HEADER_ID +# endif +# else +/* This section serves as a replacement for windows.h header. */ +# if defined (__cplusplus) +extern "C" { +# endif +# if (defined (_M_AMD64) || defined (_M_IA64) || (!defined (_STLP_WCE) && defined (_M_MRX000)) || defined (_M_ALPHA) || \ + (defined (_M_PPC) && (_STLP_MSVC_LIB >= 1000))) && !defined (RC_INVOKED) +# define InterlockedIncrement _InterlockedIncrement +# define InterlockedDecrement _InterlockedDecrement +# define InterlockedExchange _InterlockedExchange +# define _STLP_STDCALL +# else +# if defined (_MAC) +# define _STLP_STDCALL _cdecl +# else +# define _STLP_STDCALL __stdcall +# endif +# endif + +# if defined (_STLP_NEW_PLATFORM_SDK) +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long); +# if defined (_WIN64) +_STLP_IMPORT_DECLSPEC void* _STLP_STDCALL _InterlockedExchangePointer(void* volatile *, void*); +# endif +# elif !defined (_STLP_WCE) +/* boris : for the latest SDK, you may actually need the other version of the declaration (above) + * even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ... + */ +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long); +# else +/* start of eMbedded Visual C++ specific section */ +# include <stl/config/_native_headers.h> + +/* Don't let windef.h define its min and max macros. */ +# if !defined (NOMINMAX) +# define NOMINMAX +# endif +# include <windef.h> /* needed for basic windows types */ + + /** in SDKs generated with PB5, windef.h somehow includes headers which then + define setjmp. */ +# if (_WIN32_WCE >= 0x500) +# define _STLP_NATIVE_SETJMP_H_INCLUDED +# endif + +# ifndef _WINBASE_ /* winbase.h already included? */ +long WINAPI InterlockedIncrement(long*); +long WINAPI InterlockedDecrement(long*); +long WINAPI InterlockedExchange(long*, long); +# endif + +# ifndef __WINDOWS__ /* windows.h already included? */ + +# if defined (x86) +# include <winbase.h> /* needed for inline versions of Interlocked* functions */ +# endif + +# ifndef _MFC_VER + +# define MessageBox MessageBoxW +int WINAPI MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType); + +# define wvsprintf wvsprintfW +int WINAPI wvsprintfW(LPWSTR, LPCWSTR, va_list ArgList); + +void WINAPI ExitThread(DWORD dwExitCode); + +# if !defined (COREDLL) +# define _STLP_WCE_WINBASEAPI DECLSPEC_IMPORT +# else +# define _STLP_WCE_WINBASEAPI +# endif + +_STLP_WCE_WINBASEAPI int WINAPI +MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, + int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); + +_STLP_WCE_WINBASEAPI UINT WINAPI GetACP(); + +_STLP_WCE_WINBASEAPI BOOL WINAPI TerminateProcess(HANDLE hProcess, DWORD uExitCode); + +# define OutputDebugString OutputDebugStringW +void WINAPI OutputDebugStringW(LPCWSTR); + +_STLP_WCE_WINBASEAPI void WINAPI Sleep(DWORD); + +# undef _STLP_WCE_WINBASEAPI + +# endif /* !_MFC_VER */ + +# endif /* !__WINDOWS__ */ + +/* end of eMbedded Visual C++ specific section */ +# endif + +# if !defined (_STLP_WCE) +_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long); +_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA(const char* lpOutputString); +# endif + +# if defined (InterlockedIncrement) +# pragma intrinsic(_InterlockedIncrement) +# pragma intrinsic(_InterlockedDecrement) +# pragma intrinsic(_InterlockedExchange) +# if defined (_WIN64) +# pragma intrinsic(_InterlockedExchangePointer) +# endif +# endif +# if defined (__cplusplus) +} /* extern "C" */ +# endif + +# endif + +/* Here we use a macro different than the InterlockedExchangePointer SDK one + * to avoid macro definition conflict. */ +# if !defined (_WIN64) +/* Under 32 bits platform we rely on a simple InterlockedExchange call. */ +# if defined (__cplusplus) +/* We do not define this function if we are not in a C++ translation unit just + * because of the 'inline' keyword portability issue it would introduce. We will + * have to fix it the day we need this function for a C translation unit. + */ +inline +void* _STLP_CALL STLPInterlockedExchangePointer(void* volatile* __a, void* __b) { +# if defined (_STLP_MSVC) +/* Here MSVC produces warning if 64 bits portability issue is activated. + * MSVC do not see that _STLP_ATOMIC_EXCHANGE_PTR is a macro which content + * is based on the platform, Win32 or Win64 + */ +# pragma warning (push) +# pragma warning (disable : 4311) // pointer truncation from void* to long +# pragma warning (disable : 4312) // conversion from long to void* of greater size +# endif +# if !defined (_STLP_NO_NEW_STYLE_CASTS) + return reinterpret_cast<void*>(InterlockedExchange(reinterpret_cast<long*>(const_cast<void**>(__a)), + reinterpret_cast<long>(__b))); +# else + return (void*)InterlockedExchange((long*)__a, (long)__b); +# endif +# if defined (_STLP_MSVC) +# pragma warning (pop) +# endif +} +# endif +# else +# define STLPInterlockedExchangePointer _InterlockedExchangePointer +# endif + +#endif /* _STLP_WINDOWS_H_INCLUDED */ + +/* _STLP_WIN95_LIKE signal the Windows 95 OS or assimilated Windows OS version that + * has Interlockeded[Increment, Decrement] Win32 API functions not returning modified + * value. + */ +#if (defined (WINVER) && (WINVER < 0x0410) && (!defined (_WIN32_WINNT) || (_WIN32_WINNT < 0x400))) || \ + (!defined (WINVER) && (defined (_WIN32_WINDOWS) && (_WIN32_WINDOWS < 0x0410) || \ + (defined (_WIN32_WINNT) && (_WIN32_WINNT < 0x400)))) +# define _STLP_WIN95_LIKE +#endif + +/* Between Windows 95 (0x400) and later Windows OSes an API enhancement forces us + * to change _Refcount_Base internal struct. As _Refcount_base member methods might + * be partially inlined we need to check that STLport build/use are coherent. To do + * so we try to generate a link time error thanks to the following macro. + * This additional check is limited to old compilers that might still be used with + * Windows 95. */ +#if (defined (_DEBUG) || defined (_STLP_DEBUG)) && \ + (defined (_STLP_MSVC) && (_STLP_MSVC < 1310) || \ + defined (__GNUC__) && (__GNUC__ < 3)) +/* We invert symbol names based on macro detection, when building for Windows + * 95 we expose a + * building_for_windows95_or_previous_but_library_built_for_windows98_or_later + * function in order to have a more obvious link error message signaling how + * the lib has been built and how it is used. */ +# if defined (__BUILDING_STLPORT) +# if defined (_STLP_WIN95_LIKE) +# define _STLP_SIGNAL_RUNTIME_COMPATIBILITY building_for_windows95_but_library_built_for_at_least_windows98 +# else +# define _STLP_SIGNAL_RUNTIME_COMPATIBILITY building_for_at_least_windows98_but_library_built_for_windows95 +# endif +# else +# if defined (_STLP_WIN95_LIKE) +# define _STLP_CHECK_RUNTIME_COMPATIBILITY building_for_windows95_but_library_built_for_at_least_windows98 +# else +# define _STLP_CHECK_RUNTIME_COMPATIBILITY building_for_at_least_windows98_but_library_built_for_windows95 +# endif +# endif +#endif + +#if defined (__WIN16) || defined (WIN16) || defined (_WIN16) +# define _STLP_WIN16 +#else +# define _STLP_WIN32 +#endif + +#if defined(_STLP_WIN32) +# define _STLP_USE_WIN32_IO /* CreateFile/ReadFile/WriteFile */ +#endif + +#if defined(__MINGW32__) && !defined(_STLP_USE_STDIO_IO) +# define _STLP_USE_WIN32_IO /* CreateFile/ReadFile/WriteFile */ +#endif /* __MINGW32__ */ + +#ifdef _STLP_WIN16 +# define _STLP_USE_UNIX_EMULATION_IO /* _open/_read/_write */ +# define _STLP_LDOUBLE_80 +#endif + +#endif /* _STLP_INTERNAL_WINDOWS_H */ |