mount.h/radix.h
Jeroen Ruigrok/asmodai
asmodai at wxs.nl
Mon Jan 24 15:11:41 PST 2005
mount.h does:
#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES)
#include <net/radix.h>
radix.h:
#ifndef _KERNEL
#include <stdbool.h>
#define boolean_t bool
#define R_Malloc(p, t, n) (p = (t) malloc((n)))
#define Free(p) free(p);
#else
#define R_Malloc(p, t, n) (p = (t) malloc((n), M_RTABLE, M_INTWAIT | M_NULLOK))
#define Free(p) free(p, M_RTABLE);
#endif
Isn't this kind of backwards?
I mean, if you develop userland applications you include sys/types.h, which
type defines boolean_t to an int, then you include stdbool.h and happily
hardwire it to boolean_t while stdbool.h should fix the case if the compiler
doesn't support the _Bool object by hardwiring it to an int typedef. So
totally unneeded.
Also, if _KERNEL is defined, where is the boolean_t picked up from in order
to properly use rn_refines?
boolean_t rn_refines (char *, char *);
--
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Free Tibet! http://www.savetibet.org/ | http://ashemedai.deviantart.com/
http://www.tendra.org/ | http://www.in-nomine.org/
Of course I can't say, whether it will become better if it gets changed;
but as much as I can say, it must change if it shall become good...
More information about the Submit
mailing list