Re: patch(1) max line length

Crystal Kolipe <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.