Commit Graph

7369 Commits

Author SHA1 Message Date
Bruno Haible dfbe004f01 build: Add support for shallow-cloning of subdirectories.
* gitsub.sh (func_usage): Document allowed git options with 'git pull'.
(func_pull): Accept GIT_OPTIONS argument.
(pull): Parse git options before complaining about too many arguments.
Pass the git options to func_pull.
2019-09-01 17:51:31 +02:00
Bruno Haible c65180d223 xgettext: Assume that Python source files are in UTF-8 by default.
Reported by ilias iliadis <apiuano-bugs@yahoo.gr>
at <https://savannah.gnu.org/bugs/?55231>.

* gettext-tools/src/xg-encoding.h (xgettext_global_source_encoding): Allow a
NULL value.
* gettext-tools/src/xg-encoding.c (xgettext_global_source_encoding): Likewise.
* gettext-tools/src/xgettext.c (main): Initialize
xgettext_global_source_encoding with NULL, not "ASCII". Handle a NULL
xgettext_global_source_encoding.
(extract_from_file): Use ASCII as default for xgettext_global_source_encoding.
* gettext-tools/src/x-javascript.c (extract_javascript): Likewise.
* gettext-tools/src/x-python.c (phase2_getc): Signal an error when encountering
an invalid or incomplete UTF-8 character.
(set_current_file_source_encoding): In the error message, use
xgettext_current_file_source_encoding instead of
xgettext_global_source_encoding.
(extract_python): Use UTF-8 as default for xgettext_global_source_encoding.
* gettext-tools/tests/xgettext-python-3: Verify that if the source file has no
magic coding comment but is UTF-8 encoded, xgettext succeeds.
* NEWS: Mention the change.
2019-08-25 23:37:44 +02:00
Bruno Haible c2758ebe0a Add support for Java format strings in the Formatter syntax.
* gettext-tools/src/message.h (format_type): Add format_java_printf.
(NFORMATS): Increment.
* gettext-tools/src/message.c (format_language, format_language_pretty): Add
entry for format_java_printf.
* gettext-tools/src/format.h (formatstring_java_printf): New declaration.
* gettext-tools/src/format-java.c: Update comments.
* gettext-tools/src/format-java-printf.c: New file.
* gettext-tools/src/format.c (formatstring_parsers): Add entry for
format_java_printf.
* gettext-tools/src/x-java.h (SCANNERS_JAVA): Use formatstring_java_printf.
* gettext-tools/src/x-java.c (init_flag_table_java): Add entries relevant to
format strings in Formatter syntax.
* gettext-tools/src/xgettext.c (xgettext_record_flag): Add support for
format_java_printf.
* gettext-tools/src/FILES: Add format-java-printf.c.
* gettext-tools/src/Makefile.am (FORMAT_SOURCE): Add format-java-printf.c.
* gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_java_printf.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Likewise.
* gettext-tools/tests/xgettext-6 (xg-test6.java): Add test for recognition of
format strings in Formatter syntax.
* gettext-tools/tests/format-java-printf-1: New file.
* gettext-tools/tests/format-java-printf-2: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* gettext-tools/tests/lang-java: Add two uses of String.format to the program.
* gettext-tools/doc/gettext.texi (PO Files): Document java-printf-format and
no-java-printf-format.
(java-format): Describe both kinds of format strings. Update URLs.
(Java): Mention the second kind of format string as well.
* NEWS: Mention the improvement.
2019-08-25 19:17:21 +02:00
Bruno Haible a55b0194e3 tests: Remove comments about GCJ.
We don't support GCJ any more since 2017-05-04.

* gettext-tools/tests/lang-java: Remove comment about failure with GCJ.
* gettext-tools/tests/msgunfmt-java-1: Likewise.
2019-08-25 19:00:26 +02:00
Bruno Haible bf4e4547d1 Update compile-command in comments.
* gettext-tools/src/format-*.c: Fix -I options in compile-command.
2019-08-25 16:21:09 +02:00
Bruno Haible 942c765cf7 desktop: Small parser fix.
* gettext-tools/src/read-desktop.c (desktop_lex): Fix handling of control
characters in group names.
2019-08-25 11:46:48 +02:00
Bruno Haible b794ecd23a code style: Avoid gratuitous 'continue;' statements.
* gettext-tools/src/file-list.c (read_names_from_file): Use 'if' instead of
'continue'.
* gettext-tools/src/its.c (its_rule_list_add_from_doc): Likewise.
* gettext-tools/src/locating-rule.c (locating_rule_list_add_from_file):
Likewise.
* gettext-tools/src/msgfmt.c (get_languages): Likewise.
* gettext-tools/src/x-javascript.c (phase5_scan_xml_markup): Likewise.
* gettext-tools/src/x-lua.c (phase2_getc): Likewise.
* gettext-tools/src/read-desktop.c (desktop_lex): Use 'if' instead of 'switch'
with few alternatives. Test for EOF first.
2019-08-25 11:38:22 +02:00
Bruno Haible 3fcb262659 autogen.sh: Make more reliable.
* autogen.sh: Really bail out if gnulib-tool fails to copy config.{guess,sub}.
2019-08-24 19:25:06 +02:00
Bruno Haible 5443a27e2b xgettext: Handle newlines in Lua long bracket literal strings correctly.
Reported by Frans de Jonge <fransdejonge@gmail.com>
at <https://savannah.gnu.org/bugs/?56794>.

* gettext-tools/src/x-lua.c (phase3_get): Test for EOF first. After an opening
long bracket, swallow one newline.
* gettext-tools/tests/xgettext-lua-1: Add tests for newlines in long brackets.
* gettext-tools/tests/xgettext-lua-2: Update comment.
2019-08-22 16:36:59 +02:00
Bruno Haible 7643c58c13 xgettext: Recognize gettext -e invocations in shell parser.
Reported by Eugene V. Lyubimkin <jackyf.devel@gmail.com>
in <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507091>.

* gettext-runtime/src/escapes.h: New file, extracted from
gettext-runtime/src/gettext.c.
* gettext-runtime/src/gettext.c: Include escapes.h.
(expand_escape): Remove function.
(inhibit_added_newline): New variable.
(add_newline): Remove variable.
(main): Initialize inhibit_added_newline. Invoke expand_escapes instead of
expand_escape.
* gettext-runtime/src/ngettext.c: Include escapes.h.
(expand_escape): Remove function.
(main): Invoke expand_escapes instead of expand_escape.
* gettext-runtime/src/Makefile.am (gettext_SOURCES, ngettext_SOURCES): Add
escapes.h.
* gettext-tools/tests/tstgettext.c: Include escapes.h.
(expand_escape): Remove function.
(inhibit_added_newline): New variable.
(add_newline): Remove variable.
(main): Initialize inhibit_added_newline. Invoke expand_escapes instead of
expand_escape.
* gettext-tools/tests/Makefile.am (tstgettext_SOURCES): Add escapes.h.
* gettext-tools/src/x-sh.c: Include escapes.h.
(read_command): Recognize a '-e' option in the argument list of gettext and
ngettext.
* gettext-tools/src/Makefile.am (xgettext_SOURCES): Add escapes.h.
* gettext-tools/tests/xgettext-sh-1: Test the recognition of gettext -e
arguments.
* NEWS: Mention the change.
2019-08-19 10:52:36 +02:00
Bruno Haible b0d302e404 doc: Fix documentation of gettext, ngettext programs.
* gettext-runtime/doc/rt-gettext.texi: Clarify when the additional newline is
emitted.
* gettext-runtime/doc/rt-ngettext.texi: Remove '\c' from the list of recognized
escape sequences.
2019-08-19 10:24:30 +02:00
Bruno Haible 586b823025 Update after gnulib changed.
* gettext-runtime/intl/localcharset.c: Update from gnulib.
* gettext-runtime/intl/verify.h: Likewise.
2019-08-19 04:12:51 +02:00
Bruno Haible 7af869e62d gettext, ngettext: Fix the expansion of '\\' and octal escape sequences.
* gettext-runtime/src/gettext.c (expand_escape): Don't swallow the expansion
of '\\' and octal escape sequences.
* gettext-runtime/src/ngettext.c (expand_escape): Likewise.
* gettext-tools/tests/tstgettext.c (expand_escape): Likewise.
* NEWS: Mention the change.
2019-08-19 02:16:43 +02:00
Bruno Haible 6a1a31af58 xgettext: Fix parsing of escaped single-quote characters in shell parser.
Reported by Markus Gothe <nietzsche@lysator.liu.se>
at <https://savannah.gnu.org/bugs/?49809>.

* gettext-tools/src/x-sh.c (phase2_getc): Handle the case c == '\''
&& !open_singlequote && !open_doublequote differently.
* gettext-tools/tests/xgettext-sh-1: Add test with an escape single-quote.
2019-08-19 01:34:34 +02:00
Bruno Haible 1d3a5bf838 xgettext: Fix endless loop in shell parser.
Reported by Hanno Boeck at <https://savannah.gnu.org/bugs/?45408>.
Based on patch by Daiki Ueno.

* gettext-tools/src/x-sh.c (read_word): React on CLOSING_BACKQUOTE even when we
are currently not looking for a closing backquote.
2019-08-19 01:02:26 +02:00
Bruno Haible 14389a3f00 build: Don't use an obsolete libtool macro.
* gettext-tools/m4/exported.m4 (gt_GLOBAL_SYMBOL_PIPE): Require
_LT_CMD_GLOBAL_SYMBOLS, not AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE.
2019-08-18 17:08:39 +02:00
Bruno Haible b754366044 Update to the newest gnulib. 2019-08-18 17:08:39 +02:00
Bruno Haible a0e712b4ee libtextstyle: Fix VPATH build (regression from yesterday).
* libtextstyle/lib/Makefile.am (AM_CPPFLAGS): Search also the glib subdirectory
of the build dir.
2019-08-18 17:08:39 +02:00
Bruno Haible 1c9b721505 Don't extract Icon values from .desktop files into POT files.
Reported by Piotr Drąg <piotrdrag@gmail.com>
at <https://savannah.gnu.org/support/?108887>
and by Will Thompson <wjt@endlessm.com>
at <https://savannah.gnu.org/bugs/?56543>.

There was a discussion starting at
<https://lists.freedesktop.org/archives/xdg/2019-June/014158.html>.
The most interesting posts in this thread were
<https://lists.freedesktop.org/archives/xdg/2019-June/014164.html>
<https://lists.freedesktop.org/archives/xdg/2019-June/014167.html>.

* gettext-tools/doc/gettext.texi (Icons): New subsubsection.
* gettext-tools/src/read-desktop.c (desktop_add_default_keywords): Don't add
"Icon".
* gettext-tools/src/x-desktop.c: Update comments.
* gettext-tools/doc/xgettext.texi (Desktop): Remove 'Icon' from the list of
extracted keys.
* gettext-tools/tests/xgettext-desktop-2: New file.
* gettext-tools/tests/msgfmt-desktop-3: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add them.
* NEWS: Mention the change.
2019-08-18 13:27:30 +02:00
Bruno Haible d09d707b7a maint: Document how to deal with the build error in gettext-tools/examples/po.
Reported by Nick Alcock <nix@esperi.org.uk>
at <https://savannah.gnu.org/bugs/?56529>.

* HACKING (Building off the Git repository): Explain the common build error and
how to fix it.
2019-08-18 10:59:40 +02:00
Bruno Haible 859f2fd892 libtextstyle: Upgrade to libcroco-0.6.13.
This fixes a couple of warnings.

Reported by Frank Hunleth <fhunleth@troodon-software.com>
at <https://savannah.gnu.org/bugs/?55356>.

* libtextstyle/gnulib-local/lib/libcroco/*: Upgrade to version 0.6.13.
* libtextstyle/gnulib-local/modules/libcroco: Update.
* libtextstyle/gnulib-local/lib/glib/gmacros.in.h: New file, based on
glib-2.12.4/glib/gmacros.h.
* libtextstyle/gnulib-local/lib/glib/gprintfint.in.h: New file, based on
glib-2.12.4/glib/gprintfint.h.
* libtextstyle/Makefile.am (EXTRA_DIST): Add them.
* libtextstyle/gnulib-local/m4/libglib.m4 (gl_LIBGLIB): Add glib/gmacros.h and
glib/gprintfint.h to LIBGLIB_H.
* libtextstyle/gnulib-local/modules/libglib (Files): Add lib/glib/gmacros.in.h,
lib/glib/gprintfint.in.h.
(Depends-on): Add snprintf-posix.
(glib/gmacros.h, glib/gprintfint.h): New rules.
(MOSTLYCLEANFILES): Add glib/gmacros.h, glib/gprintfint.h.
* libtextstyle/gnulib-local/lib/glib.in.h: Include glib/gmacros.h.
* libtextstyle/gnulib-local/lib/glib/gstrfuncs.in.h (g_ascii_dtostr,
g_ascii_formatd, g_ascii_strcasecmp): Enable declarations.
* libtextstyle/gnulib-local/lib/glib/gstrfuncs.c: Include gprintfint.h.
(g_ascii_dtostr, g_ascii_formatd): Enable.
(ISSPACE, ISUPPER, ISLOWER, ISALPHA, TOUPPER, TOLOWER): Move out of function
g_parse_long_long.
(g_ascii_strcasecmp): Enable.
2019-08-17 21:25:42 +02:00
Bruno Haible d32034fbf3 libtextstyle: Document the hyperlink support.
* libtextstyle/doc/libtextstyle.texi (The NO_TERM_HYPERLINKS variable): New
section.
(Hyperlinks): New subsection.
(The abstract styled_ostream class): Document styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink.
(The term_ostream class): Document term_ostream_get_hyperlink_ref,
term_ostream_get_hyperlink_id, term_ostream_set_hyperlink.
(The html_ostream class): Document html_ostream_get_hyperlink_ref,
html_ostream_set_hyperlink_ref.
* libtextstyle/NEWS: Mention it.
2019-08-14 20:59:03 +02:00
Bruno Haible b117afc171 libtextstyle: styled-ostream: Add hyperlink support.
* libtextstyle/gnulib-local/lib/styled-ostream.oo.h (struct styled_ostream): Add
methods get_hyperlink_ref, get_hyperlink_id, set_hyperlink.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c
(term_styled_ostream::get_hyperlink_ref, term_styled_ostream::get_hyperlink_id,
term_styled_ostream::set_hyperlink): New functions.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c
(struct html_styled_ostream): Add field hyperlink_id.
(html_styled_ostream::free): Free the hyperlink_id field.
(html_styled_ostream::get_hyperlink_ref, html_styled_ostream::get_hyperlink_id,
html_styled_ostream::set_hyperlink): New functions.
(html_styled_ostream_create): Initialize the hyperlink_id field.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.c
(struct noop_styled_ostream): Add fields hyperlink_ref, hyperlink_id.
(noop_styled_ostream::free): Free the hyperlink_ref and hyperlink_id fields.
(noop_styled_ostream::get_hyperlink_ref, noop_styled_ostream::get_hyperlink_id,
noop_styled_ostream::set_hyperlink): New functions.
(noop_styled_ostream_create): Initialize the hyperlink_ref and hyperlink_id
fields.
* libtextstyle/lib/textstyle.h (styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
term_styled_ostream_get_hyperlink_ref, term_styled_ostream_get_hyperlink_id,
term_styled_ostream_set_hyperlink, html_styled_ostream_get_hyperlink_ref,
html_styled_ostream_get_hyperlink_id, html_styled_ostream_set_hyperlink,
noop_styled_ostream_get_hyperlink_ref, noop_styled_ostream_get_hyperlink_id,
noop_styled_ostream_set_hyperlink): New declarations.
* libtextstyle/adhoc-tests/hello.c (main): Invoke styled_ostream_set_hyperlink.
2019-08-14 20:52:30 +02:00
Bruno Haible 4a553fd8d3 libtextstyle: html-ostream: Add hyperlink support.
* libtextstyle/gnulib-local/lib/html-ostream.oo.h (struct html_ostream): Add
methods get_hyperlink_ref, set_hyperlink_ref.
* libtextstyle/gnulib-local/lib/html-ostream.oo.c (struct html_ostream): Add
field hyperlink_ref;
(write_attribute_value): New function.
(html_ostream::free): Emit an anchor end if needed.
(html_ostream::get_hyperlink_ref, html_ostream::set_hyperlink_ref): New
functions.
(html_ostream_create): Initialize the hyperlink_ref field.
* libtextstyle/lib/textstyle.h (html_ostream_get_hyperlink_ref,
html_ostream_set_hyperlink_ref): New declarations.
2019-08-14 20:52:25 +02:00
Bruno Haible 22dea032cd libtextstyle: term-ostream: Add hyperlink support.
* libtextstyle/gnulib-local/lib/term-ostream.oo.h (struct term_ostream): Add
methods get_hyperlink_ref, get_hyperlink_id, set_hyperlink.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c: Include <stdint.h>,
<sys/time.h>, get_ppid_of.h, get_progname_of.h, xgethostname.h.
(hyperlink_t): New type.
(free_hyperlink): New function.
(attributes_t): Add 'hyperlink' field.
(equal_attributes): Compare also the 'hyperlink' field.
(struct term_ostream): Add fields supports_hyperlink, restore_hyperlink,
hostname_hash, start_time, id_serial, hyperlinks_array, hyperlinks_count,
hyperlinks_allocated, active_attr_hyperlink.
(simplify_attributes): Deal with 'hyperlink' field.
(generate_hyperlink_id): New function.
(out_hyperlink_change): New function.
(out_attr_change): Set active_attr_hyperlink. Invoke out_hyperlink_change.
(restore, async_restore): Use stream->restore_hyperlink.
(async_set_attributes_from_default): Invoke out_hyperlink_change.
(output_buffer): At the end, free the unused hyperlink_t objects.
(term_ostream::free): Free the hyperlinks_array and its contents.
(term_ostream::get_hyperlink_ref, term_ostream::get_hyperlink_id,
term_ostream::set_hyperlink): New functions.
(get_terminal_emulator_progname, should_enable_hyperlinks): New functions.
(term_ostream_create): Set the fields supports_hyperlink, restore_hyperlink,
hostname_hash, start_time, id_serial, hyperlinks_array, hyperlinks_count,
hyperlinks_allocated.
* libtextstyle/gnulib-local/m4/term-ostream.m4 (gl_TERM_OSTREAM): Test for
getsid function.
* libtextstyle/gnulib-local/modules/term-ostream (Depends-on): Add gettimeofday,
get_ppid_of, get_progname_of, stdint, xgethostname.
* libtextstyle/lib/textstyle.h (term_ostream_get_hyperlink_ref,
term_ostream_get_hyperlink_id, term_ostream_set_hyperlink): New declarations.
2019-08-14 20:52:21 +02:00
Bruno Haible 3130550180 Update to the newest gnulib. 2019-08-14 20:50:48 +02:00
Bruno Haible 7040b13946 libtextstyle: Support the NO_COLOR environment variable.
It follows the specification at https://no-color.org/.

The support is in the example programs, not in the function
styled_ostream_create, so that it can be overridden through the command-line
option --color=always.

We only test whether the environment variable is set, not whether its value
is non-empty. POSIX-specified environment variables are treated like unset
when their value is empty; this is because in the old days it was not possible
to unset an environment variable. But nowadays:
  - all shells support the 'unset' built-in,
  - all platforms that have the setenv() function also have the unsetenv()
    function, and
  - the 'env' program from GNU coreutils supports --unset=VARIABLE to unset a
    variable.
This makes it possible to unset an environment variable that is set by the
parent process.

* libtextstyle/adhoc-tests/hello.c (main): Do not emit styling when the
environment variable NO_COLOR is set.
* libtextstyle/examples/color-filter/filter.c (main): Likewise.
* libtextstyle/examples/color-hello/hello.c (main): Likewise.
* gettext-tools/src/write-catalog.c (msgdomain_list_print): Likewise.
* libtextstyle/doc/libtextstyle.texi (The NO_COLOR variable): New section.
* libtextstyle/NEWS: Mention it.
2019-08-14 02:46:36 +02:00
Bruno Haible 8e280e2efd xalloc: Add x2realloc function, from gnulib.
* gnulib-local/lib/xalloc.h (x2realloc): New declaration, from
gnulib/lib/xalloc.h.
* gnulib-local/lib/xmalloc.c (x2nrealloc): New function, from
gnulib/lib/xalloc.h.
(x2realloc): New function, from gnulib/lib/xmalloc.c.
* gnulib-local/modules/xalloc (configure.ac): Require AC_C_INLINE.
2019-08-12 03:31:49 +02:00
Bruno Haible 9a4495f84f Drop our xalloc_oversized macro in favour of gnulib's xalloc_oversized macro.
* gnulib-local/lib/xalloc.h: Include xalloc-oversized.h.
(xalloc_oversized): Remove macro.
* gnulib-local/modules/xalloc (Depends-on): Add 'xalloc-oversized'.
2019-08-12 03:05:48 +02:00
Bruno Haible 4785289e45 xgettext: Fix parsing of JavaScript template literals inside functions.
Reported by Dmitry Vinnik <vinnik.dmitry07@gmail.com>
in <https://savannah.gnu.org/bugs/?56678>.

* gettext-tools/src/x-javascript.c (brace_depths, brace_depths_alloc): New
variables.
(brace_depth): Remove variable.
(new_brace_depth_level): New function.
(phase5_get): Invoke it. Access the top of the brace_depths stack.
(extract_javascript): Don't set brace_depth. Invoke new_brace_depth_level
instead.
* gettext-tools/tests/xgettext-javascript-7: Test template literals inside a
function.
2019-07-28 19:21:32 +02:00
Bruno Haible 4f918e5683 Update to the newest gnulib. 2019-07-28 17:35:48 +02:00
Bruno Haible 7540219a2c Fix test failure on MSVC.
* gettext-tools/tests/lang-c++: On MSVC, use <iostream>, not <iostream.h>.
2019-07-21 01:46:12 +02:00
Bruno Haible 36b100f51c Update after gnulib changed.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES): Add
windows-rwlock.
* gettext-runtime/intl/windows-rwlock.h: New file, from gnulib.
* gettext-runtime/intl/windows-rwlock.c: New file, from gnulib.
* gettext-runtime/intl/windows-initguard.h: New file, from gnulib.
* gettext-runtime/intl/windows-spinlock.h: Remove file.
* gettext-runtime/intl/lock.h: Update from gnulib.
* gettext-runtime/intl/lock.c: Likewise.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/intl/windows-mutex.h: Likewise.
* gettext-runtime/intl/windows-recmutex.h: Likewise.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add windows-rwlock.h,
windows-initguard.h. Remove windows-spinlock.h.
(LIBINTLSOURCES): Conditionally add windows-rwlock.c.
(windows-rwlock.lo): New rule.
(*.lo): Update dependencies.
* Makefile.am (distcheck-hook): Check that gettext-runtime/intl/windows-*.[hc]
are up-to-date.
* gnulib-local/lib/libxml/threads.c: Test HAVE_PTHREAD_H, HAVE_WIN32_THREADS,
HAVE_BEOS_THREADS only if LIBXML_THREAD_ENABLED is defined; otherwise use a
fallback suitable for single-threaded applications.
2019-07-21 01:45:52 +02:00
Bruno Haible a0a6ab1139 Update to the newest gnulib. 2019-07-20 13:40:24 +02:00
Bruno Haible 87a858c840 build: Avoid warnings from bison versions >= 3.3.
Reported by Bernhard Voelker <mail@bernhard-voelker.de>.

* gettext-runtime/intl/Makefile.am (YACC): Remove option '-y'.
2019-07-19 23:23:06 +02:00
Bruno Haible 0522501a76 intl: Make autoconf macro more robust.
Reported by Bernhard Voelker <mail@bernhard-voelker.de>.

* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't make assumptions about
the version numbers of future Bison versions.
2019-07-19 23:11:48 +02:00
Bruno Haible e328c8a73f libtextstyle: Fix link error when compiled with GCC 3.3.x.
Reported by Jeffrey Walton <noloader@gmail.com>.

* gnulib-local/lib/libxml/timsort.h (CLZ): Don't define based on __builtin_clzll
in GCC versions < 3.4.
2019-07-17 20:40:11 +02:00
Bruno Haible 28fb06a64d intl: Don't export the glwthread* symbols from libintl on native Windows.
* gettext-runtime/intl/Makefile.am (OTHER_LDFLAGS): Add an -export-symbols-regex
option.
2019-07-07 10:19:25 +02:00
Bruno Haible 1724d2a48c build: Fix build errors with MSVC.
* gettext-tools/src/lang-table.h (language_table, language_variant_table):
Declare with C linkage.
* gettext-tools/src/read-po.h (input_format_po): Likewise.
* gettext-tools/src/read-properties.h (input_format_properties): Likewise.
* gettext-tools/src/read-stringtable.h (input_format_stringtable): Likewise.
* gettext-tools/src/write-properties.h (output_format_properties): Likewise.
* gettext-tools/src/write-stringtable.h (output_format_stringtable): Likewise.
2019-07-04 16:27:44 +02:00
Bruno Haible 7cb3e79471 build: Fix build error with MSVC.
* gettext-runtime/intl/Makefile.am (INTL_WINDOWS_LIBS): New variable.
(OTHER_LDFLAGS): Add it.
2019-07-04 16:27:41 +02:00
Bruno Haible 76d4702f1e build: Fix build error with MSVC.
* gettext-runtime/intl/export.h (LIBINTL_DLL_EXPORTED): Define differently for
MSVC.
2019-07-04 16:27:37 +02:00
Bruno Haible 0fbe7b1906 build: Fix build errors with MSVC.
* gettext-tools/libgettextpo/exported.sh.in: Remove one level of eval.
* gettext-tools/libgettextpo/Makefile.am (config.h): Redirect compiler output to
stderr. Remove symbols that contain an '@'.
* libtextstyle/lib/Makefile.am (config.h): Likewise.
2019-07-04 16:27:33 +02:00
Bruno Haible fcb56438aa Update after gnulib changed.
* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES): Add
windows-mutex, windows-once, windows-recmutex.
* gettext-runtime/m4/flexmember.m4: Update from gnulib.
* gettext-runtime/intl/flexmember.h: Likewise.
* gettext-runtime/intl/localcharset.c: Likewise.
* gettext-runtime/intl/windows-mutex.h: New file, from gnulib.
* gettext-runtime/intl/windows-mutex.c: New file, from gnulib.
* gettext-runtime/intl/windows-once.h: New file, from gnulib.
* gettext-runtime/intl/windows-once.c: New file, from gnulib.
* gettext-runtime/intl/windows-recmutex.h: New file, from gnulib.
* gettext-runtime/intl/windows-recmutex.c: New file, from gnulib.
* gettext-runtime/intl/windows-spinlock.h: New file, from gnulib.
* gettext-runtime/intl/lock.h: Update from gnulib.
* gettext-runtime/intl/lock.c: Likewise.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add windows-*.h.
(LIBINTLSOURCES): Conditionally add windows-*.c.
(windows-mutex.lo, windows-recmutex.lo, windows-once.lo): New rules.
(*.lo): Update dependencies.
* gettext-runtime/configure.ac: New condition WINDOWS_NATIVE.
* gettext-tools/configure.ac: Likewise.
* Makefile.am (distcheck-hook): Check that gettext-runtime/intl/windows-*.[hc]
are up-to-date.
2019-07-04 01:53:11 +02:00
Bruno Haible 0356f5e863 Update to the newest gnulib. 2019-07-04 01:53:11 +02:00
Bruno Haible ec0e6b3074 Update after gnulib changed.
* gettext-runtime/intl/setlocale.c (search): Optimize away a redundant strcmp()
invocation.
(locales_with_principal_territory): New array.
(langcmp, get_main_locale_with_same_language): New functions.
(locales_with_principal_language): New array.
(terrcmp, get_main_locale_with_same_territory): New functions.
(rpl_setlocale): When setlocale_single failed, try again with a locale that is
more likely to exist. Don't warn if the environment variable SETLOCALE_VERBOSE
is not set.
2019-05-20 23:28:10 +02:00
Bruno Haible d92828fdcb Update after gnulib changed.
* gettext-runtime/m4/intlmacosx.m4 (gt_INTL_MACOSX): Don't test for
CFLocaleCopyCurrent.
* gettext-runtime/intl/localename.c: Remove includes for
HAVE_CFLOCALECOPYCURRENT.
(gl_locale_name_environ, gl_locale_name_default): Remove code for
HAVE_CFLOCALECOPYCURRENT.
2019-05-20 23:26:58 +02:00
Bruno Haible dc163d13d8 Update to the newest gnulib. 2019-05-20 23:25:41 +02:00
Bruno Haible 0bbf58816a msginit: Define default territory for some more languages.
* gettext-tools/src/msginit.c (catalogname_for_locale): Add information about
Bislama, Kyrgyz, Mauritian Creole, Chichewa, Kinyarwanda, Tok Pisin.
2019-05-20 23:25:41 +02:00
Bruno Haible 56616d1b41 Update a country name.
* gettext-tools/doc/ISO_3166: Write "North Macedonia", not "Macedonia".
* gettext-tools/doc/iso-3166.texi: Likewise.
* gettext-tools/src/msginit.c (catalogname_for_locale): Likewise.
2019-05-20 23:25:41 +02:00
Bruno Haible 584921cc24 build: Avoid endless "config.status --recheck" loop (regression from yesterday).
* gettext-tools/configure.ac: Use AC_MSG_WARN instead of AC_MSG_ERROR.
2019-05-20 02:29:48 +02:00