1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/regex/config.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,411 @@
1.4 +/*
1.5 + *
1.6 + * Copyright (c) 1998-2002
1.7 + * John Maddock
1.8 + *
1.9 + * Use, modification and distribution are subject to the
1.10 + * Boost Software License, Version 1.0. (See accompanying file
1.11 + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
1.12 + *
1.13 + */
1.14 +
1.15 + /*
1.16 + * LOCATION: see http://www.boost.org for most recent version.
1.17 + * FILE config.hpp
1.18 + * VERSION see <boost/version.hpp>
1.19 + * DESCRIPTION: regex extended config setup.
1.20 + */
1.21 +
1.22 +#ifndef BOOST_REGEX_CONFIG_HPP
1.23 +#define BOOST_REGEX_CONFIG_HPP
1.24 +/*
1.25 + * Borland C++ Fix/error check
1.26 + * this has to go *before* we include any std lib headers:
1.27 + */
1.28 +#if defined(__BORLANDC__)
1.29 +# include <boost/regex/config/borland.hpp>
1.30 +#endif
1.31 +
1.32 +/*****************************************************************************
1.33 + *
1.34 + * Include all the headers we need here:
1.35 + *
1.36 + ****************************************************************************/
1.37 +
1.38 +#ifdef __cplusplus
1.39 +
1.40 +# ifndef BOOST_REGEX_USER_CONFIG
1.41 +# define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
1.42 +# endif
1.43 +
1.44 +# include BOOST_REGEX_USER_CONFIG
1.45 +
1.46 +# include <boost/config.hpp>
1.47 +
1.48 +#else
1.49 + /*
1.50 + * C build,
1.51 + * don't include <boost/config.hpp> because that may
1.52 + * do C++ specific things in future...
1.53 + */
1.54 +# include <stdlib.h>
1.55 +# include <stddef.h>
1.56 +# ifdef _MSC_VER
1.57 +# define BOOST_MSVC _MSC_VER
1.58 +# endif
1.59 +#endif
1.60 +
1.61 +/*****************************************************************************
1.62 + *
1.63 + * Boilerplate regex config options:
1.64 + *
1.65 + ****************************************************************************/
1.66 +
1.67 +/* Obsolete macro, use BOOST_VERSION instead: */
1.68 +#define BOOST_RE_VERSION 320
1.69 +
1.70 +/* fix: */
1.71 +#if defined(_UNICODE) && !defined(UNICODE)
1.72 +#define UNICODE
1.73 +#endif
1.74 +
1.75 +/*
1.76 + * Fix for gcc prior to 3.4: std::ctype<wchar_t> doesn't allow
1.77 + * masks to be combined, for example:
1.78 + * std::use_facet<std::ctype<wchar_t> >.is(std::ctype_base::lower|std::ctype_base::upper, L'a');
1.79 + * returns *false*.
1.80 + */
1.81 +#ifdef __GLIBCPP__
1.82 +# define BOOST_REGEX_BUGGY_CTYPE_FACET
1.83 +#endif
1.84 +
1.85 +/*
1.86 + * Intel C++ before 8.0 ends up with unresolved externals unless we turn off
1.87 + * extern template support:
1.88 + */
1.89 +#if defined(BOOST_INTEL) && defined(__cplusplus) && (BOOST_INTEL <= 800)
1.90 +# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
1.91 +#endif
1.92 +
1.93 +/*
1.94 + * If there isn't good enough wide character support then there will
1.95 + * be no wide character regular expressions:
1.96 + */
1.97 +#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
1.98 +# if !defined(BOOST_NO_WREGEX)
1.99 +# define BOOST_NO_WREGEX
1.100 +# endif
1.101 +#else
1.102 +# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
1.103 + /* STLPort on IRIX is misconfigured: <cwctype> does not compile
1.104 + * as a temporary fix include <wctype.h> instead and prevent inclusion
1.105 + * of STLPort version of <cwctype> */
1.106 +# include <wctype.h>
1.107 +# define __STLPORT_CWCTYPE
1.108 +# define _STLP_CWCTYPE
1.109 +# endif
1.110 +
1.111 +#ifdef __cplusplus
1.112 +# include <boost/regex/config/cwchar.hpp>
1.113 +#endif
1.114 +
1.115 +#endif
1.116 +
1.117 +/*
1.118 + * If Win32 support has been disabled for boost in general, then
1.119 + * it is for regex in particular:
1.120 + */
1.121 +#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
1.122 +# define BOOST_REGEX_NO_W32
1.123 +#endif
1.124 +
1.125 +/* disable our own file-iterators and mapfiles if we can't
1.126 + * support them: */
1.127 +#if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
1.128 +# define BOOST_REGEX_NO_FILEITER
1.129 +#endif
1.130 +
1.131 +/* backwards compatibitity: */
1.132 +#if defined(BOOST_RE_NO_LIB)
1.133 +# define BOOST_REGEX_NO_LIB
1.134 +#endif
1.135 +
1.136 +#if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
1.137 +/* gcc on win32 has problems if you include <windows.h>
1.138 + (sporadically generates bad code). */
1.139 +# define BOOST_REGEX_NO_W32
1.140 +#endif
1.141 +#if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
1.142 +# define BOOST_REGEX_NO_W32
1.143 +#endif
1.144 +
1.145 +/*****************************************************************************
1.146 + *
1.147 + * Wide character workarounds:
1.148 + *
1.149 + ****************************************************************************/
1.150 +
1.151 +/*
1.152 + * define BOOST_REGEX_HAS_OTHER_WCHAR_T when wchar_t is a native type, but the users
1.153 + * code may be built with wchar_t as unsigned short: basically when we're building
1.154 + * with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions
1.155 + * of the non-inline functions in the library, so that users can still link to the lib,
1.156 + * irrespective of whether their own code is built with /Zc:wchar_t.
1.157 + */
1.158 +#if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
1.159 +# define BOOST_REGEX_HAS_OTHER_WCHAR_T
1.160 +# ifdef BOOST_MSVC
1.161 +# pragma warning(push)
1.162 +# pragma warning(disable : 4251 4231 4660)
1.163 +# endif
1.164 +# ifdef _DLL
1.165 +# include <string>
1.166 + extern template class __declspec(dllimport) std::basic_string<unsigned short>;
1.167 +# endif
1.168 +# ifdef BOOST_MSVC
1.169 +# pragma warning(pop)
1.170 +# endif
1.171 +#endif
1.172 +
1.173 +
1.174 +/*****************************************************************************
1.175 + *
1.176 + * Set up dll import/export options:
1.177 + *
1.178 + ****************************************************************************/
1.179 +
1.180 +#if defined(BOOST_HAS_DECLSPEC) && (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
1.181 +# if defined(BOOST_REGEX_SOURCE)
1.182 +# define BOOST_REGEX_DECL __declspec(dllexport)
1.183 +# define BOOST_REGEX_BUILD_DLL
1.184 +# else
1.185 +# define BOOST_REGEX_DECL __declspec(dllimport)
1.186 +# endif
1.187 +#endif
1.188 +
1.189 +#ifndef BOOST_REGEX_DECL
1.190 +# define BOOST_REGEX_DECL
1.191 +#endif
1.192 +
1.193 +#if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
1.194 +# define BOOST_LIB_NAME boost_regex
1.195 +# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
1.196 +# define BOOST_DYN_LINK
1.197 +# endif
1.198 +# ifdef BOOST_REGEX_DIAG
1.199 +# define BOOST_LIB_DIAGNOSTIC
1.200 +# endif
1.201 +# include <boost/config/auto_link.hpp>
1.202 +#endif
1.203 +
1.204 +/*****************************************************************************
1.205 + *
1.206 + * Set up function call type:
1.207 + *
1.208 + ****************************************************************************/
1.209 +
1.210 +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS)
1.211 +#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED)
1.212 +# define BOOST_REGEX_CALL __cdecl
1.213 +#else
1.214 +# define BOOST_REGEX_CALL __fastcall
1.215 +#endif
1.216 +# define BOOST_REGEX_CCALL __cdecl
1.217 +#endif
1.218 +
1.219 +#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
1.220 +# define BOOST_REGEX_CALL __fastcall
1.221 +# define BOOST_REGEX_CCALL __stdcall
1.222 +#endif
1.223 +
1.224 +#ifndef BOOST_REGEX_CALL
1.225 +# define BOOST_REGEX_CALL
1.226 +#endif
1.227 +#ifndef BOOST_REGEX_CCALL
1.228 +#define BOOST_REGEX_CCALL
1.229 +#endif
1.230 +
1.231 +/*****************************************************************************
1.232 + *
1.233 + * Set up localisation model:
1.234 + *
1.235 + ****************************************************************************/
1.236 +
1.237 +/* backwards compatibility: */
1.238 +#ifdef BOOST_RE_LOCALE_C
1.239 +# define BOOST_REGEX_USE_C_LOCALE
1.240 +#endif
1.241 +
1.242 +#ifdef BOOST_RE_LOCALE_CPP
1.243 +# define BOOST_REGEX_USE_CPP_LOCALE
1.244 +#endif
1.245 +
1.246 +/* Win32 defaults to native Win32 locale: */
1.247 +#if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32)
1.248 +# define BOOST_REGEX_USE_WIN32_LOCALE
1.249 +#endif
1.250 +/* otherwise use C++ locale if supported: */
1.251 +#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE)
1.252 +# define BOOST_REGEX_USE_CPP_LOCALE
1.253 +#endif
1.254 +/* otherwise use C+ locale: */
1.255 +#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
1.256 +# define BOOST_REGEX_USE_C_LOCALE
1.257 +#endif
1.258 +
1.259 +#ifndef BOOST_REGEX_MAX_STATE_COUNT
1.260 +# define BOOST_REGEX_MAX_STATE_COUNT 100000000
1.261 +#endif
1.262 +
1.263 +
1.264 +/*****************************************************************************
1.265 + *
1.266 + * Error Handling for exception free compilers:
1.267 + *
1.268 + ****************************************************************************/
1.269 +
1.270 +#ifdef BOOST_NO_EXCEPTIONS
1.271 +/*
1.272 + * If there are no exceptions then we must report critical-errors
1.273 + * the only way we know how; by terminating.
1.274 + */
1.275 +#include <stdexcept>
1.276 +#include <string>
1.277 +#include <boost/throw_exception.hpp>
1.278 +
1.279 +# define BOOST_REGEX_NOEH_ASSERT(x)\
1.280 +if(0 == (x))\
1.281 +{\
1.282 + std::string s("Error: critical regex++ failure in: ");\
1.283 + s.append(#x);\
1.284 + std::runtime_error e(s);\
1.285 + boost::throw_exception(e);\
1.286 +}
1.287 +#else
1.288 +/*
1.289 + * With exceptions then error handling is taken care of and
1.290 + * there is no need for these checks:
1.291 + */
1.292 +# define BOOST_REGEX_NOEH_ASSERT(x)
1.293 +#endif
1.294 +
1.295 +
1.296 +/*****************************************************************************
1.297 + *
1.298 + * Stack protection under MS Windows:
1.299 + *
1.300 + ****************************************************************************/
1.301 +
1.302 +#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
1.303 +# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
1.304 + && !defined(__GNUC__) \
1.305 + && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
1.306 + && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
1.307 +# define BOOST_REGEX_HAS_MS_STACK_GUARD
1.308 +# endif
1.309 +#elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
1.310 +# undef BOOST_REGEX_HAS_MS_STACK_GUARD
1.311 +#endif
1.312 +
1.313 +#if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
1.314 +
1.315 +namespace boost{
1.316 +namespace re_detail{
1.317 +
1.318 +BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
1.319 +
1.320 +}
1.321 +}
1.322 +
1.323 +#endif
1.324 +
1.325 +
1.326 +/*****************************************************************************
1.327 + *
1.328 + * Algorithm selection and configuration:
1.329 + *
1.330 + ****************************************************************************/
1.331 +
1.332 +#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
1.333 +# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1400))
1.334 +# define BOOST_REGEX_RECURSIVE
1.335 +# else
1.336 +# define BOOST_REGEX_NON_RECURSIVE
1.337 +# endif
1.338 +#endif
1.339 +
1.340 +#ifdef BOOST_REGEX_NON_RECURSIVE
1.341 +# ifdef BOOST_REGEX_RECURSIVE
1.342 +# error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
1.343 +# endif
1.344 +# ifndef BOOST_REGEX_BLOCKSIZE
1.345 +# define BOOST_REGEX_BLOCKSIZE 4096
1.346 +# endif
1.347 +# if BOOST_REGEX_BLOCKSIZE < 512
1.348 +# error "BOOST_REGEX_BLOCKSIZE must be at least 512"
1.349 +# endif
1.350 +# ifndef BOOST_REGEX_MAX_BLOCKS
1.351 +# define BOOST_REGEX_MAX_BLOCKS 1024
1.352 +# endif
1.353 +# ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
1.354 +# undef BOOST_REGEX_HAS_MS_STACK_GUARD
1.355 +# endif
1.356 +# ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
1.357 +# define BOOST_REGEX_MAX_CACHE_BLOCKS 16
1.358 +# endif
1.359 +#endif
1.360 +
1.361 +
1.362 +/*****************************************************************************
1.363 + *
1.364 + * helper memory allocation functions:
1.365 + *
1.366 + ****************************************************************************/
1.367 +
1.368 +#if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE)
1.369 +namespace boost{ namespace re_detail{
1.370 +
1.371 +BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block();
1.372 +BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*);
1.373 +
1.374 +}} /* namespaces */
1.375 +#endif
1.376 +
1.377 +/*****************************************************************************
1.378 + *
1.379 + * Diagnostics:
1.380 + *
1.381 + ****************************************************************************/
1.382 +
1.383 +#ifdef BOOST_REGEX_CONFIG_INFO
1.384 +BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info();
1.385 +#endif
1.386 +
1.387 +#if defined(BOOST_REGEX_DIAG)
1.388 +# pragma message ("BOOST_REGEX_DECL" BOOST_STRINGIZE(=BOOST_REGEX_DECL))
1.389 +# pragma message ("BOOST_REGEX_CALL" BOOST_STRINGIZE(=BOOST_REGEX_CALL))
1.390 +# pragma message ("BOOST_REGEX_CCALL" BOOST_STRINGIZE(=BOOST_REGEX_CCALL))
1.391 +#ifdef BOOST_REGEX_USE_C_LOCALE
1.392 +# pragma message ("Using C locale in regex traits class")
1.393 +#elif BOOST_REGEX_USE_CPP_LOCALE
1.394 +# pragma message ("Using C++ locale in regex traits class")
1.395 +#else
1.396 +# pragma message ("Using Win32 locale in regex traits class")
1.397 +#endif
1.398 +#if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
1.399 +# pragma message ("Dynamic linking enabled")
1.400 +#endif
1.401 +#if defined(BOOST_REGEX_NO_LIB) || defined(BOOST_ALL_NO_LIB)
1.402 +# pragma message ("Auto-linking disabled")
1.403 +#endif
1.404 +#ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
1.405 +# pragma message ("Extern templates disabled")
1.406 +#endif
1.407 +
1.408 +#endif
1.409 +
1.410 +#endif
1.411 +
1.412 +
1.413 +
1.414 +