From 3355ce597d39925ea1221c92f62ef8dcb80d7274 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 23 Mar 2014 22:47:41 +0200 Subject: Add default defn's for constants in extension files. --- extension/ChangeLog | 7 +++++++ extension/gawkfts.c | 4 ++++ extension/readdir.c | 4 ++++ 3 files changed, 15 insertions(+) (limited to 'extension') diff --git a/extension/ChangeLog b/extension/ChangeLog index 4a1fe2ed..61381171 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,10 @@ +2014-03-23 Arnold D. Robbins + + * gawkfts.c (MAXPATHLEN): Add a default definition. Thanks to + Antonio Diaz Dian and Nelson H.F. Beebe. + * readdir.c (PATH_MAX): Add a default definition. Thanks to + Nelson H.F. Beebe. + 2014-03-08 Andrew J. Schorr * filefuncs.c (read_symlink, do_fts): Replace free with gawk_free. diff --git a/extension/gawkfts.c b/extension/gawkfts.c index 25a4c108..4a712153 100644 --- a/extension/gawkfts.c +++ b/extension/gawkfts.c @@ -139,6 +139,10 @@ static int fts_safe_changedir(const FTS *, const FTSENT *, int, #define _DIAGASSERT(expression) +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 /* a guess */ +#endif + FTS * fts_open(char * const *argv, int options, int (*compar)(const FTSENT **, const FTSENT **)) diff --git a/extension/readdir.c b/extension/readdir.c index 5b9a7913..bf14e486 100644 --- a/extension/readdir.c +++ b/extension/readdir.c @@ -67,6 +67,10 @@ #define _(msgid) gettext(msgid) #define N_(msgid) msgid +#ifndef PATH_MAX +#define PATH_MAX 1024 /* a good guess */ +#endif + static const gawk_api_t *api; /* for convenience macros to work */ static awk_ext_id_t *ext_id; static const char *ext_version = "readdir extension: version 1.0"; -- cgit v1.2.3