tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: patch(1) max line length



On Fri, Jul 12, 2024 at 09:32:28AM +0700, Robert Elz wrote:
> I'd also note that if you're going to change things, "long" probably
> isn't really big enough, that's just 32 bits (4GiB) on many ports,
> and files, and hence "lines" in files, can be much larger than that,
> so all you've really done is moved the goalpost.
> 
> Better would be to use size_t -- nothing (in memory) can be bigger than
> that, by definition.   But you'd need to be aware of the switch from a
> signed type to unsigned, which can affect how some code works.
> Using ssize_t is also not really big enough.

FWIW, patch in OpenBSD was changed to use ssize_t in July last year.

https://marc.info/?l=openbsd-bugs&m=168907249732754


Home | Main Index | Thread Index | Old Index