From 123f411d523558019559483d03f58c71f9919b751f6ed4bb381c84b2467c18d1 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 12 Oct 2017 11:16:48 +0000 Subject: [PATCH 1/3] Accepting request 533389 from home:AndreasStieger:branches:Base:System - also ignore transient test time failure on ppc64 OBS-URL: https://build.opensuse.org/request/show/533389 OBS-URL: https://build.opensuse.org/package/show/Base:System/gawk?expand=0&rev=66 --- gawk.changes | 5 +++++ gawk.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gawk.changes b/gawk.changes index 9906c28..a9ede57 100644 --- a/gawk.changes +++ b/gawk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 11 11:40:41 UTC 2017 - astieger@suse.com + +- also ignore transient test time failure on ppc64 + ------------------------------------------------------------------- Mon Apr 10 07:39:22 UTC 2017 - josef.moellers@suse.com diff --git a/gawk.spec b/gawk.spec index c5b812d..8f2ace4 100644 --- a/gawk.spec +++ b/gawk.spec @@ -1,7 +1,7 @@ # # spec file for package gawk # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -46,7 +46,7 @@ chmod -x COPYING # skip strftime time sed -ie 's/ strftime / /g' test/Makefile.in # apply only for the arch that experienced previously transient failure -%ifarch ppc64le +%ifarch ppc64le ppc64 %patch1 -p1 %endif From 7a772246efa64caa5794d9503d93572dfa16df2234b7a6208c55974734844d3c Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Fri, 20 Oct 2017 08:01:29 +0000 Subject: [PATCH 2/3] Accepting request 535340 from home:AndreasSchwab:f - Update to gawk 4.2.0 * If not in POSIX mode, changes to ENVIRON are reflected into gawk's environment * The series of numbers returned by rand() should now be "more random" than previously * Multiple changes related to the pretty printer * The igawk script and igawk.1 man page are no longer installed * Gawk now processes a maximum of two hexadecimal digits in \x escape sequences inside strings * Setting PROCINFO["redirection", "NONFATAL"] to true makes I/O errors for "redirection" not fatal * Gawk now supports retryable I/O via PROCINFO[input-file, "RETRY"] * Revisions in the POSIX standard remove the special case for POSIX mode when FS = " " where newline was not a field separator * Gawk now supports strongly typed regexp constants * The new typeof() function can be used to indicate if a variable or array element is an array, regexp, string or number * Optimizations are now enabled by default * Passing negative operands to any of the bitwise functions now produces a fatal error * The mktime function now accepts an optional second argument * The FIELDWIDTHS parsing syntax has been enhanced to allow specifying how many characters to skip before a field starts * The PROCINFO["argv"] array records all of gawk's command line arguments as gawk received them - gawk_ppc64le_ignore_transient_test_time_failure.patch: removed OBS-URL: https://build.opensuse.org/request/show/535340 OBS-URL: https://build.opensuse.org/package/show/Base:System/gawk?expand=0&rev=67 --- gawk-4.1.4.tar.xz | 3 -- gawk-4.1.4.tar.xz.sig | 11 ----- gawk-4.2.0.tar.xz | 3 ++ gawk-4.2.0.tar.xz.sig | 11 +++++ gawk.changes | 30 +++++++++++++ gawk.spec | 15 ++----- ...e_ignore_transient_test_time_failure.patch | 42 ------------------- 7 files changed, 47 insertions(+), 68 deletions(-) delete mode 100644 gawk-4.1.4.tar.xz delete mode 100644 gawk-4.1.4.tar.xz.sig create mode 100644 gawk-4.2.0.tar.xz create mode 100644 gawk-4.2.0.tar.xz.sig delete mode 100644 gawk_ppc64le_ignore_transient_test_time_failure.patch diff --git a/gawk-4.1.4.tar.xz b/gawk-4.1.4.tar.xz deleted file mode 100644 index 299f1cb..0000000 --- a/gawk-4.1.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:53e184e2d0f90def9207860531802456322be091c7b48f23fdc79cda65adc266 -size 2367832 diff --git a/gawk-4.1.4.tar.xz.sig b/gawk-4.1.4.tar.xz.sig deleted file mode 100644 index 0f25509..0000000 --- a/gawk-4.1.4.tar.xz.sig +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1 - -iQEcBAABAgAGBQJXvzSWAAoJEN9ZeBWTfsDSPP8H/1Naw13ybArprjJDgwU7kQ5X -Yrwt40pQwehaxk+21kVlA+19O7qamHbKhX1etyRB4+KaBjTf9s3tOCdIIo4b3oTi -XCMSXhyBRzOs47+p2l6MVtQLPNuQ5nNhqeuP6tmlSi0QyI43EAcP3cix0nsYriUH -EAv2VffhdYawUrKgZE1sssRlDD47YoEelS4Gs1kC1HBRp/LnvuISItiP43JVGGeX -+SjgPh14oe8F7yVxIyAUFnK4zKEaNM/KDKvvZ7tDz1n7NtLxihtJPnvsticLhvDC -w+upaY41YUx0nnIy2QXF2lLNRtceJJ5zhl/QMxME5nWnN1dNGZLAVnBQYUbU7oU= -=8yeI ------END PGP SIGNATURE----- diff --git a/gawk-4.2.0.tar.xz b/gawk-4.2.0.tar.xz new file mode 100644 index 0000000..7a214ba --- /dev/null +++ b/gawk-4.2.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f3cd31c001fd0ed52832d4fbfbdfeaa38ad541c182f80ff8fdf87324a6a9f2 +size 2948108 diff --git a/gawk-4.2.0.tar.xz.sig b/gawk-4.2.0.tar.xz.sig new file mode 100644 index 0000000..70808a3 --- /dev/null +++ b/gawk-4.2.0.tar.xz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQEcBAABAgAGBQJZ6PEYAAoJEN9ZeBWTfsDSBtQH/RaqjTVMNIpoqJRXyfnx+Lu7 +Mnm3qkcvjn0PdaYT9pCSakZmbz75Y9Ra+FuDzMUGdXdeVsJhJ5N57Ao/5z52E4cA +G2612gJJbgeT69aAS1oKN49wbW8/ukjbHRGZkO/8WDnBHvo6WlbnoMIsw4WCANTR +GOBU9+QDCD1KwS2os+TWaEUZKLGWFHKzbryQnxpDes/5fsVFWPhFsI1t6Zu6/T0w +YimlDnEh+7S4KfKmxl3JIgj1tFBI9ftaZNNy9LqO3h3eYTRqpcfEgPZBG+G4mHRj +hhfu+LiSly9wB46+ca0mCqkP3oTyZ9YQkBIJSdDnRpSb6tvPGy1+AteijtyZlWE= +=UJep +-----END PGP SIGNATURE----- diff --git a/gawk.changes b/gawk.changes index a9ede57..7b680fd 100644 --- a/gawk.changes +++ b/gawk.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Thu Oct 19 21:54:47 UTC 2017 - schwab@linux-m68k.org + +- Update to gawk 4.2.0 + * If not in POSIX mode, changes to ENVIRON are reflected into + gawk's environment + * The series of numbers returned by rand() should now be "more + random" than previously + * Multiple changes related to the pretty printer + * The igawk script and igawk.1 man page are no longer installed + * Gawk now processes a maximum of two hexadecimal digits in \x + escape sequences inside strings + * Setting PROCINFO["redirection", "NONFATAL"] to true makes I/O + errors for "redirection" not fatal + * Gawk now supports retryable I/O via PROCINFO[input-file, "RETRY"] + * Revisions in the POSIX standard remove the special case for POSIX + mode when FS = " " where newline was not a field separator + * Gawk now supports strongly typed regexp constants + * The new typeof() function can be used to indicate if a variable or + array element is an array, regexp, string or number + * Optimizations are now enabled by default + * Passing negative operands to any of the bitwise functions now + produces a fatal error + * The mktime function now accepts an optional second argument + * The FIELDWIDTHS parsing syntax has been enhanced to allow specifying + how many characters to skip before a field starts + * The PROCINFO["argv"] array records all of gawk's command line arguments + as gawk received them +- gawk_ppc64le_ignore_transient_test_time_failure.patch: removed + ------------------------------------------------------------------- Wed Oct 11 11:40:41 UTC 2017 - astieger@suse.com diff --git a/gawk.spec b/gawk.spec index 8f2ace4..4e3ba0e 100644 --- a/gawk.spec +++ b/gawk.spec @@ -17,7 +17,7 @@ Name: gawk -Version: 4.1.4 +Version: 4.2.0 Release: 0 Summary: GNU awk License: GPL-3.0+ @@ -27,7 +27,6 @@ Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: http://savannah.gnu.org/people/viewgpg.php?user_id=80653#/gawk.keyring Source4: gawk.rpmlintrc -Patch1: gawk_ppc64le_ignore_transient_test_time_failure.patch BuildRequires: update-alternatives Requires(post): %{install_info_prereq} Requires(post): update-alternatives @@ -42,20 +41,12 @@ almost completely POSIX 1003.2 compliant. %prep %setup -q -chmod -x COPYING -# skip strftime time -sed -ie 's/ strftime / /g' test/Makefile.in -# apply only for the arch that experienced previously transient failure -%ifarch ppc64le ppc64 -%patch1 -p1 -%endif %build %configure --libexecdir=%{_libdir} make %{?_smp_mflags} %check -# strftime test skipped via prep section make check %{?_smp_mflags} %install @@ -91,6 +82,8 @@ fi %files -f %{name}.lang %defattr(-,root,root) +%config %{_sysconfdir}/profile.d/gawk.csh +%config %{_sysconfdir}/profile.d/gawk.sh #UsrMerge /bin/awk #EndUsrMerge @@ -104,14 +97,12 @@ fi /bin/gawk #EndUsrMerge %{_bindir}/gawk -%{_bindir}/igawk %{_libdir}/awk %{_libdir}/gawk %{_datadir}/awk %{_includedir}/gawkapi.h %{_infodir}/*.info.gz %{_mandir}/man1/gawk.1%{?ext_man} -%{_mandir}/man1/igawk.1%{?ext_man} %{_mandir}/man3/*%{?ext_man} %changelog diff --git a/gawk_ppc64le_ignore_transient_test_time_failure.patch b/gawk_ppc64le_ignore_transient_test_time_failure.patch deleted file mode 100644 index 1a83e10..0000000 --- a/gawk_ppc64le_ignore_transient_test_time_failure.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Michel Normand -Subject: gawk ppc64le ignore transient test time failure -Date: Wed, 04 May 2016 17:46:51 +0200 - -gawk ignore test/time.awk transient failure -I experienced it one time on ppc64le with gawk version 4.1.3 -=== -[ 50s] ============== _time ============= -[ 50s] *** time.ok Sun Apr 5 08:13:50 2015 -[ 50s] --- _time Wed May 4 05:51:05 2016 -[ 50s] *************** -[ 50s] *** 1,3 **** -[ 50s] ! gettimeofday - systime = 0 -[ 50s] sleep(1.3) = 0 -[ 50s] gettimeofday - systime = 0 -[ 50s] --- 1,3 ---- -[ 50s] ! gettimeofday - systime = 1 -[ 50s] sleep(1.3) = 0 -[ 50s] gettimeofday - systime = 0 -[ 50s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gawk-4.1.3/test' -[ 50s] Makefile:1583: recipe for target 'check' failed -[ 50s] make[1]: *** [check] Error 1 -=== - -Signed-off-by: Michel Normand ---- - test/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: gawk-4.1.3/test/Makefile.in -=================================================================== ---- gawk-4.1.3.orig/test/Makefile.in -+++ gawk-4.1.3/test/Makefile.in -@@ -3921,7 +3921,7 @@ rwarray: - time: - @echo $@ - @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ -- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ || { echo "WARNING ignore diff:"; $(CMP) "$(srcdir)"/$@.ok _$@; rm -f _$@; } - - # end of file Maketests - From 289902b5c0e354e1f4c03ff295e4e4007739b79c06214e79b7f55f69b1e8edc1 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 23 Oct 2017 20:17:23 +0000 Subject: [PATCH 3/3] Accepting request 535707 from home:AndreasSchwab:f - fold-string.patch: Don't fold constant strings if either is translatable OBS-URL: https://build.opensuse.org/request/show/535707 OBS-URL: https://build.opensuse.org/package/show/Base:System/gawk?expand=0&rev=68 --- fold-string.patch | 644 ++++++++++++++++++++++++++++++++++++++++++++++ gawk.changes | 5 + gawk.spec | 3 + 3 files changed, 652 insertions(+) create mode 100644 fold-string.patch diff --git a/fold-string.patch b/fold-string.patch new file mode 100644 index 0000000..9dc76c8 --- /dev/null +++ b/fold-string.patch @@ -0,0 +1,644 @@ +2017-10-21 Arnold D. Robbins + + * awkgram.y: For string concatenation, don't fold constants + if one or the other is translatable. Thanks to Harald van Dijk + for the report. + +Index: gawk-4.2.0/awkgram.c +=================================================================== +--- gawk-4.2.0.orig/awkgram.c ++++ gawk-4.2.0/awkgram.c +@@ -684,13 +684,13 @@ static const yytype_uint16 yyrline[] = + 1401, 1409, 1414, 1423, 1424, 1429, 1431, 1436, 1438, 1446, + 1451, 1459, 1460, 1465, 1472, 1476, 1478, 1480, 1493, 1510, + 1520, 1527, 1529, 1534, 1536, 1538, 1546, 1548, 1553, 1555, +- 1560, 1562, 1564, 1620, 1622, 1624, 1626, 1628, 1630, 1632, +- 1634, 1648, 1653, 1658, 1683, 1689, 1691, 1693, 1695, 1697, +- 1699, 1704, 1708, 1740, 1747, 1753, 1759, 1772, 1773, 1774, +- 1779, 1784, 1788, 1792, 1807, 1828, 1833, 1870, 1899, 1900, +- 1906, 1907, 1912, 1914, 1921, 1938, 1955, 1957, 1964, 1969, +- 1977, 1987, 1999, 2008, 2012, 2016, 2020, 2024, 2028, 2031, +- 2033, 2037, 2041, 2045 ++ 1560, 1562, 1564, 1621, 1623, 1625, 1627, 1629, 1631, 1633, ++ 1635, 1649, 1654, 1659, 1684, 1690, 1692, 1694, 1696, 1698, ++ 1700, 1705, 1709, 1741, 1748, 1754, 1760, 1773, 1774, 1775, ++ 1780, 1785, 1789, 1793, 1808, 1829, 1834, 1871, 1900, 1901, ++ 1907, 1908, 1913, 1915, 1922, 1939, 1956, 1958, 1965, 1970, ++ 1978, 1988, 2000, 2009, 2013, 2017, 2021, 2025, 2029, 2032, ++ 2034, 2038, 2042, 2046 + }; + #endif + +@@ -3627,7 +3627,8 @@ regular_print: + + // 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); +@@ -3652,47 +3653,47 @@ regular_print: + max_args = count; + } + } +-#line 3656 "awkgram.c" /* yacc.c:1646 */ ++#line 3657 "awkgram.c" /* yacc.c:1646 */ + break; + + case 144: +-#line 1623 "awkgram.y" /* yacc.c:1646 */ ++#line 1624 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3662 "awkgram.c" /* yacc.c:1646 */ ++#line 3663 "awkgram.c" /* yacc.c:1646 */ + break; + + case 145: +-#line 1625 "awkgram.y" /* yacc.c:1646 */ ++#line 1626 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3668 "awkgram.c" /* yacc.c:1646 */ ++#line 3669 "awkgram.c" /* yacc.c:1646 */ + break; + + case 146: +-#line 1627 "awkgram.y" /* yacc.c:1646 */ ++#line 1628 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3674 "awkgram.c" /* yacc.c:1646 */ ++#line 3675 "awkgram.c" /* yacc.c:1646 */ + break; + + case 147: +-#line 1629 "awkgram.y" /* yacc.c:1646 */ ++#line 1630 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3680 "awkgram.c" /* yacc.c:1646 */ ++#line 3681 "awkgram.c" /* yacc.c:1646 */ + break; + + case 148: +-#line 1631 "awkgram.y" /* yacc.c:1646 */ ++#line 1632 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3686 "awkgram.c" /* yacc.c:1646 */ ++#line 3687 "awkgram.c" /* yacc.c:1646 */ + break; + + case 149: +-#line 1633 "awkgram.y" /* yacc.c:1646 */ ++#line 1634 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3692 "awkgram.c" /* yacc.c:1646 */ ++#line 3693 "awkgram.c" /* yacc.c:1646 */ + break; + + case 150: +-#line 1635 "awkgram.y" /* yacc.c:1646 */ ++#line 1636 "awkgram.y" /* yacc.c:1646 */ + { + /* + * In BEGINFILE/ENDFILE, allow `getline [var] < file' +@@ -3706,29 +3707,29 @@ regular_print: + _("non-redirected `getline' undefined inside END action")); + (yyval) = mk_getline((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), redirect_input); + } +-#line 3710 "awkgram.c" /* yacc.c:1646 */ ++#line 3711 "awkgram.c" /* yacc.c:1646 */ + break; + + case 151: +-#line 1649 "awkgram.y" /* yacc.c:1646 */ ++#line 1650 "awkgram.y" /* yacc.c:1646 */ + { + (yyvsp[0])->opcode = Op_postincrement; + (yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0])); + } +-#line 3719 "awkgram.c" /* yacc.c:1646 */ ++#line 3720 "awkgram.c" /* yacc.c:1646 */ + break; + + case 152: +-#line 1654 "awkgram.y" /* yacc.c:1646 */ ++#line 1655 "awkgram.y" /* yacc.c:1646 */ + { + (yyvsp[0])->opcode = Op_postdecrement; + (yyval) = mk_assignment((yyvsp[-1]), NULL, (yyvsp[0])); + } +-#line 3728 "awkgram.c" /* yacc.c:1646 */ ++#line 3729 "awkgram.c" /* yacc.c:1646 */ + break; + + case 153: +-#line 1659 "awkgram.y" /* yacc.c:1646 */ ++#line 1660 "awkgram.y" /* yacc.c:1646 */ + { + if (do_lint_old) { + warning_ln((yyvsp[-1])->source_line, +@@ -3748,64 +3749,64 @@ regular_print: + (yyval) = list_append(list_merge(t, (yyvsp[0])), (yyvsp[-1])); + } + } +-#line 3752 "awkgram.c" /* yacc.c:1646 */ ++#line 3753 "awkgram.c" /* yacc.c:1646 */ + break; + + case 154: +-#line 1684 "awkgram.y" /* yacc.c:1646 */ ++#line 1685 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = mk_getline((yyvsp[-1]), (yyvsp[0]), (yyvsp[-3]), (yyvsp[-2])->redir_type); + bcfree((yyvsp[-2])); + } +-#line 3761 "awkgram.c" /* yacc.c:1646 */ ++#line 3762 "awkgram.c" /* yacc.c:1646 */ + break; + + case 155: +-#line 1690 "awkgram.y" /* yacc.c:1646 */ ++#line 1691 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3767 "awkgram.c" /* yacc.c:1646 */ ++#line 3768 "awkgram.c" /* yacc.c:1646 */ + break; + + case 156: +-#line 1692 "awkgram.y" /* yacc.c:1646 */ ++#line 1693 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3773 "awkgram.c" /* yacc.c:1646 */ ++#line 3774 "awkgram.c" /* yacc.c:1646 */ + break; + + case 157: +-#line 1694 "awkgram.y" /* yacc.c:1646 */ ++#line 1695 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3779 "awkgram.c" /* yacc.c:1646 */ ++#line 3780 "awkgram.c" /* yacc.c:1646 */ + break; + + case 158: +-#line 1696 "awkgram.y" /* yacc.c:1646 */ ++#line 1697 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3785 "awkgram.c" /* yacc.c:1646 */ ++#line 3786 "awkgram.c" /* yacc.c:1646 */ + break; + + case 159: +-#line 1698 "awkgram.y" /* yacc.c:1646 */ ++#line 1699 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3791 "awkgram.c" /* yacc.c:1646 */ ++#line 3792 "awkgram.c" /* yacc.c:1646 */ + break; + + case 160: +-#line 1700 "awkgram.y" /* yacc.c:1646 */ ++#line 1701 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = mk_binary((yyvsp[-2]), (yyvsp[0]), (yyvsp[-1])); } +-#line 3797 "awkgram.c" /* yacc.c:1646 */ ++#line 3798 "awkgram.c" /* yacc.c:1646 */ + break; + + case 161: +-#line 1705 "awkgram.y" /* yacc.c:1646 */ ++#line 1706 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = list_create((yyvsp[0])); + } +-#line 3805 "awkgram.c" /* yacc.c:1646 */ ++#line 3806 "awkgram.c" /* yacc.c:1646 */ + break; + + case 162: +-#line 1709 "awkgram.y" /* yacc.c:1646 */ ++#line 1710 "awkgram.y" /* yacc.c:1646 */ + { + if ((yyvsp[0])->opcode == Op_match_rec) { + (yyvsp[0])->opcode = Op_nomatch; +@@ -3837,42 +3838,42 @@ regular_print: + } + } + } +-#line 3841 "awkgram.c" /* yacc.c:1646 */ ++#line 3842 "awkgram.c" /* yacc.c:1646 */ + break; + + case 163: +-#line 1741 "awkgram.y" /* yacc.c:1646 */ ++#line 1742 "awkgram.y" /* yacc.c:1646 */ + { + if (do_pretty_print) + (yyval) = list_append((yyvsp[-1]), bcalloc(Op_parens, 1, sourceline)); + else + (yyval) = (yyvsp[-1]); + } +-#line 3852 "awkgram.c" /* yacc.c:1646 */ ++#line 3853 "awkgram.c" /* yacc.c:1646 */ + break; + + case 164: +-#line 1748 "awkgram.y" /* yacc.c:1646 */ ++#line 1749 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = snode((yyvsp[-1]), (yyvsp[-3])); + if ((yyval) == NULL) + YYABORT; + } +-#line 3862 "awkgram.c" /* yacc.c:1646 */ ++#line 3863 "awkgram.c" /* yacc.c:1646 */ + break; + + case 165: +-#line 1754 "awkgram.y" /* yacc.c:1646 */ ++#line 1755 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = snode((yyvsp[-1]), (yyvsp[-3])); + if ((yyval) == NULL) + YYABORT; + } +-#line 3872 "awkgram.c" /* yacc.c:1646 */ ++#line 3873 "awkgram.c" /* yacc.c:1646 */ + break; + + case 166: +-#line 1760 "awkgram.y" /* yacc.c:1646 */ ++#line 1761 "awkgram.y" /* yacc.c:1646 */ + { + static bool warned = false; + +@@ -3885,45 +3886,45 @@ regular_print: + if ((yyval) == NULL) + YYABORT; + } +-#line 3889 "awkgram.c" /* yacc.c:1646 */ ++#line 3890 "awkgram.c" /* yacc.c:1646 */ + break; + + case 169: +-#line 1775 "awkgram.y" /* yacc.c:1646 */ ++#line 1776 "awkgram.y" /* yacc.c:1646 */ + { + (yyvsp[-1])->opcode = Op_preincrement; + (yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1])); + } +-#line 3898 "awkgram.c" /* yacc.c:1646 */ ++#line 3899 "awkgram.c" /* yacc.c:1646 */ + break; + + case 170: +-#line 1780 "awkgram.y" /* yacc.c:1646 */ ++#line 1781 "awkgram.y" /* yacc.c:1646 */ + { + (yyvsp[-1])->opcode = Op_predecrement; + (yyval) = mk_assignment((yyvsp[0]), NULL, (yyvsp[-1])); + } +-#line 3907 "awkgram.c" /* yacc.c:1646 */ ++#line 3908 "awkgram.c" /* yacc.c:1646 */ + break; + + case 171: +-#line 1785 "awkgram.y" /* yacc.c:1646 */ ++#line 1786 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = list_create((yyvsp[0])); + } +-#line 3915 "awkgram.c" /* yacc.c:1646 */ ++#line 3916 "awkgram.c" /* yacc.c:1646 */ + break; + + case 172: +-#line 1789 "awkgram.y" /* yacc.c:1646 */ ++#line 1790 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = list_create((yyvsp[0])); + } +-#line 3923 "awkgram.c" /* yacc.c:1646 */ ++#line 3924 "awkgram.c" /* yacc.c:1646 */ + break; + + case 173: +-#line 1793 "awkgram.y" /* yacc.c:1646 */ ++#line 1794 "awkgram.y" /* yacc.c:1646 */ + { + if ((yyvsp[0])->lasti->opcode == Op_push_i + && ((yyvsp[0])->lasti->memory->flags & STRING) == 0 +@@ -3938,11 +3939,11 @@ regular_print: + (yyval) = list_append((yyvsp[0]), (yyvsp[-1])); + } + } +-#line 3942 "awkgram.c" /* yacc.c:1646 */ ++#line 3943 "awkgram.c" /* yacc.c:1646 */ + break; + + case 174: +-#line 1808 "awkgram.y" /* yacc.c:1646 */ ++#line 1809 "awkgram.y" /* yacc.c:1646 */ + { + if ((yyvsp[0])->lasti->opcode == Op_push_i + && ((yyvsp[0])->lasti->memory->flags & STRING) == 0 +@@ -3960,20 +3961,20 @@ regular_print: + (yyval) = list_append((yyvsp[0]), (yyvsp[-1])); + } + } +-#line 3964 "awkgram.c" /* yacc.c:1646 */ ++#line 3965 "awkgram.c" /* yacc.c:1646 */ + break; + + case 175: +-#line 1829 "awkgram.y" /* yacc.c:1646 */ ++#line 1830 "awkgram.y" /* yacc.c:1646 */ + { + func_use((yyvsp[0])->lasti->func_name, FUNC_USE); + (yyval) = (yyvsp[0]); + } +-#line 3973 "awkgram.c" /* yacc.c:1646 */ ++#line 3974 "awkgram.c" /* yacc.c:1646 */ + break; + + case 176: +-#line 1834 "awkgram.y" /* yacc.c:1646 */ ++#line 1835 "awkgram.y" /* yacc.c:1646 */ + { + /* indirect function call */ + INSTRUCTION *f, *t; +@@ -4007,11 +4008,11 @@ regular_print: + (yyval) = list_prepend((yyvsp[0]), t); + at_seen = false; + } +-#line 4011 "awkgram.c" /* yacc.c:1646 */ ++#line 4012 "awkgram.c" /* yacc.c:1646 */ + break; + + case 177: +-#line 1871 "awkgram.y" /* yacc.c:1646 */ ++#line 1872 "awkgram.y" /* yacc.c:1646 */ + { + NODE *n; + +@@ -4036,49 +4037,49 @@ regular_print: + (yyval) = list_append(t, (yyvsp[-3])); + } + } +-#line 4040 "awkgram.c" /* yacc.c:1646 */ ++#line 4041 "awkgram.c" /* yacc.c:1646 */ + break; + + case 178: +-#line 1899 "awkgram.y" /* yacc.c:1646 */ ++#line 1900 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +-#line 4046 "awkgram.c" /* yacc.c:1646 */ ++#line 4047 "awkgram.c" /* yacc.c:1646 */ + break; + + case 179: +-#line 1901 "awkgram.y" /* yacc.c:1646 */ ++#line 1902 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +-#line 4052 "awkgram.c" /* yacc.c:1646 */ ++#line 4053 "awkgram.c" /* yacc.c:1646 */ + break; + + case 180: +-#line 1906 "awkgram.y" /* yacc.c:1646 */ ++#line 1907 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +-#line 4058 "awkgram.c" /* yacc.c:1646 */ ++#line 4059 "awkgram.c" /* yacc.c:1646 */ + break; + + case 181: +-#line 1908 "awkgram.y" /* yacc.c:1646 */ ++#line 1909 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[-1]); } +-#line 4064 "awkgram.c" /* yacc.c:1646 */ ++#line 4065 "awkgram.c" /* yacc.c:1646 */ + break; + + case 182: +-#line 1913 "awkgram.y" /* yacc.c:1646 */ ++#line 1914 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +-#line 4070 "awkgram.c" /* yacc.c:1646 */ ++#line 4071 "awkgram.c" /* yacc.c:1646 */ + break; + + case 183: +-#line 1915 "awkgram.y" /* yacc.c:1646 */ ++#line 1916 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = list_merge((yyvsp[-1]), (yyvsp[0])); + } +-#line 4078 "awkgram.c" /* yacc.c:1646 */ ++#line 4079 "awkgram.c" /* yacc.c:1646 */ + break; + + case 184: +-#line 1922 "awkgram.y" /* yacc.c:1646 */ ++#line 1923 "awkgram.y" /* yacc.c:1646 */ + { + INSTRUCTION *ip = (yyvsp[0])->lasti; + int count = ip->sub_count; /* # of SUBSEP-seperated expressions */ +@@ -4092,11 +4093,11 @@ regular_print: + sub_counter++; /* count # of dimensions */ + (yyval) = (yyvsp[0]); + } +-#line 4096 "awkgram.c" /* yacc.c:1646 */ ++#line 4097 "awkgram.c" /* yacc.c:1646 */ + break; + + case 185: +-#line 1939 "awkgram.y" /* yacc.c:1646 */ ++#line 1940 "awkgram.y" /* yacc.c:1646 */ + { + INSTRUCTION *t = (yyvsp[-1]); + if ((yyvsp[-1]) == NULL) { +@@ -4110,31 +4111,31 @@ regular_print: + (yyvsp[0])->sub_count = count_expressions(&t, false); + (yyval) = list_append(t, (yyvsp[0])); + } +-#line 4114 "awkgram.c" /* yacc.c:1646 */ ++#line 4115 "awkgram.c" /* yacc.c:1646 */ + break; + + case 186: +-#line 1956 "awkgram.y" /* yacc.c:1646 */ ++#line 1957 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); } +-#line 4120 "awkgram.c" /* yacc.c:1646 */ ++#line 4121 "awkgram.c" /* yacc.c:1646 */ + break; + + case 187: +-#line 1958 "awkgram.y" /* yacc.c:1646 */ ++#line 1959 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = list_merge((yyvsp[-1]), (yyvsp[0])); + } +-#line 4128 "awkgram.c" /* yacc.c:1646 */ ++#line 4129 "awkgram.c" /* yacc.c:1646 */ + break; + + case 188: +-#line 1965 "awkgram.y" /* yacc.c:1646 */ ++#line 1966 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[-1]); } +-#line 4134 "awkgram.c" /* yacc.c:1646 */ ++#line 4135 "awkgram.c" /* yacc.c:1646 */ + break; + + case 189: +-#line 1970 "awkgram.y" /* yacc.c:1646 */ ++#line 1971 "awkgram.y" /* yacc.c:1646 */ + { + char *var_name = (yyvsp[0])->lextok; + +@@ -4142,22 +4143,22 @@ regular_print: + (yyvsp[0])->memory = variable((yyvsp[0])->source_line, var_name, Node_var_new); + (yyval) = list_create((yyvsp[0])); + } +-#line 4146 "awkgram.c" /* yacc.c:1646 */ ++#line 4147 "awkgram.c" /* yacc.c:1646 */ + break; + + case 190: +-#line 1978 "awkgram.y" /* yacc.c:1646 */ ++#line 1979 "awkgram.y" /* yacc.c:1646 */ + { + char *arr = (yyvsp[-1])->lextok; + (yyvsp[-1])->memory = variable((yyvsp[-1])->source_line, arr, Node_var_new); + (yyvsp[-1])->opcode = Op_push_array; + (yyval) = list_prepend((yyvsp[0]), (yyvsp[-1])); + } +-#line 4157 "awkgram.c" /* yacc.c:1646 */ ++#line 4158 "awkgram.c" /* yacc.c:1646 */ + break; + + case 191: +-#line 1988 "awkgram.y" /* yacc.c:1646 */ ++#line 1989 "awkgram.y" /* yacc.c:1646 */ + { + INSTRUCTION *ip = (yyvsp[0])->nexti; + if (ip->opcode == Op_push +@@ -4169,73 +4170,73 @@ regular_print: + } else + (yyval) = (yyvsp[0]); + } +-#line 4173 "awkgram.c" /* yacc.c:1646 */ ++#line 4174 "awkgram.c" /* yacc.c:1646 */ + break; + + case 192: +-#line 2000 "awkgram.y" /* yacc.c:1646 */ ++#line 2001 "awkgram.y" /* yacc.c:1646 */ + { + (yyval) = list_append((yyvsp[-1]), (yyvsp[-2])); + if ((yyvsp[0]) != NULL) + mk_assignment((yyvsp[-1]), NULL, (yyvsp[0])); + } +-#line 4183 "awkgram.c" /* yacc.c:1646 */ ++#line 4184 "awkgram.c" /* yacc.c:1646 */ + break; + + case 193: +-#line 2009 "awkgram.y" /* yacc.c:1646 */ ++#line 2010 "awkgram.y" /* yacc.c:1646 */ + { + (yyvsp[0])->opcode = Op_postincrement; + } +-#line 4191 "awkgram.c" /* yacc.c:1646 */ ++#line 4192 "awkgram.c" /* yacc.c:1646 */ + break; + + case 194: +-#line 2013 "awkgram.y" /* yacc.c:1646 */ ++#line 2014 "awkgram.y" /* yacc.c:1646 */ + { + (yyvsp[0])->opcode = Op_postdecrement; + } +-#line 4199 "awkgram.c" /* yacc.c:1646 */ ++#line 4200 "awkgram.c" /* yacc.c:1646 */ + break; + + case 195: +-#line 2016 "awkgram.y" /* yacc.c:1646 */ ++#line 2017 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = NULL; } +-#line 4205 "awkgram.c" /* yacc.c:1646 */ ++#line 4206 "awkgram.c" /* yacc.c:1646 */ + break; + + case 197: +-#line 2024 "awkgram.y" /* yacc.c:1646 */ ++#line 2025 "awkgram.y" /* yacc.c:1646 */ + { yyerrok; } +-#line 4211 "awkgram.c" /* yacc.c:1646 */ ++#line 4212 "awkgram.c" /* yacc.c:1646 */ + break; + + case 198: +-#line 2028 "awkgram.y" /* yacc.c:1646 */ ++#line 2029 "awkgram.y" /* yacc.c:1646 */ + { yyerrok; } +-#line 4217 "awkgram.c" /* yacc.c:1646 */ ++#line 4218 "awkgram.c" /* yacc.c:1646 */ + break; + + case 201: +-#line 2037 "awkgram.y" /* yacc.c:1646 */ ++#line 2038 "awkgram.y" /* yacc.c:1646 */ + { yyerrok; } +-#line 4223 "awkgram.c" /* yacc.c:1646 */ ++#line 4224 "awkgram.c" /* yacc.c:1646 */ + break; + + case 202: +-#line 2041 "awkgram.y" /* yacc.c:1646 */ ++#line 2042 "awkgram.y" /* yacc.c:1646 */ + { (yyval) = (yyvsp[0]); yyerrok; } +-#line 4229 "awkgram.c" /* yacc.c:1646 */ ++#line 4230 "awkgram.c" /* yacc.c:1646 */ + break; + + case 203: +-#line 2045 "awkgram.y" /* yacc.c:1646 */ ++#line 2046 "awkgram.y" /* yacc.c:1646 */ + { yyerrok; } +-#line 4235 "awkgram.c" /* yacc.c:1646 */ ++#line 4236 "awkgram.c" /* yacc.c:1646 */ + break; + + +-#line 4239 "awkgram.c" /* yacc.c:1646 */ ++#line 4240 "awkgram.c" /* yacc.c:1646 */ + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires +@@ -4463,7 +4464,7 @@ yyreturn: + #endif + return yyresult; + } +-#line 2047 "awkgram.y" /* yacc.c:1906 */ ++#line 2048 "awkgram.y" /* yacc.c:1906 */ + + + struct token { +Index: gawk-4.2.0/awkgram.y +=================================================================== +--- gawk-4.2.0.orig/awkgram.y ++++ gawk-4.2.0/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); diff --git a/gawk.changes b/gawk.changes index 7b680fd..577159c 100644 --- a/gawk.changes +++ b/gawk.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Oct 21 20:12:05 UTC 2017 - schwab@linux-m68k.org + +- fold-string.patch: Don't fold constant strings if either is translatable + ------------------------------------------------------------------- Thu Oct 19 21:54:47 UTC 2017 - schwab@linux-m68k.org diff --git a/gawk.spec b/gawk.spec index 4e3ba0e..c2cf4fb 100644 --- a/gawk.spec +++ b/gawk.spec @@ -27,6 +27,7 @@ Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: http://savannah.gnu.org/people/viewgpg.php?user_id=80653#/gawk.keyring Source4: gawk.rpmlintrc +Patch: fold-string.patch BuildRequires: update-alternatives Requires(post): %{install_info_prereq} Requires(post): update-alternatives @@ -41,6 +42,8 @@ almost completely POSIX 1003.2 compliant. %prep %setup -q +%patch -p1 +touch awkgram.c %build %configure --libexecdir=%{_libdir}