Re: [ANNOUNCE] Git v2.9.1
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jul 12, 2016, 18:38 UTC
- Message-ID
- <CACsJy8CBGcKyMh9nbCAjZ=0T8TpoY9m98YJtgPFhQztVRPvXhg@mail.gmail.com>
- In-Reply-To
- <20160712134652.GA613@sigill.intra.peff.net>
On Tue, Jul 12, 2016 at 3:46 PM, Jeff King <peff@peff.net> wrote:
Show 26 quoted lines
> On Tue, Jul 12, 2016 at 03:31:00PM +0200, Andreas Schwab wrote: > >> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: >> >> > Hi Andreas, >> > >> > On Tue, 12 Jul 2016, Andreas Schwab wrote: >> > >> >> Johannes Schindelin <schindelin@wisc.edu> writes: >> >> >> >> >> PRIuMAX isn't compatible with time_t. >> >> > >> >> > That statement is wrong. >> >> >> >> No, it isn't. PRIuMAX is for uintmax_t, and time_t is not uintmax_t >> >> (even if they happen to have the same representation). >> > >> > Sigh. >> > >> > So if it is wrong, what is right? >> >> The right thing is to add a cast, of course. > > In general, I think the right cast for time_t should be to (intmax_t), > and the formatting string should be PRIdMAX (which, as an aside, needs > an entry in git-compat-util.h).
Coincidentally, I have the same problem with unsigned long being 32-bit and have to switch to off_t in some places. Does anybody know what a fallback in git-compat-util for PRIdMAX would look like? I guess it's "lld"...
-- Duy