aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extension/ChangeLog5
-rw-r--r--extension/gawkdirfd.h2
-rw-r--r--test/ChangeLog2
-rw-r--r--test/Makefile.am4
-rw-r--r--test/Makefile.in4
-rw-r--r--test/fnmatch.awk6
-rw-r--r--test/fnmatch.ok3
7 files changed, 21 insertions, 5 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 6704ec30..ef1aa4d3 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkdirfd.h: Improve test for doing own dirfd function. Needed
+ for IRIX.
+
2013-03-20 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Add AC_OUTPUT_COMMANDS that drops in a do-nothing
diff --git a/extension/gawkdirfd.h b/extension/gawkdirfd.h
index 249a0641..1fbd6f57 100644
--- a/extension/gawkdirfd.h
+++ b/extension/gawkdirfd.h
@@ -21,7 +21,7 @@
#include <config.h>
-#if !defined(HAVE_DIRFD) && !defined(HAVE_DECL_DIRFD)
+#if !defined(HAVE_DIRFD) && (!defined(HAVE_DECL_DIRFD) || HAVE_DECL_DIRFD == 0)
int
dirfd (DIR *dir_p)
{
diff --git a/test/ChangeLog b/test/ChangeLog
index 01472c65..0be38264 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -2,6 +2,8 @@
* Makefile.am (readdir): Add a check for GNU/Linux and NFS directory
and issue a warning if so.
+ (fts): Ditto for IRIX - can't check for NFS so just print the message.
+ (fnmatch.awk, fnmatch.ok): Improve portability.
2013-03-20 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index e5a56ce4..cfd46324 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1765,6 +1765,10 @@ readdir:
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
fts:
+ @if [ "`uname`" = IRIX ]; then \
+ echo This test may fail on IRIX systems when run on an NFS filesystem.; \
+ echo If it does, try rerunning on an xfs filesystem. ; \
+ fi
@echo $@
@$(AWK) -f $(srcdir)/fts.awk
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
diff --git a/test/Makefile.in b/test/Makefile.in
index 0b8906b7..2751ae32 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -2145,6 +2145,10 @@ readdir:
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
fts:
+ @if [ "`uname`" = IRIX ]; then \
+ echo This test may fail on IRIX systems when run on an NFS filesystem.; \
+ echo If it does, try rerunning on an xfs filesystem. ; \
+ fi
@echo $@
@$(AWK) -f $(srcdir)/fts.awk
@-$(CMP) $@.ok _$@ && rm -f $@.ok _$@
diff --git a/test/fnmatch.awk b/test/fnmatch.awk
index c0885074..b3717549 100644
--- a/test/fnmatch.awk
+++ b/test/fnmatch.awk
@@ -1,11 +1,13 @@
@load "fnmatch"
BEGIN {
- print "FNM_NOMATCH =", FNM_NOMATCH
# can't print the values; they vary from system to system
for (i in FNM)
printf("\"%s\" is an element in FNM\n", i)
+ # can't even print this
+ # print "FNM_NOMATCH =", FNM_NOMATCH
printf("fnmatch(\"*.a\", \"foo.a\", 0) = %d\n", fnmatch("*.a", "foo.a", 0) )
- printf("fnmatch(\"*.a\", \"foo.c\", 0) = %d\n", fnmatch("*.a", "foo.c", 0))
+ if (fnmatch("*.a", "foo.c", 0) == FNM_NOMATCH)
+ printf("fnmatch(\"*.a\", \"foo.c\", 0) == FNM_NOMATCH\n")
}
diff --git a/test/fnmatch.ok b/test/fnmatch.ok
index fd8a78ce..15bb1916 100644
--- a/test/fnmatch.ok
+++ b/test/fnmatch.ok
@@ -1,4 +1,3 @@
-FNM_NOMATCH = 1
"LEADING_DIR" is an element in FNM
"CASEFOLD" is an element in FNM
"NOESCAPE" is an element in FNM
@@ -6,4 +5,4 @@ FNM_NOMATCH = 1
"PATHNAME" is an element in FNM
"FILE_NAME" is an element in FNM
fnmatch("*.a", "foo.a", 0) = 0
-fnmatch("*.a", "foo.c", 0) = 1
+fnmatch("*.a", "foo.c", 0) == FNM_NOMATCH