From: Roy Marples Date: Thu, 7 Mar 2019 12:21:20 +0000 (+0000) Subject: rbtree: reduce more with upstream X-Git-Tag: v8.0.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2db4f26f86e37b2a720cf5259720d7c137c34cbe;p=thirdparty%2Fdhcpcd.git rbtree: reduce more with upstream --- diff --git a/compat/rb.c b/compat/rb.c index 3b1c3e5f..0e0a2cf5 100644 --- a/compat/rb.c +++ b/compat/rb.c @@ -29,6 +29,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "common.h" + #if !defined(_KERNEL) && !defined(_STANDALONE) #include #include @@ -39,7 +41,7 @@ #else #define KASSERT(s) do { } while (/*CONSTCOND*/ 0) #endif -//__RCSID("$NetBSD: rb.c,v 1.13 2014/08/22 17:19:48 matt Exp $"); +__RCSID("$NetBSD: rb.c,v 1.13 2014/08/22 17:19:48 matt Exp $"); #else #include __KERNEL_RCSID(0, "$NetBSD: rb.c,v 1.13 2014/08/22 17:19:48 matt Exp $"); @@ -67,8 +69,6 @@ __weak_alias(rb_tree_depths, _rb_tree_depths) #include #endif -#include "common.h" - static void rb_tree_insert_rebalance(struct rb_tree *, struct rb_node *); static void rb_tree_removal_rebalance(struct rb_tree *, struct rb_node *, unsigned int); diff --git a/src/common.h b/src/common.h index e70b8b9e..a1dc5217 100644 --- a/src/common.h +++ b/src/common.h @@ -136,6 +136,8 @@ # endif #endif +/* Needed for rbtree(3) compat */ +#define __RCSID(a) #ifndef __predict_false # if __GNUC__ > 2 # define __predict_true(exp) __builtin_expect((exp) != 0, 1)