summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-03-23 22:47:41 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-03-23 22:47:41 +0200
commit3355ce597d39925ea1221c92f62ef8dcb80d7274 (patch)
tree6af11c090b036d57200bc45d1502abfdf332c63a
parentd84037582745e908a51378e61b0fc3cb5dbcce38 (diff)
downloadgawk-3355ce597d39925ea1221c92f62ef8dcb80d7274.tar.gz
Add default defn's for constants in extension files.
-rw-r--r--extension/ChangeLog7
-rw-r--r--extension/gawkfts.c4
-rw-r--r--extension/readdir.c4
3 files changed, 15 insertions, 0 deletions
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 <arnold@skeeve.com>
+
+ * 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 <aschorr@telemetry-investments.com>
* 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";