Date: Sun, 18 Dec 2011 18:48:37 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: mdf@freebsd.org Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric <dim@freebsd.org> Subject: Re: svn commit: r228625 - head/usr.bin/csup Message-ID: <20111218183813.H1383@besplex.bde.org> In-Reply-To: <CAMBSHm9=0%2BZ%2BC687097WW_mGaNUpJ7Tbo7SZa4XLr7g0L2ecOQ@mail.gmail.com> References: <201112171314.pBHDEjtQ060509@svn.freebsd.org> <CAMBSHm9cBbCxZ9MvgPvKgYfSxPSpeofgTq0NnJo=e3tR5idxEQ@mail.gmail.com> <4EED0F99.2020306@FreeBSD.org> <CAMBSHm9=0%2BZ%2BC687097WW_mGaNUpJ7Tbo7SZa4XLr7g0L2ecOQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-563560353-1324194517=:1383 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 17 Dec 2011 mdf@freebsd.org wrote: > On Sat, Dec 17, 2011 at 1:54 PM, Dimitry Andric <dim@freebsd.org> wrote: >> On 2011-12-17 22:32, mdf@FreeBSD.org wrote: >> ... >>>> =A0In usr.bin/csup/auth.c, use the correct number of bytes for zeroing= the >>>> =A0shared secret, and use long long format to snprintf a time_t. >>> If casting is necessary, style prefers intmax_t or uintmax_t, since >>> those are always wide enough. >> >> I don't see anything about that in style(9), maybe it should be added >> then? style(9) decoments the uncouthness of long long and %lld by providing no examples of them. Unfortunately for my cause, it also provides no examples of intmax_t. It is basically just too old to provide examples of either. > Probably; Bruce has mentioned it many times in the past, and as bz@ I tried to get [u]intmax_t used, and [unsigned] long long and [u]quad_t killed, before C99, so that FreeBSD would never use the long long abomination. There was a problem printing the [u]intmax_t's before C99. I don't remember anything that would have worked except %q, and in userland, also %ll. %ll was intentionally left out of the kernel printf(), but this has been broken. > notes, it's a well-defined type with a well-defined conversion > specifier. Also, long long is a bit of a hack that came in before C99 s/a bit of/gross/ > standardized on a few wider types, and the PRIu64 macros are really > hideous. Bruce --0-563560353-1324194517=:1383--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111218183813.H1383>