Subject: Re: [PATCH 1/3] test-lib: add prerequisite for 64-bit platforms

From: Junio C Hamano <[email-masked]>
Date: Thu, 28 Oct 2021 15:38:48 -0700

Carlo Arenas <[email-masked]> writes:

>> Since this is clearly copied from `LONG_IS_64BIT`, why the change from
>> `-le` to `-eq`? It is at least inconsistent to use anything different
>> here.
>
> My assumption is that the check for sizeof(size_t) we have is really
> about finding the bit width of the platform, and we currently support
> 2 of them (32-bit and 64-bit), which is why the name I chose was
> "IS_64BIT" and also why I was strict on it being exactly 8 bytes
> (considering all platforms git supports have bytes with 8 bits).
>
> It can go eitherway IMHO, and your point about being inconsistent
> (with my lack of explanation in the commit) suggests we should instead
> use your proposal, do you want me to resend or could adjust them in
> your tree?

Is LONG_IS_64BIT used to ensure that long is _at least_ 64 bit?  If
so, perhaps its name may need to be rethought.  On the other hand,
if it is meant to ensure that long is exactly 64 bit, then it should
use -eq to compare.

And from that point of view, SIZE_T_IS_64BIT and use of -eq look
consistent with each other, I would think.

Thanks.