forked from boostorg/regex
Compare commits
6 Commits
boost-1.45
...
sandbox-br
Author | SHA1 | Date | |
---|---|---|---|
ad7046fa0b | |||
9f9ce59d57 | |||
2686ab22a2 | |||
75b99d3a37 | |||
bae1c80992 | |||
e3ca2987e4 |
@ -192,15 +192,22 @@ if [ check-icu-config ]
|
||||
if $(gHAS_ICU)
|
||||
{
|
||||
BOOST_REGEX_ICU_OPTS = "<target-os>freebsd:<include>/usr/local/include" ;
|
||||
ICU_SEARCH_OPTS = "<target-os>freebsd:<search>/$(ICU_PATH)/lib" ;
|
||||
ICU_SEARCH_OPTS = "<target-os>freebsd:<search>$(ICU_PATH)/lib" ;
|
||||
BOOST_REGEX_ICU_OPTS += "<define>BOOST_HAS_ICU=1" ;
|
||||
|
||||
if $(ICU_PATH)
|
||||
{
|
||||
# If ICU_PATH is specified on the command line, then it's
|
||||
# relative to the current directory, while paths specified
|
||||
# in a Jamfile are relative to that Jamfile. So, to
|
||||
# avoid confusing the user if he's not running from
|
||||
# libs/regex/build, explicitly root this.
|
||||
ICU_PATH = [ path.native
|
||||
[ path.root [ path.make $(ICU_PATH) ] [ path.pwd ] ] ] ;
|
||||
if $(ICU_PATH) != "/usr" && $(ICU_PATH) != "/usr/local"
|
||||
{
|
||||
BOOST_REGEX_ICU_OPTS += "<include>$(ICU_PATH)/include" ;
|
||||
ICU_SEARCH_OPTS = <search>/$(ICU_PATH)/lib ;
|
||||
ICU_SEARCH_OPTS = <search>$(ICU_PATH)/lib ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,17 +228,20 @@ if $(gHAS_ICU)
|
||||
{
|
||||
lib icucore : : <name>$(gICU_CORE_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
|
||||
ICU_EXTRA_SOURCE = icucore ;
|
||||
explicit icucore ;
|
||||
}
|
||||
if $(gICU_IN_LIB)
|
||||
{
|
||||
lib icuin : : <name>$(gICU_IN_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
|
||||
ICU_EXTRA_SOURCE += icuin ;
|
||||
explicit icuin ;
|
||||
}
|
||||
#Added by Tommy Nordgren libicudata must be linked against on Mac OS X
|
||||
if $(gICU_DATA_LIB)
|
||||
{
|
||||
lib icudata : : <name>$(gICU_DATA_LIB) $(ICU_SEARCH_OPTS) <link>shared ;
|
||||
ICU_EXTRA_SOURCE += icudata ;
|
||||
explicit icudata ;
|
||||
}
|
||||
#End of addition by Tommy Nordgren
|
||||
}
|
||||
@ -267,9 +277,36 @@ lib boost_regex : ../src/$(SOURCES) $(ICU_EXTRA_SOURCE) icu_config2 icu_config
|
||||
<toolset>gcc-mingw:<link>static
|
||||
<toolset>gcc-cygwin:<link>static
|
||||
$(BOOST_REGEX_ICU_OPTS)
|
||||
<conditional>@force-shared-linking
|
||||
;
|
||||
|
||||
shared-linking-warning-emitted = ;
|
||||
|
||||
# The ICU is shipped as shared libraries with dynamic runtime.
|
||||
# If Boost.Regex is built against static runtime, the combination
|
||||
# will not work. The below rule forces shared runtime, and
|
||||
# prints an explanation.
|
||||
rule force-shared-linking ( properties * )
|
||||
{
|
||||
if $(gHAS_ICU)
|
||||
{
|
||||
if <runtime-link>static in $(properties)
|
||||
{
|
||||
if ! $(shared-linking-warning-emitted)
|
||||
{
|
||||
shared-linking-warning-emitted = 1 ;
|
||||
ECHO "warning: forcing runtime-link=shared for Boost.Regex" ;
|
||||
ECHO "warning: this is required when using the ICU library" ;
|
||||
}
|
||||
}
|
||||
return <runtime-link>shared ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
alias icu_options : $(ICU_EXTRA_SOURCE) : : : $(BOOST_REGEX_ICU_OPTS) ;
|
||||
explicit icu_options ;
|
||||
|
||||
boost-install boost_regex ;
|
||||
|
||||
|
@ -2008,7 +2008,7 @@ insert_recursion:
|
||||
v = static_cast<int>(hash_value_from_capture_name(base, m_position));
|
||||
re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
|
||||
br->index = v;
|
||||
if((*m_position != charT('>')) && (*m_position != charT('\'')) || (++m_position == m_end))
|
||||
if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end))
|
||||
{
|
||||
fail(regex_constants::error_badrepeat, m_position - m_base);
|
||||
return false;
|
||||
|
@ -157,7 +157,7 @@ void scoped_static_mutex_lock::lock()
|
||||
{
|
||||
boost::call_once(static_mutex::m_once,&static_mutex::init);
|
||||
if(0 == m_plock)
|
||||
m_plock = new boost::recursive_mutex::scoped_lock(*static_mutex::m_pmutex, false);
|
||||
m_plock = new boost::recursive_mutex::scoped_lock(*static_mutex::m_pmutex, boost::defer_lock);
|
||||
m_plock->lock();
|
||||
m_have_lock = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user