diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-08-02 17:48:59 -0400 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-08-02 17:48:59 -0400 |
commit | 3f60b6ccc298f1eddac0ce917712d84212e015d0 (patch) | |
tree | 0baf5546338f132ac69c149b31d55d70743e93cd | |
parent | 7ac1bb98e0ec7cc957b965bea8a1c489669c24b6 (diff) | |
download | egawk-3f60b6ccc298f1eddac0ce917712d84212e015d0.tar.gz egawk-3f60b6ccc298f1eddac0ce917712d84212e015d0.tar.bz2 egawk-3f60b6ccc298f1eddac0ce917712d84212e015d0.zip |
Minor improvement for Windows in filefuncs.c.
-rw-r--r-- | extension/ChangeLog | 6 | ||||
-rw-r--r-- | extension/filefuncs.c | 19 |
2 files changed, 24 insertions, 1 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog index 91146f3b..5a0065fe 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,9 @@ +2013-08-02 Arnold D. Robbins <arnold@skeeve.com> + + * filefuncs.c (do_fts): Add a version for _WIN32 that prints a + "not supported" fatal message. This is slightly better than the + "fts not found" which is otherwise produced. + 2013-07-24 Arnold D. Robbins <arnold@skeeve.com> * gawkdirfd.h (FAKE_FD_VALUE): Move definition up in the file to give diff --git a/extension/filefuncs.c b/extension/filefuncs.c index ad6a991d..0ffddedd 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -511,7 +511,24 @@ init_filefuncs(void) return errors == 0; } -#ifndef _WIN32 +#ifdef _WIN32 +/* do_fts --- walk a heirarchy and fill in an array */ + +/* + * Usage from awk: + * flags = or(FTS_PHYSICAL, ...) + * result = fts(pathlist, flags, filedata) + */ + +static awk_value_t * +do_fts(int nargs, awk_value_t *result) +{ + fatal(ext_id, _("fts is not supported on this system")); + + return NULL; /* for the compiler */ +} + +#else /* _WIN32 */ static int fts_errors = 0; |