History log of /netbsd/usr.bin/patch/patch.c (Results 1 – 25 of 34)
Revision Date Author Comments
# ebbaadf3 16-Jun-2023 wiz <wiz@NetBSD.org>

patch: add --backup-if-mismatch and --no-backup-if-mismatch for GNU patch compatibility

These options only make sense in POSIX mode, since NetBSD's patch
has --backup enabled by default and GNU patc

patch: add --backup-if-mismatch and --no-backup-if-mismatch for GNU patch compatibility

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.

show more ...


# 96ba1207 20-Sep-2021 dholland <dholland@NetBSD.org>

Fix the message that appears if you patch -R an unapplied patch.


# 5631a155 25-May-2021 cjep <cjep@NetBSD.org>

As per OpenBSD, use malloc for the line buffer. Fixes the known issue
with long lines and makes our ATF test suite pass fully.
Closes PR bin/54620 from coypu who suggested the approach.
Reviewed by c

As per OpenBSD, use malloc for the line buffer. Fixes the known issue
with long lines and makes our ATF test suite pass fully.
Closes PR bin/54620 from coypu who suggested the approach.
Reviewed by christos.

show more ...


# e7857a6e 20-Feb-2021 nia <nia@NetBSD.org>

patch(1): use PATH_MAX for the size of rejname

via freebsd, openbsd


# 2ec3a9ea 19-Feb-2021 nia <nia@NetBSD.org>

patch: make '-V none' work in the expected way

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

patch: make '-V none' work in the expected way

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?

show more ...


# 94d23bf2 06-Sep-2011 joerg <joerg@NetBSD.org>

Consistently use __dead and __printflike.


# 16f69791 26-Mar-2011 dholland <dholland@NetBSD.org>

Exit with EXIT_FAILURE for invalid arguments. PR 43517.


# d5b2c9a8 19-Sep-2008 joerg <joerg@NetBSD.org>

Update patch to the version used by DragonFly and derived from OpenBSD.
Major changes are:
- better detection of double applied patches
- rejects remain unified diffs for unified patches
- far less l

Update patch to the version used by DragonFly and derived from OpenBSD.
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.

show more ...


# 69bdd817 10-Aug-2008 gdt <gdt@NetBSD.org>

Add error checking to use of fputs in creating output file in
temprorary directory. Previously, fputs was used without checking the
return value, leading to silent truncation when the temporary
file

Add error checking to use of fputs in creating output file in
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).

show more ...


# bd560fde 14-Oct-2007 lukem <lukem@NetBSD.org>

Convert to using raise_default_signal(3).


# de60b309 25-Mar-2005 wiz <wiz@NetBSD.org>

Sort options. Add -C to usage.


# 4f9669ed 25-Mar-2005 skd <skd@NetBSD.org>

add --dry-run like gnu patch.


# 33131ab9 09-Dec-2004 mycroft <mycroft@NetBSD.org>

Fix an array overrun in option parsing.
Fixes PR 26732, PR 26775, PR 28416 and PR 28589.


# 224d89c7 14-Aug-2004 cube <cube@NetBSD.org>

Remove debug printf (hi mycroft!).


# ee776b9f 06-Aug-2004 mycroft <mycroft@NetBSD.org>

Parse multiple options that are specified together; e.g. "-fs".
XXX It is not clear to me why patch(1) doesn't get getopt_long(3).


# 75c32b46 30-Jul-2003 itojun <itojun@NetBSD.org>

use bounded string op


# 3e51d2b7 08-Jul-2003 kristerw <kristerw@NetBSD.org>

Const poisoning.


# f4b0e187 30-May-2003 kristerw <kristerw@NetBSD.org>

Fix some lint warnings.


# 7e5434fe 30-May-2003 kristerw <kristerw@NetBSD.org>

Remove stuff that are not needed any longer.


# b86c323d 30-May-2003 kristerw <kristerw@NetBSD.org>

Simplify handling of memory allocation, and make sure all return values
from malloc etc. are handled.

This removes the old behavior to retry the operation with a less memory-
consuming method in cas

Simplify handling of memory allocation, and make sure all return values
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...)

show more ...


# 2a9882e7 29-May-2003 kristerw <kristerw@NetBSD.org>

Be consistent with use of types (e.g. do not use LINENUM for quantities
that are not line numbers).


# 6d0ebdd7 19-Jan-2003 kristerw <kristerw@NetBSD.org>

Do not try to write a rejects file for those cases where the user has
told us to skip a patch due to missing file to patch.

Solves PR 19827 from Toru TAKAMIZU.


# 93318b47 16-Mar-2002 kristerw <kristerw@NetBSD.org>

Check result of malloc and strdup
Made some functions static
Removed unneccessary buffer
Increased size of some buffers that could overflow


# 175b5054 11-Mar-2002 kristerw <kristerw@NetBSD.org>

Ansify
Remove unused defines
Remove #ifndef lint
Remove redundant and incorrect casts.


# 8bcbaa7b 08-Mar-2002 kristerw <kristerw@NetBSD.org>

Ansify
Remove 'register'
Make local functions static.
Remove most '#ifndef lint'


12