[Midnightbsd-cvs] src [8311] trunk: fix flags.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 17 18:32:14 EDT 2016
Revision: 8311
http://svnweb.midnightbsd.org/src/?rev=8311
Author: laffer1
Date: 2016-09-17 18:32:14 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
fix flags.
Modified Paths:
--------------
trunk/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
trunk/contrib/libstdc++/include/bits/fstream.tcc
trunk/contrib/libstdc++/include/bits/locale_facets.h
trunk/contrib/libstdc++/include/bits/locale_facets.tcc
trunk/contrib/libstdc++/include/bits/streambuf_iterator.h
trunk/contrib/libstdc++/include/debug/safe_iterator.tcc
trunk/contrib/libstdc++/include/ext/ropeimpl.h
trunk/contrib/libstdc++/include/std/std_sstream.h
trunk/contrib/libstdc++/libsupc++/tinfo.cc
trunk/contrib/libstdc++/src/locale.cc
trunk/contrib/libstdc++/src/strstream.cc
trunk/contrib/libstdc++/src/tree.cc
trunk/gnu/lib/libstdc++/Makefile
trunk/gnu/lib/libsupc++/Makefile
Modified: trunk/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
===================================================================
--- trunk/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h 2016-09-17 22:32:14 UTC (rev 8311)
@@ -38,8 +38,9 @@
_GLIBCXX_BEGIN_NAMESPACE(std)
/// @brief Base class for ctype.
- struct ctype_base
+ class ctype_base
{
+ public:
// Non-standard typedefs.
typedef const int* __to_type;
Modified: trunk/contrib/libstdc++/include/bits/fstream.tcc
===================================================================
--- trunk/contrib/libstdc++/include/bits/fstream.tcc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/bits/fstream.tcc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -641,21 +641,23 @@
setbuf(char_type* __s, streamsize __n)
{
if (!this->is_open())
- if (__s == 0 && __n == 0)
- _M_buf_size = 1;
- else if (__s && __n > 0)
- {
- // This is implementation-defined behavior, and assumes that
- // an external char_type array of length __n exists and has
- // been pre-allocated. If this is not the case, things will
- // quickly blow up. When __n > 1, __n - 1 positions will be
- // used for the get area, __n - 1 for the put area and 1
- // position to host the overflow char of a full put area.
- // When __n == 1, 1 position will be used for the get area
- // and 0 for the put area, as in the unbuffered case above.
- _M_buf = __s;
- _M_buf_size = __n;
- }
+ {
+ if (__s == 0 && __n == 0)
+ _M_buf_size = 1;
+ else if (__s && __n > 0)
+ {
+ // This is implementation-defined behavior, and assumes that
+ // an external char_type array of length __n exists and has
+ // been pre-allocated. If this is not the case, things will
+ // quickly blow up. When __n > 1, __n - 1 positions will be
+ // used for the get area, __n - 1 for the put area and 1
+ // position to host the overflow char of a full put area.
+ // When __n == 1, 1 position will be used for the get area
+ // and 0 for the put area, as in the unbuffered case above.
+ _M_buf = __s;
+ _M_buf_size = __n;
+ }
+ }
return this;
}
Modified: trunk/contrib/libstdc++/include/bits/locale_facets.h
===================================================================
--- trunk/contrib/libstdc++/include/bits/locale_facets.h 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/bits/locale_facets.h 2016-09-17 22:32:14 UTC (rev 8311)
@@ -4335,8 +4335,9 @@
/**
* @brief Messages facet base class providing catalog typedef.
*/
- struct messages_base
+ class messages_base
{
+ public:
typedef int catalog;
};
Modified: trunk/contrib/libstdc++/include/bits/locale_facets.tcc
===================================================================
--- trunk/contrib/libstdc++/include/bits/locale_facets.tcc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/bits/locale_facets.tcc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -316,7 +316,7 @@
int __sep_pos = 0;
while (!__testeof)
{
- if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
+ if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
|| __c == __lc->_M_decimal_point)
break;
else if (__c == __lit[__num_base::_S_izero])
@@ -558,7 +558,7 @@
int __sep_pos = 0;
while (!__testeof)
{
- if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep
+ if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep)
|| __c == __lc->_M_decimal_point)
break;
else if (__c == __lit[__num_base::_S_izero]
@@ -748,16 +748,20 @@
const char_type __c = *__beg;
if (__testf)
- if (__n < __lc->_M_falsename_size)
- __testf = __c == __lc->_M_falsename[__n];
- else
- break;
+ {
+ if (__n < __lc->_M_falsename_size)
+ __testf = __c == __lc->_M_falsename[__n];
+ else
+ break;
+ }
if (__testt)
- if (__n < __lc->_M_truename_size)
- __testt = __c == __lc->_M_truename[__n];
- else
- break;
+ {
+ if (__n < __lc->_M_truename_size)
+ __testt = __c == __lc->_M_truename[__n];
+ else
+ break;
+ }
if (!__testf && !__testt)
break;
@@ -1387,9 +1391,9 @@
== money_base::space)))
|| (__i == 2 && ((static_cast<part>(__p.field[3])
== money_base::value)
- || __mandatory_sign
+ || (__mandatory_sign
&& (static_cast<part>(__p.field[3])
- == money_base::sign))))
+ == money_base::sign)))))
{
const size_type __len = __lc->_M_curr_symbol_size;
size_type __j = 0;
Modified: trunk/contrib/libstdc++/include/bits/streambuf_iterator.h
===================================================================
--- trunk/contrib/libstdc++/include/bits/streambuf_iterator.h 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/bits/streambuf_iterator.h 2016-09-17 22:32:14 UTC (rev 8311)
@@ -160,7 +160,7 @@
{
const bool __thiseof = _M_at_eof();
const bool __beof = __b._M_at_eof();
- return (__thiseof && __beof || (!__thiseof && !__beof));
+ return ((__thiseof && __beof) || (!__thiseof && !__beof));
}
private:
Modified: trunk/contrib/libstdc++/include/debug/safe_iterator.tcc
===================================================================
--- trunk/contrib/libstdc++/include/debug/safe_iterator.tcc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/debug/safe_iterator.tcc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -54,8 +54,8 @@
static_cast<const _Sequence*>(_M_sequence)->begin();
std::pair<difference_type, _Distance_precision> __dist =
this->_M_get_distance(__begin, *this);
- bool __ok = (__dist.second == __dp_exact && __dist.first >= -__n
- || __dist.second != __dp_exact && __dist.first > 0);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= -__n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
return __ok;
}
else
@@ -64,8 +64,8 @@
static_cast<const _Sequence*>(_M_sequence)->end();
std::pair<difference_type, _Distance_precision> __dist =
this->_M_get_distance(*this, __end);
- bool __ok = (__dist.second == __dp_exact && __dist.first >= __n
- || __dist.second != __dp_exact && __dist.first > 0);
+ bool __ok = ((__dist.second == __dp_exact && __dist.first >= __n)
+ || (__dist.second != __dp_exact && __dist.first > 0));
return __ok;
}
}
Modified: trunk/contrib/libstdc++/include/ext/ropeimpl.h
===================================================================
--- trunk/contrib/libstdc++/include/ext/ropeimpl.h 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/ext/ropeimpl.h 2016-09-17 22:32:14 UTC (rev 8311)
@@ -1143,7 +1143,7 @@
}
else
{
- char* __kind;
+ const char* __kind;
switch (__r->_M_tag)
{
Modified: trunk/contrib/libstdc++/include/std/std_sstream.h
===================================================================
--- trunk/contrib/libstdc++/include/std/std_sstream.h 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/include/std/std_sstream.h 2016-09-17 22:32:14 UTC (rev 8311)
@@ -240,10 +240,12 @@
{
const bool __testin = _M_mode & ios_base::in;
if (this->pptr() && this->pptr() > this->egptr())
- if (__testin)
- this->setg(this->eback(), this->gptr(), this->pptr());
- else
- this->setg(this->pptr(), this->pptr(), this->pptr());
+ {
+ if (__testin)
+ this->setg(this->eback(), this->gptr(), this->pptr());
+ else
+ this->setg(this->pptr(), this->pptr(), this->pptr());
+ }
}
};
Modified: trunk/contrib/libstdc++/libsupc++/tinfo.cc
===================================================================
--- trunk/contrib/libstdc++/libsupc++/tinfo.cc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/libsupc++/tinfo.cc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -499,9 +499,9 @@
result.whole2dst =
__sub_kind (result.whole2dst | result2.whole2dst);
}
- else if ((result.dst_ptr != 0 & result2.dst_ptr != 0)
- || (result.dst_ptr != 0 & result2_ambig)
- || (result2.dst_ptr != 0 & result_ambig))
+ else if ((result.dst_ptr != 0 && result2.dst_ptr != 0)
+ || (result.dst_ptr != 0 && result2_ambig)
+ || (result2.dst_ptr != 0 && result_ambig))
{
// Found two different DST_TYPE bases, or a valid one and a set of
// ambiguous ones, must disambiguate. See whether SRC_PTR is
Modified: trunk/contrib/libstdc++/src/locale.cc
===================================================================
--- trunk/contrib/libstdc++/src/locale.cc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/src/locale.cc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -146,7 +146,7 @@
locale::_S_normalize_category(category __cat)
{
int __ret = 0;
- if (__cat == none || (__cat & all) && !(__cat & ~all))
+ if (__cat == none || ((__cat & all) && !(__cat & ~all)))
__ret = __cat;
else
{
Modified: trunk/contrib/libstdc++/src/strstream.cc
===================================================================
--- trunk/contrib/libstdc++/src/strstream.cc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/src/strstream.cc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -311,10 +311,12 @@
strstreambuf::_M_free(char* p)
{
if (p)
- if (_M_free_fun)
- _M_free_fun(p);
- else
- delete[] p;
+ {
+ if (_M_free_fun)
+ _M_free_fun(p);
+ else
+ delete[] p;
+ }
}
void
Modified: trunk/contrib/libstdc++/src/tree.cc
===================================================================
--- trunk/contrib/libstdc++/src/tree.cc 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/contrib/libstdc++/src/tree.cc 2016-09-17 22:32:14 UTC (rev 8311)
@@ -316,17 +316,21 @@
else
__z->_M_parent->_M_right = __x;
if (__leftmost == __z)
- if (__z->_M_right == 0) // __z->_M_left must be null also
- __leftmost = __z->_M_parent;
- // makes __leftmost == _M_header if __z == __root
- else
- __leftmost = _Rb_tree_node_base::_S_minimum(__x);
+ {
+ if (__z->_M_right == 0) // __z->_M_left must be null also
+ __leftmost = __z->_M_parent;
+ // makes __leftmost == _M_header if __z == __root
+ else
+ __leftmost = _Rb_tree_node_base::_S_minimum(__x);
+ }
if (__rightmost == __z)
- if (__z->_M_left == 0) // __z->_M_right must be null also
- __rightmost = __z->_M_parent;
- // makes __rightmost == _M_header if __z == __root
- else // __x == __z->_M_left
- __rightmost = _Rb_tree_node_base::_S_maximum(__x);
+ {
+ if (__z->_M_left == 0) // __z->_M_right must be null also
+ __rightmost = __z->_M_parent;
+ // makes __rightmost == _M_header if __z == __root
+ else // __x == __z->_M_left
+ __rightmost = _Rb_tree_node_base::_S_maximum(__x);
+ }
}
if (__y->_M_color != _S_red)
{
Modified: trunk/gnu/lib/libstdc++/Makefile
===================================================================
--- trunk/gnu/lib/libstdc++/Makefile 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/gnu/lib/libstdc++/Makefile 2016-09-17 22:32:14 UTC (rev 8311)
@@ -20,7 +20,6 @@
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
-Wno-deprecated
-CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections}
DPADD= ${LIBM}
@@ -624,3 +623,6 @@
CLEANFILES+= ${VERSION_MAP}
.include <bsd.lib.mk>
+
+# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98.
+CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
Modified: trunk/gnu/lib/libsupc++/Makefile
===================================================================
--- trunk/gnu/lib/libsupc++/Makefile 2016-09-17 22:30:47 UTC (rev 8310)
+++ trunk/gnu/lib/libsupc++/Makefile 2016-09-17 22:32:14 UTC (rev 8311)
@@ -25,7 +25,6 @@
CFLAGS+= -I${.CURDIR}/../libstdc++ -I.
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections
-CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
PO_CXXFLAGS= ${CXXFLAGS:N-ffunction-sections}
HDRS= exception new typeinfo cxxabi.h exception_defines.h
@@ -44,3 +43,6 @@
.include <bsd.lib.mk>
+
+# Filter out libc++-specific flags, and -std= flags above c++98 or gnu++98.
+CXXFLAGS:= ${CXXFLAGS:N-stdlib=libc++:N-std=c++[01][13x]:N-std=gnu++[01][13x]}
More information about the Midnightbsd-cvs
mailing list