Bug 1545827: Rename a macro to avoid conflicts. r=mjf,drno
authorByron Campen [:bwc] <docfaraday@gmail.com>
Fri, 26 Apr 2019 14:46:43 +0000
changeset 530314 93e934e867c5955fe22d8c5baf19a805a4317ea1
parent 530313 43f6ce8cb91b45fc8bf361d91d8b61d3dd3e0050
child 530315 010e3e33937759bb284eee7570117afa2cb9c331
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf, drno
bugs1545827
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545827: Rename a macro to avoid conflicts. r=mjf,drno Differential Revision: https://phabricator.services.mozilla.com/D28845
media/mtransport/test/ice_unittest.cpp
media/mtransport/third_party/nICEr/src/net/transport_addr.c
media/mtransport/third_party/nICEr/src/net/transport_addr_reg.c
media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h
--- a/media/mtransport/test/ice_unittest.cpp
+++ b/media/mtransport/test/ice_unittest.cpp
@@ -2964,17 +2964,17 @@ void AddNonPairableCandidates(
         break;
       case 4:
         candidates.push_back(new SchedulableTrickleCandidate(
             peer, stream,
             "candidate:0 1 UDP 2113601793 100.64.1.1 12345 typ host", "",
             test_utils_));
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
   }
 
   for (auto i = candidates.rbegin(); i != candidates.rend(); ++i) {
     std::cerr << "Scheduling candidate: " << (*i)->Candidate().c_str()
               << std::endl;
     (*i)->Schedule(0);
   }
--- a/media/mtransport/third_party/nICEr/src/net/transport_addr.c
+++ b/media/mtransport/third_party/nICEr/src/net/transport_addr.c
@@ -392,27 +392,27 @@ int nr_transport_addr_is_loopback(nr_tra
     switch(addr->ip_version){
       case NR_IPV4:
         switch(addr->u.addr4.sin_family){
           case AF_INET:
             if (((ntohl(addr->u.addr4.sin_addr.s_addr)>>24)&0xff)==0x7f)
               return 1;
             break;
           default:
-            UNIMPLEMENTED;
+            NR_UNIMPLEMENTED;
             break;
         }
         break;
 
       case NR_IPV6:
         if(!memcmp(addr->u.addr6.sin6_addr.s6_addr,in6addr_loopback.s6_addr,sizeof(struct in6_addr)))
           return(1);
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
 
     return(0);
   }
 
 int nr_transport_addr_is_link_local(nr_transport_addr *addr)
   {
     switch(addr->ip_version){
@@ -424,17 +424,17 @@ int nr_transport_addr_is_link_local(nr_t
       case NR_IPV6:
         {
           UINT4* addrTop = (UINT4*)(addr->u.addr6.sin6_addr.s6_addr);
           if ((*addrTop & htonl(0xFFC00000)) == htonl(0xFE800000))
             return(2);
         }
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
 
     return(0);
   }
 
 int nr_transport_addr_is_mac_based(nr_transport_addr *addr)
   {
     switch(addr->ip_version){
@@ -449,17 +449,17 @@ int nr_transport_addr_is_mac_based(nr_tr
           UINT4* macExt = (UINT4*)(addr->u.addr6.sin6_addr.s6_addr + 12);
           if ((*macCom & htonl(0x020000FF)) == htonl(0x020000FF) &&
               (*macExt & htonl(0xFF000000)) == htonl(0xFE000000)) {
             return(1);
           }
         }
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
     return(0);
   }
 
 int nr_transport_addr_is_teredo(nr_transport_addr *addr)
   {
     switch(addr->ip_version){
       case NR_IPV4:
@@ -467,17 +467,17 @@ int nr_transport_addr_is_teredo(nr_trans
       case NR_IPV6:
         {
           UINT4* addrTop = (UINT4*)(addr->u.addr6.sin6_addr.s6_addr);
           if ((*addrTop & htonl(0xFFFFFFFF)) == htonl(0x20010000))
             return(1);
         }
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
 
     return(0);
   }
 
 int nr_transport_addr_check_compatibility(nr_transport_addr *addr1, nr_transport_addr *addr2)
   {
     // first make sure we're comparing the same ip versions and protocols
@@ -504,17 +504,17 @@ int nr_transport_addr_is_wildcard(nr_tra
         break;
       case NR_IPV6:
         if(!memcmp(addr->u.addr6.sin6_addr.s6_addr,in6addr_any.s6_addr,sizeof(struct in6_addr)))
           return(1);
         if(addr->u.addr6.sin6_port==0)
           return(1);
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
 
     return(0);
   }
 
 nr_transport_addr_mask nr_private_ipv4_addrs[] = {
   /* RFC1918: 10/8 */
   {0x0A000000, 0xFF000000},
@@ -536,17 +536,17 @@ int nr_transport_addr_get_private_addr_r
             if ((ip & nr_private_ipv4_addrs[i].mask) == nr_private_ipv4_addrs[i].addr)
               return i + 1;
           }
         }
         break;
       case NR_IPV6:
         return(0);
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
     }
 
     return(0);
   }
 
 int nr_transport_addr_is_reliable_transport(nr_transport_addr *addr)
   {
     return addr->protocol == IPPROTO_TCP;
--- a/media/mtransport/third_party/nICEr/src/net/transport_addr_reg.c
+++ b/media/mtransport/third_party/nICEr/src/net/transport_addr_reg.c
@@ -173,17 +173,17 @@ nr_reg_set_transport_addr(NR_registry pr
         if ((r=NR_reg_set2_string(prefix, "protocol", "tcp")))
           ABORT(r);
         break;
       case IPPROTO_UDP:
         if ((r=NR_reg_set2_string(prefix, "protocol", "udp")))
           ABORT(r);
         break;
       default:
-        UNIMPLEMENTED;
+        NR_UNIMPLEMENTED;
         break;
     }
 
     if (strlen(addr->ifname) > 0) {
       if ((r=NR_reg_set2_string(prefix, "ifname", addr->ifname)))
         ABORT(r);
     }
 
--- a/media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h
+++ b/media/mtransport/third_party/nrappkit/src/util/libekr/r_macros.h
@@ -125,13 +125,13 @@
 
 #ifdef DEBUG
 #define DBG(a) debug a
 int debug(int cls, char *format,...);
 #else
 #define DBG(a)
 #endif
 
-#define UNIMPLEMENTED do { fprintf(stderr,"%s:%d Function %s unimplemented\n",__FILE__,__LINE__,__FUNCTION__); abort(); } while(0)
+#define NR_UNIMPLEMENTED do { fprintf(stderr,"%s:%d Function %s unimplemented\n",__FILE__,__LINE__,__FUNCTION__); abort(); } while(0)
 
 #include "r_memory.h"
 
 #endif