logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: ebf39d586792507f6ea0eca8b20a2d613a8d092e
parent b6b022627e6e561a90df50065c2d0143b798b3b2
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 20 Feb 2020 16:15:12 -0800

awk: Update to 20200219

Diffstat:

M.gitmodules1-
Mpkg/awk/gen.lua2+-
Dpkg/awk/patch/0001-maketab-Only-consider-define-lines-that-match-the-ex.patch26--------------------------
Dpkg/awk/patch/0002-Use-MB_LEN_MAX-instead-of-MB_CUR_MAX-to-avoid-VLA.patch46----------------------------------------------
Mpkg/awk/ver2+-
5 files changed, 2 insertions(+), 75 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -9,7 +9,6 @@ [submodule "pkg/awk/src"] path = pkg/awk/src url = https://github.com/onetrueawk/awk - ignore = all [submodule "pkg/bc/src"] path = pkg/bc/src url = https://github.com/gavinhoward/bc diff --git a/pkg/awk/gen.lua b/pkg/awk/gen.lua @@ -1,5 +1,5 @@ cflags{ - '-std=c90', + '-std=c99', '-D _XOPEN_SOURCE=700', '-I $outdir', '-I $srcdir', diff --git a/pkg/awk/patch/0001-maketab-Only-consider-define-lines-that-match-the-ex.patch b/pkg/awk/patch/0001-maketab-Only-consider-define-lines-that-match-the-ex.patch @@ -1,26 +0,0 @@ -From 16228e926b5718cb0012371e8351156ef1da75c9 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sat, 10 Dec 2016 19:57:39 -0800 -Subject: [PATCH] maketab: Only consider #define lines that match the expected - form - ---- - maketab.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/maketab.c b/maketab.c -index c3ce5c6..9981422 100644 ---- a/maketab.c -+++ b/maketab.c -@@ -138,7 +138,7 @@ int main(int argc, char *argv[]) - while (fgets(buf, sizeof buf, fp) != NULL) { - // 199 is sizeof(def) - 1 - n = sscanf(buf, "%1c %199s %199s %d", &c, def, name, &tok); -- if (c != '#' || (n != 4 && strcmp(def,"define") != 0)) /* not a valid #define */ -+ if (c != '#' || n != 4 || strcmp(def,"define") != 0) /* not a valid #define */ - continue; - if (strcmp(name, "YYSTYPE_IS_DECLARED") == 0) - continue; --- -2.24.0 - diff --git a/pkg/awk/patch/0002-Use-MB_LEN_MAX-instead-of-MB_CUR_MAX-to-avoid-VLA.patch b/pkg/awk/patch/0002-Use-MB_LEN_MAX-instead-of-MB_CUR_MAX-to-avoid-VLA.patch @@ -1,46 +0,0 @@ -From 5df71bac0a1ab0eb8d0a73c87d7e9404cd3ea870 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Wed, 29 Jan 2020 15:17:41 -0800 -Subject: [PATCH] Use MB_LEN_MAX instead of MB_CUR_MAX to avoid VLA -Upstream: https://github.com/onetrueawk/awk/pull/70 - -MB_CUR_MAX is the maximum number of bytes in a multibyte character -for the current locale, and might not be a constant expression. -MB_LEN_MAX is the maximum number of bytes in a multibyte character -for any locale, and always expands to a constant-expression. ---- - lib.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib.c b/lib.c -index dbc09c3..be5655b 100644 ---- a/lib.c -+++ b/lib.c -@@ -29,6 +29,7 @@ THIS SOFTWARE. - #include <errno.h> - #include <stdlib.h> - #include <stdarg.h> -+#include <limits.h> - #include "awk.h" - #include "ytab.h" - -@@ -333,14 +334,14 @@ void fldbld(void) /* create fields from current record */ - *fr = 0; - } else if ((sep = *inputFS) == 0) { /* new: FS="" => 1 char/field */ - for (i = 0; *r != '\0'; r += n) { -- char buf[MB_CUR_MAX + 1]; -+ char buf[MB_LEN_MAX + 1]; - - i++; - if (i > nfields) - growfldtab(i); - if (freeable(fldtab[i])) - xfree(fldtab[i]->sval); -- n = mblen(r, MB_CUR_MAX); -+ n = mblen(r, MB_LEN_MAX); - if (n < 0) - n = 1; - memcpy(buf, r, n); --- -2.25.0 - diff --git a/pkg/awk/ver b/pkg/awk/ver @@ -1 +1 @@ -20191208 r1 +20200219 r0