summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjoerg <joerg>2013-05-30 15:37:24 +0000
committerjoerg <joerg>2013-05-30 15:37:24 +0000
commit84a2ac96ce32eac4c51cdd90dbc21d31f6df7c96 (patch)
tree4aeea10a1ef4fe059ff355ce61c11e3cf9d58b6f /net
parent0bddfd033c0dc0404fdfa64281f6ca19a4a7d9ec (diff)
downloadpkgsrc-84a2ac96ce32eac4c51cdd90dbc21d31f6df7c96.tar.gz
static_assert is part of C++11, so avoid the name.
Diffstat (limited to 'net')
-rw-r--r--net/xorp/distinfo23
-rw-r--r--net/xorp/patches/patch-libproto_packet.hh31
-rw-r--r--net/xorp/patches/patch-libxipc_xrl__atom.cc28
-rw-r--r--net/xorp/patches/patch-libxipc_xrl__pf__stcp__ph.cc18
-rw-r--r--net/xorp/patches/patch-libxipc_xuid.cc26
-rw-r--r--net/xorp/patches/patch-libxorp_asyncio.cc13
-rw-r--r--net/xorp/patches/patch-libxorp_ipv4.hh13
-rw-r--r--net/xorp/patches/patch-libxorp_ipv6.cc31
-rw-r--r--net/xorp/patches/patch-libxorp_ipv6.hh13
-rw-r--r--net/xorp/patches/patch-libxorp_ipvx.cc35
-rw-r--r--net/xorp/patches/patch-libxorp_selector.cc13
-rw-r--r--net/xorp/patches/patch-libxorp_utility.h14
-rw-r--r--net/xorp/patches/patch-ospf_packet.cc13
-rw-r--r--net/xorp/patches/patch-ospf_peer.cc17
-rw-r--r--net/xorp/patches/patch-rip_auth.cc33
-rw-r--r--net/xorp/patches/patch-rip_packets.hh78
-rw-r--r--net/xorp/patches/patch-rip_port.cc15
-rw-r--r--net/xorp/patches/patch-rip_test__auth.cc29
-rw-r--r--net/xorp/patches/patch-rip_test__packets.cc29
-rw-r--r--net/xorp/patches/patch-vrrp_vrrp__packet.cc15
20 files changed, 478 insertions, 9 deletions
diff --git a/net/xorp/distinfo b/net/xorp/distinfo
index 7c01d4249ad..fa5d9db3a1a 100644
--- a/net/xorp/distinfo
+++ b/net/xorp/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2012/09/28 05:47:31 dholland Exp $
+$NetBSD: distinfo,v 1.20 2013/05/30 15:37:24 joerg Exp $
SHA1 (xorp-1.6.tar.gz) = 366d32068ed76b8ec69958b601d4fbde61ef4cbb
RMD160 (xorp-1.6.tar.gz) = 32b3f6d03defc816ed983088e61b5e808de17f98
@@ -16,18 +16,29 @@ SHA1 (patch-fea_data__plane_control__socket_click__socket.hh) = 1e0ea2de08a131a9
SHA1 (patch-fea_data__plane_control__socket_netlink__socket.hh) = 2b2c774a8e9778d438292850f4a310403d019365
SHA1 (patch-fea_data__plane_control__socket_routing__socket.hh) = 1acad764066424d1fc457ea7e130636257248530
SHA1 (patch-fea_data__plane_control__socket_windows__rtm__pipe.hh) = 608b22a8507e2a44c5eea26e964c6201e7240420
+SHA1 (patch-libproto_packet.hh) = a5e8a8fe88bbaf20ef48cf136770fb5f7325b400
SHA1 (patch-libxipc_finder.cc) = 941d01e3f041c9ad2ea73671b42b1ef7daac0e7b
SHA1 (patch-libxipc_finder__messenger.hh) = f1a36df79516ac03a69e3e9ba56dc1b56bc6d886
+SHA1 (patch-libxipc_xrl__atom.cc) = 5b2dd8488570477c362017faa41eb9191cd2b48b
SHA1 (patch-libxipc_xrl__error.hh) = efce8151c2211526a3a27d6f7cb7b599c46bd84b
+SHA1 (patch-libxipc_xrl__pf__stcp__ph.cc) = 306e5c27cd371f206233ff70ce3d38493157fd00
SHA1 (patch-libxipc_xrl__router.hh) = b29884206da7a9c40c26b1e20f5bf4dccd9da42a
+SHA1 (patch-libxipc_xuid.cc) = 0d2711e92b162817b0a76d2d4fc15edd4b3be29e
+SHA1 (patch-libxorp_asyncio.cc) = 1288ac42bac5e5f1cdfa98ef26036379d7ff1d2e
SHA1 (patch-libxorp_heap.cc) = 45abbc27a4391f3312e6048d632b56c9e5091fa7
+SHA1 (patch-libxorp_ipv4.hh) = d8c5be2a038f29b4e45040fb7edb59f037efd13c
+SHA1 (patch-libxorp_ipv6.cc) = d1d0793c0b28f4b40c96ffd26036ddc6c3d14623
+SHA1 (patch-libxorp_ipv6.hh) = bdea336f34ca1aa06aaba084d6a72e70822e0fa7
+SHA1 (patch-libxorp_ipvx.cc) = 97c95f85eb44649bd3996ca649c26485737d7b21
SHA1 (patch-libxorp_safe__callback__obj.hh) = a5019173b864829dd96f55c92d831dd98a1b0d84
+SHA1 (patch-libxorp_selector.cc) = 36c97e64242aa1911fb7c8d9395aada6dc1541b8
SHA1 (patch-libxorp_test__main.hh) = 9893f1276066f16fe92b5787e9235484882cbfe9
SHA1 (patch-libxorp_transaction.hh) = f6fbcc929610f48116590fd28a8df7ed30280856
SHA1 (patch-libxorp_trie.hh) = eab5e4e232fb3bd60d9c3632c47bc4d89f432ed8
-SHA1 (patch-libxorp_utility.h) = d9d929e0a900f7f3dcfa680982539c2881940223
+SHA1 (patch-libxorp_utility.h) = 8c29d67c38ac8ff37725c1617aa18f5182cdfe28
SHA1 (patch-libxorp_xorp.h) = 09fa420872903bdff321decd020810588668c2a2
-SHA1 (patch-ospf_peer.cc) = c5220d6ee8966ded9ebc168092c5c41a32ee6042
+SHA1 (patch-ospf_packet.cc) = b172129d5f754dc66a3d99d75320fd78208033fe
+SHA1 (patch-ospf_peer.cc) = 2a30dbf655ae194bb47a882c095f5a83973e80be
SHA1 (patch-pim_pim__bsr.cc) = 67ebcd67efeb421327de9847803213f826a2c5cc
SHA1 (patch-pim_pim__bsr.hh) = a8876be2bcaac8c026dda04cd599175f5965b205
SHA1 (patch-pim_pim__vif.cc) = 922e9b502e8e0622efb1d63621aeec3ab2265549
@@ -43,10 +54,16 @@ SHA1 (patch-rib_rt__tab__merged.cc) = 12c0cccba2473a592cc37c244b72b468fba3fc3b
SHA1 (patch-rib_rt__tab__pol__conn.cc) = bf8ab3155ad1ecdab7b034b1aa62887a2d248420
SHA1 (patch-rib_rt__tab__pol__redist.cc) = 494a477dad76bf725a745cef15d54625da4560e0
SHA1 (patch-rib_rt__tab__redist.cc) = e4ec537e2353d4bde70ad3a3ef637b3c7f8af0ff
+SHA1 (patch-rip_auth.cc) = 53dd12a160a24922db5dd7033319bdde0d46cb62
SHA1 (patch-rip_output__table.cc) = c0fd4f05e87ac857280c6e81e7adf4e51d961cf0
SHA1 (patch-rip_output__updates.cc) = d43fa6eabd3413bb7e221a565c6f250305c29292
+SHA1 (patch-rip_packets.hh) = c15d74e809ce5572b1cbd90f5af59817d5e70698
+SHA1 (patch-rip_port.cc) = 6de82193835b76d99c7dc6820d277c12e7d91e2a
+SHA1 (patch-rip_test__auth.cc) = 6140a0efd5f6b744323690606b5b33ceea3067f8
+SHA1 (patch-rip_test__packets.cc) = a8f14d034d090ea98e1dfe96fc829c639cd89473
SHA1 (patch-rtrmgr_boot.ll) = 9bbbd83c9275f2888f6632f514ae4bf7b37e2e0e
SHA1 (patch-rtrmgr_cli.cc) = 0756e3eaaef0d510cdfc602836441066df2852d0
SHA1 (patch-rtrmgr_op__commands.ll) = 0259228f4d604a869f04c6b80402126cab083108
SHA1 (patch-rtrmgr_template.ll) = cf2467c8a928b60bcd848c90f1b6842047cb79ca
SHA1 (patch-rtrmgr_xorpsh__main.cc) = a87e6dcc1a95885ced5e061dc0c0282047476f11
+SHA1 (patch-vrrp_vrrp__packet.cc) = 335ee62e40cd9ece557e3ce4cac48a161b3b708d
diff --git a/net/xorp/patches/patch-libproto_packet.hh b/net/xorp/patches/patch-libproto_packet.hh
new file mode 100644
index 00000000000..69d45b036fe
--- /dev/null
+++ b/net/xorp/patches/patch-libproto_packet.hh
@@ -0,0 +1,31 @@
+$NetBSD: patch-libproto_packet.hh,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libproto/packet.hh.orig 2013-04-29 19:23:03.000000000 +0000
++++ libproto/packet.hh
+@@ -414,11 +414,11 @@ public:
+ _ip_src(_data + _ip_src_offset),
+ _ip_dst(_data + _ip_dst_offset)
+ {
+- static_assert(IpHeader4::SIZE == _ip_vhl_sizeof + _ip_tos_sizeof
++ my_static_assert(IpHeader4::SIZE == _ip_vhl_sizeof + _ip_tos_sizeof
+ + _ip_len_sizeof + _ip_id_sizeof + _ip_off_sizeof
+ + _ip_ttl_sizeof + _ip_p_sizeof + _ip_sum_sizeof
+ + _ip_src_sizeof + _ip_dst_sizeof);
+- static_assert(IpHeader4::SIZE == _ip_dst_offset + _ip_dst_sizeof);
++ my_static_assert(IpHeader4::SIZE == _ip_dst_offset + _ip_dst_sizeof);
+ }
+
+ static const size_t SIZE = 20; // The header size
+@@ -708,10 +708,10 @@ public:
+ _ip_src(_data + _ip_src_offset),
+ _ip_dst(_data + _ip_dst_offset)
+ {
+- static_assert(IpHeader6::SIZE == _ip_vtc_flow_sizeof
++ my_static_assert(IpHeader6::SIZE == _ip_vtc_flow_sizeof
+ + _ip_plen_sizeof + _ip_nxt_sizeof + _ip_hlim_sizeof
+ + _ip_src_sizeof + _ip_dst_sizeof);
+- static_assert(IpHeader6::SIZE == _ip_dst_offset + _ip_dst_sizeof);
++ my_static_assert(IpHeader6::SIZE == _ip_dst_offset + _ip_dst_sizeof);
+ }
+
+ static const size_t SIZE = 40; // The header size
diff --git a/net/xorp/patches/patch-libxipc_xrl__atom.cc b/net/xorp/patches/patch-libxipc_xrl__atom.cc
new file mode 100644
index 00000000000..8c8e6fec77b
--- /dev/null
+++ b/net/xorp/patches/patch-libxipc_xrl__atom.cc
@@ -0,0 +1,28 @@
+$NetBSD: patch-libxipc_xrl__atom.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxipc/xrl_atom.cc.orig 2013-04-29 19:23:21.000000000 +0000
++++ libxipc/xrl_atom.cc
+@@ -728,10 +728,10 @@ XrlAtom::packed_bytes() const
+ return bytes;
+ }
+
+- static_assert(sizeof(IPv4) == 4);
+- static_assert(sizeof(IPv6) == 16);
+- static_assert(sizeof(IPv4Net) == sizeof(IPv4) + 4);
+- static_assert(sizeof(IPv6Net) == sizeof(IPv6) + 4);
++ my_static_assert(sizeof(IPv4) == 4);
++ my_static_assert(sizeof(IPv6) == 16);
++ my_static_assert(sizeof(IPv4Net) == sizeof(IPv4) + 4);
++ my_static_assert(sizeof(IPv6Net) == sizeof(IPv6) + 4);
+
+ switch (_type) {
+ case xrlatom_no_type:
+@@ -1090,7 +1090,7 @@ XrlAtom::pack_list(uint8_t* buffer, size
+ size_t done = 0;
+
+ uint32_t nelem = htonl(_list->size());
+- static_assert(sizeof(nelem) == 4);
++ my_static_assert(sizeof(nelem) == 4);
+
+ memcpy(buffer, &nelem, sizeof(nelem));
+ done += sizeof(nelem);
diff --git a/net/xorp/patches/patch-libxipc_xrl__pf__stcp__ph.cc b/net/xorp/patches/patch-libxipc_xrl__pf__stcp__ph.cc
new file mode 100644
index 00000000000..84d3d69e9cb
--- /dev/null
+++ b/net/xorp/patches/patch-libxipc_xrl__pf__stcp__ph.cc
@@ -0,0 +1,18 @@
+$NetBSD: patch-libxipc_xrl__pf__stcp__ph.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxipc/xrl_pf_stcp_ph.cc.orig 2013-04-29 19:23:23.000000000 +0000
++++ libxipc/xrl_pf_stcp_ph.cc
+@@ -62,11 +62,11 @@ STCPPacketHeader::STCPPacketHeader(uint8
+ _error_note_bytes(_data + _error_note_bytes_offset),
+ _xrl_data_bytes(_data + _xrl_data_bytes_offset)
+ {
+- static_assert(STCPPacketHeader::SIZE == _fourcc_sizeof + _major_sizeof
++ my_static_assert(STCPPacketHeader::SIZE == _fourcc_sizeof + _major_sizeof
+ + _minor_sizeof + _seqno_sizeof + _flags_sizeof + _type_sizeof
+ + _error_code_sizeof + _error_note_bytes_sizeof
+ + _xrl_data_bytes_sizeof);
+- static_assert(STCPPacketHeader::SIZE ==
++ my_static_assert(STCPPacketHeader::SIZE ==
+ _xrl_data_bytes_offset + _xrl_data_bytes_sizeof);
+ }
+
diff --git a/net/xorp/patches/patch-libxipc_xuid.cc b/net/xorp/patches/patch-libxipc_xuid.cc
new file mode 100644
index 00000000000..aa5b151c258
--- /dev/null
+++ b/net/xorp/patches/patch-libxipc_xuid.cc
@@ -0,0 +1,26 @@
+$NetBSD: patch-libxipc_xuid.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxipc/xuid.cc.orig 2013-04-29 19:23:19.000000000 +0000
++++ libxipc/xuid.cc
+@@ -109,8 +109,8 @@ static const uint32_t XUID_CSTR_BYTES =
+
+ XUID::XUID(const string& s) throw (InvalidString)
+ {
+- static_assert(sizeof(_data) == 16);
+- static_assert(sizeof(_data[0]) == 4);
++ my_static_assert(sizeof(_data) == 16);
++ my_static_assert(sizeof(_data[0]) == 4);
+
+ if (s.size() < XUID_CSTR_BYTES)
+ throw InvalidString();
+@@ -133,8 +133,8 @@ XUID::operator==(const XUID& x) const
+ bool
+ XUID::operator<(const XUID& x) const
+ {
+- static_assert(sizeof(_data) == 16);
+- static_assert(sizeof(_data[0]) == 4);
++ my_static_assert(sizeof(_data) == 16);
++ my_static_assert(sizeof(_data[0]) == 4);
+ int i;
+
+ for (i = 0; i < 3; i++) { // Loop ends intentionally at 3 not 4.
diff --git a/net/xorp/patches/patch-libxorp_asyncio.cc b/net/xorp/patches/patch-libxorp_asyncio.cc
new file mode 100644
index 00000000000..3c07ede0310
--- /dev/null
+++ b/net/xorp/patches/patch-libxorp_asyncio.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-libxorp_asyncio.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxorp/asyncio.cc.orig 2013-04-29 19:22:48.000000000 +0000
++++ libxorp/asyncio.cc
+@@ -484,7 +484,7 @@ template <typename T, typename U>
+ static void
+ iov_place(T*& iov_base, U& iov_len, uint8_t* data, size_t data_len)
+ {
+- static_assert(sizeof(T*) == sizeof(uint8_t*));
++ my_static_assert(sizeof(T*) == sizeof(uint8_t*));
+ iov_base = reinterpret_cast<T*>(data);
+ iov_len = data_len;
+ }
diff --git a/net/xorp/patches/patch-libxorp_ipv4.hh b/net/xorp/patches/patch-libxorp_ipv4.hh
new file mode 100644
index 00000000000..3581f3aabd5
--- /dev/null
+++ b/net/xorp/patches/patch-libxorp_ipv4.hh
@@ -0,0 +1,13 @@
+$NetBSD: patch-libxorp_ipv4.hh,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxorp/ipv4.hh.orig 2013-04-29 19:22:58.000000000 +0000
++++ libxorp/ipv4.hh
+@@ -506,7 +506,7 @@ public:
+ * @return address size in number of octets.
+ */
+ static size_t addr_bytelen() {
+- static_assert(sizeof(IPv4) == sizeof(uint32_t));
++ my_static_assert(sizeof(IPv4) == sizeof(uint32_t));
+ return sizeof(IPv4);
+ }
+
diff --git a/net/xorp/patches/patch-libxorp_ipv6.cc b/net/xorp/patches/patch-libxorp_ipv6.cc
new file mode 100644
index 00000000000..460b6071e33
--- /dev/null
+++ b/net/xorp/patches/patch-libxorp_ipv6.cc
@@ -0,0 +1,31 @@
+$NetBSD: patch-libxorp_ipv6.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxorp/ipv6.cc.orig 2013-04-29 19:22:46.000000000 +0000
++++ libxorp/ipv6.cc
+@@ -223,7 +223,7 @@ IPv6
+ IPv6::operator<<(uint32_t ls) const
+ {
+ uint32_t tmp_addr[4];
+- static_assert(sizeof(_addr) == sizeof(tmp_addr));
++ my_static_assert(sizeof(_addr) == sizeof(tmp_addr));
+
+ // Shift the words, and at the same time convert them into host-order
+ switch (ls / 32) {
+@@ -278,7 +278,7 @@ IPv6
+ IPv6::operator>>(uint32_t rs) const
+ {
+ uint32_t tmp_addr[4];
+- static_assert(sizeof(_addr) == sizeof(tmp_addr));
++ my_static_assert(sizeof(_addr) == sizeof(tmp_addr));
+
+ // Shift the words, and at the same time convert them into host-order
+ switch (rs / 32) {
+@@ -333,7 +333,7 @@ bool
+ IPv6::operator<(const IPv6& other) const
+ {
+ int i;
+- static_assert(sizeof(_addr) == 16);
++ my_static_assert(sizeof(_addr) == 16);
+
+ for (i = 0; i < 3; i++) { // XXX: Loop ends intentionally at 3 not 4
+ if (_addr[i] != other._addr[i])
diff --git a/net/xorp/patches/patch-libxorp_ipv6.hh b/net/xorp/patches/patch-libxorp_ipv6.hh
new file mode 100644
index 00000000000..a8f5f52190d
--- /dev/null
+++ b/net/xorp/patches/patch-libxorp_ipv6.hh
@@ -0,0 +1,13 @@
+$NetBSD: patch-libxorp_ipv6.hh,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxorp/ipv6.hh.orig 2013-04-29 19:22:56.000000000 +0000
++++ libxorp/ipv6.hh
+@@ -459,7 +459,7 @@ public:
+ * @return address size in number of octets.
+ */
+ static size_t addr_bytelen() {
+- static_assert(sizeof(IPv6) == 4 * sizeof(uint32_t));
++ my_static_assert(sizeof(IPv6) == 4 * sizeof(uint32_t));
+ return sizeof(IPv6);
+ }
+
diff --git a/net/xorp/patches/patch-libxorp_ipvx.cc b/net/xorp/patches/patch-libxorp_ipvx.cc
new file mode 100644
index 00000000000..d926a0e6dc1
--- /dev/null
+++ b/net/xorp/patches/patch-libxorp_ipvx.cc
@@ -0,0 +1,35 @@
+$NetBSD: patch-libxorp_ipvx.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxorp/ipvx.cc.orig 2013-04-29 19:22:50.000000000 +0000
++++ libxorp/ipvx.cc
+@@ -70,8 +70,8 @@ IPvX::IPvX(int family, const uint8_t *fr
+
+ IPvX::IPvX(const IPv4& ipv4)
+ {
+- static_assert(sizeof(_addr) >= sizeof(IPv4));
+- static_assert(sizeof(IPv4) == 4);
++ my_static_assert(sizeof(_addr) >= sizeof(IPv4));
++ my_static_assert(sizeof(IPv4) == 4);
+
+ _af = AF_INET;
+ memset(_addr, 0, sizeof(_addr));
+@@ -80,8 +80,8 @@ IPvX::IPvX(const IPv4& ipv4)
+
+ IPvX::IPvX(const IPv6& ipv6)
+ {
+- static_assert(sizeof(_addr) >= sizeof(IPv6));
+- static_assert(sizeof(IPv6) == 16);
++ my_static_assert(sizeof(_addr) >= sizeof(IPv6));
++ my_static_assert(sizeof(IPv6) == 16);
+
+ _af = AF_INET6;
+ memcpy(_addr, &ipv6, 16);
+@@ -197,7 +197,7 @@ IPvX::operator>>(uint32_t right_shift) c
+ bool
+ IPvX::operator<(const IPvX& other) const
+ {
+- static_assert(sizeof(_addr) == 16);
++ my_static_assert(sizeof(_addr) == 16);
+ int i;
+
+ for (i = 0; i < 3; i++) { // Loop ends intentionally at 3 not 4.
diff --git a/net/xorp/patches/patch-libxorp_selector.cc b/net/xorp/patches/patch-libxorp_selector.cc
new file mode 100644
index 00000000000..656ce695bba
--- /dev/null
+++ b/net/xorp/patches/patch-libxorp_selector.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-libxorp_selector.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- libxorp/selector.cc.orig 2013-04-29 19:22:54.000000000 +0000
++++ libxorp/selector.cc
+@@ -203,7 +203,7 @@ SelectorList::SelectorList(ClockBase *cl
+ : _clock(clock), _observer(NULL), _testfds_n(0), _last_served_fd(-1),
+ _last_served_sel(-1), _maxfd(0), _descriptor_count(0), _is_debug(false)
+ {
+- static_assert(SEL_RD == (1 << SEL_RD_IDX) && SEL_WR == (1 << SEL_WR_IDX)
++ my_static_assert(SEL_RD == (1 << SEL_RD_IDX) && SEL_WR == (1 << SEL_WR_IDX)
+ && SEL_EX == (1 << SEL_EX_IDX) && SEL_MAX_IDX == 3);
+ for (int i = 0; i < SEL_MAX_IDX; i++)
+ FD_ZERO(&_fds[i]);
diff --git a/net/xorp/patches/patch-libxorp_utility.h b/net/xorp/patches/patch-libxorp_utility.h
index fea73136b44..39d95efdb49 100644
--- a/net/xorp/patches/patch-libxorp_utility.h
+++ b/net/xorp/patches/patch-libxorp_utility.h
@@ -1,16 +1,20 @@
-$NetBSD: patch-libxorp_utility.h,v 1.2 2012/09/28 05:47:32 dholland Exp $
+$NetBSD: patch-libxorp_utility.h,v 1.3 2013/05/30 15:37:24 joerg Exp $
--- libxorp/utility.h.orig 2009-01-05 18:30:58.000000000 +0000
+++ libxorp/utility.h
-@@ -31,7 +31,7 @@
+@@ -30,9 +30,9 @@
+ /*
* Compile time assertion.
*/
- #ifndef static_assert
+-#ifndef static_assert
-#define static_assert(a) switch (a) case 0: case (a):
-+#define static_assert(a) ((void)sizeof(int[(a) ? 1 : -1]))
- #endif /* static_assert */
+-#endif /* static_assert */
++#ifndef my_static_assert
++#define my_static_assert(a) ((void)sizeof(int[(a) ? 1 : -1]))
++#endif /* my_static_assert */
/*
+ * A macro to avoid compilation warnings about unused functions arguments.
@@ -42,7 +42,7 @@
#ifdef UNUSED
# undef UNUSED
diff --git a/net/xorp/patches/patch-ospf_packet.cc b/net/xorp/patches/patch-ospf_packet.cc
new file mode 100644
index 00000000000..2893f6c7529
--- /dev/null
+++ b/net/xorp/patches/patch-ospf_packet.cc
@@ -0,0 +1,13 @@
+$NetBSD: patch-ospf_packet.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- ospf/packet.cc.orig 2013-04-29 19:23:06.000000000 +0000
++++ ospf/packet.cc
+@@ -272,7 +272,7 @@ Packet::decode_standard_header(uint8_t *
+ switch(version) {
+ case OspfTypes::V2:
+ // Verify the auth structure is the correct size.
+- static_assert(sizeof(_auth) == (64 / 8));
++ my_static_assert(sizeof(_auth) == (64 / 8));
+ set_auth_type(extract_16(&ptr[Packet::AUTH_TYPE_OFFSET]));
+ memcpy(&_auth[0], &ptr[Packet::AUTH_PAYLOAD_OFFSET], sizeof(_auth));
+ // The authentication field is expected to be zero for the
diff --git a/net/xorp/patches/patch-ospf_peer.cc b/net/xorp/patches/patch-ospf_peer.cc
index 9555b7840a7..4f6667a713d 100644
--- a/net/xorp/patches/patch-ospf_peer.cc
+++ b/net/xorp/patches/patch-ospf_peer.cc
@@ -1,7 +1,22 @@
-$NetBSD: patch-ospf_peer.cc,v 1.1 2012/07/03 17:36:10 joerg Exp $
+$NetBSD: patch-ospf_peer.cc,v 1.2 2013/05/30 15:37:24 joerg Exp $
--- ospf/peer.cc.orig 2009-01-05 18:31:01.000000000 +0000
+++ ospf/peer.cc
+@@ -170,12 +170,12 @@ PeerOut<A>::get_frame_size() const
+ switch(_ospf.get_version()) {
+ case OspfTypes::V2:
+ frame -= sizeof(struct ip);
+- static_assert(20 == sizeof(struct ip));
++ my_static_assert(20 == sizeof(struct ip));
+ break;
+ case OspfTypes::V3:
+ #ifdef HAVE_NETINET_IP6_H
+ frame -= sizeof(struct ip6_hdr);
+- static_assert(40 == sizeof(struct ip6_hdr));
++ my_static_assert(40 == sizeof(struct ip6_hdr));
+ #else
+ frame -= 40;
+ #endif
@@ -301,19 +301,16 @@ template <typename A>
void
PeerOut<A>::peer_change()
diff --git a/net/xorp/patches/patch-rip_auth.cc b/net/xorp/patches/patch-rip_auth.cc
new file mode 100644
index 00000000000..b99812a1e5a
--- /dev/null
+++ b/net/xorp/patches/patch-rip_auth.cc
@@ -0,0 +1,33 @@
+$NetBSD: patch-rip_auth.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- rip/auth.cc.orig 2013-04-29 19:23:08.000000000 +0000
++++ rip/auth.cc
+@@ -255,8 +255,8 @@ PlaintextAuthHandler::authenticate_outbo
+ if (head_entries() > 0)
+ first_entry_ptr = packet.route_entry_ptr(0);
+
+- static_assert(PacketRouteEntry<IPv4>::SIZE == 20);
+- static_assert(PlaintextPacketRouteEntry4::SIZE == 20);
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == 20);
++ my_static_assert(PlaintextPacketRouteEntry4::SIZE == 20);
+ XLOG_ASSERT(packet.data_ptr() + RipPacketHeader::size()
+ == first_entry_ptr);
+
+@@ -488,7 +488,7 @@ MD5AuthHandler::authenticate_inbound(con
+ const IPv4& src_addr,
+ bool new_peer)
+ {
+- static_assert(MD5PacketTrailer::SIZE == 20);
++ my_static_assert(MD5PacketTrailer::SIZE == 20);
+
+ //
+ // XXX: if no valid keys, then don't use any authentication
+@@ -627,7 +627,7 @@ MD5AuthHandler::authenticate_outbound(Ri
+ vector<uint8_t> first_trailer;
+ KeyChain::iterator iter;
+
+- static_assert(MD5PacketTrailer::SIZE == 20);
++ my_static_assert(MD5PacketTrailer::SIZE == 20);
+
+ //
+ // XXX: if no valid keys, then don't use any authentication
diff --git a/net/xorp/patches/patch-rip_packets.hh b/net/xorp/patches/patch-rip_packets.hh
new file mode 100644
index 00000000000..d1f723370c6
--- /dev/null
+++ b/net/xorp/patches/patch-rip_packets.hh
@@ -0,0 +1,78 @@
+$NetBSD: patch-rip_packets.hh,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- rip/packets.hh.orig 2013-04-29 19:23:15.000000000 +0000
++++ rip/packets.hh
+@@ -51,9 +51,9 @@ public:
+ _unused0(_data + _unused0_offset),
+ _unused1(_data + _unused1_offset)
+ {
+- static_assert(RipPacketHeader::SIZE == _command_sizeof
++ my_static_assert(RipPacketHeader::SIZE == _command_sizeof
+ + _version_sizeof + _unused0_sizeof + _unused1_sizeof);
+- static_assert(RipPacketHeader::SIZE == _unused1_offset
++ my_static_assert(RipPacketHeader::SIZE == _unused1_offset
+ + _unused1_sizeof);
+ }
+
+@@ -220,10 +220,10 @@ public:
+ _nh(_data + _nh_offset),
+ _metric(_data + _metric_offset)
+ {
+- static_assert(PacketRouteEntry<IPv4>::SIZE == _af_sizeof + _tag_sizeof
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == _af_sizeof + _tag_sizeof
+ + _addr_sizeof + _mask_sizeof + _nh_sizeof
+ + _metric_sizeof);
+- static_assert(PacketRouteEntry<IPv4>::SIZE == _metric_offset
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == _metric_offset
+ + _metric_sizeof);
+ }
+
+@@ -406,9 +406,9 @@ public:
+ _auth(_data + _auth_offset),
+ _pw(_data + _pw_offset)
+ {
+- static_assert(PlaintextPacketRouteEntry4::SIZE == _af_sizeof
++ my_static_assert(PlaintextPacketRouteEntry4::SIZE == _af_sizeof
+ + _auth_sizeof + _pw_sizeof);
+- static_assert(PlaintextPacketRouteEntry4::SIZE == _pw_offset
++ my_static_assert(PlaintextPacketRouteEntry4::SIZE == _pw_offset
+ + _pw_sizeof);
+ }
+
+@@ -532,10 +532,10 @@ public:
+ _seqno(_data + _seqno_offset),
+ _mbz(_data + _mbz_offset)
+ {
+- static_assert(MD5PacketRouteEntry4::SIZE == _af_sizeof + _auth_sizeof
++ my_static_assert(MD5PacketRouteEntry4::SIZE == _af_sizeof + _auth_sizeof
+ + _auth_off_sizeof + _key_id_sizeof + _auth_bytes_sizeof
+ + _seqno_sizeof + _mbz_sizeof);
+- static_assert(MD5PacketRouteEntry4::SIZE == _mbz_offset + _mbz_sizeof);
++ my_static_assert(MD5PacketRouteEntry4::SIZE == _mbz_offset + _mbz_sizeof);
+ }
+
+ static const size_t SIZE = 20; // The entry size
+@@ -665,9 +665,9 @@ public:
+ _one(_data + _one_offset),
+ _auth_data(_data + _auth_data_offset)
+ {
+- static_assert(MD5PacketTrailer::SIZE == _af_sizeof + _one_sizeof
++ my_static_assert(MD5PacketTrailer::SIZE == _af_sizeof + _one_sizeof
+ + _auth_data_sizeof);
+- static_assert(MD5PacketTrailer::SIZE == _auth_data_offset
++ my_static_assert(MD5PacketTrailer::SIZE == _auth_data_offset
+ + _auth_data_sizeof);
+ }
+
+@@ -774,9 +774,9 @@ public:
+ _prefix_len(_data + _prefix_len_offset),
+ _metric(_data + _metric_offset)
+ {
+- static_assert(PacketRouteEntry<IPv6>::SIZE == _prefix_sizeof
++ my_static_assert(PacketRouteEntry<IPv6>::SIZE == _prefix_sizeof
+ + _tag_sizeof + _prefix_len_sizeof + _metric_sizeof);
+- static_assert(PacketRouteEntry<IPv6>::SIZE == _metric_offset
++ my_static_assert(PacketRouteEntry<IPv6>::SIZE == _metric_offset
+ + _metric_sizeof);
+ }
+
diff --git a/net/xorp/patches/patch-rip_port.cc b/net/xorp/patches/patch-rip_port.cc
new file mode 100644
index 00000000000..092d07eb989
--- /dev/null
+++ b/net/xorp/patches/patch-rip_port.cc
@@ -0,0 +1,15 @@
+$NetBSD: patch-rip_port.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- rip/port.cc.orig 2013-04-29 19:23:11.000000000 +0000
++++ rip/port.cc
+@@ -781,8 +781,8 @@ Port<A>::port_io_receive(const A& src_ad
+ {
+ string why;
+
+- static_assert(RipPacketHeader::SIZE == 4);
+- static_assert(PacketRouteEntry<A>::SIZE == 20);
++ my_static_assert(RipPacketHeader::SIZE == 4);
++ my_static_assert(PacketRouteEntry<A>::SIZE == 20);
+
+ if (enabled() == false) {
+ debug_msg("Discarding RIP packet: Port not enabled.");
diff --git a/net/xorp/patches/patch-rip_test__auth.cc b/net/xorp/patches/patch-rip_test__auth.cc
new file mode 100644
index 00000000000..2ab7eae1c99
--- /dev/null
+++ b/net/xorp/patches/patch-rip_test__auth.cc
@@ -0,0 +1,29 @@
+$NetBSD: patch-rip_test__auth.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- rip/test_auth.cc.orig 2013-04-29 19:23:13.000000000 +0000
++++ rip/test_auth.cc
+@@ -260,16 +260,16 @@ test_main()
+ string dummy_error_msg;
+
+ // Static sizing tests
+- static_assert(RipPacketHeader::SIZE == 4);
+- static_assert(PacketRouteEntry<IPv4>::SIZE == 20);
+- static_assert(RipPacketHeader::SIZE == RIPv2_MIN_PACKET_BYTES);
+- static_assert(RipPacketHeader::SIZE + PacketRouteEntry<IPv4>::SIZE
++ my_static_assert(RipPacketHeader::SIZE == 4);
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == 20);
++ my_static_assert(RipPacketHeader::SIZE == RIPv2_MIN_PACKET_BYTES);
++ my_static_assert(RipPacketHeader::SIZE + PacketRouteEntry<IPv4>::SIZE
+ == RIPv2_MIN_AUTH_PACKET_BYTES);
+- static_assert(PacketRouteEntry<IPv4>::SIZE
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE
+ == PlaintextPacketRouteEntry4::SIZE);
+- static_assert(PacketRouteEntry<IPv4>::SIZE == MD5PacketRouteEntry4::SIZE);
+- static_assert(MD5PacketTrailer::SIZE == 20);
+- static_assert(PacketRouteEntry<IPv4>::SIZE
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == MD5PacketRouteEntry4::SIZE);
++ my_static_assert(MD5PacketTrailer::SIZE == 20);
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE
+ == PacketRouteEntry<IPv6>::SIZE);
+
+ vector<uint8_t> pkt;
diff --git a/net/xorp/patches/patch-rip_test__packets.cc b/net/xorp/patches/patch-rip_test__packets.cc
new file mode 100644
index 00000000000..d72b57386d0
--- /dev/null
+++ b/net/xorp/patches/patch-rip_test__packets.cc
@@ -0,0 +1,29 @@
+$NetBSD: patch-rip_test__packets.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- rip/test_packets.cc.orig 2013-04-29 19:23:17.000000000 +0000
++++ rip/test_packets.cc
+@@ -53,16 +53,16 @@ static int
+ test_main()
+ {
+ // Static sizing tests
+- static_assert(RipPacketHeader::SIZE == 4);
+- static_assert(PacketRouteEntry<IPv4>::SIZE == 20);
+- static_assert(RipPacketHeader::SIZE == RIPv2_MIN_PACKET_BYTES);
+- static_assert(RipPacketHeader::SIZE + PacketRouteEntry<IPv4>::SIZE
++ my_static_assert(RipPacketHeader::SIZE == 4);
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == 20);
++ my_static_assert(RipPacketHeader::SIZE == RIPv2_MIN_PACKET_BYTES);
++ my_static_assert(RipPacketHeader::SIZE + PacketRouteEntry<IPv4>::SIZE
+ == RIPv2_MIN_AUTH_PACKET_BYTES);
+- static_assert(PacketRouteEntry<IPv4>::SIZE
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE
+ == PlaintextPacketRouteEntry4::SIZE);
+- static_assert(PacketRouteEntry<IPv4>::SIZE == MD5PacketRouteEntry4::SIZE);
+- static_assert(MD5PacketTrailer::SIZE == 20);
+- static_assert(PacketRouteEntry<IPv4>::SIZE
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE == MD5PacketRouteEntry4::SIZE);
++ my_static_assert(MD5PacketTrailer::SIZE == 20);
++ my_static_assert(PacketRouteEntry<IPv4>::SIZE
+ == PacketRouteEntry<IPv6>::SIZE);
+
+ //
diff --git a/net/xorp/patches/patch-vrrp_vrrp__packet.cc b/net/xorp/patches/patch-vrrp_vrrp__packet.cc
new file mode 100644
index 00000000000..f3018074141
--- /dev/null
+++ b/net/xorp/patches/patch-vrrp_vrrp__packet.cc
@@ -0,0 +1,15 @@
+$NetBSD: patch-vrrp_vrrp__packet.cc,v 1.1 2013/05/30 15:37:24 joerg Exp $
+
+--- vrrp/vrrp_packet.cc.orig 2013-04-29 19:23:25.000000000 +0000
++++ vrrp/vrrp_packet.cc
+@@ -34,8 +34,8 @@ const IPv4 VrrpPacket::mcast_group = IPv
+ VrrpHeader&
+ VrrpHeader::assign(uint8_t* data)
+ {
+- static_assert(sizeof(VrrpHeader) == 8);
+- static_assert(sizeof(VrrpAuth) == 8);
++ my_static_assert(sizeof(VrrpHeader) == 8);
++ my_static_assert(sizeof(VrrpAuth) == 8);
+
+ VrrpHeader* vh = reinterpret_cast<VrrpHeader*>(data);
+