These options only make sense in POSIX mode, since NetBSD's patch
has --backup enabled by default and GNU patch doesn't.
In POSIX mode, GNU patch and NetBSD patch now behave the same for these
two options.
Internally the code confuses the concept of "the user doesn't want
a backup file" and "the user hasn't defined a type of backup file".
Introduce a new "undefined" backup type to serve the purpose "none"
previously did, and make "none" not generate backup files, as expected.
http://mail-index.netbsd.org/tech-userlevel/2021/02/19/msg012901.html
XXX pullup?
Major changes are:
- better detection of double applied patches
- rejects remain unified diffs for unified patches
- far less limitations, e.g. patch lines may be arbitrary long
This addresses PR standards/11220 by changing patch -b behavior to be
POSIX compliant. Old behavior can be obtained using --suffix, which
works since NetBSD 1.4. pkgsrc has been adjusted accordingly.
temprorary directory. Previously, fputs was used without checking the
return value, leading to silent truncation when the temporary
filesystem was full (such as can easily happen when migrating to
tmpfs).
from malloc etc. are handled.
This removes the old behavior to retry the operation with a less memory-
consuming method in case malloc failed (this mechanism has never really
worked, and is hard to test. Besides, it is less useful now than it was
20 years ago when the code was written...)