summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-20 22:15:18 +0000
committerpfg <pfg@FreeBSD.org>2015-04-20 22:15:18 +0000
commite13e816432142d46aec6d67f8623b61056e01e83 (patch)
treeb397ad07eb7079be7d1f42b3caed96e03593cf14 /usr.bin/patch
parentd7580b474711f5b0efd68ec33e2f96b41ee63121 (diff)
downloadFreeBSD-src-e13e816432142d46aec6d67f8623b61056e01e83.zip
FreeBSD-src-e13e816432142d46aec6d67f8623b61056e01e83.tar.gz
patch(1): small include changes.
Mostly to match OpenBSD, no functional change. Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/patch')
-rw-r--r--usr.bin/patch/inp.c2
-rw-r--r--usr.bin/patch/pch.c1
-rw-r--r--usr.bin/patch/util.c6
3 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index f0dcd45..826f85b 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -34,8 +34,8 @@
#include <ctype.h>
#include <libgen.h>
-#include <limits.h>
#include <stddef.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c
index aacafc8..e731ca1 100644
--- a/usr.bin/patch/pch.c
+++ b/usr.bin/patch/pch.c
@@ -34,6 +34,7 @@
#include <ctype.h>
#include <libgen.h>
#include <limits.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/usr.bin/patch/util.c b/usr.bin/patch/util.c
index 27ee1ae..1859e17 100644
--- a/usr.bin/patch/util.c
+++ b/usr.bin/patch/util.c
@@ -27,13 +27,13 @@
* $FreeBSD$
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
+#include <limits.h>
#include <paths.h>
#include <signal.h>
#include <stdarg.h>
@@ -96,7 +96,7 @@ int
backup_file(const char *orig)
{
struct stat filestat;
- char bakname[MAXPATHLEN], *s, *simplename;
+ char bakname[PATH_MAX], *s, *simplename;
dev_t orig_device;
ino_t orig_inode;
@@ -406,7 +406,7 @@ fetchname(const char *at, bool *exists, int strip_leading)
char *
checked_in(char *file)
{
- char *filebase, *filedir, tmpbuf[MAXPATHLEN];
+ char *filebase, *filedir, tmpbuf[PATH_MAX];
struct stat filestat;
filebase = basename(file);
OpenPOWER on IntegriCloud