aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/compat_fts.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-07 07:42:56 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-07 07:42:56 +0000
commitc835fb3911fccc07e8eb54a54a60a6a10389eaef (patch)
tree044ebedb580064edf7d0a301a75d8462500557df /compat_fts.c
parentb7b56f24dd304cb4dfd288e46f98b1edb7eb3a9c (diff)
downloadmandoc-c835fb3911fccc07e8eb54a54a60a6a10389eaef.tar.gz
mandoc-c835fb3911fccc07e8eb54a54a60a6a10389eaef.tar.zst
mandoc-c835fb3911fccc07e8eb54a54a60a6a10389eaef.zip
trivial sync to OpenBSD: <sys/param.h> no longer needed
Diffstat (limited to 'compat_fts.c')
-rw-r--r--compat_fts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/compat_fts.c b/compat_fts.c
index d6e99e61..dab9e44b 100644
--- a/compat_fts.c
+++ b/compat_fts.c
@@ -6,8 +6,8 @@ int dummy;
#else
-/* $Id: compat_fts.c,v 1.6 2014/12/11 18:20:07 schwarze Exp $ */
-/* $OpenBSD: fts.c,v 1.49 2014/11/23 00:14:22 guenther Exp $ */
+/* $Id: compat_fts.c,v 1.7 2015/02/07 07:42:56 schwarze Exp $ */
+/* $OpenBSD: fts.c,v 1.50 2015/01/16 16:48:51 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -38,7 +38,6 @@ int dummy;
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -51,6 +50,8 @@ int dummy;
#include <unistd.h>
#include "compat_fts.h"
+#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
+
static FTSENT *fts_alloc(FTS *, const char *, size_t);
static FTSENT *fts_build(FTS *);
static void fts_lfree(FTSENT *);
@@ -62,7 +63,6 @@ static unsigned short fts_stat(FTS *, FTSENT *);
static int fts_safe_changedir(FTS *, FTSENT *, int, const char *);
#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
-#define MAX(a,b) (((a)>(b))?(a):(b))
#ifndef O_DIRECTORY
#define O_DIRECTORY 0
#endif
@@ -97,7 +97,7 @@ fts_open(char * const *argv, int options, void *dummy)
* Start out with 1K of path space, and enough, in any case,
* to hold the user's paths.
*/
- if (fts_palloc(sp, MAX(fts_maxarglen(argv), PATH_MAX)))
+ if (fts_palloc(sp, MAXIMUM(fts_maxarglen(argv), PATH_MAX)))
goto mem1;
/* Allocate/initialize root's parent. */