cvs commit: src/sys/net
Matthew Dillon
dillon at apollo.backplane.com
Wed Dec 15 19:35:48 PST 2004
:<stdbool.h> has an ugly side-effect of defining a macro
: #define bool _Bool
:and this breaks the following place in src/usr.sbin/mrouted/kern.c:
:
: void
: k_hdr_include(int bool)
:
:So I'd rather suggest rolling your own boolean_t in radix.h(provided
:you can't move boolean_t out of `#ifdef _KERNEL' conditional
:in /sys/sys/types.h) for !_KERNEL case.
:
:Index: radix.h
:===================================================================
:RCS file: /dragonfly/cvs/src/sys/net/radix.h,v
:retrieving revision 1.7
:diff -u -r1.7 radix.h
:--- radix.h 15 Dec 2004 07:32:26 -0000 1.7
:+++ radix.h 16 Dec 2004 03:21:44 -0000
:@@ -150,10 +150,9 @@
: };
:
: #ifndef _KERNEL
:-#include <stdbool.h>
:-#define boolean_t bool
: #define R_Malloc(p, t, n) (p = (t) malloc((n)))
: #define Free(p) free(p);
:+typedef int boolean_t;
: #else
: #define R_Malloc(p, t, n) (p = (t) malloc((n), M_RTABLE, M_INTWAIT | M_NULLOK))
: #define Free(p) free(p, M_RTABLE);
It's easier to fix mrouted. Frankly, the radix header file has no
business implementing its own boolean type.
-Matt
Matthew Dillon
<dillon at xxxxxxxxxxxxx>
More information about the Commits
mailing list