diff --git a/lib/dns/include/dns/rbt.h b/lib/dns/include/dns/rbt.h index 084d28732c..768f4d301e 100644 --- a/lib/dns/include/dns/rbt.h +++ b/lib/dns/include/dns/rbt.h @@ -13,6 +13,7 @@ /*! \file dns/rbt.h */ +#include #include #include #include @@ -1077,7 +1078,7 @@ dns_rbtnodechain_nextflat(dns_rbtnodechain_t *chain, dns_name_t *name); } while (0) #else /* DNS_RBT_USEISCREFCOUNT */ #define dns_rbtnode_refinit(node, n) ((node)->references = (n)) -#define dns_rbtnode_refdestroy(node) REQUIRE((node)->references == 0) +#define dns_rbtnode_refdestroy(node) ISC_REQUIRE((node)->references == 0) #define dns_rbtnode_refcurrent(node) ((node)->references) #if (__STDC_VERSION__ + 0) >= 199901L || defined __GNUC__ @@ -1090,7 +1091,7 @@ dns_rbtnode_refincrement0(dns_rbtnode_t *node, unsigned int *refs) { static inline void dns_rbtnode_refincrement(dns_rbtnode_t *node, unsigned int *refs) { - REQUIRE(node->references > 0); + ISC_REQUIRE(node->references > 0); node->references++; if (refs != NULL) *refs = node->references; @@ -1098,7 +1099,7 @@ dns_rbtnode_refincrement(dns_rbtnode_t *node, unsigned int *refs) { static inline void dns_rbtnode_refdecrement(dns_rbtnode_t *node, unsigned int *refs) { - REQUIRE(node->references > 0); + ISC_REQUIRE(node->references > 0); node->references--; if (refs != NULL) *refs = node->references; @@ -1113,14 +1114,14 @@ dns_rbtnode_refdecrement(dns_rbtnode_t *node, unsigned int *refs) { } while (0) #define dns_rbtnode_refincrement(node, refs) \ do { \ - REQUIRE((node)->references > 0); \ + ISC_REQUIRE((node)->references > 0); \ (node)->references++; \ if ((refs) != NULL) \ (*refs) = (node)->references; \ } while (0) #define dns_rbtnode_refdecrement(node, refs) \ do { \ - REQUIRE((node)->references > 0); \ + ISC_REQUIRE((node)->references > 0); \ (node)->references--; \ if ((refs) != NULL) \ (*refs) = (node)->references; \ diff --git a/lib/isc/include/isc/assertions.h b/lib/isc/include/isc/assertions.h index a3c5ee6077..cb67f61679 100644 --- a/lib/isc/include/isc/assertions.h +++ b/lib/isc/include/isc/assertions.h @@ -16,6 +16,7 @@ #define ISC_ASSERTIONS_H 1 #include +#include #include ISC_LANG_BEGINDECLS diff --git a/lib/isc/include/isc/buffer.h b/lib/isc/include/isc/buffer.h index c4f21b774d..5f8ad17819 100644 --- a/lib/isc/include/isc/buffer.h +++ b/lib/isc/include/isc/buffer.h @@ -96,8 +96,10 @@ *** Imports ***/ +#include #include #include +#include #include #include @@ -911,10 +913,10 @@ ISC_LANG_ENDDECLS do { \ if (ISC_UNLIKELY((_b)->autore)) { \ isc_buffer_t *_tmp = _b; \ - REQUIRE(isc_buffer_reserve(&_tmp, _length) \ + ISC_REQUIRE(isc_buffer_reserve(&_tmp, _length) \ == ISC_R_SUCCESS); \ } \ - REQUIRE(isc_buffer_availablelength(_b) >= (unsigned int) _length); \ + ISC_REQUIRE(isc_buffer_availablelength(_b) >= (unsigned int) _length); \ memmove(isc_buffer_used(_b), (_base), (_length)); \ (_b)->used += (_length); \ } while (0) @@ -926,10 +928,10 @@ ISC_LANG_ENDDECLS _length = strlen(_source); \ if (ISC_UNLIKELY((_b)->autore)) { \ isc_buffer_t *_tmp = _b; \ - REQUIRE(isc_buffer_reserve(&_tmp, _length) \ + ISC_REQUIRE(isc_buffer_reserve(&_tmp, _length) \ == ISC_R_SUCCESS); \ } \ - REQUIRE(isc_buffer_availablelength(_b) >= (unsigned int) _length); \ + ISC_REQUIRE(isc_buffer_availablelength(_b) >= (unsigned int) _length); \ _cp = isc_buffer_used(_b); \ memmove(_cp, (_source), _length); \ (_b)->used += (_length); \ @@ -942,10 +944,10 @@ ISC_LANG_ENDDECLS isc_uint8_t _val2 = (_val); \ if (ISC_UNLIKELY((_b)->autore)) { \ isc_buffer_t *_tmp = _b; \ - REQUIRE(isc_buffer_reserve(&_tmp, 1) \ + ISC_REQUIRE(isc_buffer_reserve(&_tmp, 1) \ == ISC_R_SUCCESS); \ } \ - REQUIRE(isc_buffer_availablelength(_b) >= 1U); \ + ISC_REQUIRE(isc_buffer_availablelength(_b) >= 1U); \ _cp = isc_buffer_used(_b); \ (_b)->used++; \ _cp[0] = _val2; \ @@ -958,10 +960,10 @@ ISC_LANG_ENDDECLS isc_uint16_t _val2 = (_val); \ if (ISC_UNLIKELY((_b)->autore)) { \ isc_buffer_t *_tmp = _b; \ - REQUIRE(isc_buffer_reserve(&_tmp, 2) \ + ISC_REQUIRE(isc_buffer_reserve(&_tmp, 2) \ == ISC_R_SUCCESS); \ } \ - REQUIRE(isc_buffer_availablelength(_b) >= 2U); \ + ISC_REQUIRE(isc_buffer_availablelength(_b) >= 2U); \ _cp = isc_buffer_used(_b); \ (_b)->used += 2; \ _cp[0] = (unsigned char)(_val2 >> 8); \ @@ -975,10 +977,10 @@ ISC_LANG_ENDDECLS isc_uint32_t _val2 = (_val); \ if (ISC_UNLIKELY((_b)->autore)) { \ isc_buffer_t *_tmp = _b; \ - REQUIRE(isc_buffer_reserve(&_tmp, 3) \ + ISC_REQUIRE(isc_buffer_reserve(&_tmp, 3) \ == ISC_R_SUCCESS); \ } \ - REQUIRE(isc_buffer_availablelength(_b) >= 3U); \ + ISC_REQUIRE(isc_buffer_availablelength(_b) >= 3U); \ _cp = isc_buffer_used(_b); \ (_b)->used += 3; \ _cp[0] = (unsigned char)(_val2 >> 16); \ @@ -993,10 +995,10 @@ ISC_LANG_ENDDECLS isc_uint32_t _val2 = (_val); \ if (ISC_UNLIKELY((_b)->autore)) { \ isc_buffer_t *_tmp = _b; \ - REQUIRE(isc_buffer_reserve(&_tmp, 4) \ + ISC_REQUIRE(isc_buffer_reserve(&_tmp, 4) \ == ISC_R_SUCCESS); \ } \ - REQUIRE(isc_buffer_availablelength(_b) >= 4U); \ + ISC_REQUIRE(isc_buffer_availablelength(_b) >= 4U); \ _cp = isc_buffer_used(_b); \ (_b)->used += 4; \ _cp[0] = (unsigned char)(_val2 >> 24); \ diff --git a/lib/isc/include/isc/error.h b/lib/isc/include/isc/error.h index 78804042a2..f808f6d4ef 100644 --- a/lib/isc/include/isc/error.h +++ b/lib/isc/include/isc/error.h @@ -17,6 +17,7 @@ #include #include +#include #include ISC_LANG_BEGINDECLS