From owner-svn-src-head@freebsd.org Sat Dec 5 17:01:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B19D4A42C9D; Sat, 5 Dec 2015 17:01:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 816B61B40; Sat, 5 Dec 2015 17:01:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5H1cUX035069; Sat, 5 Dec 2015 17:01:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5H1c2c035068; Sat, 5 Dec 2015 17:01:38 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512051701.tB5H1c2c035068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 5 Dec 2015 17:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291861 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:01:39 -0000 Author: cem Date: Sat Dec 5 17:01:38 2015 New Revision: 291861 URL: https://svnweb.freebsd.org/changeset/base/291861 Log: style.9: Add a small blurb about allowing bool It was allowed before, but make it very explicit it is allowed now. And prefer 'bool' to older types that were used for the same purpose -- int and boolean_t. Like with the C99 fixed-width types, use common sense when changing old code. No igor regressions. Suggested by: bde <20151205031713.T3286@besplex.bde.org> Reviewed by: glebius, davide, bapt (earlier versions) Reviewed by: imp Feedback from: julian Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4384 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Sat Dec 5 16:28:14 2015 (r291860) +++ head/share/man/man9/style.9 Sat Dec 5 17:01:38 2015 (r291861) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd November 22, 2015 +.Dd December 5, 2015 .Dt STYLE 9 .Os .Sh NAME @@ -288,6 +288,30 @@ Like white-space commits, care should be .Vt uintXX_t only commits. .Pp +Similarly, the project is slowly moving to use the +.St -isoC-99 +.Vt bool +in preference to the older +.Vt int +or +.Vt boolean_t . +New code should use +.Vt bool , +and old code may be converted if it is +reasonable to do so. +Literal values are named +.Dv true +and +.Dv false . +These are preferred to the old spellings +.Dv TRUE +and +.Dv FALSE . +Userspace code should include +.In stdbool.h , +while kernel code should include +.In sys/types.h . +.Pp Enumeration values are all uppercase. .Bd -literal enum enumtype { ONE, TWO } et;