Skip to content

Commit

Permalink
fts: include config.h and optionally add MAX(a,b)
Browse files Browse the repository at this point in the history
If HAVE_DECL_MAX is 0 or undefined, define it locally.
  • Loading branch information
pullmoll committed Feb 22, 2016
1 parent 959e560 commit 9b3d7da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fts.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ __RCSID("$NetBSD: fts.c,v 1.48 2015/01/29 15:55:21 manu Exp $");
#endif
#endif /* LIBC_SCCS and not lint */

#include "config.h"

#include <sys/param.h>
#include <sys/stat.h>

Expand All @@ -50,6 +52,10 @@ __RCSID("$NetBSD: fts.c,v 1.48 2015/01/29 15:55:21 manu Exp $");
#include <string.h>
#include <unistd.h>

#if !defined(HAVE_DECL_MAX) || (HAVE_DECL_MAX==0)
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif

static FTSENT *fts_alloc(FTS *, const char *, size_t);
static FTSENT *fts_build(FTS *, int);
static void fts_free(FTSENT *);
Expand Down

0 comments on commit 9b3d7da

Please sign in to comment.