gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4993-g06536377


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-4993-g06536377
Date: Thu, 9 Feb 2023 13:43:06 -0500 (EST)

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, gawk-5.2-stable has been updated
       via  065363774ac6276e90557aec898e907865951c92 (commit)
       via  2bc5b3024008eb51cd27ee36c18bac68dd904226 (commit)
      from  1bcf38aaf4dd205a64747ef10b7d847ffe49265b (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=065363774ac6276e90557aec898e907865951c92

commit 065363774ac6276e90557aec898e907865951c92
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Thu Feb 9 20:42:46 2023 +0200

    Add source URL to usage message.

diff --git a/ChangeLog b/ChangeLog
index ff08342d..728bb903 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2023-02-09         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * main.c (usage): Include URL for source code in the message.
+
 2023-02-05         Arnold D. Robbins     <arnold@skeeve.com>
 
        * io.c (do_getline_redir): If `s' from get_a_record is NULL,
diff --git a/main.c b/main.c
index 75cbdca4..ba6eda3d 100644
--- a/main.c
+++ b/main.c
@@ -616,6 +616,14 @@ add_preassign(enum assign_type type, char *val)
 static void
 usage(int exitval, FILE *fp)
 {
+       static const char gnu_url[] = "https://ftp.gnu.org/gnu/gawk";;
+       static const char beta_url[] = "https://www.skeeve.com/gawk";;
+       const char *url;
+       int major_version, minor_version, patchlevel;
+
+       major_version = minor_version = patchlevel = 0;
+       sscanf(PACKAGE_VERSION, "%d.%d.%d", & major_version, & minor_version, & 
patchlevel);
+
        /* Not factoring out common stuff makes it easier to translate. */
        fprintf(fp, _("Usage: %s [POSIX or GNU style options] -f progfile [--] 
file ...\n"),
                myname);
@@ -679,6 +687,17 @@ 
https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.\n\
 PLEASE do NOT try to report bugs by posting in comp.lang.awk,\n\
 or by using a web forum such as Stack Overflow.\n\n"), fp);
 
+       // 5.2.60 is beta release on master, will become 5.3.0.
+       // 5.2.2a is beta release on stable, will become 5.2.3.
+       if (patchlevel >= 60 || 
isalpha(PACKAGE_VERSION[strlen(PACKAGE_VERSION)-1]))
+               url = beta_url;
+       else
+               url = gnu_url;
+
+       /* ditto */
+       fprintf(fp, _("Source code for gawk may be obtained 
from\n%s/gawk-%s.tar.gz\n\n"),
+               url, PACKAGE_VERSION);
+
        /* ditto */
        fputs(_("gawk is a pattern scanning and processing language.\n\
 By default it reads standard input and writes standard output.\n\n"), fp);
diff --git a/test/ChangeLog b/test/ChangeLog
index 97cfd1c6..7f7b05ee 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2023-02-09         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * badargs.ok: Update after code changes.
+
 2023-01-31         Arnold D. Robbins     <arnold@skeeve.com>
 
        * Makefile.am (EXTRA_DIST): New test: elemnew1.
diff --git a/test/badargs.ok b/test/badargs.ok
index ea022461..f1a01849 100644
--- a/test/badargs.ok
+++ b/test/badargs.ok
@@ -40,6 +40,9 @@ https://www.gnu.org/software/gawk/manual/html_node/Bugs.html.
 PLEASE do NOT try to report bugs by posting in comp.lang.awk,
 or by using a web forum such as Stack Overflow.
 
+Source code for gawk may be obtained from
+https://ftp.gnu.org/gnu/gawk/gawk-5.2.1.tar.gz
+
 gawk is a pattern scanning and processing language.
 By default it reads standard input and writes standard output.
 

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

commit 2bc5b3024008eb51cd27ee36c18bac68dd904226
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Thu Feb 9 20:38:57 2023 +0200

    Fix possible fd leak in readdir extension.

diff --git a/extension/ChangeLog b/extension/ChangeLog
index abc2bf95..14b95fa0 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-09         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * readdir.c (dir_can_take_control_of): If ! HAVE_OPENDIR,
+       don't leak any open file descriptor. Thanks to
+       Eli Zaretskii <eliz@gnu.org> for the bug report.
+
 2023-01-22         Arnold D. Robbins     <arnold@skeeve.com>
 
        * configure.ac: Check also for strptime.
diff --git a/extension/readdir.c b/extension/readdir.c
index 77059168..8ec695d7 100644
--- a/extension/readdir.c
+++ b/extension/readdir.c
@@ -270,8 +270,11 @@ dir_take_control_of(awk_input_buf_t *iobuf)
        dp = fdopendir(iobuf->fd);
 #else
        dp = opendir(iobuf->name);
-       if (dp != NULL)
+       if (dp != NULL) {
+               if (iobuf->fd != INVALID_HANDLE)
+                       (void) close(iobuf->fd);
                iobuf->fd = dirfd(dp);
+       }
 #endif
        if (dp == NULL) {
                warning(ext_id, _("dir_take_control_of: opendir/fdopendir 
failed: %s"),

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

Summary of changes:
 ChangeLog           |  4 ++++
 extension/ChangeLog |  6 ++++++
 extension/readdir.c |  5 ++++-
 main.c              | 19 +++++++++++++++++++
 test/ChangeLog      |  4 ++++
 test/badargs.ok     |  3 +++
 6 files changed, 40 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
gawk



reply via email to

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