On Mon, 2022-02-21 at 08:59 +0000, Edward Welbourne wrote: > and that's assuming a 32-bit int; the signed range is from - > 2,147,483,647 to 2,147,483,648. However, may I suggest the following > (which I know included in the GPL'd cfengine sources at some point):
This computation is already included in GNU make (in Git) as the constant INTSTR_LENGTH (which uses sizeof(uintmax_t) as the basis), from a previous, similar suggestion you made a few months ago :). I modified this and a few other buffers that used static lengths, to use the INTSTR_LENGTH macro.