Bug 1073003 - Create an stlport modifications patch and update README.mozilla r=nfroyd (on a CLOSED TREE)

This commit is contained in:
Dave Hylands 2015-01-08 13:52:22 -08:00
Родитель cd8a210555
Коммит a6ca66e530
2 изменённых файлов: 73 добавлений и 0 удалений

Просмотреть файл

@ -7,3 +7,6 @@ The overrides/ directory contains Mozilla-specific overrides to the standard
The following patches are applied on top:
- android-mozilla-config.patch: Adjusts Android-specific configuration
to the mozilla codebase use of the STL.
- fix-warnings-as-errors.patch: Fixes warnings which were causing the
B2G emulator-ICS build to fail (related to bug 1073003).

Просмотреть файл

@ -0,0 +1,70 @@
# HG changeset patch
# Parent f89b28ea7c7b7fcb54c34e74fcb047626300bfba
# User Dave Hylands <dhylands@mozilla.com>
Bug 1073003 - Fix warnings in stlport causing errors in emulator build.
diff --git a/build/stlport/stlport/stl/_istream.c b/build/stlport/stlport/stl/_istream.c
--- a/build/stlport/stlport/stl/_istream.c
+++ b/build/stlport/stlport/stl/_istream.c
@@ -1140,17 +1140,16 @@ basic_istream<_CharT, _Traits>::ignore(s
template <class _CharT, class _Traits>
basic_istream<_CharT, _Traits>&
basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) {
sentry __sentry(*this, _No_Skip_WS());
this->_M_gcount = 0;
if (__sentry) {
basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
- typedef _STLP_PRIV _Constant_unary_fun<bool, int_type> _Const_bool;
typedef _STLP_PRIV _Constant_binary_fun<streamsize, streamsize, streamsize>
_Const_streamsize;
const streamsize __maxss = (numeric_limits<streamsize>::max)();
if (__n == (numeric_limits<int>::max)()) {
if (__buf->gptr() != __buf->egptr())
_M_gcount = _M_ignore_buffered(this, __buf,
__maxss, _Const_streamsize(__maxss),
diff --git a/build/stlport/stlport/stl/_slist.c b/build/stlport/stlport/stl/_slist.c
--- a/build/stlport/stlport/stl/_slist.c
+++ b/build/stlport/stlport/stl/_slist.c
@@ -143,17 +143,16 @@ void _Slist_unique(slist<_Tp, _Alloc>& _
}
}
}
template <class _Tp, class _Alloc, class _StrictWeakOrdering>
void _Slist_merge(slist<_Tp, _Alloc>& __that, slist<_Tp, _Alloc>& __x,
_StrictWeakOrdering __comp) {
typedef _Slist_node<_Tp> _Node;
- typedef _STLP_PRIV _Slist_node_base _Node_base;
if (__that.get_allocator() == __x.get_allocator()) {
typename slist<_Tp, _Alloc>::iterator __ite(__that.before_begin());
while (__ite._M_node->_M_next && !__x.empty()) {
if (__comp(__x.front(), __STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data)) {
_STLP_VERBOSE_ASSERT(!__comp(__STATIC_CAST(_Node*, __ite._M_node->_M_next)->_M_data, __x.front()),
_StlMsg_INVALID_STRICT_WEAK_PREDICATE)
__that.splice_after(__ite, __x, __x.before_begin());
}
diff --git a/build/stlport/stlport/stl/config/features.h b/build/stlport/stlport/stl/config/features.h
--- a/build/stlport/stlport/stl/config/features.h
+++ b/build/stlport/stlport/stl/config/features.h
@@ -303,17 +303,18 @@
# undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 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];
+//# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1];
+# define _STLP_STATIC_ASSERT(expr) static_assert(expr, "static_assert failed");
#endif
/* apple mpw exception handling bug */
#ifndef _STLP_MPWFIX_TRY
# define _STLP_MPWFIX_TRY
#endif
#ifndef _STLP_MPWFIX_CATCH
# define _STLP_MPWFIX_CATCH