Subject: Re: soc zfs: namespace collision between proplib and compat code
To: None <,,>
From: Matthias Scheler <>
List: tech-userlevel
Date: 08/15/2007 21:21:02
On Wed, Aug 15, 2007 at 04:14:59PM -0400, Oliver Gould wrote:
> A not-insignificant amount of FreeBSD-compatible Solaris userland code
> (from which I am porting ZFS utilities) relies on boolean_t.  In order
> to accommodate this code, I added the following (or something
> thereabout) to the ZFS compatibility layer's sys/types.h:
>   #ifndef _KERNEL
>   ...
>   typedef enum {false, true}	boolean_t; 
>   ...
>   #endif

What about "typedef bool boolean_t"?

> However, for code that also includes sys <sys/disk.h>, there is a
> conflict with the boolean_t defined in <prop/prop_object.h>.
>   typedef      int     boolean_t;

This looks bogus. Jason: why is that definition in there?

> Otherwise, it seems (to me) like a good idea to change proplib's
> boolean_t to e.g. prop_boolean_t -- or, better yet, bool_t.

I think it should use "bool".

> Or, if code in the NetBSD source tree is actually going to continue
> using boolean_t, perhaps its definition could be moved somewhere more
> common to other code?

No, "boolean_t" was removed a while ago.

	Kind regards

Matthias Scheler