]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
20 months agobuild: Fix "make distcheck" failure.
Bruno Haible [Fri, 1 Mar 2024 23:18:31 +0000 (00:18 +0100)] 
build: Fix "make distcheck" failure.

* Makefile.am (distcheck-hook): Remove comparison with
gettext-tools/gnulib-m4/po.m4, since that file no longer exists.

20 months agolibtextstyle: Avoid crashing the terminal emulator when using ncurses.
Bruno Haible [Wed, 28 Feb 2024 22:15:35 +0000 (23:15 +0100)] 
libtextstyle: Avoid crashing the terminal emulator when using ncurses.

Reported by Adriaan de Groot <adridg@freebsd.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2021-12/msg00023.html>.
Long explanation: <https://euroquis.nl/freebsd/2021/11/24/bison.html>

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (out_data_string,
out_data_string_unchecked): New functions.
(out_hyperlink_change): Don't use tputs on strings that are not escape
sequences.

20 months agobuild: Tweak ChangeLog generation.
Bruno Haible [Sat, 24 Feb 2024 11:17:01 +0000 (12:17 +0100)] 
build: Tweak ChangeLog generation.

* Makefile.am (gen-ChangeLogs): Untabify rule. Pass option '--no-cluster'.

20 months agoUpdate after gnulib changed.
Bruno Haible [Mon, 26 Feb 2024 19:32:30 +0000 (20:32 +0100)] 
Update after gnulib changed.

20 months agobuild: Improve handling of divergences between gnulib and gettext.
Bruno Haible [Mon, 26 Feb 2024 19:26:13 +0000 (20:26 +0100)] 
build: Improve handling of divergences between gnulib and gettext.

* autogen.sh: Detect divergence also of gettext.m4, nls.m4, progtest.m4.
When there is a divergence without a serial number bump, assume it's a copyright
year update and copy the file from gnulib to gettext.

20 months agoMerge from 0.22.x branch: Prepare for 0.22.5 release.
Bruno Haible [Thu, 22 Feb 2024 01:31:47 +0000 (02:31 +0100)] 
Merge from 0.22.x branch: Prepare for 0.22.5 release.

* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* libtextstyle/version.sh: Update VERSION_NUMBER, RELEASE_DATE.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.22.5.
* gettext-tools/misc/autopoint.in: Allow version 0.22.5.

20 months agoUpdate after gnulib changed.
Bruno Haible [Thu, 22 Feb 2024 01:29:52 +0000 (02:29 +0100)] 
Update after gnulib changed.

* gettext-runtime/intl/configure.ac: Update list of symbols to rename,
from modules 'localename-unsafe', 'localename', and 'setlocale-null-unlocked'.

20 months agoUpdate to the newest gnulib.
Bruno Haible [Thu, 22 Feb 2024 01:25:46 +0000 (02:25 +0100)] 
Update to the newest gnulib.

20 months agoMerge from 0.22.x branch: Update NEWS file for release 0.22.5.
Bruno Haible [Thu, 22 Feb 2024 01:24:13 +0000 (02:24 +0100)] 
Merge from 0.22.x branch: Update NEWS file for release 0.22.5.

20 months agoRemove support for OS/2 (based on EMX directly), part 2.
Bruno Haible [Fri, 23 Feb 2024 02:08:46 +0000 (03:08 +0100)] 
Remove support for OS/2 (based on EMX directly), part 2.

* Makefile.am (EXTRA_DIST): Remove os2/*.

20 months agoRemove support for OS/2 (based on EMX directly).
Bruno Haible [Mon, 19 Feb 2024 22:25:12 +0000 (23:25 +0100)] 
Remove support for OS/2 (based on EMX directly).

Nowadays, KO Myung-Hun <komh78@gmail.com> uses an approach based on kLIBC
instead of emx+gcc. This kLIBC (https://github.com/bitwiseworks/libc) contains
iconv already.

* os2: Remove directory.

20 months agoWrite #include <error.h>, not #include "error.h".
Bruno Haible [Mon, 19 Feb 2024 22:58:27 +0000 (23:58 +0100)] 
Write #include <error.h>, not #include "error.h".

This is required by Gnulib, although <error.h> is not a POSIX or ISO C
standardized header file.

Reported by Collin Funk <collin.funk1@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00011.html>.

* gettext-runtime/src/envsubst.c: Use #include <error.h> instead of
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/libgettextpo/gettext-po.c: Likewise.
* gettext-tools/libgrep/m-fgrep.c: Likewise.
* gettext-tools/libgrep/m-regex.c: Likewise.
* gettext-tools/src/file-list.c: Likewise.
* gettext-tools/src/format-scheme.c: Likewise.
* gettext-tools/src/format.h: Likewise.
* gettext-tools/src/hostname.c: Likewise.
* gettext-tools/src/if-error.c: Likewise.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcat.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgcomm.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgl-cat.c: Likewise.
* gettext-tools/src/msgl-charset.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/msgunfmt.c: Likewise.
* gettext-tools/src/msguniq.c: Likewise.
* gettext-tools/src/po-error.c: Likewise.
* gettext-tools/src/po-gram-gen.y: Likewise.
* gettext-tools/src/po-lex.c: Likewise.
* gettext-tools/src/po-lex.h: Likewise.
* gettext-tools/src/po-xerror.c: Likewise.
* gettext-tools/src/read-catalog-abstract.c: Likewise.
* gettext-tools/src/read-csharp.c: Likewise.
* gettext-tools/src/read-desktop.c: Likewise.
* gettext-tools/src/read-java.c: Likewise.
* gettext-tools/src/read-mo.c: Likewise.
* gettext-tools/src/read-properties.c: Likewise.
* gettext-tools/src/read-resources.c: Likewise.
* gettext-tools/src/read-stringtable.c: Likewise.
* gettext-tools/src/read-tcl.c: Likewise.
* gettext-tools/src/recode-sr-latin.c: Likewise.
* gettext-tools/src/urlget.c: Likewise.
* gettext-tools/src/write-csharp.c: Likewise.
* gettext-tools/src/write-desktop.c: Likewise.
* gettext-tools/src/write-java.c: Likewise.
* gettext-tools/src/write-mo.c: Likewise.
* gettext-tools/src/write-properties.c: Likewise.
* gettext-tools/src/write-qt.c: Likewise.
* gettext-tools/src/write-resources.c: Likewise.
* gettext-tools/src/write-tcl.c: Likewise.
* gettext-tools/src/write-xml.c: Likewise.
* gettext-tools/src/x-awk.c: Likewise.
* gettext-tools/src/x-c.c: Likewise.
* gettext-tools/src/x-csharp.c: Likewise.
* gettext-tools/src/x-desktop.c: Likewise.
* gettext-tools/src/x-elisp.c: Likewise.
* gettext-tools/src/x-java.c: Likewise.
* gettext-tools/src/x-javascript.c: Likewise.
* gettext-tools/src/x-librep.c: Likewise.
* gettext-tools/src/x-lisp.c: Likewise.
* gettext-tools/src/x-lua.c: Likewise.
* gettext-tools/src/x-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.c: Likewise.
* gettext-tools/src/x-rst.c: Likewise.
* gettext-tools/src/x-ruby.c: Likewise.
* gettext-tools/src/x-scheme.c: Likewise.
* gettext-tools/src/x-sh.c: Likewise.
* gettext-tools/src/x-smalltalk.c: Likewise.
* gettext-tools/src/x-tcl.c: Likewise.
* gettext-tools/src/x-vala.c: Likewise.
* gettext-tools/src/x-ycp.c: Likewise.
* gettext-tools/src/xg-mixed-string.c: Likewise.
* gettext-tools/src/xgettext.c: Likewise.
* gettext-tools/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise.
* gnulib-local/lib/closeout.c: Likewise.
* gnulib-local/lib/xerror.c: Likewise.
* libtextstyle/gnulib-local/lib/fd-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/memory-ostream.oo.c: Likewise.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c: Likewise.
* gettext-tools/src/its.c: Likewise, and reorganize #includes.
* gettext-tools/src/locating-rule.c: Likewise.

20 months agolibtextstyle: Use #include <...> style for system headers.
Bruno Haible [Mon, 19 Feb 2024 22:08:30 +0000 (23:08 +0100)] 
libtextstyle: Use #include <...> style for system headers.

* libtextstyle/gnulib-local/lib/libcroco/cr-additional-sel.c: Use #include <...>
style for system headers.
* libtextstyle/gnulib-local/lib/libcroco/cr-input.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-num.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-parser.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-stylesheet.c: Likewise.
* libtextstyle/gnulib-local/lib/libcroco/cr-tknzr.c: Likewise.

20 months agoDon't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv.
Bruno Haible [Wed, 14 Feb 2024 23:00:56 +0000 (00:00 +0100)] 
Don't treat Apple's new Citrus/FreeBSD-based iconv like GNU libiconv.

* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c (iconv_ostream::write_mem):
Don't treat the bastard Apple iconv like GNU libiconv.
* gettext-tools/src/po-charset.c (po_lex_charset_set): Likewise.

20 months agointl: Improve support of Citrus/FreeBSD iconv.
Bruno Haible [Wed, 14 Feb 2024 22:51:28 +0000 (23:51 +0100)] 
intl: Improve support of Citrus/FreeBSD iconv.

* gettext-runtime/intl/dcigettext.c (_nl_find_msg): Use //TRANSLIT with all
iconv implementations that support it.

21 months agolibtextstyle: Add a comment regarding COLORTERM.
Bruno Haible [Mon, 29 Jan 2024 18:19:11 +0000 (19:19 +0100)] 
libtextstyle: Add a comment regarding COLORTERM.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream_create): Add
comment.

21 months agolibtextstyle: Update a few URLs.
Bruno Haible [Mon, 29 Jan 2024 10:05:57 +0000 (11:05 +0100)] 
libtextstyle: Update a few URLs.

* libtextstyle/doc/libtextstyle.texi (Terminal emulators): Update URL. From
Simon Sobisch.
(Style rules): Update URL.
(Hyperlinks): Reference new state-of-the-art document. From Simon Sobisch.

21 months agointl: Revert "Add special hack for GCC" from 2022-06-21.
Bruno Haible [Mon, 29 Jan 2024 09:32:34 +0000 (10:32 +0100)] 
intl: Revert "Add special hack for GCC" from 2022-06-21.

The added option --enable-host-shared has the same effect as the
libtool-provided option --with-pic, and gcc's Makefile.def actually
uses --with-pic, not --enable-host-shared.

* gettext-runtime/intl/configure.ac: Don't accept option --enable-host-shared.
Don't set PICFLAG.
* gettext-runtime/intl/Makefile.am (AM_CFLAGS): Remove the PICFLAG.
* gnulib-local/modules/gettext-runtime-intl-misc (Makefile.am): Remove the
PICFLAG from AM_CFLAGS.

21 months agointl: Fix the Windows MUI code, so that it works on Windows 10.
Bruno Haible [Mon, 8 Jan 2024 05:51:40 +0000 (06:51 +0100)] 
intl: Fix the Windows MUI code, so that it works on Windows 10.

Reported by <lrn1986@gmail.com> at <https://savannah.gnu.org/bugs/?65128>.

* gettext-runtime/intl/langprefs.c (_nl_language_preferences_win32_mui): Make
GetUserPreferredUILanguages prototype with Microsoft's current documentation.
Allow the first GetUserPreferredUILanguages call to succeed.

22 months agoxgettext: Java: Flag strings on which the method 'formatted' is used as java-printf...
Bruno Haible [Tue, 5 Dec 2023 15:07:38 +0000 (16:07 +0100)] 
xgettext: Java: Flag strings on which the method 'formatted' is used as java-printf-format.

* gettext-tools/src/x-java.c (token_type_semicolon): New enum item.
(phase5_get): Recognize semicolon tokens.
(extract_parenthesized): Handle method invocation .formatted. Return when a
semicolon was seen.
* gettext-tools/tests/xgettext-java-8: New file, based on
gettext-tools/tests/xgettext-vala-6.
* gettext-tools/tests/xgettext-java-9: New file, based on
gettext-tools/tests/xgettext-vala-7.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* NEWS: Mention the change.

22 months agoxgettext: Python: Add support for f-strings.
Bruno Haible [Tue, 5 Dec 2023 13:15:42 +0000 (14:15 +0100)] 
xgettext: Python: Add support for f-strings.

Reported by Ben <gnu@mail.qoben.com>
at <https://savannah.gnu.org/bugs/?61596>.

* gettext-tools/src/x-python.c (P7_498_START_OF_EXPRESSION): New macro.
(token_type_498, token_type_l498, token_type_m498, token_type_r498): New enum
items.
(free_token): Treat token_type_498 like token_type_string.
(phase7_getuc): Accept an f_string parameter. Use it to combine {{ to { and
}} to }.
(f_string_depth): New variable.
(struct f_string_level): New type.
(f_string_stack, f_string_stack_alloc): New variables.
(new_f_string_level): New function.
(open_pb): Renamed from open_pbb.
(phase5_get): Consider also the f_string_stack. Accept f"...", fr"...", rf"..."
syntax. Recognize tokens of type token_type_498, token_type_l498,
token_type_m498, token_type_r498.
(x_python_lex): Treat token_type_498 like token_type_string.
(extract_balanced): Handle the new token types.
(extract_python): Initialize f_string_depth and the f_string_stack.
* gettext-tools/tests/xgettext-python-1: Test also the backslash handling in
f-strings.
* gettext-tools/tests/xgettext-python-8: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* gettext-tools/doc/lang-python.texi (Python): Explain the limitations of
f-string support.
* NEWS: Mention the change.

23 months agoxgettext: Vala: Flag strings on which the method 'printf' is used as c-format.
Bruno Haible [Thu, 30 Nov 2023 16:16:36 +0000 (17:16 +0100)] 
xgettext: Vala: Flag strings on which the method 'printf' is used as c-format.

* gettext-tools/src/x-vala.c (token_type_semicolon): New enum item.
(phase3_get): Recognize semicolon tokens.
(phase4_pushback, phase4_pushback_length): New variables.
(phase4_get): Renamed from x_vala_lex. Handle pushback.
(phase4_unget, x_vala_lex, x_vala_unlex): New functions.
(extract_balanced): Handle method invocations .printf and .vprintf. Return when
a semicolon was seen.
(extract_vala): Initialize phase4_pushback_length.
* gettext-tools/tests/xgettext-vala-6: Add tests for printf used as method.
* gettext-tools/tests/xgettext-vala-7: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
* NEWS: Mention the change.

23 months agoxgettext: Vala: Don't flag printf arguments as c-format.
Bruno Haible [Thu, 30 Nov 2023 15:55:42 +0000 (16:55 +0100)] 
xgettext: Vala: Don't flag printf arguments as c-format.

Reported by Anders Jonsson <anders.jonsson@norsjovallen.se>
at <https://savannah.gnu.org/bugs/?64921>.

* gettext-tools/src/xgettext.c (xgettext_record_flag: Recognize also
"undecided-...-format".
* gettext-tools/src/x-vala.c (init_flag_table_vala): Flag the printf function as
'undecided-c-format', not 'c-format'.
* gettext-tools/tests/xgettext-vala-5: Use vprintf instead of printf.
* gettext-tools/tests/xgettext-vala-6: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

23 months agoxgettext: Support modifying the flags of a message after it has been remembered.
Bruno Haible [Thu, 30 Nov 2023 15:01:50 +0000 (16:01 +0100)] 
xgettext: Support modifying the flags of a message after it has been remembered.

* gettext-tools/src/xg-arglist-context.h (struct remembered_message_ty,
struct remembered_message_list_ty): New types.
(remembered_message_list_append): New declaration.
(struct formatstring_region_ty): Add a 'remembered' field.
* gettext-tools/src/xg-arglist-context.c (remembered_message_list_alloc,
remembered_message_list_append, remembered_message_list_ref,
remembered_message_list_unref): New functions.
(the_null_context_region): Update.
(inheriting_region): Inherit or allocate the 'remembered' fields.
(unref_region): Unref the 'remembered' fields.
* gettext-tools/src/xg-message.h (set_format_flag_from_context): New
declaration.
* gettext-tools/src/xg-message.c (validate_is_format): New function, extracted
from set_format_flags_from_context.
(set_format_flags_from_context): Change parameters. Invoke validate_is_format.
(set_format_flag_from_context): New function.
(remember_a_message, remember_a_message_plural): Update.

23 months agoxgettext: Refactor the formatstring code.
Bruno Haible [Thu, 30 Nov 2023 08:02:29 +0000 (09:02 +0100)] 
xgettext: Refactor the formatstring code.

Use "regions" instead of "contexts" to keep track of the flags and data that is
specific to a (usually parenthesized) block in an input file.

* gettext-tools/src/xg-arglist-context.h (null_context, passthrough_context,
inherited_context): Remove declarations.
(struct formatstring_region_ty, struct flag_region_ty): New types.
(null_context_region, inheriting_region, ref_region, unref_region): New
declarations.
(assign_region, assign_new_region): New macros.
* gettext-tools/src/xg-arglist-context.c: Include attribute.h.
(null_context): Make static.
(passthrough_context): Make static. Mark as MAYBE_UNUSED.
(inherited_context): Remove function.
(the_null_context_region): New variable.
(null_context_region, inheriting_region, ref_region, unref_region): New
functions.
* gettext-tools/src/xg-arglist-parser.h (struct partial_call,
arglist_parser_remember, arglist_parser_remember_msgctxt): Use
'flag_region_ty *' instead of flag_context_ty.
* gettext-tools/src/xg-arglist-parser.c (arglist_parser_alloc,
arglist_parser_clone, arglist_parser_remember): Update.
(arglist_parser_remember_msgctxt, arglist_parser_done): Use 'flag_region_ty *'
instead of flag_context_ty.
* gettext-tools/src/xg-message.h (remember_a_message,
remember_a_message_plural): Use 'flag_region_ty *' instead of flag_context_ty.
* gettext-tools/src/xg-message.c (set_format_flags_from_context,
remember_a_message, remember_a_message_plural): Use 'flag_region_ty *' instead
of flag_context_ty.
* gettext-tools/src/x-awk.c (extract_parenthesized): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_awk): Update.
* gettext-tools/src/x-c.c (extract_parenthesized): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_whole_file): Update.
* gettext-tools/src/x-csharp.c (extract_parenthesized): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_csharp): Update.
* gettext-tools/src/x-desktop.c (extract_desktop_handle_pair): Update.
* gettext-tools/src/x-elisp.c (read_object): Use 'flag_region_ty *' instead of
flag_context_ty.
(extract_elisp): Update.
* gettext-tools/src/x-java.c (extract_parenthesized): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_java): Update.
* gettext-tools/src/x-javascript.c (extract_balanced): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_javascript): Update.
* gettext-tools/src/x-librep.c (read_object): Use 'flag_region_ty *' instead of
flag_context_ty.
(extract_librep): Update.
* gettext-tools/src/x-lisp.c (read_object): Use 'flag_region_ty *' instead of
flag_context_ty.
(extract_lisp): Update.
* gettext-tools/src/x-lua.c (extract_balanced): Use 'flag_region_ty *' instead
of flag_context_ty.
(extract_lua): Update.
* gettext-tools/src/x-perl.c (extract_variable, interpolate_keywords,
extract_balanced): Use 'flag_region_ty *' instead of flag_context_ty.
(extract_perl): Update.
* gettext-tools/src/x-php.c (extract_balanced): Use 'flag_region_ty *' instead
of flag_context_ty.
(extract_php): Update.
* gettext-tools/src/x-python.c (extract_balanced): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_python): Update.
* gettext-tools/src/x-rst.c (extract_rst, extract_rsj): Update.
* gettext-tools/src/x-scheme.c (read_object): Use 'flag_region_ty *' instead of
flag_context_ty.
(extract_scheme): Update.
* gettext-tools/src/x-sh.c (read_word, read_command, read_command_list): Use
'flag_region_ty *' instead of flag_context_ty.
(extract_sh): Update.
* gettext-tools/src/x-smalltalk.c (extract_smalltalk): Update.
* gettext-tools/src/x-tcl.c (accumulate_word, read_word, read_command,
read_command_list): Use 'flag_region_ty *' instead of flag_context_ty.
(extract_tcl): Update.
* gettext-tools/src/x-vala.c (extract_balanced): Use 'flag_region_ty *' instead
of flag_context_ty.
(extract_vala): Update.
* gettext-tools/src/x-ycp.c (extract_parenthesized): Use 'flag_region_ty *'
instead of flag_context_ty.
(extract_ycp): Update.
* gettext-tools/src/xgettext.c (xgettext_its_extract_callback): Update.

23 months agoxgettext: Refactor the formatstring code.
Bruno Haible [Thu, 30 Nov 2023 07:43:16 +0000 (08:43 +0100)] 
xgettext: Refactor the formatstring code.

* gettext-tools/src/xg-formatstring.h (NXFORMATS, XFORMAT_PRIMARY,
XFORMAT_SECONDARY, XFORMAT_TERTIARY, XFORMAT_FOURTH): New macros.
(current_formatstring_parser1, current_formatstring_parser2,
current_formatstring_parser3, current_formatstring_parser4): Remove
declarations.
(current_formatstring_parser): New declaration.
* gettext-tools/src/xg-formatstring.c (current_formatstring_parser1,
current_formatstring_parser2, current_formatstring_parser3,
current_formatstring_parser4): Remove variables.
(current_formatstring_parser): New variable.
* gettext-tools/src/xg-arglist-context.h: Include xg-formatstring.h.
(struct formatstring_context_ty): New type.
(struct flag_context_ty): Replace individual fields with an array.
(flag_context_list_table_add): Rename parameter 'index' to 'fi'.
* gettext-tools/src/xg-arglist-context.c (null_context, passthrough_context):
Update.
(inherited_context): Loop over the four formatstring types.
(passthrough_context_circular_list): Update.
(set_flags_for_formatstring_type): Simplify.
(flag_context_list_table_add): Rename parameter 'index' to 'fi'.
* gettext-tools/src/xg-arglist-parser.c (arglist_parser_done): Update.
* gettext-tools/src/xg-message.c (set_format_flags_from_context): Loop over the
four formatstring types.
(is_relevant): New function.
(decide_is_format, remember_a_message_plural): Use it.
* gettext-tools/src/xgettext.c (struct extractor_ty): Replace individual fields
with an array.
(main): Update.
(flag_context_list_table_insert): Rename parameter 'index' to 'fi'.
(xgettext_record_flag): Use XFORMAT_* macros.
(extract_from_file): Loop over the four formatstring types.
(recognize_qt_formatstrings): Update.
(language_to_extractor): Use XFORMAT_* macros and a loop.

23 months agoxgettext: Refactor.
Bruno Haible [Thu, 30 Nov 2023 07:34:51 +0000 (08:34 +0100)] 
xgettext: Refactor.

* gettext-tools/src/xg-formatstring.h: New file, extracted from xgettext.h.
* gettext-tools/src/xg-formatstring.c: New file, extracted from xgettext.c.
* gettext-tools/src/FILES: Mention them.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add xg-formatstring.h.
(xgettext_SOURCES): Add xg-formatstring.c.
* gettext-tools/src/xgettext.h (current_formatstring_parser1,
current_formatstring_parser2, current_formatstring_parser3,
current_formatstring_parser4): Remove declarations.
* gettext-tools/src/xgettext.c: Include xg-formatstring.h.
(current_formatstring_parser1, current_formatstring_parser2,
current_formatstring_parser3, current_formatstring_parser4): Remove variables.
* gettext-tools/src/xg-message.c: Include xg-formatstring.h.

23 months agoxgettext: Refactor.
Bruno Haible [Thu, 30 Nov 2023 07:31:27 +0000 (08:31 +0100)] 
xgettext: Refactor.

* gettext-tools/src/xg-message.c (remember_a_message): Simplify: Don't cache
mp->do_syntax_check in a local variable.

23 months agoxgettext: Refactor.
Bruno Haible [Thu, 30 Nov 2023 07:30:05 +0000 (08:30 +0100)] 
xgettext: Refactor.

* gettext-tools/src/xg-message.c (remember_a_message): Simplify: Don't cache
mp->do_wrap in a local variable.

23 months agoxgettext: Refactor.
Bruno Haible [Thu, 30 Nov 2023 07:27:32 +0000 (08:27 +0100)] 
xgettext: Refactor.

* gettext-tools/src/xg-message.c (remember_a_message): Simplify: Don't cache
mp->is_format in a local variable.

23 months agotests: Avoid an autopoint-3 failure caused by an Autoconf 2.71 bug.
Bruno Haible [Thu, 30 Nov 2023 10:38:36 +0000 (11:38 +0100)] 
tests: Avoid an autopoint-3 failure caused by an Autoconf 2.71 bug.

* gettext-tools/tests/autopoint-3: Remove the autom4te cache before invoking
automake.

23 months agoFix clang -Wunused-function warnings.
Bruno Haible [Thu, 30 Nov 2023 07:24:18 +0000 (08:24 +0100)] 
Fix clang -Wunused-function warnings.

* gettext-runtime/src/envsubst.c: Include attribute.h.
(string_list_member, string_list_destroy): Mark as MAYBE_UNUSED.
* gettext-tools/src/format-scheme.c: Include attribute.h.
(II): Mark as MAYBE_UNUSED.
* gettext-tools/src/msgl-fsearch.c: Include attribute.h.
(add_index): Mark as MAYBE_UNUSED.
* gettext-tools/src/po-lex.c: Include attribute.h.
(mb_isnul, mb_cmp, mb_equal, mb_isascii, mb_putc, mb_setascii): Mark as
MAYBE_UNUSED.
* gettext-tools/src/write-qt.c: Include attribute.h.
(write_u16): Mark as MAYBE_UNUSED.
* gettext-tools/src/x-awk.c (free_token): Mark as MAYBE_UNUSED.
* gettext-tools/src/x-python.c (phase0_ungetc): Mark as MAYBE_UNUSED.

23 months agotests: Fix a typo.
Bruno Haible [Thu, 30 Nov 2023 07:07:56 +0000 (08:07 +0100)] 
tests: Fix a typo.

* gettext-tools/tests/autopoint-3: Fix a typo in a file name.

23 months agoMerge from 0.22.x branch: Prepare for 0.22.4 release.
Bruno Haible [Sun, 19 Nov 2023 21:25:43 +0000 (22:25 +0100)] 
Merge from 0.22.x branch: Prepare for 0.22.4 release.

* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* libtextstyle/version.sh: Update VERSION_NUMBER, RELEASE_DATE.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.22.3.
* gettext-tools/misc/autopoint.in: Allow version 0.22.3.

23 months agoMerge from 0.22.x branch: Update NEWS file for release 0.22.4.
Bruno Haible [Sun, 19 Nov 2023 21:24:11 +0000 (22:24 +0100)] 
Merge from 0.22.x branch: Update NEWS file for release 0.22.4.

23 months agobuild: Obey --disable-threads also regarding msgmerge and OpenMP.
Bruno Haible [Fri, 17 Nov 2023 21:31:15 +0000 (22:31 +0100)] 
build: Obey --disable-threads also regarding msgmerge and OpenMP.

* gettext-tools/configure.ac: If --disable-threads was specified, just set
OPENMP_CFLAGS to empty.

23 months agoUpdate after gnulib changed.
Bruno Haible [Fri, 17 Nov 2023 21:26:38 +0000 (22:26 +0100)] 
Update after gnulib changed.

23 months agoUpdate to the newest gnulib.
Bruno Haible [Fri, 17 Nov 2023 21:23:00 +0000 (22:23 +0100)] 
Update to the newest gnulib.

23 months agoAdd installation instructions for AIX.
Bruno Haible [Fri, 17 Nov 2023 12:10:01 +0000 (13:10 +0100)] 
Add installation instructions for AIX.

* INSTALL.aix: New file.
* Makefile.am (EXTRA_DIST): Add it.

23 months agogettext.m4: Recognize a statically built libintl on macOS and AIX.
Bruno Haible [Fri, 17 Nov 2023 11:46:18 +0000 (12:46 +0100)] 
gettext.m4: Recognize a statically built libintl on macOS and AIX.

Reported by David Edelsohn <dje.gcc@gmail.com> in
<https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636558.html>.

* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): In the
"checking for GNU gettext in libintl..." test, add also the special
system library dependencies needed on macOS and AIX.

23 months agobuild: Fix a build issue on AIX.
Bruno Haible [Fri, 17 Nov 2023 11:40:54 +0000 (12:40 +0100)] 
build: Fix a build issue on AIX.

How to reproduce:
$ cd gettext-20231111
$ ~/build-64-gcc --disable-shared
$ (cd build-64-gcc && gmake install)
$ cd ..
$ cd gettext-0.22.3
$ ~/build-64-gcc
=> Fails with "ERROR: Undefined symbol: .syntax_check_message_list"
because the link uses $PREFIX/lib/libgettextsrc.a, which is a non-shared
library that does not export 'syntax_check_message_list'.

* gettext-tools/configure.ac (INSTALL_PRIVATE_LIBRARIES): New conditional.
* gettext-tools/src/Makefile.am (noinst_LTLIBRARIES): Define as alternative to
lib_LTLIBRARIES.
(install-exec-clean): Remove rule.
* gettext-tools/gnulib-lib/Makefile.am (lib_LTLIBRARIES): Initialize.
* gnulib-local/modules/gettext-tools-misc (Makefile.am): Define
noinst_LTLIBRARIES as alternative to lib_LTLIBRARIES. Remove
'install-exec-clean' rule.

23 months agobuild: Fix a compilation failure on AIX with gcc 10.
Bruno Haible [Wed, 15 Nov 2023 15:11:34 +0000 (16:11 +0100)] 
build: Fix a compilation failure on AIX with gcc 10.

* m4/more-warnings.m4 (gt_MORE_WARNINGS): Turn off -fanalyzer with GCC 10
or older.

23 months agoxgettext: Fix memory overrun while parsing a C++ brace format string.
Bruno Haible [Sun, 12 Nov 2023 00:07:41 +0000 (01:07 +0100)] 
xgettext: Fix memory overrun while parsing a C++ brace format string.

Found with CHERI on CheriBSD.

* gettext-tools/src/format-c++-brace.c (format_parse): Compare the first
character after ':' against '\0', not '0'.

23 months agolibgettextpo: Remove static variables gram_pos_column, gram_pot_role, signal_eilseq...
Bruno Haible [Sat, 11 Nov 2023 15:48:31 +0000 (16:48 +0100)] 
libgettextpo: Remove static variables gram_pos_column, gram_pot_role, signal_eilseq, po_lex_obsolete, po_lex_previous, mbf.

* gettext-tools/src/po-gram.h: Include <stdbool.h>, <stdio.h>, unistr.h.
(MBCHAR_BUF_SIZE, struct mbchar, mbchar_t, NPUSHBACK, struct mbfile, mbfile_t):
Moved to here, from po-lex.c.
(struct po_parser_state): Add fields gram_pot_role, gram_pos_column,
signal_eilseq, mbf, po_lex_obsolete, po_lex_previous.
* gettext-tools/src/po-gram-gen.y: Add %lex-param declaration.
(do_callback_message): Add 'struct po_parser_state *ps' parameter. Update all
callers.
* gettext-tools/src/po-lex.h (gram_pos_column, gram_pot_role): Remove
declarations.
(lex_start): Add 'struct po_parser_state *ps' parameter. Remove is_pot_role
parameter.
(po_gram_lex): Add 'struct po_parser_state *ps' parameter.
* gettext-tools/src/po-lex.c: Don't include unistr.h.
(gram_pos_column, gram_pot_role, signal_eilseq, mbf, po_lex_obsolete,
po_lex_previous): Remove variables.
(po_gram_error): Update.
(MBCHAR_BUF_SIZE, struct mbchar, mbchar_t, NPUSHBACK, struct mbfile, mbfile_t):
Remove declarations.
(mb_width): Add 'struct po_parser_state *ps' parameter.
(mbfile_getc): Likewise. Pass it to po_gram_error.
(lex_start): Add 'struct po_parser_state *ps' parameter. Remove is_pot_role
parameter.
(lex_end): Remove assignments to variables.
(lex_getc, lex_ungetc, keyword_p, control_sequence, po_gram_lex): Add
'struct po_parser_state *ps' parameter.
* gettext-tools/src/read-po.c (po_parse): Iniitialize gram_pot_role field here.
Pass 'struct po_parser_state *' to lex_start.
* gettext-tools/woe32dll/gettextsrc-exports.c: Remove gram_pos_column,
gram_pot_role.

23 months agolibgettextpo: Remove static variable 'plural_counter'.
Bruno Haible [Sat, 11 Nov 2023 15:48:27 +0000 (16:48 +0100)] 
libgettextpo: Remove static variable 'plural_counter'.

* gettext-tools/src/po-gram.h (struct po_parser_state): New type.
(po_gram_parse): Add 'struct po_parser_state *ps' parameter.
* gettext-tools/src/po-gram-gen.y: Add %parse-param declaration.
Access ps->plural_counter instead of plural_counter.
(plural_counter): Remove variable.
* gettext-tools/src/po-lex.h (po_gram_error): Add 'struct po_parser_state *ps'
parameter.
* gettext-tools/src/po-lex.c: Include po-gram.h.
(po_gram_error): Add 'struct po_parser_state *ps' parameter.
(mbfile_getc, control_sequence): Update po_gram_error calls.
* gettext-tools/src/read-po.c (po_parse): Pass a 'struct po_parser_state *' to
po_gram_parse.

23 months agobuild: Remove po-gram-gen2.h.
Bruno Haible [Sat, 11 Nov 2023 15:48:24 +0000 (16:48 +0100)] 
build: Remove po-gram-gen2.h.

* gettext-tools/src/po-lex.c: Include po-gram-gen.h instead of po-gram-gen2.h.
* gettext-tools/src/po-lex.h: Update comment.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Remove po-gram-gen2.h.
(po-gram-gen2.h): Remove rule.
(BUILT_SOURCES, MAINTAINERCLEANFILES, EXTRA_DIST): Don't add it.
(po-lex.o, po-lex.lo): Don't depend on it.

23 months agolibgettextpo: Remove static variables po_gram_lval, po_gram_char, po_gram_nerrs.
Bruno Haible [Sat, 11 Nov 2023 15:48:20 +0000 (16:48 +0100)] 
libgettextpo: Remove static variables po_gram_lval, po_gram_char, po_gram_nerrs.

* gettext-tools/src/po-gram-gen.y: Request a pure parser.
* gettext-tools/src/po-lex.h (po_gram_lex): Add lval parameter.
* gettext-tools/src/po-lex.c (po_gram_lex): Add lval parameter. Store the result
in *lval instead of in po_gram_lval.
* gettext-tools/woe32dll/gettextsrc-exports.c: Remove po_gram_lval.

23 months agolibgettextpo: Remove static variable 'width.0'.
Bruno Haible [Sat, 11 Nov 2023 15:48:16 +0000 (16:48 +0100)] 
libgettextpo: Remove static variable 'width.0'.

* gnulib-local/lib/xerror.h: Include <stddef.h>.
(multiline_warning, multiline_error): Change return type to size_t. Don't
suggest to pass a NULL prefix.
(multiline_append): New declaration.
* gnulib-local/lib/xerror.c (multiline_internal): New function, extracted from
multiline_warning.
(multiline_warning, multiline_error): Reject a NULL prefix. Call
multiline_internal.
(multiline_append): New function.
* gettext-tools/src/msgl-charset.c (compare_po_locale_charsets): Invoke
multiline_append instead of multiline_warning with NULL argument.
* gettext-tools/src/msgfmt.c (msgfmt_parse_debrief): Invoke multiline_append
instead of multiline_error with NULL argument.
* gettext-tools/src/po-error.c (void_multiline_warning, void_multiline_error):
New functions.
(po_multiline_warning, po_multiline_error): Use them as initializer.
* gettext-tools/libgettextpo/gettext-po.c (void_multiline_warning,
void_multiline_error): New functions.
(po_file_read_v2, po_file_write): Use them as defaults for po_multiline_warning,
po_multiline_error.

23 months agolibgettextpo: Remove static variable 'result.0'.
Bruno Haible [Sat, 11 Nov 2023 15:48:13 +0000 (16:48 +0100)] 
libgettextpo: Remove static variable 'result.0'.

* gettext-tools/src/write-po.h (make_format_description_string): Change return
type to 'char *'.
* gettext-tools/src/write-po.c (make_format_description_string): Return a
freshly allocated string.
(message_print_comment_flags, message_print_obsolete): Free the result of
make_format_description_string when done.
* gettext-tools/src/write-stringtable.c (write_message): Likewise.

23 months agolibgettextpo: Remove static variables curr_mp, curr_msgid_pos.
Bruno Haible [Sat, 11 Nov 2023 15:48:09 +0000 (16:48 +0100)] 
libgettextpo: Remove static variables curr_mp, curr_msgid_pos.

* gettext-tools/src/format.h (formatstring_error_logger_t): Add a 'data'
parameter.
(struct formatstring_parser): In the 'check' method, add an 'error_logger_data'
parameter.
(check_msgid_msgstr_format_i, check_msgid_msgstr_format): Add an
'error_logger_data' parameter.
* gettext-tools/src/format-awk.c (format_check): Add an 'error_logger_data'
parameter. Pass it to each error_logger invocation.
* gettext-tools/src/format-boost.c (format_check): Likewise.
* gettext-tools/src/format-c.c (format_check): Likewise.
* gettext-tools/src/format-c++-brace.c (format_check): Likewise.
* gettext-tools/src/format-csharp.c (format_check): Likewise.
* gettext-tools/src/format-elisp.c (format_check): Likewise.
* gettext-tools/src/format-gcc-internal.c (format_check): Likewise.
* gettext-tools/src/format-gfc-internal.c (format_check): Likewise.
* gettext-tools/src/format-java-printf.c (format_check): Likewise.
* gettext-tools/src/format-java.c (format_check): Likewise.
* gettext-tools/src/format-javascript.c (format_check): Likewise.
* gettext-tools/src/format-kde-kuit.c (format_check): Likewise.
* gettext-tools/src/format-kde.c (format_check): Likewise.
* gettext-tools/src/format-librep.c (format_check): Likewise.
* gettext-tools/src/format-lisp.c (format_check): Likewise.
* gettext-tools/src/format-lua.c (format_check): Likewise.
* gettext-tools/src/format-pascal.c (format_check): Likewise.
* gettext-tools/src/format-perl-brace.c (format_check): Likewise.
* gettext-tools/src/format-perl.c (format_check): Likewise.
* gettext-tools/src/format-php.c (format_check): Likewise.
* gettext-tools/src/format-python-brace.c (format_check): Likewise.
* gettext-tools/src/format-python.c (format_check): Likewise.
* gettext-tools/src/format-qt-plural.c (format_check): Likewise.
* gettext-tools/src/format-qt.c (format_check): Likewise.
* gettext-tools/src/format-ruby.c (format_check): Likewise.
* gettext-tools/src/format-scheme.c (format_check): Likewise.
* gettext-tools/src/format-sh.c (format_check): Likewise.
* gettext-tools/src/format-smalltalk.c (format_check): Likewise.
* gettext-tools/src/format-tcl.c (format_check): Likewise.
* gettext-tools/src/format.c (check_msgid_msgstr_format_i,
check_msgid_msgstr_format): Add an 'error_logger_data' parameter.
* gettext-tools/src/msgl-check.c (curr_mp, curr_msgid_pos): Remove variables.
(struct formatstring_error_logger_locals): New type.
(formatstring_error_logger): Add a 'data' parameter.
(check_pair): Set up a 'struct formatstring_error_logger_locals' on the stack
and pass it to check_msgid_msgstr_format.
* gettext-tools/src/msgmerge.c (silent_error_logger): Add a 'data' parameter.
(message_merge): Pass a null error_logger_data.
* gettext-tools/libgettextpo/gettext-po.c (po_error_logger): Add a 'data'
parameter.
(po_message_check_format): Pass a null error_logger_data.

23 months agolibgettextpo: Remove static variable bullet_stack.
Bruno Haible [Sat, 11 Nov 2023 15:48:05 +0000 (16:48 +0100)] 
libgettextpo: Remove static variable bullet_stack.

* gettext-tools/src/xg-check.h: New file, extracted from
gettext-tools/src/msgl-check.h.
* gettext-tools/src/xg-check.c: New file, extracted from
gettext-tools/src/msgl-check.c.
* gettext-tools/src/msgl-check.h (syntax_check_message_list): Remove
declaration.
* gettext-tools/src/msgl-check.c: Don't include quote.h, sentence.h, unictype.h,
unistr.h.
(struct callback_arg, struct bullet_ty, struct bullet_stack_ty,
syntax_check_function): Remove types.
(bullet_stack, sc_funcs): Remove variables.
(syntax_check_ellipsis_unicode, syntax_check_space_ellipsis,
syntax_check_quote_unicode_callback, syntax_check_quote_unicode,
syntax_check_bullet_unicode, syntax_check_message, syntax_check_message_list):
Remove functions.
* gettext-tools/src/xgettext.c: Include xg-check.h instead of msgl-check.h.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add xg-check.h.
(xgettext_SOURCES): Add xg-check.c.
* gettext-tools/src/FILES: Mention xg-check.h, xg-check.c.
* gettext-tools/po/POTFILES.in: Add src/xg-check.c.

23 months agolibgettextpo: Remove static variable 'directory'.
Bruno Haible [Sat, 11 Nov 2023 15:48:00 +0000 (16:48 +0100)] 
libgettextpo: Remove static variable 'directory'.

* gettext-tools/src/read-catalog-file.h: New file, extracted from
gettext-tools/src/read-catalog.h.
* gettext-tools/src/read-catalog.h (read_catalog_file): Remove declaration.
* gettext-tools/src/read-catalog-file.c: New file, extracted from
gettext-tools/src/read-catalog.c.
* gettext-tools/src/read-catalog.c: Don't include open-catalog.h.
(read_catalog_file): Remove function.
* gettext-tools/src/msgl-cat.c: Include read-catalog-file.h instead of
read-catalog.h.
* gettext-tools/src/msgattrib.c: Likewise.
* gettext-tools/src/msgcmp.c: Likewise.
* gettext-tools/src/msgconv.c: Likewise.
* gettext-tools/src/msgen.c: Likewise.
* gettext-tools/src/msgexec.c: Likewise.
* gettext-tools/src/msgfilter.c: Likewise.
* gettext-tools/src/msgfmt.c: Likewise.
* gettext-tools/src/msggrep.c: Likewise.
* gettext-tools/src/msginit.c: Likewise.
* gettext-tools/src/msgmerge.c: Likewise.
* gettext-tools/src/FILES: Mention read-catalog-file.h, read-catalog-file.c.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add read-catalog-file.h.
(libgettextsrc_la_SOURCES): Add read-catalog-file.c.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Remove
dir-list.c, open-catalog.c.

2 years agobuild: Use $(PATH_SEPARATOR) as a path separator
KO Myung-Hun [Wed, 18 Oct 2023 14:32:44 +0000 (23:32 +0900)] 
build: Use $(PATH_SEPARATOR) as a path separator

':' is not a path separator on Windows and OS/2.

PATH_SEPARATOR is defined and AC_SUBSTed by Autoconf.

* gettext-tools/examples/po/Makefile.am (USE_BUILT_PROGS): Use
$(PATH_SEPARATOR) instead of ':'.

Copyright-paperwork-exempt: Yes

2 years agoxgettext: Mention last changes in NEWS.
Bruno Haible [Fri, 6 Oct 2023 15:38:41 +0000 (17:38 +0200)] 
xgettext: Mention last changes in NEWS.

* NEWS: Mention diagnostics changes.

2 years agoxgettext: Simplify code that emits diagnostics with error number.
Bruno Haible [Thu, 5 Oct 2023 21:04:32 +0000 (23:04 +0200)] 
xgettext: Simplify code that emits diagnostics with error number.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC): Add xstrerror.
(GNULIB_MODULES_LIBGETTEXTPO_OTHER): Add strerror_r-posix.
* gettext-tools/src/x-csharp.c: Include xstrerror.h.
(phase2_getc): Invoke 'xstrerror' and 'if_error' instead of 'error'.
* gettext-tools/src/x-javascript.c: Include xstrerror.h.
(phase2_getc): Invoke 'xstrerror' and 'if_error' instead of 'error'.
* gettext-tools/src/x-python.c: Include xstrerror.h.
(phase2_getc): Invoke 'xstrerror' and 'if_error' instead of 'error'.

2 years agoxgettext: Simplify code that emits diagnostics.
Bruno Haible [Thu, 5 Oct 2023 12:30:20 +0000 (14:30 +0200)] 
xgettext: Simplify code that emits diagnostics.

Also, for Perl input, clarify some diagnostics as errors vs. warnings.

* gettext-tools/src/if-error.h: New file.
* gettext-tools/src/if-error.c: New file.
* gettext-tools/src/xg-mixed-string.c: Include if-error.h instead of
error-progname.h.
(mixed_string_buffer_append_lone_surrogate): Invoke 'if_error' instead of
'error'.
* gettext-tools/src/x-awk.c: Include if-error.h instead of error-progname.h.
(phase7_getc, x_awk_lex, extract_parenthesized): Invoke 'if_error' instead of
'error'.
* gettext-tools/src/x-c.c: Include if-error.h instead of error-progname.h.
(phase7_getc, phase5_get, extract_parenthesized): Invoke 'if_error' instead of
'error'.
* gettext-tools/src/x-csharp.c: Include if-error.h instead of error-progname.h.
(do_getc_unicode_escaped, accumulate_escaped, extract_parenthesized): Invoke
'if_error' instead of 'error'.
* gettext-tools/src/x-elisp.c: Include if-error.h instead of error-progname.h.
(do_getc_escaped, read_object): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-java.c: Include if-error.h instead of error-progname.h.
(accumulate_escaped, phase5_get, extract_parenthesized): Invoke 'if_error'
instead of 'error'.
* gettext-tools/src/x-javascript.c: Include if-error.h instead of
error-progname.h.
(phase7_getuc, phase5_scan_regexp, phase5_scan_xml_markup, phase5_get,
extract_balanced): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-librep.c: Include if-error.h instead of error-progname.h.
(read_object): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-lisp.c: Include if-error.h instead of error-progname.h.
(read_object): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-lua.c: Include if-error.h instead of error-progname.h.
(extract_balanced): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-perl.c: Include if-error.h instead of error-progname.h.
(get_here_document, extract_quotelike_pass3, interpolate_keywords, x_perl_lex,
extract_balanced): Invoke 'if_error' instead of 'error'.
(interpolate_keywords): Update extract_quotelike_pass3 invocations.
(extract_balanced): Update collect_message invocations. Call fflush before
abort (needed for MSVC).
* gettext-tools/src/x-php.c: Include if-error.h instead of error-progname.h.
(extract_balanced): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-python.c: Include if-error.h instead of error-progname.h.
(phase7_getuc, extract_balanced): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-rst.c: Include if-error.h instead of error-progname.h.
(extract_rst, extract_rsj): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-scheme.c: Include if-error.h instead of error-progname.h.
(read_object): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-sh.c: Include if-error.h instead of error-progname.h.
(read_word, read_command_list): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-tcl.c: Include if-error.h instead of error-progname.h.
(accumulate_word, read_word): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/x-vala.c: Include if-error.h instead of error-progname.h.
(phase7_getc, phase3_scan_regex, phase3_get, extract_balanced): Invoke
'if_error' instead of 'error'.
* gettext-tools/src/x-ycp.c: Include if-error.h instead of error-progname.h.
(extract_parenthesized): Invoke 'if_error' instead of 'error'.
* gettext-tools/src/xg-arglist-parser.c: Include if-error.h instead of error.h,
error-progname.h.
(arglist_parser_done): Invoke 'if_error' instead of 'error_at_line'.
* gettext-tools/src/xg-message.c: Include if-error.h instead of
error-progname.h.
(set_format_flags_from_context, warn_format_string, remember_a_message): Invoke
'if_error' instead of 'multiline_warning'.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add if-error.h.
(xgettext_SOURCES): Add if-error.c.
* gettext-tools/src/FILES: Mention if-error.h, if-error.c.
* gettext-tools/po/Makevars (XGETTEXT_OPTIONS): Add option regarding the
'if_error' function.
* gettext-tools/po/POTFILES.in: Add src/if-error.c.

2 years agoxgettext: Clarify some diagnostics as errors vs. warnings.
Bruno Haible [Thu, 5 Oct 2023 06:20:50 +0000 (08:20 +0200)] 
xgettext: Clarify some diagnostics as errors vs. warnings.

* gettext-tools/src/x-csharp.c (phase2_getc): Clarify role of diagnostics.
* gettext-tools/src/x-javascript.c (phase2_getc): Likewise.
* gettext-tools/src/x-perl.c (get_here_document, extract_balanced): Likewise.
* gettext-tools/src/x-python.c (phase2_getc): Likewise.
* gettext-tools/src/x-rst.c (extract_rst, extract_rsj): Likewise.
* gettext-tools/src/xg-arglist-parser.c (arglist_parser_done): Likewise.

2 years agoUpdate to the newest gnulib.
Bruno Haible [Sat, 7 Oct 2023 12:54:50 +0000 (14:54 +0200)] 
Update to the newest gnulib.

2 years agoAvoid possible problems in C++ mode.
Bruno Haible [Wed, 4 Oct 2023 20:48:31 +0000 (22:48 +0200)] 
Avoid possible problems in C++ mode.

* gettext-tools/src/po-xerror.h: Move the #include outside the extern "C" {...}
block.

2 years agoAvoid crash by SIGFPE during plural form expression evaluation.
Bruno Haible [Sun, 1 Oct 2023 18:18:23 +0000 (20:18 +0200)] 
Avoid crash by SIGFPE during plural form expression evaluation.

Libraries (such as libintl and libgettextpo) should not raise signals, because
catching such signals cannot be done in a multithread-safe way.

* gettext-runtime/intl/plural-exp.h (enum eval_status): New enum items
PE_INTDIV, PE_INTOVF.
* gettext-runtime/intl/eval-plural.h (plural_eval_recurse): When a division
argument is zero, return status PE_INTDIV instead of raising SIGFPE.
* gettext-runtime/intl/dcigettext.c (INTDIV0_RAISES_SIGFPE): Remove macro.
Don't include <signal.h>.
* gettext-runtime/intl/configure.ac: Don't invoke gt_INTDIV0.
* gettext-runtime/intl/m4/intdiv0.m4: Remove file.
* gettext-runtime/intl/Makefile.am (ACLOCAL_AMFLAGS): Remove option '-I m4'.
(EXTRA_DIST): Remove m4/intdiv0.m4.
* autogen.sh: When invoking aclocal in gettext-runtime/intl, omit option
'-I m4'.

* gettext-tools/src/msgl-check.c: Don't include <setjmp.h>, <signal.h>.
(plural_expression_histogram): Don't invoke install_sigfpe_handler,
uninstall_sigfpe_handler.
(check_plural_eval): Don't invoke setjmp, install_sigfpe_handler,
uninstall_sigfpe_handler. Remove 'volatile' from array variable.
Produce error message when status PE_INTDIV or PE_INTOVF occurred.
* gettext-tools/src/plural-eval.h: Don't include <setjmp.h>.
(sigjmp_buf, sigsetjmp, siglongjmp): Remove definitions.
(USE_SIGINFO): Remove macro.
(sigfpe_exit, sigfpe_code, install_sigfpe_handler, uninstall_sigfpe_handler):
Remove declarations.
* gettext-tools/src/plural-eval.c: Don't include <signal.h>.
(sigfpe_exit, sigfpe_code): Remove variables.
(sigfpe_handler, install_sigfpe_handler, uninstall_sigfpe_handler): Remove
functions.
* gettext-tools/configure.ac: Don't invoke gt_SIGINFO.
* gettext-tools/m4/siginfo.m4: Remove file.
* gettext-tools/m4/Makefile.am (EXTRA_DIST): Remove it.

2 years agotests: Check against SIGFPE signal during plural expression evaluation.
Bruno Haible [Sun, 1 Oct 2023 18:18:17 +0000 (20:18 +0200)] 
tests: Check against SIGFPE signal during plural expression evaluation.

* gettext-tools/tests/plural-4: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

2 years agoAvoid crash by stack overflow during plural expression evaluation.
Bruno Haible [Sun, 1 Oct 2023 18:18:12 +0000 (20:18 +0200)] 
Avoid crash by stack overflow during plural expression evaluation.

* gettext-runtime/intl/plural-exp.h (enum eval_status, struct eval_result): New
types.
(plural_eval): Change return type to 'struct eval_result'.
* gettext-runtime/intl/eval-plural.h (EVAL_MAXDEPTH, OK): New macros.
(plural_eval_recurse): New function, extracted from plural_eval.
(plural_eval): Change return type to 'struct eval_result'. Invoke
plural_eval_recurse.
* gettext-runtime/intl/dcigettext.c (plural_lookup): Update.
* gettext-tools/src/plural-eval.h: Update comment.
* gettext-tools/src/msgl-check.c (plural_expression_histogram): Update.
(check_plural_eval): Update. Fail with an error message if the plural expression
evaluation produced a stack overflow.
* gettext-tools/tests/plural-3: Update.

2 years agotests: Check against stack overflow during plural expression evaluation.
Bruno Haible [Sun, 1 Oct 2023 18:18:06 +0000 (20:18 +0200)] 
tests: Check against stack overflow during plural expression evaluation.

* gettext-tools/tests/plural-1: Add comment.
* gettext-tools/tests/plural-2: Add comment.
* gettext-tools/tests/plural-3: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

2 years agotests: Add option --thread to tstgettext, tstngettext.
Bruno Haible [Sun, 1 Oct 2023 18:18:02 +0000 (20:18 +0200)] 
tests: Add option --thread to tstgettext, tstngettext.

* gettext-tools/tests/tstgettext.c: Include glthread/thread.h.
(inhibit_added_newline, do_expand): Remove variables.
(long_options): Add --thread option.
(struct worker_context): New type.
(main): Move some local variables into a context. Recognize option --thread.
At the end, invoke worker_thread.
(worker_thread): New function, extracted from main.
* gettext-tools/tests/tstngettext.c: Include glthread/thread.h.
(long_options): Add --thread option.
(struct worker_context): New type.
(main): Move some local variables into a context. Recognize option --thread.
At the end, invoke worker_thread.
(worker_thread): New function, extracted from main.
* gettext-tools/tests/Makefile.am (tstgettext_LDADD, tstngettext_LDADD): Add
gnulib-lib/libtestsgnu.a and $(LIBMULTITHREAD).

2 years agobuild: Use a separate gnulib-tool invocation for gettext-tools/tests/.
Bruno Haible [Sun, 1 Oct 2023 18:17:58 +0000 (20:17 +0200)] 
build: Use a separate gnulib-tool invocation for gettext-tools/tests/.

* autogen.sh (GNULIB_MODULES_LIBGETTEXTLIB, GNULIB_MODULES_TOOLS_TESTS): New
variables.
Add a gnulib-tool invocation for gettext-tools/tests/gnulib-{m4,lib}.
Add option -I tests/gnulib-m4 when generating gettext-tools/configure.
* gettext-tools/tests/gnulib-lib/Makefile.am: New file.
* gettext-tools/tests/Makefile.am (SUBDIRS): New variable.
(AM_CPPFLAGS): Add more -I options.
(EXTRA_DIST): Add gnulib-m4/gnulib-cache.m4.
* gettext-tools/Makefile.am (ACLOCAL_AMFLAGS): Add -I tests/gnulib-m4.
* gettext-tools/configure.ac: Invoke gttgl_EARLY and gttgl_INIT. Add an
AC_CONFIG_FILES of tests/gnulib-lib/Makefile.

2 years agobuild: Remove redundant -I options from AM_CPPFLAGS.
Bruno Haible [Sun, 1 Oct 2023 18:16:36 +0000 (20:16 +0200)] 
build: Remove redundant -I options from AM_CPPFLAGS.

https://www.gnu.org/software/automake/manual/html_node/Program-Variables.html
documents that -I. -I$(srcdir) and -I$(top_builddir) (for config.h)
are already part of Automake's $(DEFAULT_INCLUDES), which is used
before $(AM_CPPFLAGS).

* gettext-runtime/src/Makefile.am (AM_CPPFLAGS): Remove redundant -I options.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/libgettextpo/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/libgrep/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/src/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/system-tests/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/tests/Makefile.am (AM_CPPFLAGS): Likewise.
* libtextstyle/adhoc-tests/Makefile.am (AM_CPPFLAGS): Likewise.
* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-runtime/intl/Makefile.am (AM_CPPFLAGS): Add comment.
* gettext-runtime/libasprintf/Makefile.am (AM_CPPFLAGS): Likewise.

2 years agobuild: Remove unused -I options from AM_CPPFLAGS.
Bruno Haible [Sun, 1 Oct 2023 10:55:46 +0000 (12:55 +0200)] 
build: Remove unused -I options from AM_CPPFLAGS.

* gnulib-local/modules/gettext-runtime-misc (Makefile.am): Remove
-I$(top_srcdir)/intl from AM_CPPFLAGS.
* gettext-runtime/tests/Makefile.am (AM_CPPFLAGS): Set to empty.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Remove
-I$(top_srcdir)/../gettext-runtime/intl.
* gettext-tools/gnulib-tests/Makefile.am (AM_CPPFLAGS): Update comment.
* gettext-tools/src/Makefile.am (AM_CPPFLAGS): Add comment.
* gettext-tools/libgettextpo/Makefile.am (AM_CPPFLAGS): Likewise.
* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir).

2 years agopo-mode: Remove support for Emacs versions < 23.
Bruno Haible [Fri, 6 Oct 2023 11:25:50 +0000 (13:25 +0200)] 
po-mode: Remove support for Emacs versions < 23.

Reported by Julien Palard <julien@palard.fr>
at <https://savannah.gnu.org/bugs/?64748>.

* gettext-tools/emacs/po-mode.el (po-mode-version-string): Bump to 2.29.
(po-buffer-substring, po-match-string, po-with-temp-buffer, po-kill-new,
po-read-event, po-force-mode-line-update): Remove portability polyfills.
(easy-menu-define, format-time-string): Assume present as well.
* gettext-tools/emacs/po-compat.el: Update.

2 years agopo-mode: Add a HACKING file.
Bruno Haible [Fri, 6 Oct 2023 11:18:02 +0000 (13:18 +0200)] 
po-mode: Add a HACKING file.

* gettext-tools/emacs/HACKING: New file.
* gettext-tools/emacs/Makefile.am (EXTRA_DIST): Add it.

2 years agoMerge from 0.22.x branch: Prepare for 0.22.3 release.
Bruno Haible [Wed, 4 Oct 2023 14:53:00 +0000 (16:53 +0200)] 
Merge from 0.22.x branch: Prepare for 0.22.3 release.

* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Bump.
* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Bump.
* libtextstyle/version.sh: Update VERSION_NUMBER, RELEASE_DATE.
* gettext-tools/configure.ac (ARCHIVE_VERSION): Bump to 0.22.3.
* gettext-tools/misc/autopoint.in: Allow version 0.22.3.

2 years agoMerge from 0.22.x branch: Update NEWS file for release 0.22.3.
Bruno Haible [Wed, 4 Oct 2023 15:46:56 +0000 (17:46 +0200)] 
Merge from 0.22.x branch: Update NEWS file for release 0.22.3.

2 years agobuild: Fix link error on native Windows (regression 2023-09-17).
Bruno Haible [Sun, 1 Oct 2023 20:11:45 +0000 (22:11 +0200)] 
build: Fix link error on native Windows (regression 2023-09-17).

* gettext-tools/woe32dll/gettextsrc-exports.c: Export also gram_pos_column,
gram_pot_role.

2 years agointl: Avoid compiler warning from previous commit.
Bruno Haible [Sat, 30 Sep 2023 19:09:28 +0000 (21:09 +0200)] 
intl: Avoid compiler warning from previous commit.

* gettext-runtime/intl/localealias.c (__libc_localealias_freemem): Don't define
outside of _LIBC.

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 19:07:15 +0000 (21:07 +0200)] 
intl: Merge from glibc.

Apply commit
2022-12-27  Adhemerval Zanella Netto  <adhemerval.zanella@linaro.org>
Move libc_freeres_ptrs and libc_subfreeres to hidden/weak functions

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 19:01:15 +0000 (21:01 +0200)] 
intl: Merge from glibc.

Apply commit
2023-02-03  Wilco Dijkstra  <wilco.dijkstra@arm.com>
Replace rawmemchr (s, '\0') with strchr

2 years agointl: Fix portability problem in previous commit.
Bruno Haible [Sat, 30 Sep 2023 18:59:24 +0000 (20:59 +0200)] 
intl: Fix portability problem in previous commit.

* gettext-runtime/intl/localealias.c (read_alias_file): Use
"#pragma GCC diagnostic ..." only with new enough GCC versions.

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:54:00 +0000 (20:54 +0200)] 
intl: Merge from glibc.

Apply commit
2022-01-25  Martin Sebor  <msebor@redhat.com>
intl: Avoid -Wuse-after-free [BZ #26779]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:49:13 +0000 (20:49 +0200)] 
intl: Merge from glibc.

Apply commit
2021-12-12  Andrea Monaco  <andrea.monaco@autistici.org>
intl/plural.y: Avoid conflicting declarations of yyerror and yylex

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:46:04 +0000 (20:46 +0200)] 
intl: Merge from glibc.

Apply commit
2021-03-02  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Use 64 bit time_t stat internally

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:44:18 +0000 (20:44 +0200)] 
intl: Merge from glibc.

Apply commit
2020-09-25  Arjun Shankar  <arjun@redhat.com>
intl: Handle translation output codesets with suffixes [BZ #26383]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:42:50 +0000 (20:42 +0200)] 
intl: Merge from glibc.

Apply commit
2020-07-15  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Remove internal usage of extensible stat functions

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:41:37 +0000 (20:41 +0200)] 
intl: Merge from glibc.

Apply commit
2020-07-07  Arjun Shankar  <arjun@redhat.com>
Rewrite iconv option parsing [BZ #19519]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:38:29 +0000 (20:38 +0200)] 
intl: Merge from glibc.

Apply commit
2019-09-05  Florian Weimer  <fweimer@redhat.com>
locale: Avoid zero-length array in _nl_category_names [BZ #24962]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:35:21 +0000 (20:35 +0200)] 
intl: Merge from glibc.

Apply commit
2018-02-15  Joseph Myers  <joseph@codesourcery.com>
Fix -Os feof_unlocked linknamespace, localplt issues (bug 15105, bug 19463).

2 years agointl: Fix compilation error from previous commit.
Bruno Haible [Sat, 30 Sep 2023 19:44:26 +0000 (21:44 +0200)] 
intl: Fix compilation error from previous commit.

* gettext-runtime/intl/hash-string.h (attribute_hidden): Add fallback
definition.

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:33:06 +0000 (20:33 +0200)] 
intl: Merge from glibc.

Apply commit
2017-10-01  H.J. Lu  <hjl.tools@gmail.com>
Hide internal __hash_string function [BZ #18822]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:31:37 +0000 (20:31 +0200)] 
intl: Merge from glibc.

Apply commit
2017-10-01  H.J. Lu  <hjl.tools@gmail.com>
Hide internal __gettextparse function [BZ #18822]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:29:30 +0000 (20:29 +0200)] 
intl: Merge from glibc.

Apply commit
2017-10-01  H.J. Lu  <hjl.tools@gmail.com>
Mark internal intl functions with attribute_hidden [BZ #18822]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:28:03 +0000 (20:28 +0200)] 
intl: Merge from glibc.

Apply commit
2017-10-01  H.J. Lu  <hjl.tools@gmail.com>
Mark internal functions with attribute_hidden [BZ #18822]

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:21:52 +0000 (20:21 +0200)] 
intl: Merge from glibc.

Apply commit
2017-08-15  Florian Weimer  <fweimer@redhat.com>
iconv, intl, locale, wcsmbs: Remove internal_function

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:13:12 +0000 (20:13 +0200)] 
intl: Merge from glibc.

Apply commit
2017-07-03  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Consolidate non cancellable close call

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:11:13 +0000 (20:11 +0200)] 
intl: Merge from glibc.

Apply commit
2017-07-03  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Consolidate non cancellable read call

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:09:57 +0000 (20:09 +0200)] 
intl: Merge from glibc.

Apply commit
2017-07-03  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Consolidate non cancellable open call

2 years agointl: Fix compilation error from previous commit.
Bruno Haible [Sat, 30 Sep 2023 19:53:59 +0000 (21:53 +0200)] 
intl: Fix compilation error from previous commit.

* gettext-runtime/intl/loadmsgcat.c (_nl_load_domain): Use free() instead of
freea().

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 18:07:33 +0000 (20:07 +0200)] 
intl: Merge from glibc.

Apply commit
2017-06-21  Florian Weimer  <fweimer@redhat.com>
_nl_load_domain: Use calloc instead of alloca

2 years agointl: Remove use of alloca() for wdirname handling.
Bruno Haible [Sat, 30 Sep 2023 18:03:47 +0000 (20:03 +0200)] 
intl: Remove use of alloca() for wdirname handling.

* autogen.sh (GNULIB_MODULES_LIBINTL): Add wgetcwd-lgpl.
* gettext-runtime/intl/dcigettext.c: Include <wchar.h>.
(DCIGETTEXT): Allocate resolved_wdirname through malloc() instead of through
alloca().

2 years agointl: Fix compilation error from previous commit.
Bruno Haible [Sat, 30 Sep 2023 20:30:45 +0000 (22:30 +0200)] 
intl: Fix compilation error from previous commit.

* gettext-runtime/intl/dcigettext.c (DCIGETTEXT) [!_LIBC]: Compute the resolved
dirname without using __asprintf.

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 13:08:26 +0000 (15:08 +0200)] 
intl: Merge from glibc.

Apply commits
2017-06-21  Florian Weimer  <fweimer@redhat.com>
DCIGETTEXT: Use getcwd, asprintf to construct absolute pathname
and
2018-12-21  Florian Weimer  <fweimer@redhat.com>
intl: Do not return NULL on asprintf failure in gettext [BZ #24018]

2 years agointl: Use gnulib module 'getcwd-lgpl'.
Bruno Haible [Sat, 30 Sep 2023 13:17:14 +0000 (15:17 +0200)] 
intl: Use gnulib module 'getcwd-lgpl'.

* autogen.sh (GNULIB_MODULES_LIBINTL): Add getcwd-lgpl.

2 years agointl: Merge from glibc.
Bruno Haible [Sat, 30 Sep 2023 12:54:51 +0000 (14:54 +0200)] 
intl: Merge from glibc.

Apply commit
2017-06-19  Florian Weimer  <fweimer@redhat.com>
DCIGETTEXT: Do not make copy of localename