summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-11 18:19:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-11 19:20:07 (GMT)
commit857e44c156a1dbefcb49bb5792c4384cebd8762a (patch)
tree11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/libs
parent77d4eb7588e113beaa03f3347523b26adefdeb06 (diff)
downloadswift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip
swift-contrib-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/libs')
-rw-r--r--3rdParty/Boost/src/libs/detail/utf8_codecvt_facet.cpp26
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/operations.cpp45
-rw-r--r--3rdParty/Boost/src/libs/regex/src/c_regex_traits.cpp10
-rw-r--r--3rdParty/Boost/src/libs/regex/src/cpp_regex_traits.cpp2
-rw-r--r--3rdParty/Boost/src/libs/regex/src/cregex.cpp6
-rw-r--r--3rdParty/Boost/src/libs/regex/src/fileiter.cpp21
-rw-r--r--3rdParty/Boost/src/libs/regex/src/icu.cpp8
-rw-r--r--3rdParty/Boost/src/libs/regex/src/posix_api.cpp1
-rw-r--r--3rdParty/Boost/src/libs/regex/src/regex_traits_defaults.cpp62
-rw-r--r--3rdParty/Boost/src/libs/regex/src/static_mutex.cpp6
-rw-r--r--3rdParty/Boost/src/libs/regex/src/usinstances.cpp6
-rw-r--r--3rdParty/Boost/src/libs/regex/src/wc_regex_traits.cpp13
-rw-r--r--3rdParty/Boost/src/libs/regex/src/wide_posix_api.cpp1
-rw-r--r--3rdParty/Boost/src/libs/signals/src/named_slot_map.cpp2
-rw-r--r--3rdParty/Boost/src/libs/system/src/error_code.cpp6
-rw-r--r--3rdParty/Boost/src/libs/thread/src/pthread/exceptions.cpp124
-rw-r--r--3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp158
-rw-r--r--3rdParty/Boost/src/libs/thread/src/win32/exceptions.cpp124
-rw-r--r--3rdParty/Boost/src/libs/thread/src/win32/thread.cpp2
19 files changed, 180 insertions, 443 deletions
diff --git a/3rdParty/Boost/src/libs/detail/utf8_codecvt_facet.cpp b/3rdParty/Boost/src/libs/detail/utf8_codecvt_facet.cpp
index 658ab6a..7ea5eeb 100644
--- a/3rdParty/Boost/src/libs/detail/utf8_codecvt_facet.cpp
+++ b/3rdParty/Boost/src/libs/detail/utf8_codecvt_facet.cpp
@@ -159,7 +159,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_out(
to_next = to - (i+1);
return std::codecvt_base::partial;
}
- *from++;
+ ++from;
}
from_next = from;
to_next = to;
@@ -231,9 +231,6 @@ int get_cont_octet_out_count_impl(wchar_t word){
return 2;
}
-// note the following code will generate on some platforms where
-// wchar_t is defined as UCS2. The warnings are superfluous as
-// the specialization is never instantitiated with such compilers.
template<>
int get_cont_octet_out_count_impl<4>(wchar_t word){
if (word < 0x80) {
@@ -242,7 +239,22 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){
if (word < 0x800) {
return 1;
}
- if (word < 0x10000) {
+
+ // Note that the following code will generate warnings on some platforms
+ // where wchar_t is defined as UCS2. The warnings are superfluous as the
+ // specialization is never instantitiated with such compilers, but this
+ // can cause problems if warnings are being treated as errors, so we guard
+ // against that. Including <boost/detail/utf8_codecvt_facet.hpp> as we do
+ // should be enough to get WCHAR_MAX defined.
+#if !defined(WCHAR_MAX)
+# error WCHAR_MAX not defined!
+#endif
+ // cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
+#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
+ return 2;
+#elif WCHAR_MAX > 0x10000
+
+ if (word < 0x10000) {
return 2;
}
if (word < 0x200000) {
@@ -252,6 +264,10 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){
return 4;
}
return 5;
+
+#else
+ return 2;
+#endif
}
} // namespace anonymous
diff --git a/3rdParty/Boost/src/libs/filesystem/src/operations.cpp b/3rdParty/Boost/src/libs/filesystem/src/operations.cpp
index 0c74504..d0655b9 100644
--- a/3rdParty/Boost/src/libs/filesystem/src/operations.cpp
+++ b/3rdParty/Boost/src/libs/filesystem/src/operations.cpp
@@ -54,14 +54,7 @@ using boost::system::system_category;
# if defined(BOOST_WINDOWS_API)
# include <windows.h>
-# if defined(__BORLANDC__) || defined(__MWERKS__)
-# if defined(__BORLANDC__)
- using std::time_t;
-# endif
-# include <utime.h>
-# else
-# include <sys/utime.h>
-# endif
+# include <ctime> // for time_t
# else // BOOST_POSIX_API
# include <sys/types.h>
@@ -706,9 +699,9 @@ namespace boost
}
BOOST_FILESYSTEM_DECL error_code
- copy_file_api( const std::wstring & from, const std::wstring & to )
+ copy_file_api( const std::wstring & from, const std::wstring & to, bool fail_if_exists )
{
- return error_code( ::CopyFileW( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
+ return error_code( ::CopyFileW( from.c_str(), to.c_str(), fail_if_exists )
? 0 : ::GetLastError(), system_category );
}
@@ -886,9 +879,9 @@ namespace boost
}
BOOST_FILESYSTEM_DECL error_code
- copy_file_api( const std::string & from, const std::string & to )
+ copy_file_api( const std::string & from, const std::string & to, bool fail_if_exists )
{
- return error_code( ::CopyFileA( from.c_str(), to.c_str(), /*fail_if_exists=*/true )
+ return error_code( ::CopyFileA( from.c_str(), to.c_str(), fail_if_exists )
? 0 : ::GetLastError(), system_category );
}
@@ -1203,22 +1196,30 @@ namespace boost
BOOST_FILESYSTEM_DECL error_code
copy_file_api( const std::string & from_file_ph,
- const std::string & to_file_ph )
+ const std::string & to_file_ph, bool fail_if_exists )
{
const std::size_t buf_sz = 32768;
boost::scoped_array<char> buf( new char [buf_sz] );
int infile=-1, outfile=-1; // -1 means not open
+
+ // bug fixed: code previously did a stat() on the from_file first, but that
+ // introduced a gratuitous race condition; the stat() is now done after the open()
+
+ if ( (infile = ::open( from_file_ph.c_str(), O_RDONLY )) < 0 )
+ { return error_code( errno, system_category ); }
+
struct stat from_stat;
+ if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0 )
+ { return error_code( errno, system_category ); }
- if ( ::stat( from_file_ph.c_str(), &from_stat ) != 0
- || (infile = ::open( from_file_ph.c_str(),
- O_RDONLY )) < 0
- || (outfile = ::open( to_file_ph.c_str(),
- O_WRONLY | O_CREAT | O_EXCL,
- from_stat.st_mode )) < 0 )
+ int oflag = O_CREAT | O_WRONLY;
+ if ( fail_if_exists ) oflag |= O_EXCL;
+ if ( (outfile = ::open( to_file_ph.c_str(), oflag, from_stat.st_mode )) < 0 )
{
- if ( infile >= 0 ) ::close( infile );
- return error_code( errno, system_category );
+ int open_errno = errno;
+ BOOST_ASSERT( infile >= 0 );
+ ::close( infile );
+ return error_code( open_errno, system_category );
}
ssize_t sz, sz_read=1, sz_write;
@@ -1281,7 +1282,7 @@ namespace boost
target = std::string( "." ); // string was static but caused trouble
// when iteration called from dtor, after
// static had already been destroyed
- std::size_t path_size;
+ std::size_t path_size (0); // initialization quiets gcc warning
error_code ec = path_max( path_size );
if ( ec ) return ec;
dirent de;
diff --git a/3rdParty/Boost/src/libs/regex/src/c_regex_traits.cpp b/3rdParty/Boost/src/libs/regex/src/c_regex_traits.cpp
index da960eb..6466bc4 100644
--- a/3rdParty/Boost/src/libs/regex/src/c_regex_traits.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/c_regex_traits.cpp
@@ -122,7 +122,9 @@ enum
char_class_graph=char_class_alnum|char_class_punct,
char_class_blank=1<<9,
char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal=1<<12,
+ char_class_vertical=1<<13
};
c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_classname(const char* p1, const char* p2)
@@ -137,6 +139,7 @@ c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::loo
char_class_digit,
char_class_digit,
char_class_graph,
+ char_class_horizontal,
char_class_lower,
char_class_lower,
char_class_print,
@@ -146,6 +149,7 @@ c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::loo
char_class_upper,
char_class_unicode,
char_class_upper,
+ char_class_vertical,
char_class_alnum | char_class_word,
char_class_alnum | char_class_word,
char_class_xdigit,
@@ -176,7 +180,9 @@ bool BOOST_REGEX_CALL c_regex_traits<char>::isctype(char c, char_class_type mask
|| ((mask & char_class_punct) && (std::ispunct)(static_cast<unsigned char>(c)))
|| ((mask & char_class_xdigit) && (std::isxdigit)(static_cast<unsigned char>(c)))
|| ((mask & char_class_blank) && (std::isspace)(static_cast<unsigned char>(c)) && !::boost::re_detail::is_separator(c))
- || ((mask & char_class_word) && (c == '_'));
+ || ((mask & char_class_word) && (c == '_'))
+ || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v')))
+ || ((mask & char_class_horizontal) && (std::isspace)(static_cast<unsigned char>(c)) && !::boost::re_detail::is_separator(c) && (c != '\v'));
}
c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_collatename(const char* p1, const char* p2)
diff --git a/3rdParty/Boost/src/libs/regex/src/cpp_regex_traits.cpp b/3rdParty/Boost/src/libs/regex/src/cpp_regex_traits.cpp
index 9ed66be..1d24cc1 100644
--- a/3rdParty/Boost/src/libs/regex/src/cpp_regex_traits.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/cpp_regex_traits.cpp
@@ -42,7 +42,7 @@ void cpp_regex_traits_char_layer<char>::init()
std::messages<char>::catalog cat = reinterpret_cast<std::messages<char>::catalog>(-1);
#endif
std::string cat_name(cpp_regex_traits<char>::get_catalog_name());
- if(cat_name.size())
+ if(cat_name.size() && (m_pmessages != 0))
{
cat = this->m_pmessages->open(
cat_name,
diff --git a/3rdParty/Boost/src/libs/regex/src/cregex.cpp b/3rdParty/Boost/src/libs/regex/src/cregex.cpp
index fb12373..f67d371 100644
--- a/3rdParty/Boost/src/libs/regex/src/cregex.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/cregex.cpp
@@ -563,11 +563,7 @@ std::string RegEx::What(int i)const
return result;
}
-#ifdef BOOST_HAS_LONG_LONG
-const std::size_t RegEx::npos = static_cast<std::size_t>(~0ULL);
-#else
-const std::size_t RegEx::npos = static_cast<std::size_t>(~0UL);
-#endif
+const std::size_t RegEx::npos = ~static_cast<std::size_t>(0);
} // namespace boost
diff --git a/3rdParty/Boost/src/libs/regex/src/fileiter.cpp b/3rdParty/Boost/src/libs/regex/src/fileiter.cpp
index 7d9c7f8..ff1d111 100644
--- a/3rdParty/Boost/src/libs/regex/src/fileiter.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/fileiter.cpp
@@ -258,11 +258,22 @@ void mapfile::lock(pointer* node)const
*p = 0;
*(reinterpret_cast<int*>(*node)) = 1;
}
- std::fseek(hfile, (node - _first) * buf_size, SEEK_SET);
- if(node == _last - 1)
- std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
- else
- std::fread(*node + sizeof(int), buf_size, 1, hfile);
+
+ std::size_t read_size = 0;
+ int read_pos = std::fseek(hfile, (node - _first) * buf_size, SEEK_SET);
+
+ if(0 == read_pos && node == _last - 1)
+ read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
+ else
+ read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile);
+#ifndef BOOST_NO_EXCEPTIONS
+ if((read_size == 0) || (std::ferror(hfile)))
+ {
+ throw std::runtime_error("Unable to read file.");
+ }
+#else
+ BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0));
+#endif
}
else
{
diff --git a/3rdParty/Boost/src/libs/regex/src/icu.cpp b/3rdParty/Boost/src/libs/regex/src/icu.cpp
index e06c317..a815e91 100644
--- a/3rdParty/Boost/src/libs/regex/src/icu.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/icu.cpp
@@ -101,6 +101,8 @@ const icu_regex_traits::char_class_type icu_regex_traits::mask_underscore = icu_
const icu_regex_traits::char_class_type icu_regex_traits::mask_unicode = icu_regex_traits::char_class_type(1) << offset_unicode;
const icu_regex_traits::char_class_type icu_regex_traits::mask_any = icu_regex_traits::char_class_type(1) << offset_any;
const icu_regex_traits::char_class_type icu_regex_traits::mask_ascii = icu_regex_traits::char_class_type(1) << offset_ascii;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_horizontal = icu_regex_traits::char_class_type(1) << offset_horizontal;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_vertical = icu_regex_traits::char_class_type(1) << offset_vertical;
icu_regex_traits::char_class_type icu_regex_traits::lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2)
{
@@ -370,6 +372,7 @@ icu_regex_traits::char_class_type icu_regex_traits::lookup_classname(const char_
U_GC_ND_MASK,
U_GC_ND_MASK,
(0x3FFFFFFFu) & ~(U_GC_CC_MASK | U_GC_CF_MASK | U_GC_CS_MASK | U_GC_CN_MASK | U_GC_Z_MASK),
+ mask_horizontal,
U_GC_LL_MASK,
U_GC_LL_MASK,
~(U_GC_C_MASK),
@@ -379,6 +382,7 @@ icu_regex_traits::char_class_type icu_regex_traits::lookup_classname(const char_
U_GC_LU_MASK,
mask_unicode,
U_GC_LU_MASK,
+ mask_vertical,
char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
char_class_type(U_GC_ND_MASK) | mask_xdigit,
@@ -487,6 +491,10 @@ bool icu_regex_traits::isctype(char_type c, char_class_type f) const
return true;
if(((f & mask_ascii) != 0) && (c <= 0x7F))
return true;
+ if(((f & mask_vertical) != 0) && (::boost::re_detail::is_separator(c) || (c == static_cast<char_type>('\v')) || (m == U_GC_ZL_MASK) || (m == U_GC_ZP_MASK)))
+ return true;
+ if(((f & mask_horizontal) != 0) && !::boost::re_detail::is_separator(c) && u_isspace(c) && (c != static_cast<char_type>('\v')))
+ return true;
return false;
}
diff --git a/3rdParty/Boost/src/libs/regex/src/posix_api.cpp b/3rdParty/Boost/src/libs/regex/src/posix_api.cpp
index 1564ced..37ed422 100644
--- a/3rdParty/Boost/src/libs/regex/src/posix_api.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/posix_api.cpp
@@ -58,6 +58,7 @@ const char* names[] = {
"REG_EMPTY",
"REG_ECOMPLEXITY",
"REG_ESTACK",
+ "REG_E_PERL",
"REG_E_UNKNOWN",
};
} // namespace
diff --git a/3rdParty/Boost/src/libs/regex/src/regex_traits_defaults.cpp b/3rdParty/Boost/src/libs/regex/src/regex_traits_defaults.cpp
index 8f76c09..31b7918 100644
--- a/3rdParty/Boost/src/libs/regex/src/regex_traits_defaults.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/regex_traits_defaults.cpp
@@ -100,6 +100,9 @@ BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants
"p",
"P",
"N",
+ "g",
+ "K",
+ "R",
};
return ((n >= (sizeof(messages) / sizeof(messages[1]))) ? "" : messages[n]);
@@ -108,30 +111,31 @@ BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants
BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n)
{
static const char* const s_default_error_messages[] = {
- "Success", /* REG_NOERROR */
- "No match", /* REG_NOMATCH */
- "Invalid regular expression", /* REG_BADPAT */
- "Invalid collation character", /* REG_ECOLLATE */
- "Invalid character class name", /* REG_ECTYPE */
- "Invalid or trailing backslash", /* REG_EESCAPE */
- "Invalid back reference", /* REG_ESUBREG */
- "Unmatched [ or [^", /* REG_EBRACK */
- "Unmatched ( or \\(", /* REG_EPAREN */
- "Unmatched { or \\{", /* REG_EBRACE */
- "Invalid content of repeat range", /* REG_BADBR */
- "Invalid range end", /* REG_ERANGE */
- "Memory exhausted", /* REG_ESPACE */
- "Invalid preceding regular expression", /* REG_BADRPT */
- "Premature end of regular expression", /* REG_EEND */
- "Regular expression too big", /* REG_ESIZE */
- "Unmatched ) or \\)", /* REG_ERPAREN */
- "Empty expression", /* REG_EMPTY */
- "Complexity requirements exceeded", /* REG_ECOMPLEXITY */
- "Out of stack space", /* REG_ESTACK */
- "Unknown error", /* REG_E_UNKNOWN */
- "",
- "",
- "",
+ "Success", /* REG_NOERROR 0 error_ok */
+ "No match", /* REG_NOMATCH 1 error_no_match */
+ "Invalid regular expression.", /* REG_BADPAT 2 error_bad_pattern */
+ "Invalid collation character.", /* REG_ECOLLATE 3 error_collate */
+ "Invalid character class name, collating name, or character range.", /* REG_ECTYPE 4 error_ctype */
+ "Invalid or unterminated escape sequence.", /* REG_EESCAPE 5 error_escape */
+ "Invalid back reference: specified capturing group does not exist.", /* REG_ESUBREG 6 error_backref */
+ "Unmatched [ or [^ in character class declaration.", /* REG_EBRACK 7 error_brack */
+ "Unmatched marking parenthesis ( or \\(.", /* REG_EPAREN 8 error_paren */
+ "Unmatched quantified repeat operator { or \\{.", /* REG_EBRACE 9 error_brace */
+ "Invalid content of repeat range.", /* REG_BADBR 10 error_badbrace */
+ "Invalid range end in character class", /* REG_ERANGE 11 error_range */
+ "Out of memory.", /* REG_ESPACE 12 error_space NOT USED */
+ "Invalid preceding regular expression prior to repetition operator.", /* REG_BADRPT 13 error_badrepeat */
+ "Premature end of regular expression", /* REG_EEND 14 error_end NOT USED */
+ "Regular expression is too large.", /* REG_ESIZE 15 error_size NOT USED */
+ "Unmatched ) or \\)", /* REG_ERPAREN 16 error_right_paren NOT USED */
+ "Empty regular expression.", /* REG_EMPTY 17 error_empty */
+ "The complexity of matching the regular expression exceeded predefined bounds. "
+ "Try refactoring the regular expression to make each choice made by the state machine unambiguous. "
+ "This exception is thrown to prevent \"eternal\" matches that take an "
+ "indefinite period time to locate.", /* REG_ECOMPLEXITY 18 error_complexity */
+ "Ran out of stack space trying to match the regular expression.", /* REG_ESTACK 19 error_stack */
+ "Invalid or unterminated Perl (?...) sequence.", /* REG_E_PERL 20 error_perl */
+ "Unknown error.", /* REG_E_UNKNOWN 21 error_unknown */
};
return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[ ::boost::regex_constants::error_unknown] : s_default_error_messages[n];
@@ -375,14 +379,14 @@ BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_defaul
regex_constants::escape_type_not_class, /*H*/
regex_constants::escape_type_not_class, /*I*/
regex_constants::escape_type_not_class, /*J*/
- regex_constants::escape_type_not_class, /*K*/
+ regex_constants::escape_type_reset_start_mark, /*K*/
regex_constants::escape_type_not_class, /*L*/
regex_constants::escape_type_not_class, /*M*/
regex_constants::escape_type_named_char, /*N*/
regex_constants::escape_type_not_class, /*O*/
regex_constants::escape_type_not_property, /*P*/
regex_constants::escape_type_Q, /*Q*/
- regex_constants::escape_type_not_class, /*R*/
+ regex_constants::escape_type_line_ending, /*R*/
regex_constants::escape_type_not_class, /*S*/
regex_constants::escape_type_not_class, /*T*/
regex_constants::escape_type_not_class, /*U*/
@@ -403,11 +407,11 @@ BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_defaul
regex_constants::escape_type_class, /*d*/
regex_constants::escape_type_e, /*e*/
regex_constants::escape_type_control_f, /*f*/
- regex_constants::escape_type_class, /*g*/
+ regex_constants::escape_type_extended_backref, /*g*/
regex_constants::escape_type_class, /*h*/
regex_constants::escape_type_class, /*i*/
regex_constants::escape_type_class, /*j*/
- regex_constants::escape_type_class, /*k*/
+ regex_constants::escape_type_extended_backref, /*k*/
regex_constants::escape_type_class, /*l*/
regex_constants::escape_type_class, /*m*/
regex_constants::escape_type_control_n, /*n*/
@@ -534,7 +538,7 @@ BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_synta
regex_constants::syntax_dollar, /*$*/
regex_constants::syntax_char, /*%*/
regex_constants::syntax_char, /*&*/
- regex_constants::syntax_char, /*'*/
+ regex_constants::escape_type_end_buffer, /*'*/
regex_constants::syntax_open_mark, /*(*/
regex_constants::syntax_close_mark, /*)*/
regex_constants::syntax_star, /***/
diff --git a/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp b/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
index cef7678..d14feb1 100644
--- a/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/static_mutex.cpp
@@ -124,7 +124,7 @@ void scoped_static_mutex_lock::unlock()
boost::recursive_mutex* static_mutex::m_pmutex = 0;
boost::once_flag static_mutex::m_once = BOOST_ONCE_INIT;
-extern "C" BOOST_REGEX_DECL void free_static_mutex()
+extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex()
{
delete static_mutex::m_pmutex;
static_mutex::m_pmutex = 0;
@@ -133,7 +133,7 @@ extern "C" BOOST_REGEX_DECL void free_static_mutex()
void static_mutex::init()
{
m_pmutex = new boost::recursive_mutex();
- int r = atexit(free_static_mutex);
+ int r = atexit(boost_regex_free_static_mutex);
BOOST_ASSERT(0 == r);
}
@@ -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;
}
diff --git a/3rdParty/Boost/src/libs/regex/src/usinstances.cpp b/3rdParty/Boost/src/libs/regex/src/usinstances.cpp
index 5665366..44ebd28 100644
--- a/3rdParty/Boost/src/libs/regex/src/usinstances.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/usinstances.cpp
@@ -17,13 +17,17 @@
*/
#define BOOST_REGEX_SOURCE
+#ifdef _MSC_VER
+#pragma warning(disable:4506) // 'no definition for inline function'
+#endif
#include <boost/detail/workaround.hpp>
#include <memory>
#include <string>
#if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \
- && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
+ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\
+ && BOOST_WORKAROUND(BOOST_MSVC, <1600)
//
// This is a horrible workaround, but without declaring these symbols extern we get
// duplicate symbol errors when linking if the application is built without
diff --git a/3rdParty/Boost/src/libs/regex/src/wc_regex_traits.cpp b/3rdParty/Boost/src/libs/regex/src/wc_regex_traits.cpp
index 3640f29..fb622b5 100644
--- a/3rdParty/Boost/src/libs/regex/src/wc_regex_traits.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/wc_regex_traits.cpp
@@ -24,7 +24,8 @@
#include <string>
#if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \
- && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))
+ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\
+ && BOOST_WORKAROUND(BOOST_MSVC, <1600)
//
// This is a horrible workaround, but without declaring these symbols extern we get
// duplicate symbol errors when linking if the application is built without
@@ -161,7 +162,9 @@ enum
char_class_graph=char_class_alnum|char_class_punct,
char_class_blank=1<<9,
char_class_word=1<<10,
- char_class_unicode=1<<11
+ char_class_unicode=1<<11,
+ char_class_horizontal=1<<12,
+ char_class_vertical=1<<13
};
c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_classname(const wchar_t* p1, const wchar_t* p2)
@@ -176,6 +179,7 @@ c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<wchar_t
char_class_digit,
char_class_digit,
char_class_graph,
+ char_class_horizontal,
char_class_lower,
char_class_lower,
char_class_print,
@@ -185,6 +189,7 @@ c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<wchar_t
char_class_upper,
char_class_unicode,
char_class_upper,
+ char_class_vertical,
char_class_alnum | char_class_word,
char_class_alnum | char_class_word,
char_class_xdigit,
@@ -216,7 +221,9 @@ bool BOOST_REGEX_CALL c_regex_traits<wchar_t>::isctype(wchar_t c, char_class_typ
|| ((mask & char_class_xdigit) && (std::iswxdigit)(c))
|| ((mask & char_class_blank) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c))
|| ((mask & char_class_word) && (c == '_'))
- || ((mask & char_class_unicode) && (c & ~static_cast<wchar_t>(0xff)));
+ || ((mask & char_class_unicode) && (c & ~static_cast<wchar_t>(0xff)))
+ || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == L'\v')))
+ || ((mask & char_class_horizontal) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c) && (c != L'\v'));
}
c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_collatename(const wchar_t* p1, const wchar_t* p2)
diff --git a/3rdParty/Boost/src/libs/regex/src/wide_posix_api.cpp b/3rdParty/Boost/src/libs/regex/src/wide_posix_api.cpp
index c8a9190..bdb7580 100644
--- a/3rdParty/Boost/src/libs/regex/src/wide_posix_api.cpp
+++ b/3rdParty/Boost/src/libs/regex/src/wide_posix_api.cpp
@@ -65,6 +65,7 @@ const wchar_t* wnames[] = {
L"REG_EMPTY",
L"REG_ECOMPLEXITY",
L"REG_ESTACK",
+ L"REG_E_PERL",
L"REG_E_UNKNOWN",
};
}
diff --git a/3rdParty/Boost/src/libs/signals/src/named_slot_map.cpp b/3rdParty/Boost/src/libs/signals/src/named_slot_map.cpp
index 85a4bda..1ddde63 100644
--- a/3rdParty/Boost/src/libs/signals/src/named_slot_map.cpp
+++ b/3rdParty/Boost/src/libs/signals/src/named_slot_map.cpp
@@ -24,7 +24,7 @@ typedef slot_container_type::iterator group_iterator;
typedef slot_container_type::const_iterator const_group_iterator;
-#if BOOST_WORKAROUND(_MSC_VER, <= 1500)
+#if BOOST_WORKAROUND(_MSC_VER, <= 1600)
void named_slot_map_iterator::decrement() { assert(false); }
void named_slot_map_iterator::advance(difference_type) { assert(false); }
#endif
diff --git a/3rdParty/Boost/src/libs/system/src/error_code.cpp b/3rdParty/Boost/src/libs/system/src/error_code.cpp
index 030ab70..fa2cb0b 100644
--- a/3rdParty/Boost/src/libs/system/src/error_code.cpp
+++ b/3rdParty/Boost/src/libs/system/src/error_code.cpp
@@ -23,7 +23,7 @@
#include <cassert>
using namespace boost::system;
-using namespace boost::system::posix_error;
+using namespace boost::system::errc;
#include <cstring> // for strerror/strerror_r
@@ -193,7 +193,7 @@ namespace
case EIO: return make_error_condition( io_error );
case EISCONN: return make_error_condition( already_connected );
case EISDIR: return make_error_condition( is_a_directory );
- case ELOOP: return make_error_condition( too_many_synbolic_link_levels );
+ case ELOOP: return make_error_condition( too_many_symbolic_link_levels );
case EMFILE: return make_error_condition( too_many_files_open );
case EMLINK: return make_error_condition( too_many_links );
case EMSGSIZE: return make_error_condition( message_size );
@@ -411,11 +411,13 @@ namespace boost
namespace system
{
+# ifndef BOOST_SYSTEM_NO_DEPRECATED
BOOST_SYSTEM_DECL error_code throws; // "throw on error" special error_code;
// note that it doesn't matter if this
// isn't initialized before use since
// the only use is to take its
// address for comparison purposes
+# endif
BOOST_SYSTEM_DECL const error_category & get_system_category()
{
diff --git a/3rdParty/Boost/src/libs/thread/src/pthread/exceptions.cpp b/3rdParty/Boost/src/libs/thread/src/pthread/exceptions.cpp
deleted file mode 100644
index 8881303..0000000
--- a/3rdParty/Boost/src/libs/thread/src/pthread/exceptions.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (C) 2001-2003
-// William E. Kempf
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/exceptions.hpp>
-#include <cstring>
-#include <string>
-
-namespace boost {
-
-thread_exception::thread_exception()
- : m_sys_err(0)
-{
-}
-
-thread_exception::thread_exception(int sys_err_code)
- : m_sys_err(sys_err_code)
-{
-}
-
-thread_exception::~thread_exception() throw()
-{
-}
-
-int thread_exception::native_error() const
-{
- return m_sys_err;
-}
-
-lock_error::lock_error()
-{
-}
-
-lock_error::lock_error(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-lock_error::~lock_error() throw()
-{
-}
-
-const char* lock_error::what() const throw()
-{
- return "boost::lock_error";
-}
-
-thread_resource_error::thread_resource_error()
-{
-}
-
-thread_resource_error::thread_resource_error(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-thread_resource_error::~thread_resource_error() throw()
-{
-}
-
-const char* thread_resource_error::what() const throw()
-{
- return "boost::thread_resource_error";
-}
-
-unsupported_thread_option::unsupported_thread_option()
-{
-}
-
-unsupported_thread_option::unsupported_thread_option(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-unsupported_thread_option::~unsupported_thread_option() throw()
-{
-}
-
-const char* unsupported_thread_option::what() const throw()
-{
- return "boost::unsupported_thread_option";
-}
-
-invalid_thread_argument::invalid_thread_argument()
-{
-}
-
-invalid_thread_argument::invalid_thread_argument(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-invalid_thread_argument::~invalid_thread_argument() throw()
-{
-}
-
-const char* invalid_thread_argument::what() const throw()
-{
- return "boost::invalid_thread_argument";
-}
-
-thread_permission_error::thread_permission_error()
-{
-}
-
-thread_permission_error::thread_permission_error(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-thread_permission_error::~thread_permission_error() throw()
-{
-}
-
-const char* thread_permission_error::what() const throw()
-{
- return "boost::thread_permission_error";
-}
-
-} // namespace boost
diff --git a/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp b/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp
index cc71d97..3a5ce7c 100644
--- a/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp
+++ b/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp
@@ -42,19 +42,6 @@ namespace boost
{}
};
- struct tss_data_node
- {
- void const* key;
- boost::shared_ptr<boost::detail::tss_cleanup_function> func;
- void* value;
- tss_data_node* next;
-
- tss_data_node(void const* key_,boost::shared_ptr<boost::detail::tss_cleanup_function> func_,void* value_,
- tss_data_node* next_):
- key(key_),func(func_),value(value_),next(next_)
- {}
- };
-
namespace
{
boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
@@ -67,7 +54,7 @@ namespace boost
boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
if(thread_info)
{
- while(thread_info->tss_data || thread_info->thread_exit_callbacks)
+ while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks)
{
while(thread_info->thread_exit_callbacks)
{
@@ -80,15 +67,18 @@ namespace boost
}
delete current_node;
}
- while(thread_info->tss_data)
+ for(std::map<void const*,tss_data_node>::iterator next=thread_info->tss_data.begin(),
+ current,
+ end=thread_info->tss_data.end();
+ next!=end;)
{
- detail::tss_data_node* const current_node=thread_info->tss_data;
- thread_info->tss_data=current_node->next;
- if(current_node->func)
+ current=next;
+ ++next;
+ if(current->second.func && current->second.value)
{
- (*current_node->func)(current_node->value);
+ (*current->second.func)(current->second.value);
}
- delete current_node;
+ thread_info->tss_data.erase(current);
}
}
thread_info->self.reset();
@@ -390,7 +380,7 @@ namespace boost
{
#if defined(PTW32_VERSION) || defined(__hpux)
return pthread_num_processors_np();
-#elif defined(__linux__)
+#elif defined(_GNU_SOURCE)
return get_nprocs();
#elif defined(__APPLE__) || defined(__FreeBSD__)
int count;
@@ -552,14 +542,11 @@ namespace boost
detail::thread_data_base* const current_thread_data(get_current_thread_data());
if(current_thread_data)
{
- detail::tss_data_node* current_node=current_thread_data->tss_data;
- while(current_node)
+ std::map<void const*,tss_data_node>::iterator current_node=
+ current_thread_data->tss_data.find(key);
+ if(current_node!=current_thread_data->tss_data.end())
{
- if(current_node->key==key)
- {
- return current_node;
- }
- current_node=current_node->next;
+ return &current_node->second;
}
}
return NULL;
@@ -573,106 +560,47 @@ namespace boost
}
return NULL;
}
+
+ void add_new_tss_node(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
+ }
+
+ void erase_tss_node(void const* key)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.erase(key);
+ }
- void set_tss_data(void const* key,boost::shared_ptr<tss_cleanup_function> func,void* tss_data,bool cleanup_existing)
+ void set_tss_data(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data,bool cleanup_existing)
{
if(tss_data_node* const current_node=find_tss_data(key))
{
- if(cleanup_existing && current_node->func)
+ if(cleanup_existing && current_node->func && current_node->value)
{
(*current_node->func)(current_node->value);
}
- current_node->func=func;
- current_node->value=tss_data;
+ if(func || tss_data)
+ {
+ current_node->func=func;
+ current_node->value=tss_data;
+ }
+ else
+ {
+ erase_tss_node(key);
+ }
}
else
{
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- tss_data_node* const new_node=new tss_data_node(key,func,tss_data,current_thread_data->tss_data);
- current_thread_data->tss_data=new_node;
+ add_new_tss_node(key,func,tss_data);
}
}
}
-// thread_group::thread_group()
-// {
-// }
-
-// thread_group::~thread_group()
-// {
-// // We shouldn't have to scoped_lock here, since referencing this object
-// // from another thread while we're deleting it in the current thread is
-// // going to lead to undefined behavior any way.
-// for (std::list<thread*>::iterator it = m_threads.begin();
-// it != m_threads.end(); ++it)
-// {
-// delete (*it);
-// }
-// }
-
-// thread* thread_group::create_thread(const function0<void>& threadfunc)
-// {
-// // No scoped_lock required here since the only "shared data" that's
-// // modified here occurs inside add_thread which does scoped_lock.
-// std::auto_ptr<thread> thrd(new thread(threadfunc));
-// add_thread(thrd.get());
-// return thrd.release();
-// }
-
-// void thread_group::add_thread(thread* thrd)
-// {
-// mutex::scoped_lock scoped_lock(m_mutex);
-
-// // For now we'll simply ignore requests to add a thread object multiple
-// // times. Should we consider this an error and either throw or return an
-// // error value?
-// std::list<thread*>::iterator it = std::find(m_threads.begin(),
-// m_threads.end(), thrd);
-// BOOST_ASSERT(it == m_threads.end());
-// if (it == m_threads.end())
-// m_threads.push_back(thrd);
-// }
-
-// void thread_group::remove_thread(thread* thrd)
-// {
-// mutex::scoped_lock scoped_lock(m_mutex);
-
-// // For now we'll simply ignore requests to remove a thread object that's
-// // not in the group. Should we consider this an error and either throw or
-// // return an error value?
-// std::list<thread*>::iterator it = std::find(m_threads.begin(),
-// m_threads.end(), thrd);
-// BOOST_ASSERT(it != m_threads.end());
-// if (it != m_threads.end())
-// m_threads.erase(it);
-// }
-
-// void thread_group::join_all()
-// {
-// mutex::scoped_lock scoped_lock(m_mutex);
-// for (std::list<thread*>::iterator it = m_threads.begin();
-// it != m_threads.end(); ++it)
-// {
-// (*it)->join();
-// }
-// }
-
-// void thread_group::interrupt_all()
-// {
-// boost::lock_guard<mutex> guard(m_mutex);
-
-// for(std::list<thread*>::iterator it=m_threads.begin(),end=m_threads.end();
-// it!=end;
-// ++it)
-// {
-// (*it)->interrupt();
-// }
-// }
-
-
-// size_t thread_group::size() const
-// {
-// return m_threads.size();
-// }
}
diff --git a/3rdParty/Boost/src/libs/thread/src/win32/exceptions.cpp b/3rdParty/Boost/src/libs/thread/src/win32/exceptions.cpp
deleted file mode 100644
index 8881303..0000000
--- a/3rdParty/Boost/src/libs/thread/src/win32/exceptions.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (C) 2001-2003
-// William E. Kempf
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/exceptions.hpp>
-#include <cstring>
-#include <string>
-
-namespace boost {
-
-thread_exception::thread_exception()
- : m_sys_err(0)
-{
-}
-
-thread_exception::thread_exception(int sys_err_code)
- : m_sys_err(sys_err_code)
-{
-}
-
-thread_exception::~thread_exception() throw()
-{
-}
-
-int thread_exception::native_error() const
-{
- return m_sys_err;
-}
-
-lock_error::lock_error()
-{
-}
-
-lock_error::lock_error(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-lock_error::~lock_error() throw()
-{
-}
-
-const char* lock_error::what() const throw()
-{
- return "boost::lock_error";
-}
-
-thread_resource_error::thread_resource_error()
-{
-}
-
-thread_resource_error::thread_resource_error(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-thread_resource_error::~thread_resource_error() throw()
-{
-}
-
-const char* thread_resource_error::what() const throw()
-{
- return "boost::thread_resource_error";
-}
-
-unsupported_thread_option::unsupported_thread_option()
-{
-}
-
-unsupported_thread_option::unsupported_thread_option(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-unsupported_thread_option::~unsupported_thread_option() throw()
-{
-}
-
-const char* unsupported_thread_option::what() const throw()
-{
- return "boost::unsupported_thread_option";
-}
-
-invalid_thread_argument::invalid_thread_argument()
-{
-}
-
-invalid_thread_argument::invalid_thread_argument(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-invalid_thread_argument::~invalid_thread_argument() throw()
-{
-}
-
-const char* invalid_thread_argument::what() const throw()
-{
- return "boost::invalid_thread_argument";
-}
-
-thread_permission_error::thread_permission_error()
-{
-}
-
-thread_permission_error::thread_permission_error(int sys_err_code)
- : thread_exception(sys_err_code)
-{
-}
-
-thread_permission_error::~thread_permission_error() throw()
-{
-}
-
-const char* thread_permission_error::what() const throw()
-{
- return "boost::thread_permission_error";
-}
-
-} // namespace boost
diff --git a/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp b/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp
index a72f053..46af860 100644
--- a/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp
+++ b/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp
@@ -561,7 +561,7 @@ namespace boost
{
if(tss_data_node* const current_node=find_tss_data(key))
{
- if(cleanup_existing && current_node->func.get())
+ if(cleanup_existing && current_node->func.get() && current_node->value)
{
(*current_node->func)(current_node->value);
}