Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: src/sys/sys/rb.h causes problem?



On Wed, Jun 04, 2008 at 06:14:35PM +0200, Patrick Welche wrote:
> On Wed, Jun 04, 2008 at 09:08:04AM -0700, Paul Goyette wrote:
> >> /u/NetBSD/src/sys/sys/rb.h:164: error: expected '=', ',', ';', 'asm' or 
> >> '__attribute__' before 'rb_tree_insert_node'
> >> /u/NetBSD/src/sys/sys/rb.h:164: error: expected '=', ',', ';', 'asm' or 
> >> '__attribute__' before 'rb_tree_insert_node'
> 
> Yes, what is odd is that rb.h includes sys/types.h which does
> 
> #if defined(_KERNEL) || defined(_STANDALONE)
> #define bool    _Bool
> 
> Ah: when compiling libc, _KERNEL isn't defined...
> 
> possibly #else #include <stdbool.h> instead?
Ok, the #include was fixed by matt@, but to get src/sys/sys/rb.h
compiled, the patch below gets me there (if it's TRT is another
question ;-)

Kurt

Index: sys/sys/rb.h
===================================================================
RCS file: /cvsroot/src/sys/sys/rb.h,v
retrieving revision 1.2
diff -u -r1.2 rb.h
--- sys/sys/rb.h        4 Jun 2008 17:54:17 -0000       1.2
+++ sys/sys/rb.h        4 Jun 2008 21:08:45 -0000
@@ -49,20 +49,20 @@
        struct rb_node *rb_parent;
        struct rb_properties {
 #if BYTE_ORDER == LITTLE_ENDIAN
-               unsigned long int s_data : 8 * sizeof(unsigned long int) - 5;
-               unsigned long int s_moved : 1;
-               unsigned long int s_root : 1;
-               unsigned long int s_position : 1;
-               unsigned long int s_color : 1;
-               unsigned long int s_sentinel : 1;
+               unsigned int s_data : 8 * sizeof(unsigned int) - 5,
+               s_moved : 1,
+               s_root : 1,
+               s_position : 1,
+               s_color : 1,
+               s_sentinel : 1;
 #endif
 #if BYTE_ORDER == BIG_ENDIAN
-               unsigned long int s_sentinel : 1;
-               unsigned long int s_color : 1;
-               unsigned long int s_position : 1;
-               unsigned long int s_root : 1;
-               unsigned long int s_moved : 1;
-               unsigned long int s_data : 8 * sizeof(unsigned long int) - 5;
+               unsigned int s_sentinel : 1,
+               s_color : 1,
+               s_position : 1,
+               s_root : 1,
+               s_moved : 1,
+               s_data : 8 * sizeof(unsigned int) - 5;
 #endif
        } rb_info;
 #define        rb_moved                        rb_info.s_moved


Home | Main Index | Thread Index | Old Index