Apologies for the enormous commit, but I don't see a way to split this
up nicely. In the vast majority of cases it's a simple change. A few
extra places can use TRY instead of manual error checking though. :^)
This restriction doesn't make much sense, a user should be free to
consume the buffered data with as small a max_size as they desire.
This fixes a possible RequestServer spin when talking to HTTP servers.
Prior this change, if you had a program which frequently reads small
amount of bytes, then it would constantly fire up syscalls.
This patch sets that the minimum size that is passed to the read syscall
is 1024 and then it saves these additional bytes in a buffer for next
reads, which greatly improves the cpu usage on such cases.
In other words: reading flacs is now very efficient.
If a line was larger than 1024 bytes or the file ended without a
newline character, can_read_line would return false.
IODevice::can_read_line() now reads until a newline is found or
EOF is reached.
fixes#5907
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
This was a helper that would call a syscall repeatedly until it either
succeeded or failed with a non-EINTR error.
It was only used in two places, so I don't think we need this helper.