aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/patch/common.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* patch(1): Exit successfully if we're fed a 0-length patchKyle Evans2019-03-011-0/+1
| | | | | | | | | | | | | | | | This change is made in the name of GNU patch compatibility. If GNU patch is fed a zero-length patch, it will exit successfully with no output. This is used in at least one port to date (comms/wsjtx), and we break on this usage. It seems unlikely that anyone relies on patch(1) calling their completely empty patch garbage and failing, and GNU compatibility is a plus if it helps with porting, so make the switch. Reported by: db MFC after: 2 weeks Notes: svn path=/head/; revision=344677
* patch(1): make some macros look boolean.Pedro F. Giffuni2016-10-011-2/+1
| | | | | | | | | Similar to r306560, plus remove an unused macro. Suggested by: jmallett Notes: svn path=/head/; revision=306561
* patch(1): make some macros look boolean.Pedro F. Giffuni2016-10-011-2/+2
| | | | | | | | | | | | Minor cleanup inspired by a new patch(1) variant in schily tools. For reference: https://sourceforge.net/p/schillix-on/ MFC after: 1 week Notes: svn path=/head/; revision=306560
* Remove automatic checkout feature.Xin LI2015-08-151-6/+0
| | | | | | | | | Obtained from: DragonFly via OpenBSD Relnotes: yes MFC: never Notes: svn path=/head/; revision=286795
* Fix shell injection vulnerability in patch(1) and drop SCCSXin LI2015-07-281-4/+2
| | | | | | | | | | | | support by replacing system() with execve(). Future revisions may remove the functionality completely. Obtained from: Bitrig Security: CVE-2015-1416 Notes: svn path=/head/; revision=285974
* patch(1): avoid line number overflowsPedro F. Giffuni2014-12-081-0/+1
| | | | | | | | | | | | | | | | Introduce strtolinenum to properly check line numbers while parsing: no signs, no spaces, just digits, 0 <= x <= LONG_MAX Properly validate line ranges supplied in diff file to prevent overflows. Also fixes an out of boundary memory access because the resulting values are used as array indices. PR: 195436 Obtained from: OpenBSD (CVS pch.c rev 1.45, 1,46, common.h rev 1.28) MFC after: 1 week Notes: svn path=/head/; revision=275612
* Various style(9) fixes and typos in grep, sort and patch.Pedro F. Giffuni2014-04-211-23/+23
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=264744
* - Refresh code with latest OpenBSD revisions.Xin LI2013-01-291-3/+1
| | | | | | | | | | | | - Remove $DragonFly$ tags as they are using git nowadays and VCS tags will not help merging. - Other changes to Copyright headers to make them consistent with other source code, we intend to fork from this point. Reviewed by: pfg Notes: svn path=/head/; revision=246091
* - Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) fromGabor Kovesdan2013-01-291-0/+121
| | | | | | | | | | | DragonflyBSD and install it as bsdpatch. WITH_BSD_PATCH makes it default and installs GNU patch as gnupatch. Submitted by: pfg Obtained from: The DragonflyBSD Project Notes: svn path=/head/; revision=246074
* kill the undeadPeter Wemm1997-07-131-138/+0
| | | | Notes: svn path=/head/; revision=27369
* Finish importing Lite2's src/usr.bin, except for ex, diff, grep, mail,Bruce Evans1997-07-061-0/+138
pascal and vmstat.sparc. All changed files on the vendor branch should already have been imported. Notes: svn path=/vendor/CSRG/dist/; revision=27241