From: "Todd C. Miller" Subject: Re: inttypes.h? To: Christian Weisgerber Cc: gameoftrees@openbsd.org Date: Sat, 26 Sep 2020 09:51:38 -0600 On Sat, 26 Sep 2020 17:41:58 +0200, Christian Weisgerber wrote: > The diff below > > * ... casts time_t and off_t values to long long, so they are > guaranteed to match the %lld format specifier. On OpenBSD that > happens to be the case, on FreeBSD it's a mess that varies by > architecture. I don't know if that's acceptable, but I see similar > casts in ssh. > (Style? Second change in got_object_commit_create() below.) I think this is about the best you can do. One alternative is to cast to intmax_t instead of long long, though I don't think it really matters. > * ... switches the number in parse.y from int64_t to long long, > since it is assigned to from strtonum(), passed to parseport()'s > long long parameter, and printed with %lld anyway. That makes sense to me and argues for using long long above. - todd