Date: Thu, 18 Jul 2013 15:54:49 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Kevin Lo <kevlo@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r253442 - head/tools/regression/aio/aiop Message-ID: <20130718153625.Q948@besplex.bde.org> In-Reply-To: <201307180140.r6I1eWLA016841@svn.freebsd.org> References: <201307180140.r6I1eWLA016841@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130718153625.Q948>