svn commit: r281800 - head/usr.bin/patch

Pedro F. Giffuni pfg at FreeBSD.org
Mon Apr 20 22:15:20 UTC 2015


Author: pfg
Date: Mon Apr 20 22:15:18 2015
New Revision: 281800
URL: https://svnweb.freebsd.org/changeset/base/281800

Log:
  patch(1): small include changes.
  
  Mostly to match OpenBSD, no functional change.
  
  Obtained from:	OpenBSD

Modified:
  head/usr.bin/patch/inp.c
  head/usr.bin/patch/pch.c
  head/usr.bin/patch/util.c

Modified: head/usr.bin/patch/inp.c
==============================================================================
--- head/usr.bin/patch/inp.c	Mon Apr 20 22:12:19 2015	(r281799)
+++ head/usr.bin/patch/inp.c	Mon Apr 20 22:15:18 2015	(r281800)
@@ -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>

Modified: head/usr.bin/patch/pch.c
==============================================================================
--- head/usr.bin/patch/pch.c	Mon Apr 20 22:12:19 2015	(r281799)
+++ head/usr.bin/patch/pch.c	Mon Apr 20 22:15:18 2015	(r281800)
@@ -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>

Modified: head/usr.bin/patch/util.c
==============================================================================
--- head/usr.bin/patch/util.c	Mon Apr 20 22:12:19 2015	(r281799)
+++ head/usr.bin/patch/util.c	Mon Apr 20 22:15:18 2015	(r281800)
@@ -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, 
 char *
 checked_in(char *file)
 {
-	char		*filebase, *filedir, tmpbuf[MAXPATHLEN];
+	char		*filebase, *filedir, tmpbuf[PATH_MAX];
 	struct stat	filestat;
 
 	filebase = basename(file);


More information about the svn-src-all mailing list