Compare commits
No commits in common. 'c9' and 'c8' have entirely different histories.
@ -1 +1 @@
|
||||
9d75b47baed1a612c0120991c4b6d9cf95e0d430 SOURCES/gettext-0.21.tar.xz
|
||||
e0fe90ede22f7f16bbde7bdea791a835f2773fc9 SOURCES/gettext-0.19.8.1.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
SOURCES/gettext-0.21.tar.xz
|
||||
SOURCES/gettext-0.19.8.1.tar.xz
|
||||
|
@ -0,0 +1,47 @@
|
||||
commit bd2c6ca2b7ae0be02d4bb85db79def454f3153fb
|
||||
Author: rpm-build <rpm-build>
|
||||
AuthorDate: Wed Dec 21 12:50:54 2016 +0100
|
||||
Commit: rpm-build <rpm-build>
|
||||
CommitDate: Wed Dec 21 12:52:36 2016 +0100
|
||||
|
||||
disable-gettext-runtime-test-lock.patch
|
||||
|
||||
diff --git a/gettext-runtime/tests/Makefile.am b/gettext-runtime/tests/Makefile.am
|
||||
index 88a0684..3a27b79 100644
|
||||
--- a/gettext-runtime/tests/Makefile.am
|
||||
+++ b/gettext-runtime/tests/Makefile.am
|
||||
@@ -19,7 +19,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.11 gnits no-dependencies color-tests subdir-objects
|
||||
EXTRA_DIST =
|
||||
|
||||
-TESTS = test-lock
|
||||
+TESTS =
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I.. \
|
||||
diff --git a/gettext-runtime/tests/Makefile.in b/gettext-runtime/tests/Makefile.in
|
||||
index 4327733..5879146 100644
|
||||
--- a/gettext-runtime/tests/Makefile.in
|
||||
+++ b/gettext-runtime/tests/Makefile.in
|
||||
@@ -86,7 +86,7 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
-TESTS = test-lock$(EXEEXT)
|
||||
+TESTS =
|
||||
check_PROGRAMS = test-lock$(EXEEXT)
|
||||
subdir = tests
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
diff --git a/gettext-tools/gnulib-tests/Makefile.in b/gettext-tools/gnulib-tests/Makefile.in
|
||||
index 26becd9..4b9d0e4 100644
|
||||
--- a/gettext-tools/gnulib-tests/Makefile.in
|
||||
+++ b/gettext-tools/gnulib-tests/Makefile.in
|
||||
@@ -143,7 +143,7 @@ TESTS = test-set-mode-acl.sh test-set-mode-acl-1.sh \
|
||||
test-isnanl-nolibm$(EXEEXT) test-isnanl$(EXEEXT) \
|
||||
test-iswblank$(EXEEXT) test-langinfo$(EXEEXT) \
|
||||
test-linkedhash_list$(EXEEXT) test-locale$(EXEEXT) \
|
||||
- test-localename$(EXEEXT) test-lock$(EXEEXT) \
|
||||
+ test-localename$(EXEEXT) \
|
||||
test-log10$(EXEEXT) test-lseek.sh test-lstat$(EXEEXT) \
|
||||
test-malloca$(EXEEXT) test-math$(EXEEXT) test-mbrtowc1.sh \
|
||||
test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
|
@ -0,0 +1,43 @@
|
||||
From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
|
||||
From: Bruno Haible <bruno@clisp.org>
|
||||
Date: Fri, 9 Dec 2016 21:04:31 +0100
|
||||
Subject: [PATCH] Fix crash of xgettext with --its option.
|
||||
|
||||
* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it
|
||||
was initialized. Fixes bug introduced on 2016-05-16.
|
||||
---
|
||||
gettext-tools/src/xgettext.c | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c
|
||||
index f848d76d1..a80ee51ac 100644
|
||||
--- a/gettext-tools/src/xgettext.c
|
||||
+++ b/gettext-tools/src/xgettext.c
|
||||
@@ -330,7 +330,7 @@ main (int argc, char *argv[])
|
||||
bool sort_by_msgid = false;
|
||||
bool sort_by_filepos = false;
|
||||
char **dirs;
|
||||
- char **its_dirs;
|
||||
+ char **its_dirs = NULL;
|
||||
char *explicit_its_filename = NULL;
|
||||
const char *file_name;
|
||||
const char *files_from = NULL;
|
||||
@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension)
|
||||
if (its_locating_rules)
|
||||
locating_rule_list_free (its_locating_rules);
|
||||
|
||||
- for (i = 0; its_dirs[i] != NULL; i++)
|
||||
- free (its_dirs[i]);
|
||||
- free (its_dirs);
|
||||
+ if (its_dirs != NULL)
|
||||
+ {
|
||||
+ for (i = 0; its_dirs[i] != NULL; i++)
|
||||
+ free (its_dirs[i]);
|
||||
+ free (its_dirs);
|
||||
+ }
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
--
|
||||
2.14.3
|
||||
|
@ -0,0 +1,445 @@
|
||||
From dce3a16e5e9368245735e29bf498dcd5e3e474a4 Mon Sep 17 00:00:00 2001
|
||||
From: Daiki Ueno <ueno@gnu.org>
|
||||
Date: Thu, 15 Sep 2016 13:57:24 +0200
|
||||
Subject: [PATCH] xgettext: Fix crash with *.po file input
|
||||
|
||||
When xgettext was given two *.po files with the same msgid_plural, it
|
||||
crashed with double-free. Problem reported by Davlet Panech in:
|
||||
http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00001.html
|
||||
|
||||
praiskup:
|
||||
- I dropped the testsuite part, otherwise we'd have to 'autoreconf -vif' the
|
||||
sources
|
||||
- I'm patching manually the po-gram-gen.c file to avoid 'bison' BR
|
||||
|
||||
diff --git a/gettext-tools/src/po-gram-gen.y b/gettext-tools/src/po-gram-gen.y
|
||||
index becf5e607..4428e7725 100644
|
||||
--- a/gettext-tools/src/po-gram-gen.y
|
||||
+++ b/gettext-tools/src/po-gram-gen.y
|
||||
@@ -221,14 +221,11 @@ message
|
||||
check_obsolete ($1, $3);
|
||||
check_obsolete ($1, $4);
|
||||
if (!$1.obsolete || pass_obsolete_entries)
|
||||
- {
|
||||
- do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
|
||||
- $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
|
||||
- $1.prev_ctxt,
|
||||
- $1.prev_id, $1.prev_id_plural,
|
||||
- $1.obsolete);
|
||||
- free ($3.string);
|
||||
- }
|
||||
+ do_callback_message ($1.ctxt, string2, &$1.pos, $3.string,
|
||||
+ $4.rhs.msgstr, $4.rhs.msgstr_len, &$4.pos,
|
||||
+ $1.prev_ctxt,
|
||||
+ $1.prev_id, $1.prev_id_plural,
|
||||
+ $1.obsolete);
|
||||
else
|
||||
{
|
||||
free_message_intro ($1);
|
||||
diff --git a/gettext-tools/src/read-catalog.c b/gettext-tools/src/read-catalog.c
|
||||
index 571d18e1b..6af6d2025 100644
|
||||
--- a/gettext-tools/src/read-catalog.c
|
||||
+++ b/gettext-tools/src/read-catalog.c
|
||||
@@ -397,6 +397,8 @@ default_add_message (default_catalog_reader_ty *this,
|
||||
appropriate. */
|
||||
mp = message_alloc (msgctxt, msgid, msgid_plural, msgstr, msgstr_len,
|
||||
msgstr_pos);
|
||||
+ if (msgid_plural != NULL)
|
||||
+ free (msgid_plural);
|
||||
mp->prev_msgctxt = prev_msgctxt;
|
||||
mp->prev_msgid = prev_msgid;
|
||||
mp->prev_msgid_plural = prev_msgid_plural;
|
||||
diff --git a/gettext-tools/src/po-gram-gen.c b/gettext-tools/src/po-gram-gen.c
|
||||
--- a/gettext-tools/src/po-gram-gen.c
|
||||
+++ b/gettext-tools/src/po-gram-gen.c
|
||||
@@ -1,8 +1,8 @@
|
||||
-/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
+/* A Bison parser, made by GNU Bison 3.0.5. */
|
||||
|
||||
/* Bison implementation for Yacc-like parsers in C
|
||||
|
||||
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -44,7 +44,7 @@
|
||||
#define YYBISON 1
|
||||
|
||||
/* Bison version. */
|
||||
-#define YYBISON_VERSION "3.0.4"
|
||||
+#define YYBISON_VERSION "3.0.5"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@@ -568,9 +568,9 @@
|
||||
static const yytype_uint16 yyrline[] =
|
||||
{
|
||||
0, 169, 169, 171, 172, 173, 174, 179, 187, 195,
|
||||
- 216, 240, 249, 258, 269, 278, 292, 301, 315, 321,
|
||||
- 332, 338, 350, 361, 372, 376, 391, 414, 422, 434,
|
||||
- 442
|
||||
+ 216, 237, 246, 255, 266, 275, 289, 298, 312, 318,
|
||||
+ 329, 335, 347, 358, 369, 373, 388, 411, 419, 431,
|
||||
+ 439
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1054,6 +1054,7 @@
|
||||
case N: \
|
||||
yyformat = S; \
|
||||
break
|
||||
+ default: /* Avoid compiler warnings. */
|
||||
YYCASE_(0, YY_("syntax error"));
|
||||
YYCASE_(1, YY_("syntax error, unexpected %s"));
|
||||
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
|
||||
@@ -1370,23 +1371,23 @@
|
||||
switch (yyn)
|
||||
{
|
||||
case 7:
|
||||
-#line 180 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 180 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
po_callback_comment_dispatcher ((yyvsp[0].string).string);
|
||||
}
|
||||
-#line 1378 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1379 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 8:
|
||||
-#line 188 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 188 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
po_callback_domain ((yyvsp[0].string).string);
|
||||
}
|
||||
-#line 1386 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1387 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 9:
|
||||
-#line 196 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 196 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist);
|
||||
char *string4 = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist);
|
||||
@@ -1407,11 +1408,11 @@
|
||||
free (string4);
|
||||
}
|
||||
}
|
||||
-#line 1411 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1412 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 10:
|
||||
-#line 217 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 217 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
char *string2 = string_list_concat_destroy (&(yyvsp[-2].stringlist).stringlist);
|
||||
|
||||
@@ -1419,14 +1420,11 @@
|
||||
check_obsolete ((yyvsp[-3].message_intro), (yyvsp[-1].string));
|
||||
check_obsolete ((yyvsp[-3].message_intro), (yyvsp[0].rhs));
|
||||
if (!(yyvsp[-3].message_intro).obsolete || pass_obsolete_entries)
|
||||
- {
|
||||
- do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string,
|
||||
- (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos,
|
||||
- (yyvsp[-3].message_intro).prev_ctxt,
|
||||
- (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural,
|
||||
- (yyvsp[-3].message_intro).obsolete);
|
||||
- free ((yyvsp[-1].string).string);
|
||||
- }
|
||||
+ do_callback_message ((yyvsp[-3].message_intro).ctxt, string2, &(yyvsp[-3].message_intro).pos, (yyvsp[-1].string).string,
|
||||
+ (yyvsp[0].rhs).rhs.msgstr, (yyvsp[0].rhs).rhs.msgstr_len, &(yyvsp[0].rhs).pos,
|
||||
+ (yyvsp[-3].message_intro).prev_ctxt,
|
||||
+ (yyvsp[-3].message_intro).prev_id, (yyvsp[-3].message_intro).prev_id_plural,
|
||||
+ (yyvsp[-3].message_intro).obsolete);
|
||||
else
|
||||
{
|
||||
free_message_intro ((yyvsp[-3].message_intro));
|
||||
@@ -1435,11 +1433,11 @@
|
||||
free ((yyvsp[0].rhs).rhs.msgstr);
|
||||
}
|
||||
}
|
||||
-#line 1439 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1437 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 11:
|
||||
-#line 241 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 238 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist));
|
||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].string));
|
||||
@@ -1448,11 +1446,11 @@
|
||||
string_list_destroy (&(yyvsp[-1].stringlist).stringlist);
|
||||
free ((yyvsp[0].string).string);
|
||||
}
|
||||
-#line 1452 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1450 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 12:
|
||||
-#line 250 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 247 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[-1].stringlist));
|
||||
check_obsolete ((yyvsp[-2].message_intro), (yyvsp[0].rhs));
|
||||
@@ -1461,22 +1459,22 @@
|
||||
string_list_destroy (&(yyvsp[-1].stringlist).stringlist);
|
||||
free ((yyvsp[0].rhs).rhs.msgstr);
|
||||
}
|
||||
-#line 1465 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1463 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 13:
|
||||
-#line 259 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 256 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].message_intro), (yyvsp[0].stringlist));
|
||||
po_gram_error_at_line (&(yyvsp[-1].message_intro).pos, _("missing 'msgstr' section"));
|
||||
free_message_intro ((yyvsp[-1].message_intro));
|
||||
string_list_destroy (&(yyvsp[0].stringlist).stringlist);
|
||||
}
|
||||
-#line 1476 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1474 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 14:
|
||||
-#line 270 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 267 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
(yyval.message_intro).prev_ctxt = NULL;
|
||||
(yyval.message_intro).prev_id = NULL;
|
||||
@@ -1485,11 +1483,11 @@
|
||||
(yyval.message_intro).pos = (yyvsp[0].string).pos;
|
||||
(yyval.message_intro).obsolete = (yyvsp[0].string).obsolete;
|
||||
}
|
||||
-#line 1489 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1487 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 15:
|
||||
-#line 279 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 276 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].prev), (yyvsp[0].string));
|
||||
(yyval.message_intro).prev_ctxt = (yyvsp[-1].prev).ctxt;
|
||||
@@ -1499,11 +1497,11 @@
|
||||
(yyval.message_intro).pos = (yyvsp[0].string).pos;
|
||||
(yyval.message_intro).obsolete = (yyvsp[0].string).obsolete;
|
||||
}
|
||||
-#line 1503 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1501 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 16:
|
||||
-#line 293 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 290 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].string), (yyvsp[0].stringlist));
|
||||
(yyval.prev).ctxt = (yyvsp[-1].string).string;
|
||||
@@ -1512,11 +1510,11 @@
|
||||
(yyval.prev).pos = (yyvsp[-1].string).pos;
|
||||
(yyval.prev).obsolete = (yyvsp[-1].string).obsolete;
|
||||
}
|
||||
-#line 1516 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1514 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 17:
|
||||
-#line 302 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 299 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-2].string), (yyvsp[-1].stringlist));
|
||||
check_obsolete ((yyvsp[-2].string), (yyvsp[0].string));
|
||||
@@ -1526,21 +1524,21 @@
|
||||
(yyval.prev).pos = (yyvsp[-2].string).pos;
|
||||
(yyval.prev).obsolete = (yyvsp[-2].string).obsolete;
|
||||
}
|
||||
-#line 1530 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1528 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 18:
|
||||
-#line 316 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 313 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
(yyval.string).string = NULL;
|
||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
||||
}
|
||||
-#line 1540 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1538 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 19:
|
||||
-#line 322 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 319 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist));
|
||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos));
|
||||
@@ -1548,21 +1546,21 @@
|
||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
||||
}
|
||||
-#line 1552 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1550 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 20:
|
||||
-#line 333 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 330 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
(yyval.string).string = NULL;
|
||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
||||
}
|
||||
-#line 1562 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1560 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 21:
|
||||
-#line 339 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 336 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[-1].stringlist));
|
||||
check_obsolete ((yyvsp[-2].pos), (yyvsp[0].pos));
|
||||
@@ -1570,11 +1568,11 @@
|
||||
(yyval.string).pos = (yyvsp[0].pos).pos;
|
||||
(yyval.string).obsolete = (yyvsp[0].pos).obsolete;
|
||||
}
|
||||
-#line 1574 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1572 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 22:
|
||||
-#line 351 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 348 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist));
|
||||
plural_counter = 0;
|
||||
@@ -1582,30 +1580,30 @@
|
||||
(yyval.string).pos = (yyvsp[-1].pos).pos;
|
||||
(yyval.string).obsolete = (yyvsp[-1].pos).obsolete;
|
||||
}
|
||||
-#line 1586 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1584 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 23:
|
||||
-#line 362 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 359 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].pos), (yyvsp[0].stringlist));
|
||||
(yyval.string).string = string_list_concat_destroy (&(yyvsp[0].stringlist).stringlist);
|
||||
(yyval.string).pos = (yyvsp[-1].pos).pos;
|
||||
(yyval.string).obsolete = (yyvsp[-1].pos).obsolete;
|
||||
}
|
||||
-#line 1597 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1595 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 24:
|
||||
-#line 373 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 370 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
(yyval.rhs) = (yyvsp[0].rhs);
|
||||
}
|
||||
-#line 1605 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1603 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 25:
|
||||
-#line 377 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 374 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].rhs), (yyvsp[0].rhs));
|
||||
(yyval.rhs).rhs.msgstr = XNMALLOC ((yyvsp[-1].rhs).rhs.msgstr_len + (yyvsp[0].rhs).rhs.msgstr_len, char);
|
||||
@@ -1617,11 +1615,11 @@
|
||||
(yyval.rhs).pos = (yyvsp[-1].rhs).pos;
|
||||
(yyval.rhs).obsolete = (yyvsp[-1].rhs).obsolete;
|
||||
}
|
||||
-#line 1621 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1619 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 26:
|
||||
-#line 392 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 389 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-4].pos), (yyvsp[-3].pos));
|
||||
check_obsolete ((yyvsp[-4].pos), (yyvsp[-2].number));
|
||||
@@ -1640,11 +1638,11 @@
|
||||
(yyval.rhs).pos = (yyvsp[-4].pos).pos;
|
||||
(yyval.rhs).obsolete = (yyvsp[-4].pos).obsolete;
|
||||
}
|
||||
-#line 1644 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1642 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 27:
|
||||
-#line 415 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 412 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
string_list_init (&(yyval.stringlist).stringlist);
|
||||
string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string);
|
||||
@@ -1652,11 +1650,11 @@
|
||||
(yyval.stringlist).pos = (yyvsp[0].string).pos;
|
||||
(yyval.stringlist).obsolete = (yyvsp[0].string).obsolete;
|
||||
}
|
||||
-#line 1656 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1654 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 28:
|
||||
-#line 423 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 420 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string));
|
||||
(yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist;
|
||||
@@ -1665,11 +1663,11 @@
|
||||
(yyval.stringlist).pos = (yyvsp[-1].stringlist).pos;
|
||||
(yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete;
|
||||
}
|
||||
-#line 1669 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1667 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 29:
|
||||
-#line 435 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 432 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
string_list_init (&(yyval.stringlist).stringlist);
|
||||
string_list_append (&(yyval.stringlist).stringlist, (yyvsp[0].string).string);
|
||||
@@ -1677,11 +1675,11 @@
|
||||
(yyval.stringlist).pos = (yyvsp[0].string).pos;
|
||||
(yyval.stringlist).obsolete = (yyvsp[0].string).obsolete;
|
||||
}
|
||||
-#line 1681 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1679 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
case 30:
|
||||
-#line 443 "po-gram-gen.y" /* yacc.c:1646 */
|
||||
+#line 440 "po-gram-gen.y" /* yacc.c:1648 */
|
||||
{
|
||||
check_obsolete ((yyvsp[-1].stringlist), (yyvsp[0].string));
|
||||
(yyval.stringlist).stringlist = (yyvsp[-1].stringlist).stringlist;
|
||||
@@ -1690,11 +1688,11 @@
|
||||
(yyval.stringlist).pos = (yyvsp[-1].stringlist).pos;
|
||||
(yyval.stringlist).obsolete = (yyvsp[-1].stringlist).obsolete;
|
||||
}
|
||||
-#line 1694 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1692 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
break;
|
||||
|
||||
|
||||
-#line 1698 "po-gram-gen.c" /* yacc.c:1646 */
|
||||
+#line 1696 "po-gram-gen.c" /* yacc.c:1648 */
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
--
|
||||
2.19.1
|
||||
|
@ -1,68 +0,0 @@
|
||||
diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c
|
||||
index 990d39e..9814502 100644
|
||||
--- a/gettext-tools/src/msgl-cat.c
|
||||
+++ b/gettext-tools/src/msgl-cat.c
|
||||
@@ -306,6 +306,7 @@ catenate_msgdomain_list (string_list_ty *file_list,
|
||||
mp->msgid);
|
||||
multiline_error (xstrdup (""),
|
||||
xasprintf ("%s\n", errormsg));
|
||||
+ free (errormsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c
|
||||
index 5cf72ad..7a0e5d3 100644
|
||||
--- a/gettext-tools/src/x-csharp.c
|
||||
+++ b/gettext-tools/src/x-csharp.c
|
||||
@@ -560,6 +560,7 @@ comment_line_end (size_t chars_to_remove)
|
||||
buffer[buflen] = '\0';
|
||||
savable_comment_add (buffer);
|
||||
lexical_context = lc_outside;
|
||||
+ free (buffer);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c
|
||||
index eff1e6f..7e1bb78 100644
|
||||
--- a/gettext-tools/src/x-java.c
|
||||
+++ b/gettext-tools/src/x-java.c
|
||||
@@ -460,6 +460,7 @@ comment_line_end (size_t chars_to_remove)
|
||||
--buflen;
|
||||
buffer[buflen] = '\0';
|
||||
savable_comment_add (buffer);
|
||||
+ free (buffer);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c
|
||||
index cde1ee6..fca441e 100644
|
||||
--- a/gettext-tools/src/x-rst.c
|
||||
+++ b/gettext-tools/src/x-rst.c
|
||||
@@ -651,6 +651,7 @@ extract_rsj (FILE *f,
|
||||
else
|
||||
goto invalid_rsj;
|
||||
|
||||
+ free (s1);
|
||||
/* Parse a comma. */
|
||||
c = phase2_getc ();
|
||||
if (c == '}')
|
||||
@@ -667,6 +668,7 @@ extract_rsj (FILE *f,
|
||||
|
||||
fp = NULL;
|
||||
real_file_name = NULL;
|
||||
+ free (logical_file_name);
|
||||
logical_file_name = NULL;
|
||||
line_number = 0;
|
||||
|
||||
diff --git a/gettext-tools/src/xg-arglist-callshape.c b/gettext-tools/src/xg-arglist-callshape.c
|
||||
index 06b7076..2189aac 100644
|
||||
--- a/gettext-tools/src/xg-arglist-callshape.c
|
||||
+++ b/gettext-tools/src/xg-arglist-callshape.c
|
||||
@@ -118,6 +118,7 @@ split_keywordspec (const char *spec,
|
||||
memcpy (xcomment, xcomment_start, xcomment_len);
|
||||
xcomment[xcomment_len] = '\0';
|
||||
string_list_append (&xcomments, xcomment);
|
||||
+ free (xcomment);
|
||||
}
|
||||
else
|
||||
break;
|
@ -1,128 +0,0 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 815e3c7..e897de7 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -19,7 +19,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
-SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools
|
||||
+SUBDIRS = gnulib-local gettext-runtime gettext-tools
|
||||
|
||||
changelog_etc = \
|
||||
gettext-runtime/ChangeLog.0 \
|
||||
@@ -123,7 +123,6 @@ distcheck-hook:
|
||||
test "`sed 1,16d $(srcdir)/gettext-runtime/intl/xsize.h | md5sum`" = "`sed 1,16d $(srcdir)/gettext-tools/gnulib-lib/xsize.h | md5sum`"
|
||||
cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man
|
||||
cmp -s $(srcdir)/gettext-runtime/man/x-to-1.in $(srcdir)/gettext-tools/man/x-to-1.in
|
||||
- cmp -s $(srcdir)/libtextstyle/m4/libtextstyle.m4 $(srcdir)/gettext-tools/gnulib-m4/libtextstyle.m4
|
||||
cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.java $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.java
|
||||
cmp -s $(srcdir)/gettext-tools/examples/hello-java-awt/m4/TestAWT.class $(srcdir)/gettext-tools/examples/hello-java-swing/m4/TestAWT.class
|
||||
test "`sed 1,15d $(srcdir)/gnulib-local/lib/alloca.in.h | md5sum`" = "`sed 1,15d $(srcdir)/gettext-runtime/libasprintf/alloca.in.h | md5sum`"
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 49689fb..2d23b44 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -37,7 +37,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
-AC_CONFIG_SUBDIRS([gettext-runtime libtextstyle gettext-tools])
|
||||
+AC_CONFIG_SUBDIRS([gettext-runtime gettext-tools])
|
||||
|
||||
AM_EXTRA_RECURSIVE_TARGETS([maintainer-update-po])
|
||||
|
||||
@@ -49,7 +49,7 @@ AC_CANONICAL_HOST
|
||||
dnl Optional Features: AC_ARG_ENABLE calls
|
||||
dnl Optional Packages: AC_ARG_WITH calls
|
||||
dnl Some influential environment variables: AC_ARG_VAR calls
|
||||
-esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
|
||||
+esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
|
||||
diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am
|
||||
index 449a797..c5719c2 100644
|
||||
--- a/gettext-tools/Makefile.am
|
||||
+++ b/gettext-tools/Makefile.am
|
||||
@@ -19,7 +19,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
|
||||
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
|
||||
|
||||
-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
|
||||
+SUBDIRS = intl gnulib-lib libgrep libgettextpo src po its projects styles emacs misc man m4 tests system-tests gnulib-tests examples doc
|
||||
|
||||
EXTRA_DIST = misc/DISCLAIM
|
||||
MOSTLYCLEANFILES = core *.stackdump
|
||||
diff --git a/gettext-tools/libgettextpo/textstyle.in.h b/gettext-tools/libgettextpo/textstyle.in.h
|
||||
index 536b51b..585ce66 100644
|
||||
--- a/gettext-tools/libgettextpo/textstyle.in.h
|
||||
+++ b/gettext-tools/libgettextpo/textstyle.in.h
|
||||
@@ -213,7 +213,8 @@ typedef ostream_t file_ostream_t;
|
||||
static inline file_ostream_t
|
||||
file_ostream_create (FILE *fp)
|
||||
{
|
||||
- return fp;
|
||||
+ /* Closing the stream we return should not close 'fp'. */
|
||||
+ return fdopen (dup (fileno (fp)), "w");
|
||||
}
|
||||
|
||||
/* --------------------------- From fd-ostream.h --------------------------- */
|
||||
@@ -413,6 +414,30 @@ html_styled_ostream_create (ostream_t destination _GL_UNUSED,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+/* ----------------------- From noop-styled-ostream.h ----------------------- */
|
||||
+
|
||||
+/* noop_styled_ostream_t is a subtype of ostream_t. */
|
||||
+typedef ostream_t noop_styled_ostream_t;
|
||||
+
|
||||
+#define noop_styled_ostream_write_mem ostream_write_mem
|
||||
+#define noop_styled_ostream_flush ostream_flush
|
||||
+#define noop_styled_ostream_free ostream_free
|
||||
+#define noop_styled_ostream_begin_use_class styled_ostream_begin_use_class
|
||||
+#define noop_styled_ostream_end_use_class styled_ostream_end_use_class
|
||||
+#define noop_styled_ostream_get_hyperlink_ref styled_ostream_get_hyperlink_ref
|
||||
+#define noop_styled_ostream_get_hyperlink_id styled_ostream_get_hyperlink_id
|
||||
+#define noop_styled_ostream_set_hyperlink styled_ostream_set_hyperlink
|
||||
+#define noop_styled_ostream_flush_to_current_style styled_ostream_flush_to_current_style
|
||||
+
|
||||
+static inline ostream_t
|
||||
+noop_styled_ostream_create (ostream_t destination, bool pass_ownership)
|
||||
+{
|
||||
+ if (pass_ownership)
|
||||
+ return destination;
|
||||
+ else
|
||||
+ return fdopen (dup (fileno (destination)), "w");
|
||||
+}
|
||||
+
|
||||
/* ------------------------------ From color.h ------------------------------ */
|
||||
|
||||
#define color_test_mode false
|
||||
diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am
|
||||
index 764ffad..eccfbbd 100644
|
||||
--- a/gettext-tools/src/Makefile.am
|
||||
+++ b/gettext-tools/src/Makefile.am
|
||||
@@ -292,19 +292,9 @@ cldr_plurals_SOURCES = cldr-plural.y cldr-plural-exp.c cldr-plurals.c
|
||||
cldr_plurals_CFLAGS = $(AM_CFLAGS) $(INCXML)
|
||||
cldr_plurals_LDADD = libgettextsrc.la $(LDADD)
|
||||
|
||||
-if USE_INSTALLED_LIBTEXTSTYLE
|
||||
-LT_LIBTEXTSTYLE = @LTLIBTEXTSTYLE@
|
||||
-else
|
||||
-# How to get the include files of libtextstyle.
|
||||
-textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h:
|
||||
- here=`pwd`; \
|
||||
- cd ../../libtextstyle/lib && \
|
||||
- $(MAKE) install-nobase_includeHEADERS install-nobase_nodist_includeHEADERS includedir="$$here"
|
||||
-BUILT_SOURCES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
|
||||
-MOSTLYCLEANFILES += textstyle.h textstyle/stdbool.h textstyle/version.h textstyle/woe32dll.h
|
||||
-# Where to find the built libtextstyle library.
|
||||
-LT_LIBTEXTSTYLE = ../../libtextstyle/lib/libtextstyle.la
|
||||
-endif
|
||||
+# Use the dummy libtextstyle from gnulib, as libgettextpo does.
|
||||
+LT_LIBTEXTSTYLE =
|
||||
+AM_CPPFLAGS += -I../libgettextpo -I$(top_srcdir)/libgettextpo
|
||||
|
||||
# How to build libgettextsrc.la.
|
||||
# Need ../gnulib-lib/libgettextlib.la.
|
@ -1,44 +0,0 @@
|
||||
From 175e0bc72808d564074c4adcc72aeadb74adfcc6 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Date: Thu, 27 Aug 2020 17:52:58 -0700
|
||||
Subject: [PATCH] perror, strerror_r: remove unportable tests
|
||||
|
||||
Problem reported by Florian Weimer in:
|
||||
https://lists.gnu.org/r/bug-gnulib/2020-08/msg00220.html
|
||||
* tests/test-perror2.c (main):
|
||||
* tests/test-strerror_r.c (main): Omit unportable tests.
|
||||
---
|
||||
ChangeLog | 8 ++++++++
|
||||
tests/test-perror2.c | 3 ---
|
||||
tests/test-strerror_r.c | 3 ---
|
||||
3 files changed, 8 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/gettext-tools/gnulib-tests/test-perror2.c b/gettext-tools/gnulib-tests/test-perror2.c
|
||||
index 1d14eda7b..c6214dd25 100644
|
||||
--- a/gettext-tools/gnulib-tests/test-perror2.c
|
||||
+++ b/gettext-tools/gnulib-tests/test-perror2.c
|
||||
@@ -79,9 +79,6 @@ main (void)
|
||||
errno = -5;
|
||||
perror ("");
|
||||
ASSERT (!ferror (stderr));
|
||||
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
|
||||
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
|
||||
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
|
||||
ASSERT (STREQ (msg4, str4));
|
||||
|
||||
free (str1);
|
||||
diff --git a/gettext-tools/gnulib-tests/test-strerror_r.c b/gettext-tools/gnulib-tests/test-strerror_r.c
|
||||
index b11d6fd9f..c1dbcf837 100644
|
||||
--- a/gettext-tools/gnulib-tests/test-strerror_r.c
|
||||
+++ b/gettext-tools/gnulib-tests/test-strerror_r.c
|
||||
@@ -165,9 +165,6 @@ main (void)
|
||||
|
||||
strerror_r (EACCES, buf, sizeof buf);
|
||||
strerror_r (-5, buf, sizeof buf);
|
||||
- ASSERT (msg1 == msg2 || msg1 == msg4 || STREQ (msg1, str1));
|
||||
- ASSERT (msg2 == msg4 || STREQ (msg2, str2));
|
||||
- ASSERT (msg3 == msg4 || STREQ (msg3, str3));
|
||||
ASSERT (STREQ (msg4, str4));
|
||||
|
||||
free (str1);
|
||||
|
@ -1,116 +0,0 @@
|
||||
diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c gettext-0.21/gettext-tools/gnulib-lib/javacomp.c
|
||||
--- gettext-0.21.orig/gettext-tools/gnulib-lib/javacomp.c 2022-03-09 12:22:05.000000000 +0900
|
||||
+++ gettext-0.21/gettext-tools/gnulib-lib/javacomp.c 2022-03-20 18:23:53.636052943 +0900
|
||||
@@ -116,9 +116,8 @@ default_target_version (void)
|
||||
&& (java_version_cache[1] >= '2'
|
||||
&& java_version_cache[1] <= '7')
|
||||
&& java_version_cache[2] == '\0')
|
||||
- /* Assume that these (not yet released) Java versions will behave
|
||||
- like the preceding ones. */
|
||||
- java_version_cache = "11";
|
||||
+ /* It's one of the valid target version values. */
|
||||
+ ;
|
||||
else
|
||||
java_version_cache = "1.1";
|
||||
}
|
||||
@@ -128,7 +127,7 @@ default_target_version (void)
|
||||
/* ======================= Source version dependent ======================= */
|
||||
|
||||
/* Convert a source version to an index. */
|
||||
-#define SOURCE_VERSION_BOUND 8 /* exclusive upper bound */
|
||||
+#define SOURCE_VERSION_BOUND 14 /* exclusive upper bound */
|
||||
static unsigned int
|
||||
source_version_index (const char *source_version)
|
||||
{
|
||||
@@ -144,7 +143,7 @@ source_version_index (const char *source
|
||||
else if (source_version[0] == '9' && source_version[1] == '\0')
|
||||
return 5;
|
||||
else if (source_version[0] == '1'
|
||||
- && (source_version[1] >= '0' && source_version[1] <= '1')
|
||||
+ && (source_version[1] >= '0' && source_version[1] <= '7')
|
||||
&& source_version[2] == '\0')
|
||||
return source_version[1] - '0' + 6;
|
||||
error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class"));
|
||||
@@ -171,6 +170,10 @@ get_goodcode_snippet (const char *source
|
||||
return "class conftest { public void m() { var i = new Integer(0); } }\n";
|
||||
if (strcmp (source_version, "11") == 0)
|
||||
return "class conftest { Readable r = (var b) -> 0; }\n";
|
||||
+ if (source_version[0] == '1'
|
||||
+ && (source_version[1] >= '2' && source_version[1] <= '7')
|
||||
+ && source_version[2] == '\0')
|
||||
+ return "class conftest { Readable r = (var b) -> 0; }\n";
|
||||
error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class"));
|
||||
return NULL;
|
||||
}
|
||||
@@ -197,6 +200,10 @@ get_failcode_snippet (const char *source
|
||||
return "class conftestfail { Readable r = (var b) -> 0; }\n";
|
||||
if (strcmp (source_version, "11") == 0)
|
||||
return NULL;
|
||||
+ if (source_version[0] == '1'
|
||||
+ && (source_version[1] >= '2' && source_version[1] <= '7')
|
||||
+ && source_version[2] == '\0')
|
||||
+ return NULL;
|
||||
error (EXIT_FAILURE, 0, _("invalid source_version argument to compile_java_class"));
|
||||
return NULL;
|
||||
}
|
||||
@@ -204,7 +211,7 @@ get_failcode_snippet (const char *source
|
||||
/* ======================= Target version dependent ======================= */
|
||||
|
||||
/* Convert a target version to an index. */
|
||||
-#define TARGET_VERSION_BOUND 11 /* exclusive upper bound */
|
||||
+#define TARGET_VERSION_BOUND 17 /* exclusive upper bound */
|
||||
static unsigned int
|
||||
target_version_index (const char *target_version)
|
||||
{
|
||||
@@ -215,7 +222,7 @@ target_version_index (const char *target
|
||||
else if (target_version[0] == '9' && target_version[1] == '\0')
|
||||
return 8;
|
||||
else if (target_version[0] == '1'
|
||||
- && (target_version[1] >= '0' && target_version[1] <= '1')
|
||||
+ && (target_version[1] >= '0' && target_version[1] <= '7')
|
||||
&& target_version[2] == '\0')
|
||||
return target_version[1] - '0' + 9;
|
||||
error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class"));
|
||||
@@ -245,10 +252,10 @@ corresponding_classfile_version (const c
|
||||
return 52;
|
||||
if (strcmp (target_version, "9") == 0)
|
||||
return 53;
|
||||
- if (strcmp (target_version, "10") == 0)
|
||||
- return 54;
|
||||
- if (strcmp (target_version, "11") == 0)
|
||||
- return 55;
|
||||
+ if (target_version[0] == '1'
|
||||
+ && (target_version[1] >= '0' && target_version[1] <= '7')
|
||||
+ && target_version[2] == '\0')
|
||||
+ return target_version[1] + 54;
|
||||
error (EXIT_FAILURE, 0, _("invalid target_version argument to compile_java_class"));
|
||||
return 0;
|
||||
}
|
||||
@@ -2439,7 +2446,7 @@ compile_java_class (const char * const *
|
||||
}
|
||||
}
|
||||
|
||||
- error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC"));
|
||||
+ /* error (0, 0, _("Java compiler not found, try installing gcj or set $JAVAC")); */
|
||||
err = true;
|
||||
|
||||
done2:
|
||||
diff -urp '--exclude=*~' gettext-0.21.orig/gettext-tools/src/write-java.c gettext-0.21/gettext-tools/src/write-java.c
|
||||
--- gettext-0.21.orig/gettext-tools/src/write-java.c 2022-03-09 12:17:21.000000000 +0900
|
||||
+++ gettext-0.21/gettext-tools/src/write-java.c 2022-03-20 18:26:06.941734979 +0900
|
||||
@@ -1209,8 +1209,14 @@ msgdomain_write_java (message_list_ty *m
|
||||
Java compilers create the class files in the source file's directory -
|
||||
which is in a temporary directory in our case. */
|
||||
java_sources[0] = java_file_name;
|
||||
- if (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
|
||||
+ if (1
|
||||
+ && (compile_java_class (java_sources, 1, NULL, 0, "17", "17", directory,
|
||||
+ true, false, true, verbose > 0)) /* assume JDK 17 */
|
||||
+ && (compile_java_class (java_sources, 1, NULL, 0, "11", "11", directory,
|
||||
+ true, false, true, verbose > 0)) /* assume JDK 11 */
|
||||
+ && (compile_java_class (java_sources, 1, NULL, 0, "1.5", "1.6", directory,
|
||||
true, false, true, verbose > 0))
|
||||
+ )
|
||||
{
|
||||
if (!verbose)
|
||||
error (0, 0,
|
@ -0,0 +1,21 @@
|
||||
Index: gettext-0.19.8.1/gettext-tools/misc/po-mode.el
|
||||
===================================================================
|
||||
--- gettext-0.19.8.1.orig/gettext-tools/misc/po-mode.el
|
||||
+++ gettext-0.19.8.1/gettext-tools/misc/po-mode.el
|
||||
@@ -3518,10 +3518,12 @@ Write to your team? ('n' if writing to
|
||||
(re-search-forward
|
||||
(concat "^" (regexp-quote mail-header-separator) "\n"))
|
||||
(save-excursion
|
||||
- (insert-buffer-substring buffer)
|
||||
- (shell-command-on-region
|
||||
- (region-beginning) (region-end)
|
||||
- (concat po-gzip-uuencode-command " " name ".gz") t t))))))
|
||||
+ (save-restriction
|
||||
+ (narrow-to-region (point) (point))
|
||||
+ (insert-buffer-substring buffer)
|
||||
+ (shell-command-on-region
|
||||
+ (point-min) (point-max)
|
||||
+ (concat po-gzip-uuencode-command " " name ".gz") t t)))))))
|
||||
(message ""))
|
||||
|
||||
(defun po-confirm-and-quit ()
|
Loading…
Reference in new issue