forked from boostorg/regex
Made config header C compatible.
Added mingw dll specific fix. [SVN r25269]
This commit is contained in:
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||||
#define BOOST_REGEX_CONFIG_HPP
|
#define BOOST_REGEX_CONFIG_HPP
|
||||||
//
|
/*
|
||||||
// Borland C++ Fix/error check
|
Borland C++ Fix/error check
|
||||||
// this has to go *before* we include any std lib headers:
|
this has to go *before* we include any std lib headers:
|
||||||
//
|
*/
|
||||||
#if defined(__BORLANDC__)
|
#if defined(__BORLANDC__)
|
||||||
# include <boost/regex/config/borland.hpp>
|
# include <boost/regex/config/borland.hpp>
|
||||||
#endif
|
#endif
|
||||||
@ -60,11 +60,11 @@
|
|||||||
# include <locale>
|
# include <locale>
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
//
|
/*
|
||||||
// C build,
|
* C build,
|
||||||
// don't include <boost/config.hpp> because that may
|
* don't include <boost/config.hpp> because that may
|
||||||
// do C++ specific things in future...
|
* do C++ specific things in future...
|
||||||
//
|
*/
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
@ -81,24 +81,24 @@
|
|||||||
/* Obsolete macro, use BOOST_VERSION instead: */
|
/* Obsolete macro, use BOOST_VERSION instead: */
|
||||||
#define BOOST_RE_VERSION 320
|
#define BOOST_RE_VERSION 320
|
||||||
|
|
||||||
// fix:
|
/* fix: */
|
||||||
#if defined(_UNICODE) && !defined(UNICODE)
|
#if defined(_UNICODE) && !defined(UNICODE)
|
||||||
#define UNICODE
|
#define UNICODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
/*
|
||||||
// If there isn't good enough wide character support then there will
|
* If there isn't good enough wide character support then there will
|
||||||
// be no wide character regular expressions:
|
* be no wide character regular expressions:
|
||||||
//
|
*/
|
||||||
#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
|
#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
|
||||||
# if !defined(BOOST_NO_WREGEX)
|
# if !defined(BOOST_NO_WREGEX)
|
||||||
# define BOOST_NO_WREGEX
|
# define BOOST_NO_WREGEX
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||||
// STLPort on IRIX is misconfigured: <cwctype> does not compile
|
/* STLPort on IRIX is misconfigured: <cwctype> does not compile
|
||||||
// as a temporary fix include <wctype.h> instead and prevent inclusion
|
* as a temporary fix include <wctype.h> instead and prevent inclusion
|
||||||
// of STLPort version of <cwctype>
|
* of STLPort version of <cwctype> */
|
||||||
# include <wctype.h>
|
# include <wctype.h>
|
||||||
# define __STLPORT_CWCTYPE
|
# define __STLPORT_CWCTYPE
|
||||||
# define _STLP_CWCTYPE
|
# define _STLP_CWCTYPE
|
||||||
@ -110,34 +110,34 @@
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
/*
|
||||||
// If Win32 support has been disabled for boost in general, then
|
* If Win32 support has been disabled for boost in general, then
|
||||||
// it is for regex in particular:
|
* it is for regex in particular:
|
||||||
//
|
*/
|
||||||
#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
||||||
# define BOOST_REGEX_NO_W32
|
# define BOOST_REGEX_NO_W32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// some versions of gcc can't merge template instances:
|
/* some versions of gcc can't merge template instances: */
|
||||||
#if defined(__CYGWIN__)
|
#if defined(__CYGWIN__)
|
||||||
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// fix problems with bool as a macro,
|
/* fix problems with bool as a macro,
|
||||||
// this probably doesn't affect any current compilers:
|
* this probably doesn't affect any current compilers: */
|
||||||
#if defined(bool) || defined(true) || defined(false)
|
#if defined(bool) || defined(true) || defined(false)
|
||||||
# define BOOST_REGEX_NO_BOOL
|
# define BOOST_REGEX_NO_BOOL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We don't make our templates external if the compiler
|
/* We don't make our templates external if the compiler
|
||||||
// can't handle it:
|
can't handle it: */
|
||||||
#if (defined(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS) || defined(__HP_aCC) || defined(__MWERKS__) || defined(__COMO__) || defined(BOOST_INTEL))\
|
#if (defined(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS) || defined(__HP_aCC) || defined(__MWERKS__) || defined(__COMO__) || defined(BOOST_INTEL))\
|
||||||
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__)
|
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__)
|
||||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// disable our own file-iterators and mapfiles if we can't
|
/* disable our own file-iterators and mapfiles if we can't
|
||||||
// support them:
|
support them: */
|
||||||
#if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
|
#if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
|
||||||
# define BOOST_REGEX_NO_FILEITER
|
# define BOOST_REGEX_NO_FILEITER
|
||||||
#endif
|
#endif
|
||||||
|
@ -252,8 +252,11 @@ public:
|
|||||||
std::string What(int i = 0)const;
|
std::string What(int i = 0)const;
|
||||||
std::string operator[](int i)const { return What(i); }
|
std::string operator[](int i)const { return What(i); }
|
||||||
|
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
static const std::size_t npos = ~0u;
|
||||||
|
#else
|
||||||
static const std::size_t npos;
|
static const std::size_t npos;
|
||||||
|
#endif
|
||||||
friend struct re_detail::pred1;
|
friend struct re_detail::pred1;
|
||||||
friend struct re_detail::pred2;
|
friend struct re_detail::pred2;
|
||||||
friend struct re_detail::pred3;
|
friend struct re_detail::pred3;
|
||||||
|
Reference in New Issue
Block a user