From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 29 10:30:16 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3E65FE9D for ; Mon, 29 Oct 2012 10:30:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id EA2228FC08 for ; Mon, 29 Oct 2012 10:30:15 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:dccf:f72:6e32:6adf] (unknown [IPv6:2001:7b8:3a7:0:dccf:f72:6e32:6adf]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 46B2F5C59; Mon, 29 Oct 2012 11:30:14 +0100 (CET) Message-ID: <508E5AB4.7060209@FreeBSD.org> Date: Mon, 29 Oct 2012 11:30:12 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Erik Cederstrand Subject: Re: opensolaris B_TRUE and B_FALSE References: <560EA79C-502B-418C-8BF1-A1BC28E05FD1@cederstrand.dk> <1351466692.1123.346.camel@revolution.hippie.lan> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ian Lepore , FreeBSD Hackers X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2012 10:30:16 -0000 On 2012-10-29 09:12, Erik Cederstrand wrote: > Den 29/10/2012 kl. 00.24 skrev Ian Lepore : >> Look further up in sys/cddl/compat/opensolaris/sys/types.h, they're also >> defined (as macros rather than enum) in the KERNEL case. They're also >> defined (as enum) in sys/gnu/fs/xfs/xfs_types.h. (Once again, SlickEdit >> pays for itself by answering with one right-click a question that would >> have been a pain to use grep for.) > > The code in the report is /sbin/zpool, so I assume it's not KERNEL code. As I wrote in my email, I can see B_TRUE and B_FALSE are defined as boolean_t in sys/cddl/compat/opensolaris/sys/types.h But I can't see that boolean_t is defined anywhere in the included headers as long as KERNEL is not defined. In sys/cddl/compat/opensolaris/sys/types.h, there is: typedef enum { B_FALSE, B_TRUE } boolean_t; This line defines the boolean_t type. Maybe the type itself is never used, but only the enum values. Sort of like a an anonymous enum in C++.