svn commit: r253442 - head/tools/regression/aio/aiop
brde at optusnet.com.au
Thu Jul 18 06:14:10 UTC 2013
On Thu, 18 Jul 2013, Kevin Lo wrote:
> 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.
More information about the svn-src-head