- rel 2; fixes used by FC auto/th/gawk-4.2.0-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 14 Jan 2018 21:45:41 +0000 (22:45 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 14 Jan 2018 21:45:41 +0000 (22:45 +0100)
gawk-4.2.0-000-do-not-fold-constant-strings.patch [new file with mode: 0644]
gawk-4.2.0-001-rwarray-small-improvements.patch [new file with mode: 0644]
gawk.spec

diff --git a/gawk-4.2.0-000-do-not-fold-constant-strings.patch b/gawk-4.2.0-000-do-not-fold-constant-strings.patch
new file mode 100644 (file)
index 0000000..eb4a0b0
--- /dev/null
@@ -0,0 +1,26 @@
+From 08897b5c5facfd35aa971321a248e6fcd6abf5d8 Mon Sep 17 00:00:00 2001
+From: "Arnold D. Robbins" <arnold@skeeve.com>
+Date: Sat, 21 Oct 2017 20:59:19 +0300
+Subject: [PATCH] Don't fold constant strings if either is translatable.
+
+---
+ awkgram.y | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/awkgram.y b/awkgram.y
+index 1a75e64..9f35143 100644
+--- a/awkgram.y
++++ b/awkgram.y
+@@ -1589,7 +1589,8 @@ common_exp
+                       // 1.5 ""   # can't fold this if program mucks with CONVFMT.
+                       // See test #12 in test/posix.awk.
+-                      if ((n1->flags & (NUMBER|NUMINT)) != 0 || (n2->flags & (NUMBER|NUMINT)) != 0)
++                      // Also can't fold if one or the other is translatable.
++                      if ((n1->flags & (NUMBER|NUMINT|INTLSTR)) != 0 || (n2->flags & (NUMBER|NUMINT|INTLSTR)) != 0)
+                               goto plain_concat;
+                       n1 = force_string(n1);
+-- 
+2.9.5
+
diff --git a/gawk-4.2.0-001-rwarray-small-improvements.patch b/gawk-4.2.0-001-rwarray-small-improvements.patch
new file mode 100644 (file)
index 0000000..10059bd
--- /dev/null
@@ -0,0 +1,51 @@
+From 750e3168705de678474fea0a551f9cf29e9e077d Mon Sep 17 00:00:00 2001
+From: "Arnold D. Robbins" <arnold@skeeve.com>
+Date: Sat, 28 Oct 2017 23:22:15 +0300
+Subject: [PATCH] Small improvements in extension/rwarray.c.
+
+---
+ extension/ChangeLog | 5 +++++
+ extension/rwarray.c | 6 ++++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/extension/ChangeLog b/extension/ChangeLog
+index 4bfd896..c04e9c2 100644
+--- a/extension/ChangeLog
++++ b/extension/ChangeLog
+@@ -1,3 +1,8 @@
++2017-10-28         Arnold D. Robbins     <arnold@skeeve.com>
++
++      * rwarray.c (do_writea): Fix description in comment.
++      (write_array): Free the flattened array if writing an element fails.
++
+ 2017-10-19         Arnold D. Robbins     <arnold@skeeve.com>
+       * 4.2.0: Release tar ball made.
+diff --git a/extension/rwarray.c b/extension/rwarray.c
+index 2e82ca7..997b6b2 100644
+--- a/extension/rwarray.c
++++ b/extension/rwarray.c
+@@ -114,7 +114,7 @@ do_writea(int nargs, awk_value_t *result, struct awk_ext_func *unused)
+       if (nargs < 2)
+               goto out;
+-      /* directory is first arg, array to dump is second */
++      /* filename is first arg, array to dump is second */
+       if (! get_argument(0, AWK_STRING, & filename)) {
+               fprintf(stderr, _("do_writea: argument 0 is not a string\n"));
+               errno = EINVAL;
+@@ -178,8 +178,10 @@ write_array(FILE *fp, awk_array_t array)
+               return awk_false;
+       for (i = 0; i < flat_array->count; i++) {
+-              if (! write_elem(fp, & flat_array->elements[i]))
++              if (! write_elem(fp, & flat_array->elements[i])) {
++                      (void) release_flattened_array(array, flat_array);
+                       return awk_false;
++              }
+       }
+       if (! release_flattened_array(array, flat_array)) {
+-- 
+2.9.5
+
index cdbe8f8..2617a97 100644 (file)
--- a/gawk.spec
+++ b/gawk.spec
@@ -14,13 +14,15 @@ Summary(tr.UTF-8):  GNU araçları metin düzenleyici
 Summary(uk.UTF-8):     GNU версія утиліти обробки текстів awk
 Name:          gawk
 Version:       4.2.0
-Release:       1
+Release:       2
 License:       GPL v3+
 Group:         Applications/Text
 Source0:       http://ftp.gnu.org/gnu/gawk/%{name}-%{version}.tar.lz
 # Source0-md5: 716b498c13c96c01758ab59415763e72
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: 80753d75be0f469f70e8c90e75121a9c
+Patch100:      gawk-4.2.0-000-do-not-fold-constant-strings.patch
+Patch101:      gawk-4.2.0-001-rwarray-small-improvements.patch
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-shutup.patch
 Patch2:                no-pty-test.patch
@@ -120,6 +122,8 @@ Ten pakiet zawiera pliki nagłówkowe dla gawka.
 
 %prep
 %setup -q
+%patch100 -p1
+%patch101 -p1
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
This page took 0.148006 seconds and 4 git commands to generate.