]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Resync with upstream
authorRoy Marples <roy@marples.name>
Thu, 7 Mar 2019 15:12:27 +0000 (15:12 +0000)
committerRoy Marples <roy@marples.name>
Thu, 7 Mar 2019 15:12:27 +0000 (15:12 +0000)
compat/rbtree.h
src/common.h

index da828fd606aba6fb192313d9135165c05ab9af91..b227fd70c15ba14a0ecc04a9f3f772cf7065ad8d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $NetBSD: rbtree.h,v 1.4 2019/03/07 12:07:42 roy Exp $   */
+/*     $NetBSD: rbtree.h,v 1.5 2019/03/07 14:39:21 roy Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -61,8 +61,8 @@ typedef struct rb_node {
         * rb_node will have an alignment of 4 or 8 bytes.
         */
        uintptr_t rb_info;
-#define        RB_FLAG_POSITION        __BIT(1)
-#define        RB_FLAG_RED             __BIT(0)
+#define        RB_FLAG_POSITION        (uintptr_t)0x2
+#define        RB_FLAG_RED             (uintptr_t)0x1
 #define        RB_FLAG_MASK            (RB_FLAG_POSITION|RB_FLAG_RED)
 #define        RB_FATHER(rb) \
     ((struct rb_node *)((rb)->rb_info & ~RB_FLAG_MASK))
index a1dc5217bf6ea02a54e01b7906377693f16ce7bd..49abd418bcc26d5c4e8f3d6d1db5f56519886974 100644 (file)
 #define HOSTNAME_MAX_LEN       250     /* 255 - 3 (FQDN) - 2 (DNS enc) */
 #endif
 
-#ifndef __BIT
-#define __BIT(__n)     \
-    (((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : \
-    ((uintmax_t)1 << (uintmax_t)((__n) & (NBBY * sizeof(uintmax_t) - 1))))
-#endif
-
 #ifndef MIN
 #define MIN(a,b)               ((/*CONSTCOND*/(a)<(b))?(a):(b))
 #define MAX(a,b)               ((/*CONSTCOND*/(a)>(b))?(a):(b))