summaryrefslogtreecommitdiff
path: root/usr.bin/mg/dired.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-11-16 04:16:42 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-11-16 04:16:42 +0000
commit3243c629699c25f7f4a576fe1c2f58e274eba8f7 (patch)
tree13313bb150a27b55b2509040ec05f6786e7d8ba5 /usr.bin/mg/dired.c
parenta85c45b1c774102095dfe0605bb6242bb7309462 (diff)
Stop using <sys/param.h>; replace MAXPATHLEN with PATH_MAX, stop using MAX(),
and pull in <limits.h> for *_MAX constants. inspired on a diff from Kamil Rytarowski (n54 (at) gmx.com) ok bcallah@
Diffstat (limited to 'usr.bin/mg/dired.c')
-rw-r--r--usr.bin/mg/dired.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c
index 3e7576301c8..ce16df5e8ac 100644
--- a/usr.bin/mg/dired.c
+++ b/usr.bin/mg/dired.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dired.c,v 1.67 2014/04/03 20:17:12 lum Exp $ */
+/* $OpenBSD: dired.c,v 1.68 2014/11/16 04:16:41 guenther Exp $ */
/* This file is in the public domain. */
@@ -17,6 +17,7 @@
#include <sys/wait.h>
#include <ctype.h>
+#include <limits.h>
#include <signal.h>
#include <fcntl.h>
#include <err.h>
@@ -496,7 +497,7 @@ reaper(int signo __attribute__((unused)))
int
d_shell_command(int f, int n)
{
- char command[512], fname[MAXPATHLEN], *bufp;
+ char command[512], fname[PATH_MAX], *bufp;
struct buffer *bp;
struct mgwin *wp;
char sname[NFILEN];