From owner-svn-src-head@FreeBSD.ORG Thu Jul 18 06:14:10 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 108C0D43; Thu, 18 Jul 2013 06:14:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id B74208AA; Thu, 18 Jul 2013 06:14:09 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 920801216BC; Thu, 18 Jul 2013 15:54:50 +1000 (EST) Date: Thu, 18 Jul 2013 15:54:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kevin Lo Subject: Re: svn commit: r253442 - head/tools/regression/aio/aiop In-Reply-To: <201307180140.r6I1eWLA016841@svn.freebsd.org> Message-ID: <20130718153625.Q948@besplex.bde.org> References: <201307180140.r6I1eWLA016841@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=CTK96SQ0aVMA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=5h7fK-8y68oA:10 a=DAjhxciThkUBC3tQ3pUA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 18 Jul 2013 06:14:10 -0000 On Thu, 18 Jul 2013, Kevin Lo wrote: > Log: > Replace PRId64 with "jd" in a printf call. Cast the corresponding value to > intmax_t, because the original type is off_t. > > Reported by: bde Thanks, but it still includes inttypes.h for the definition of PRId64. Use of inttypes.h instead of stdint.h is another indication of style bugs. stdint.h declares almost all the useful things related to integer types except the prototypes for strtoimax(). Many applications only need the types. Here you need stdint.h for the definition of intmax_t. Learning of the correct includes for integer types is hindered by namespace pollution in the kernel. In the kernel, an include of sys/stdint.h is standard pollution in sys/systm.h. So kernel code never needs to include stdint.h, and including it explicitly is a style bug. Including inttypes.h in the kernel is a much larger style bug. This header doesn't exists in the kernel, but bad code finds some of its implementation details in machine/_inttypes.h. Bruce