aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/compat_fts.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-02 11:09:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-02 11:09:46 +0000
commit5e885aedc03fcf8c13fc9652c8e76da02e3a83d6 (patch)
tree97c68f4d6e3126d976e69cc3d763e591ab717afb /compat_fts.c
parent340b1503ec45a71e95d48a2b8d0005f53c3ef619 (diff)
downloadmandoc-5e885aedc03fcf8c13fc9652c8e76da02e3a83d6.tar.gz
mandoc-5e885aedc03fcf8c13fc9652c8e76da02e3a83d6.tar.zst
mandoc-5e885aedc03fcf8c13fc9652c8e76da02e3a83d6.zip
POSIX allows PATH_MAX to not be defined, meaning "unlimited".
Found by Aaron M. Ucko <amu at alum dot mit dot edu> on the GNU Hurd, via Bdale Garbee, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829624 Also add EFTYPE at two places where it was forgotten.
Diffstat (limited to 'compat_fts.c')
-rw-r--r--compat_fts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/compat_fts.c b/compat_fts.c
index ed958546..881a293b 100644
--- a/compat_fts.c
+++ b/compat_fts.c
@@ -6,7 +6,7 @@ int dummy;
#else
-/* $Id: compat_fts.c,v 1.9 2015/03/18 19:29:48 schwarze Exp $ */
+/* $Id: compat_fts.c,v 1.10 2016/08/02 11:09:46 schwarze Exp $ */
/* $OpenBSD: fts.c,v 1.50 2015/01/16 16:48:51 deraadt Exp $ */
/*-
@@ -68,6 +68,9 @@ static unsigned short fts_stat(FTS *, FTSENT *);
#ifndef O_CLOEXEC
#define O_CLOEXEC 0
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
#define CLR(opt) (sp->fts_options &= ~(opt))
#define ISSET(opt) (sp->fts_options & (opt))