gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3686-gf961cd


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-3686-gf961cdf
Date: Sun, 17 Mar 2019 14:10:39 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  f961cdf2b5f7392cc1ced4ea0c13510792151e64 (commit)
       via  cc4a81433f96f0c93b5ab2c16673aea9ca2084ea (commit)
       via  24fc32d8f0038a18562cd269e824928e5cd4cb9d (commit)
      from  eccb8aac0f64eb98279e76cbbe995ac1bad024f5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=f961cdf2b5f7392cc1ced4ea0c13510792151e64

commit f961cdf2b5f7392cc1ced4ea0c13510792151e64
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Mar 17 20:10:03 2019 +0200

    Fix readdir extension to use stat when dir info returns unknown.

diff --git a/extension/ChangeLog b/extension/ChangeLog
index ddce96a..3f19c4a 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,9 @@
+2019-03-17         Arnold D. Robbins     <address@hidden>
+
+       * readdir.c: Change to use stat when dir info is 'u'. Bump version.
+       * readdir_test.c: Ditto.
+       * readdir.3am: Document same.
+
 2019-02-15         Arnold D. Robbins     <address@hidden>
 
        * inplace.c (do_inplace_end): Fix error message to use inplace::end.
diff --git a/extension/readdir.3am b/extension/readdir.3am
index 9cec860..e4f24df 100644
--- a/extension/readdir.3am
+++ b/extension/readdir.3am
@@ -1,4 +1,4 @@
-.TH READDIR 3am "Feb 02 2018" "Free Software Foundation" "GNU Awk Extension 
Modules"
+.TH READDIR 3am "Mar 17 2019" "Free Software Foundation" "GNU Awk Extension 
Modules"
 .SH NAME
 readdir \- directory input parser for gawk
 .SH SYNOPSIS
@@ -34,24 +34,14 @@ for a FIFO,
 .B l
 for a symbolic link,
 .B s
-for a socket, and
-.B u
-(unknown) for anything else.
+for a socket.
 .PP
-On systems without the file type information, the third field is always
+On systems without the file type information, the extension falls back
+to calling
+.IR stat (2),
+in order to provide the information.
+Thus the third field should never be
 .BR u .
-.SH NOTES
-On GNU/Linux systems, there are filesystems that don't support the
-.B d_type
-entry (see
-.IR readdir (3)),
-and so the file type is always
-.BR u .
-You can use the
-.I filefuncs
-extension to call
-.I stat()
-in order to get correct type information.
 .\" .SH BUGS
 .SH EXAMPLE
 .ft CW
@@ -81,7 +71,7 @@ BEGIN { FS = "/" }
 Arnold Robbins,
 .BR address@hidden .
 .SH COPYING PERMISSIONS
-Copyright \(co 2012, 2013, 2018,
+Copyright \(co 2012, 2013, 2018, 2019
 Free Software Foundation, Inc.
 .PP
 Permission is granted to make and distribute verbatim copies of
diff --git a/extension/readdir.c b/extension/readdir.c
index e8deecd..cc1cd50 100644
--- a/extension/readdir.c
+++ b/extension/readdir.c
@@ -7,10 +7,11 @@
  *
  * Andrew Schorr and Arnold Robbins: further fixes 8/2012.
  * Simplified 11/2012.
+ * Improved 3/2019.
  */
 
 /*
- * Copyright (C) 2012-2014, 2018 the Free Software Foundation, Inc.
+ * Copyright (C) 2012-2014, 2018, 2019 the Free Software Foundation, Inc.
  *
  * This file is part of GAWK, the GNU implementation of the
  * AWK Programming Language.
@@ -73,7 +74,7 @@
 
 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";
+static const char *ext_version = "readdir extension: version 2.0";
 
 static awk_bool_t init_readdir(void);
 static awk_bool_t (*init_func)(void) = init_readdir;
@@ -103,9 +104,9 @@ ftype(struct dirent *entry, const char *dirname)
        case DT_REG:    return "f";
        case DT_SOCK:   return "s";
        default:
-       case DT_UNKNOWN: return "u";
+       case DT_UNKNOWN: break; // JFS returns 'u', so fall through and stat
        }
-#else
+#endif
        char fname[PATH_MAX];
        struct stat sbuf;
 
@@ -133,7 +134,6 @@ ftype(struct dirent *entry, const char *dirname)
 #endif
        }
        return "u";
-#endif
 }
 
 /* get_inode --- get the inode of a file */
diff --git a/extension/readdir_test.c b/extension/readdir_test.c
index 074d4ed..13bf667 100644
--- a/extension/readdir_test.c
+++ b/extension/readdir_test.c
@@ -7,10 +7,11 @@
  *
  * Andrew Schorr and Arnold Robbins: further fixes 8/2012.
  * Simplified 11/2012.
+ * Improved 3/2019.
  */
 
 /*
- * Copyright (C) 2012-2014, 2017, 2018 the Free Software Foundation, Inc.
+ * Copyright (C) 2012-2014, 2017, 2018, 2019 the Free Software Foundation, Inc.
  *
  * This file is part of GAWK, the GNU implementation of the
  * AWK Programming Language.
@@ -73,7 +74,7 @@
 
 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 2.0";
+static const char *ext_version = "readdir extension: version 3.0";
 
 static awk_bool_t init_readdir(void);
 static awk_bool_t (*init_func)(void) = init_readdir;
@@ -108,9 +109,9 @@ ftype(struct dirent *entry, const char *dirname)
        case DT_REG:    return "f";
        case DT_SOCK:   return "s";
        default:
-       case DT_UNKNOWN: return "u";
+       case DT_UNKNOWN: break; // JFS returns 'u', so fall through to stat
        }
-#else
+#endif
        char fname[PATH_MAX];
        struct stat sbuf;
 
@@ -138,7 +139,6 @@ ftype(struct dirent *entry, const char *dirname)
 #endif
        }
        return "u";
-#endif
 }
 
 /* get_inode --- get the inode of a file */

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=cc4a81433f96f0c93b5ab2c16673aea9ca2084ea

commit cc4a81433f96f0c93b5ab2c16673aea9ca2084ea
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Mar 17 20:05:00 2019 +0200

    Fix test for ZOS_FAIL.

diff --git a/ChangeLog b/ChangeLog
index 3848b4f..c56b479 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-03-17         Arnold D. Robbins     <address@hidden>
+
+       * configure.ac: Fix test for ZOS_FAIL.
+
 2019-03-15         Arnold D. Robbins     <address@hidden>
 
        * Makefile.am (pc/Makefile.tst): Yet another fix for out-
diff --git a/configure b/configure
index 4b04f79..e6dcd84 100755
--- a/configure
+++ b/configure
@@ -5801,7 +5801,7 @@ rm -f conftest*
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ebcdic" >&5
 $as_echo "$use_ebcdic" >&6; }
-if test "$use_ebcdic" = yes ]
+if test "$use_ebcdic" = yes
 then
        ZOS_FAIL='; echo Expect $@ to fail on z/OS.'
 fi
diff --git a/configure.ac b/configure.ac
index 50a985b..0c36c70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,7 +144,7 @@ gnu_gawk_in_ebcdic
  use_ebcdic=yes],
 [use_ebcdic=no])
 AC_MSG_RESULT([$use_ebcdic])
-if test "$use_ebcdic" = yes ]
+if test "$use_ebcdic" = yes
 then
        ZOS_FAIL='; echo Expect $@ to fail on z/OS.'
 fi

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=24fc32d8f0038a18562cd269e824928e5cd4cb9d

commit 24fc32d8f0038a18562cd269e824928e5cd4cb9d
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Mar 17 20:04:23 2019 +0200

    Fix mbprintf5 to keep going in case of failure.

diff --git a/test/ChangeLog b/test/ChangeLog
index 71e0ff2..de10e22 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2019-03-17         Arnold D. Robbins     <address@hidden>
+
+       * Makefile.am (mbprintf5): Add a minus so that the tests
+       will keep going if this one fails.
+
 2019-03-03         Arnold D. Robbins     <address@hidden>
 
        * badargs.ok: Update after code changes.
diff --git a/test/Makefile.am b/test/Makefile.am
index 96cbdd6..37d4984 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1898,7 +1898,7 @@ mixed1::
 
 mbprintf5::
        @echo $@ $(ZOS_FAIL)
-       @case `uname` in \
+       @-case `uname` in \
        CYGWIN* | MINGW32* | *MS-DOS*) echo this test fails on this system --- 
skipping $@ ;; \
        *) \
        [ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE ; \
diff --git a/test/Makefile.in b/test/Makefile.in
index d068b72..b4c62c1 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -2347,7 +2347,7 @@ mixed1::
 
 mbprintf5::
        @echo $@ $(ZOS_FAIL)
-       @case `uname` in \
+       @-case `uname` in \
        CYGWIN* | MINGW32* | *MS-DOS*) echo this test fails on this system --- 
skipping $@ ;; \
        *) \
        [ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE ; \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |  4 ++++
 configure                |  2 +-
 configure.ac             |  2 +-
 extension/ChangeLog      |  6 ++++++
 extension/readdir.3am    | 26 ++++++++------------------
 extension/readdir.c      | 10 +++++-----
 extension/readdir_test.c | 10 +++++-----
 test/ChangeLog           |  5 +++++
 test/Makefile.am         |  2 +-
 test/Makefile.in         |  2 +-
 10 files changed, 37 insertions(+), 32 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]