📄 features.h
字号:
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* 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_FEATURES_H
#define _STLP_FEATURES_H
/*
* Purpose of this file:
*
* Defines all STLport settings.
* This file is actually a wrapper : it includes compiler-specific
* settings from <config/stlcomp.h>
* and user-defined settings from <config/user_config.h>.
* See <config/stl_mycomp.h> and <config/user_config.h> for the description
* of those macros
*
*/
/* Definition of the STLport version informations */
#include <stl/_stlport_version.h>
/* Other macros defined by this file:
* bool, true, and false, if _STLP_NO_BOOL is defined.
* typename, as a null macro if it's not already a keyword.
* explicit, as a null macro if it's not already a keyword.
* namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.)
* exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.)
* _STLP_ASSERT, either as a test or as a null macro, depending on
whether or not _STLP_ASSERTIONS is defined.
*/
/* Definition of the 2 STLport debug levels */
#define _STLP_STLPORT_DBG_LEVEL 1
#define _STLP_STANDARD_DBG_LEVEL 2
/* Placeholder for user to override settings.
* It could be also used to mask settings from
* different directories.
*/
#include <stl/config/user_config.h>
#if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL)
# define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL
#endif
#if defined (__BUILDING_STLPORT)
/* For the STLport implementation we can use everything:
*/
# if defined (_STLP_NO_ANACHRONISMS)
# undef _STLP_NO_ANACHRONISMS
# endif
# if defined (_STLP_NO_EXTENSIONS)
# undef _STLP_NO_EXTENSIONS
# endif
/* Moreover there are things that has no sens:
*/
# if defined (_STLP_NO_IOSTREAMS)
# error If you do not use iostreams you do not need to build the STLport library.
# endif
#endif
/* ========================================================= */
/* This file is used for compatibility; it accepts old-style config
switches */
#include <stl/config/compat.h>
/* Common configuration file for this particular installation. */
#include <stl/config/host.h>
/* Operational Environment specific */
#include <stl/config/_system.h>
/* ========================================================= */
/* some fixes to configuration. This also includes modifications
* of STLport switches depending on compiler flags,
* or settings applicable to a group of compilers, such as
* to all who use EDG front-end.
*/
#include <stl/config/stl_confix.h>
#ifdef _STLP_USE_BOOST_SUPPORT
/* We are going to use the boost library support. To limit the problem
* of self referencing headers we have to specify clearly to the boost
* library that the Standard lib is STLport:
*/
# ifndef BOOST_STDLIB_CONFIG
# define BOOST_STDLIB_CONFIG <boost/config/stdlib/stlport.hpp>
# endif
#endif
/*
* Performs integrity check on user-specified parameters
* and site-specific settings.
*/
/*
# include <stl/_check_config.h>
*/
/* SGI terms */
#if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES)
# define _STLP_MEMBER_TEMPLATES 1
#endif
#if !defined (_STLP_NO_FRIEND_TEMPLATES) && !defined (_STLP_FRIEND_TEMPLATES)
# define _STLP_FRIEND_TEMPLATES 1
#endif
#if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
# define _STLP_MEMBER_TEMPLATE_CLASSES 1
#endif
#if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE)
# define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1
#endif
#if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
# define _STLP_CLASS_PARTIAL_SPECIALIZATION 1
#endif
#if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
# define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1
#endif
#if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM)
# define _STLP_USE_SHORT_STRING_OPTIM 1
#endif
#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \
!defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION)
# define _STLP_USE_CONTAINERS_EXTENSION
#endif
#if defined (_STLP_USE_CONTAINERS_EXTENSION)
# define _STLP_TEMPLATE_FOR_CONT_EXT template <class _KT>
#else
# define _STLP_TEMPLATE_FOR_CONT_EXT
#endif
#if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \
(defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
# error "Sorry but according the STLport settings your compiler can not support the pointer specialization feature."
#endif
#if defined (_STLP_NO_IOSTREAMS) && \
!defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC)
# define _STLP_USE_NEWALLOC
#endif
#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN)
# if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \
defined (__hpux) || defined (macintosh) || defined (_MAC)
# define _STLP_BIG_ENDIAN 1
# elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \
defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \
defined (__alpha__)
# define _STLP_LITTLE_ENDIAN 1
# elif 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
# else
# error "can't determine endianess"
# endif
#endif /* _STLP_BIG_ENDIAN */
/* ==========================================================
* final workaround tuning based on given flags
* ========================================================== */
#ifndef _STLP_UINT32_T
# define _STLP_UINT32_T unsigned long
#endif
#ifndef _STLP_ABORT
# define _STLP_ABORT() abort()
#endif
#if !defined (_STLP_HAS_NO_NAMESPACES)
# if defined _STLP_NO_NAMESPACES
# undef _STLP_USE_NAMESPACES
# else
/* assume it as the default, turn it off later if NO_NAMESPACES selected */
# undef _STLP_USE_NAMESPACES
# define _STLP_USE_NAMESPACES 1
# endif
#endif
#if defined (_STLP_NO_IOSTREAMS)
# define _STLP_USE_NO_IOSTREAMS
#endif
/* Operating system recognition (basic) */
#if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX) || defined (__NetBSD__) || defined(__OpenBSD__) || defined (__Lynx__)
# define _STLP_UNIX 1
#elif defined(macintosh) || defined (_MAC)
# define _STLP_MAC 1
#elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__)
# define _STLP_WIN32 1
#elif defined (__WIN16) || defined (WIN16) || defined (_WIN16)
# define _STLP_WIN16
#endif /* __unix */
#if defined (_STLP_WIN16)
# define _STLP_LDOUBLE_80
#elif defined(_STLP_WIN32)
# if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) || defined (__CYGWIN__)
# define _STLP_LDOUBLE_64
# else
# define _STLP_LDOUBLE_96
# endif
#elif defined (_STLP_UNIX)
# if defined (__CYGWIN__)
# define _STLP_LDOUBLE_96
# endif
#endif
#if !defined (_STLP_LDOUBLE_64) && !defined (_STLP_LDOUBLE_80) && !defined (_STLP_LDOUBLE_96) && !defined (_STLP_LDOUBLE_128)
# define _STLP_LDOUBLE_128
#endif
#if !defined (_STLP_NO_LONG_DOUBLE)
# define _STLP_LONGEST_FLOAT_TYPE long double
#else
# define _STLP_LONGEST_FLOAT_TYPE double
#endif
/* Native headers access macros */
#include <stl/config/_native_headers.h>
/* shared library tune-up */
#if defined (__BUILDING_STLPORT)
/* if we are rebuilding right now, place everything here */
# undef _STLP_DESIGNATED_DLL
# define _STLP_DESIGNATED_DLL 1
#endif
/* Use own namespace always if possible and not explicitly instructed otherwise */
#if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \
!defined (_STLP_NO_OWN_NAMESPACE)
# undef _STLP_USE_OWN_NAMESPACE
# define _STLP_USE_OWN_NAMESPACE 1
#else
# undef _STLP_WHOLE_NATIVE_STD
#endif
#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED)
# if defined (_PTHREADS)
# define _STLP_PTHREADS
# define _STLP_THREADS
# endif
# if defined (_UITHREADS)
# define _STLP_UITHREADS
# define _STLP_THREADS
# endif
# if defined (__sgi) && !defined (__KCC) && !defined (__GNUC__)
# define _STLP_SGI_THREADS
# elif defined (__DECC) || defined (__DECCXX)
# define _STLP_DEC_THREADS
# elif defined (_STLP_WIN32) && !defined (_STLP_PTHREADS)
# define _STLP_WIN32THREADS 1
# elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \
!defined(_STLP_PTHREADS)
# define _STLP_UITHREADS
# elif defined (__OS2__)
# define _STLP_OS2THREADS
# elif defined (__BEOS__)
# define _STLP_BETHREADS
# elif defined (__MWERKS__) && defined (N_PLAT_NLM) /* (__dest_os == __netware_os) */
# define _STLP_NWTHREADS
# else
# define _STLP_PTHREADS
# endif /* __sgi */
# define _STLP_THREADS_DEFINED
#endif
#if (defined (_REENTRANT) || defined (_THREAD_SAFE) || \
(defined (_POSIX_THREADS) && defined (__OpenBSD__))) && \
!defined (_STLP_THREADS)
# define _STLP_THREADS
#endif /* _REENTRANT */
#if defined (__linux__) && defined (_STLP_PTHREADS)
/* # include <features.h> */
# if defined (__USE_XOPEN2K) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK)
# define _STLP_USE_PTHREAD_SPINLOCK
# define _STLP_STATIC_MUTEX _STLP_mutex
# endif /* __USE_XOPEN2K */
#endif /* __linux__ && _STLP_PTHREADS */
#if defined (__OpenBSD__) && defined (_POSIX_THREADS) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK)
# define _STLP_USE_PTHREAD_SPINLOCK
# define _STLP_STATIC_MUTEX _STLP_mutex
#endif
#ifndef _STLP_STATIC_MUTEX
# define _STLP_STATIC_MUTEX _STLP_mutex_base
#endif
#if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC)
# define _STLP_USE_MFC 1
#endif
#if defined (_STLP_THREADS)
# define _STLP_VOLATILE volatile
/* windows.h _MUST be included before bool definition ;( */
# if defined (_STLP_WIN32THREADS) && defined (_STLP_NO_BOOL)
# undef NOMINMAX
# define NOMINMAX
# ifdef _STLP_USE_MFC
# include <afx.h>
# else
# include <windows.h>
# endif
# define _STLP_WINDOWS_H_INCLUDED
# endif
#else
# define _STLP_VOLATILE
#endif
#if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
# define _STLP_USE_NEW_C_HEADERS
#endif
/* disable new-style headers if requested */
#if defined (_STLP_NO_NEW_C_HEADERS)
# undef _STLP_USE_NEW_C_HEADERS
#endif
#if !defined (_STLP_STATIC_TEMPLATE_DATA)
# define _STLP_STATIC_TEMPLATE_DATA 1
#endif
#if defined (_STLP_BASE_TYPEDEF_BUG)
# undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG
# define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
#endif
#if defined (_STLP_NESTED_TYPE_PARAM_BUG) || (defined (_STLP_MSVC) && (_STLP_MSVC < 1100))
# define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG
#endif
/* SUNpro 4.2 inline string literal bug */
#ifdef _STLP_INLINE_STRING_LITERAL_BUG
# define _STLP_FIX_LITERAL_BUG(__x) __x = __x;
#else
# define _STLP_FIX_LITERAL_BUG(__x)
#endif
#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
# undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
#endif
#define _STLP_NEW new
#define _STLP_PLACEMENT_NEW new
#ifdef _STLP_DEBUG
# define _STLP_ASSERTIONS 1
#endif
#if !defined (_STLP_STATIC_ASSERT)
/* Some compiler support 0 size array so we use negative size array to generate
* a compilation time error.
*/
# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
#endif
/* apple mpw exception handling bug */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -