]> git.ipfire.org Git - thirdparty/gettext.git/log
thirdparty/gettext.git
4 years agoUpdate to the newest gnulib.
Bruno Haible [Sun, 20 Jun 2021 01:44:25 +0000 (03:44 +0200)] 
Update to the newest gnulib.

* gnulib-local/lib/localename.c.diff: Remove file.
* gnulib-local/lib/localename-table.h.diff: Remove file.
* gnulib-local/lib/tsearch.c.diff: Remove file.
* gnulib-local/modules/tsearch.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.
* libtextstyle/configure.ac: Update for changed naming convention of module
indicator variables.

4 years agobuild: Simplify further.
Bruno Haible [Sun, 20 Jun 2021 12:25:39 +0000 (14:25 +0200)] 
build: Simplify further.

* gettext-runtime/intl/Makefile.am: Assume BUILD_INCLUDED_LIBINTL is true.
* gettext-runtime/intl/configure.ac: Remove BUILD_INCLUDED_LIBINTL conditional.
* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Don't set
BUILD_INCLUDED_LIBINTL.

4 years agobuild: Revert unneeded change.
Bruno Haible [Sun, 20 Jun 2021 14:06:04 +0000 (16:06 +0200)] 
build: Revert unneeded change.

* autogen.sh: Do the automake invocations bottom-up, as before.

4 years agointl: Assume strtoul exists.
Bruno Haible [Sun, 20 Jun 2021 01:43:54 +0000 (03:43 +0200)] 
intl: Assume strtoul exists.

* gettext-runtime/intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Assume
HAVE_STRTOUL to be 1.
* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for strtoul.

4 years agointl: Assume strdup exists.
Bruno Haible [Sun, 20 Jun 2021 01:43:50 +0000 (03:43 +0200)] 
intl: Assume strdup exists.

* gettext-runtime/intl/bindtextdom.c (set_binding_values): Assume HAVE_STRDUP
to be 1.
* gettext-runtime/intl/finddomain.c (_nl_find_domain): Likewise.
* gettext-runtime/intl/textdomain.c (TEXTDOMAIN): Likewise.
* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for strdup.

4 years agointl: Assume <limits.h> exists.
Bruno Haible [Sun, 20 Jun 2021 01:43:45 +0000 (03:43 +0200)] 
intl: Assume <limits.h> exists.

* gettext-runtime/intl/dcigettext.c: Include <limits.h> always.
* gettext-runtime/m4/intl.m4 (gt_INTL_SUBDIR_CORE): Don't test for limits.h.

4 years agobuild: Move most of intl.m4 into gettext-runtime/intl/configure.ac.
Bruno Haible [Sun, 20 Jun 2021 01:43:32 +0000 (03:43 +0200)] 
build: Move most of intl.m4 into gettext-runtime/intl/configure.ac.

* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Don't invoke AM_INTL_SUBDIR.
* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR, gt_GL_ATTRIBUTE): Remove macros.
(gt_INTL_SUBDIR_CORE): Test for uselocale.
* gnulib-local/modules/gettext-runtime-intl-misc (configure.ac): Ensure
LOCALENAME_ENHANCE_LOCALE_FUNCS initialization.
* autogen.sh (GNULIB_MODULES_LIBINTL): Add lib-symbol-visibility, localename.
* gettext-runtime/intl/configure.ac: Set WINDRES. Invoke gt_INTL_SUBDIR_CORE.
Set HAVE_POSIX_PRINTF, HAVE_ASPRINTF, HAVE_SNPRINTF, HAVE_WPRINTF,
HAVE_NEWLOCALE. Test for features.h, _snprintf, _snwprintf.
Set ENHANCE_LOCALE_FUNCS, WOE32DLL.

4 years agobuild: Simplify the use of gnulib in libintl.
Bruno Haible [Sun, 20 Jun 2021 01:43:17 +0000 (03:43 +0200)] 
build: Simplify the use of gnulib in libintl.

* gnulib-local/lib/localename-table.h.diff: New file.
* gnulib-local/lib/localename.c.diff: New file.
* gnulib-local/lib/tsearch.c.diff: New file.
* gnulib-local/modules/gettext-runtime-intl-misc: New file, based on
gettext-runtime/intl/Makefile.am.
* gnulib-local/modules/tsearch.diff: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add them.
* autogen.sh (GNULIB_MODULES_LIBINTL, GNULIB_SETLOCALE_DEPENDENCIES): New
variables.
Invoke gnulib-tool for the gettext-runtime/intl/ directory.
Update 'aclocal' invocation for the gettext-runtime/intl/ directory.
* gettext-runtime/intl/configure.ac (enable_relocatable): Set to yes always.
Invoke gl_EARLY and gl_INIT. Don't invoke gl_USE_SYSTEM_EXTENSIONS,
AM_PROG_CC_C_O, gl_COMMON, gl_RELOCATABLE_LIBRARY explicitly.
Define IN_LIBINTL through config.h.
Rename __libc* macros and symbols through config.h.
Invoke AC_CONFIG_FILES for gnulib-lib/Makefile.
* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Don't rename __libc* macros and
symbols here.
(gt_INTL_SUBDIR_CORE): Don't test for tsearch.
* gettext-runtime/intl/arg-nonnull.h: Remove file.
* gettext-runtime/intl/attribute.h: Remove file.
* gettext-runtime/intl/filename.h: Remove file.
* gettext-runtime/intl/flexmember.h: Remove file.
* gettext-runtime/intl/localcharset.h: Remove file.
* gettext-runtime/intl/localcharset.c: Remove file.
* gettext-runtime/intl/localename.c: Remove file.
* gettext-runtime/intl/localename-table.in.h: Remove file.
* gettext-runtime/intl/localename-table.c: Remove file.
* gettext-runtime/intl/lock.h: Remove file.
* gettext-runtime/intl/lock.c: Remove file.
* gettext-runtime/intl/printf-args.h: Remove file.
* gettext-runtime/intl/printf-args.c: Remove file.
* gettext-runtime/intl/printf-parse.h: Remove file.
* gettext-runtime/intl/printf-parse.c: Remove file.
* gettext-runtime/intl/relocatable.h: Remove file.
* gettext-runtime/intl/relocatable.c: Remove file.
* gettext-runtime/intl/setlocale-lock.c: Remove file.
* gettext-runtime/intl/setlocale_null.h: Remove file.
* gettext-runtime/intl/setlocale_null.c: Remove file.
* gettext-runtime/intl/thread-optim.h: Remove file.
* gettext-runtime/intl/threadlib.c: Remove file.
* gettext-runtime/intl/tsearch.h: Remove file.
* gettext-runtime/intl/tsearch.c: Remove file.
* gettext-runtime/intl/vasnprintf.c: Remove file.
* gettext-runtime/intl/verify.h: Remove file.
* gettext-runtime/intl/windows-initguard.h: Remove file.
* gettext-runtime/intl/windows-mutex.h: Remove file.
* gettext-runtime/intl/windows-mutex.c: Remove file.
* gettext-runtime/intl/windows-once.h: Remove file.
* gettext-runtime/intl/windows-once.c: Remove file.
* gettext-runtime/intl/windows-recmutex.h: Remove file.
* gettext-runtime/intl/windows-recmutex.c: Remove file.
* gettext-runtime/intl/windows-rwlock.h: Remove file.
* gettext-runtime/intl/windows-rwlock.c: Remove file.
* gettext-runtime/intl/xsize.h: Remove file.
* gettext-runtime/intl/xsize.c: Remove file.
* gettext-runtime/intl/Makefile.am (ACLOCAL_AMFLAGS): Reference gnulib-m4 in
this directory.
(SUBDIRS): Add gnulib-lib.
(AM_CPPFLAGS): Add -I statements for the gnulib-lib directory. Don't define
BUILDING_DLL, IN_LIBINTL here. Don't parametrize the 'relocatable-lib-lgpl'
module here.
(EXTRA_DIST, LIBINTLSOURCES): Remove the said files.
(localename-table.h): Remove rule.
(*.lo): Remove rules and dependencies for the said files.
(libintl_la_LIBADD, libintl_la_DEPENDENCIES, libgnuintl_la_LIBADD,
libgnuintl_la_DEPENDENCIES): Add gnulib-lib/libgnu.la.
(OTHER_LDFLAGS): Don't export _libintl_* symbols.
(EXTRA_DIST): Add gnulib-m4/gnulib-cache.m4.
* gettext-runtime/intl/gettextP.h: Include glthread/lock.h, not lock.h.
(gl_locale_name_canonicalize, gl_locale_name_from_win32_LANGID,
gl_locale_name_from_win32_LCID, gl_locale_name_thread_unsafe,
gl_locale_name_thread, gl_locale_name_posix, gl_locale_name_environ,
gl_locale_name_default, gl_locale_name): Remove macros.
(_nl_locale_name_posix, _nl_locale_name_environ, _nl_locale_name_default):
Remove declarations.
* gettext-runtime/intl/plural-exp.h (FREE_EXPRESSION, PLURAL_PARSE,
GERMANIC_PLURAL, EXTRACT_PLURAL_EXPRESSION): Prefix these libintl-private
symbols with _libintl_, not libintl_.
* gettext-runtime/intl/bindtextdom.c: Include glthread/lock.h, not lock.h.
* gettext-runtime/intl/finddomain.c: Likewise.
* gettext-runtime/intl/loadmsgcat.c: Likewise.
* gettext-runtime/intl/localealias.c: Likewise.
* gettext-runtime/intl/log.c: Likewise.
* gettext-runtime/intl/textdomain.c: Likewise.
* gettext-runtime/intl/dcigettext.c: Include localename.h. Include
glthread/lock.h, not lock.h.
Include <search.h> always; don't include tsearch.c.
* gettext-runtime/intl/printf.c: Don't define libintl_vasprintf here. Instead,
use _libintl_vasprintf from gnulib-lib/vasnprintf.c. Define _libintl_vasnwprintf
instead of libintl_vasnwprintf.
* gettext-runtime/intl/setlocale.c: Include <errno.h>, localename.h.
(gl_locale_name_canonicalize): New declaration.
* Makefile.am (distcheck-hook): Remove the file comparisons for files in
gettext-runtime/intl/.

4 years agobuild: Add a separate configure.ac in gettext-runtime/intl/.
Bruno Haible [Sun, 20 Jun 2021 01:42:49 +0000 (03:42 +0200)] 
build: Add a separate configure.ac in gettext-runtime/intl/.

* autogen.sh (GNULIB_MODULES_RUNTIME_OTHER): Remove bison. Instead, copy
bison.m4 explicitly.
Generate configure file also in gettext-runtime/intl/.
Do automake invocations top-down, not bottom-up.
* gettext-runtime/intl/Makefile.am (ACLOCAL_AMFLAGS, SUBDIRS): New variables.
* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Allow 'here' as INTLSYMBOL
argument.
* gettext-runtime/intl/configure.ac: New file, based on
gettext-runtime/configure.ac.
* gettext-runtime/intl/AUTHORS: New file.
* gettext-runtime/intl/NEWS: New file.
* gettext-runtime/intl/README: New file.
* gettext-runtime/intl/ABOUT-NLS: New file, copied from
gettext-runtime/ABOUT-NLS.
* gettext-runtime/intl/INSTALL: New file, copied from gettext-runtime/INSTALL.
* gettext-runtime/configure.ac: Define WINDRES. Pass third argument to
AM_GNU_GETTEXT. Remove conditionals USE_INCLUDED_LIBINTL,
BUILD_INCLUDED_LIBINTL, PRELOADABLE_LIBINTL. Invoke AC_CONFIG_SUBDIRS([intl]).
Don't create intl/Makefile from here.
* gettext-tools/configure.ac: Define WINDRES. Redefine __libc_lock_*, for use
in localealias.c. Invoke gt_GLIBC2.

4 years agoAvoid lang-vala failure on Ubuntu 16.04 in 32-bit mode.
Bruno Haible [Sun, 20 Jun 2021 01:42:13 +0000 (03:42 +0200)] 
Avoid lang-vala failure on Ubuntu 16.04 in 32-bit mode.

* gettext-tools/tests/lang-vala: Skip the test if the valac invocation on a
trivial program fails.

4 years agobuild: Restore installation of preloadable_libintl.so (regression 2021-06-15).
Bruno Haible [Sun, 20 Jun 2021 01:42:04 +0000 (03:42 +0200)] 
build: Restore installation of preloadable_libintl.so (regression 2021-06-15).

* gettext-tools/configure.ac (USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL,
PRELOADABLE_LIBINTL): Remove unused conditionals.
* gettext-runtime/configure.ac (PRELOADABLE_LIBINTL): Define as before in
gettext-tools/configure.ac.
* PACKAGING: Update regarding preloadable_libintl.so.

4 years agolibtextstyle: Fix build in locales other than the C locale (regression 2021-04-07).
Bruno Haible [Sun, 20 Jun 2021 01:41:45 +0000 (03:41 +0200)] 
libtextstyle: Fix build in locales other than the C locale (regression 2021-04-07).

* libtextstyle/lib/Makefile.am (config.h): Invoke join-v-1 in the C locale.

4 years agolibtextstyle: Fix compilation error with cc on Solaris 10.
Bruno Haible [Sun, 20 Jun 2021 01:41:26 +0000 (03:41 +0200)] 
libtextstyle: Fix compilation error with cc on Solaris 10.

* gnulib-local/lib/libxml/timsort.h: Use 'inline' instead of '__inline'.

4 years agobuild: Simplify further.
Bruno Haible [Sun, 20 Jun 2021 01:41:04 +0000 (03:41 +0200)] 
build: Simplify further.

* autogen.sh: Don't create a directory gettext-tools/intl/ any more.

4 years agobuild: Simplify further.
Bruno Haible [Sun, 20 Jun 2021 01:40:56 +0000 (03:40 +0200)] 
build: Simplify further.

* gettext-tools/src/Makefile.am (msginit_SOURCES): Remove Solaris workaround
(no longer needed).

4 years agobuild: Simplify: Don't build libintl+libgnuintl a second time in gettext-tools.
Bruno Haible [Tue, 15 Jun 2021 10:49:11 +0000 (12:49 +0200)] 
build: Simplify: Don't build libintl+libgnuintl a second time in gettext-tools.

* PACKAGING: Document that gettext-tools cannot be built without
gettext-runtime.
* autogen.sh: Don't create gettext-tools/intl/Makefile.am.
* gettext-tools/Makefile.am (SUBDIRS): Remove 'intl'.
* gettext-runtime/intl/Makefile.am (dist-hook): Remove.
(install-data-local, uninstall-local, uninstall-sources): Moved ...
* gettext-tools/misc/Makefile.am (install-data-local, uninstall-local,
uninstall-sources): ... to here.
* gettext-runtime/configure.ac (PACKAGE_IS_GETTEXT_TOOLS): Remove conditional.
* gettext-tools/configure.ac: Add 3rd argument to AM_GNU_GETTEXT invocation.
(PACKAGE_IS_GETTEXT_TOOLS): Remove conditional.
Update reference to os2compat.h.
Don't create intl/Makefile from intl/Makefile.in.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Use the built header files
in gettext-runtime/intl/.
* gettext-tools/libgrep/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/src/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/libgettextpo/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/gnulib-tests/Makefile.am (AM_CPPFLAGS): Likewise.
* gettext-tools/tests/Makefile.am (AM_CPPFLAGS): Likewise.
(LDADD_yes, LDADD_no): Use the built libraries in gettext-runtime/intl/.
* gettext-tools/tests/lang-c: Use the built header files in gettext-runtime/intl/.
* gettext-tools/tests/lang-c++: Likewise.
* gettext-tools/tests/lang-objc: Likewise.

4 years agoFix build failure on AIX 7.
Bruno Haible [Tue, 15 Jun 2021 08:36:08 +0000 (10:36 +0200)] 
Fix build failure on AIX 7.

* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Require gl_LOCALE_H_DEFAULTS
before gt_INTL_THREAD_LOCALE_NAME.

4 years agoAvoid lang-vala failure on macOS with MacPorts.
Bruno Haible [Tue, 15 Jun 2021 08:32:19 +0000 (10:32 +0200)] 
Avoid lang-vala failure on macOS with MacPorts.

* gettext-tools/tests/lang-vala: Skip the test if the valac invocation reports
that <glib.h> is not installed.

4 years agoHandle known test failure on Alpine Linux.
Bruno Haible [Tue, 15 Jun 2021 00:47:29 +0000 (02:47 +0200)] 
Handle known test failure on Alpine Linux.

* gettext-tools/tests/autopoint-3: Add comment regarding Alpine Linux.

4 years agobuild: Simplify the use of gnulib in libasprintf.
Bruno Haible [Mon, 14 Jun 2021 00:23:57 +0000 (02:23 +0200)] 
build: Simplify the use of gnulib in libasprintf.

* autogen.sh (GNULIB_MODULES_LIBASPRINTF): Add vasnprintf. Remove attribute,
errno, verify, xsize.
Pass option '--source-base=gnulib-lib' instead of
'--source-base=. --makefile-name=Makefile.gnulib'.
Don't create any gettext-runtime/libasprintf/gnulib-m4/*.m4 file through simple
copy.
* gettext-runtime/libasprintf/printf-args.c: Remove file.
* gettext-runtime/libasprintf/printf-args.h: Remove file.
* gettext-runtime/libasprintf/printf-parse.c: Remove file.
* gettext-runtime/libasprintf/printf-parse.h: Remove file.
* gettext-runtime/libasprintf/vasnprintf.c: Remove file.
* gettext-runtime/libasprintf/vasnprintf.h: Remove file.
* gettext-runtime/libasprintf/lib-asprintf.c: Don't include printf-args.c,
printf-parse.c, vasnprintf.c, asnprintf.c.
(STATIC): Remove macro.
* gettext-runtime/libasprintf/configure.ac: Hide undesired symbols from the
global namespace.
(AC_CONFIG_FILES): Add gnulib-lib/Makefile.
* gettext-runtime/libasprintf/Makefile.am: Don't include Makefile.gnulib.
(SUBDIRS, AM_CPPFLAGS): New variable.
(libasprintf_la_SOURCES, lib_asprintf_EXTRASOURCES): Remove files that are now
in gnulib-lib/.
(LIBASPRINTF_EXPORTED_SYMBOLS_REGEX): New variable.
(libasprintf_la_LDFLAGS): Use it.
(libasprintf.la): Link with gnulib-lib/libgnu.la.
* Makefile.am (distcheck-hook): Don't check the files in
gettext-runtime/libasprintf/.

4 years agolibtextstyle: Fix the set of exported symbols on Alpine Linux.
Bruno Haible [Tue, 6 Apr 2021 23:37:51 +0000 (01:37 +0200)] 
libtextstyle: Fix the set of exported symbols on Alpine Linux.

* libtextstyle/build-aux/join-v-1: New file, from GNU libunistring.
* libtextstyle/Makefile.am (EXTRA_DIST): Add it.
* libtextstyle/lib/Makefile.am (config.h): Use it instead of 'join -v 1'.

4 years agoHandle known test failures on musl libc.
Bruno Haible [Sun, 4 Apr 2021 22:56:13 +0000 (00:56 +0200)] 
Handle known test failures on musl libc.

* gettext-tools/tests/msgcat-22: Add comment regarding musl libc.
* gettext-tools/tests/msgconv-8: Likewise.

4 years agoUse xalloc module from gnulib.
Bruno Haible [Sun, 4 Apr 2021 14:01:02 +0000 (16:01 +0200)] 
Use xalloc module from gnulib.

* gnulib-local/lib/xalloc.h: Remove file.
* gnulib-local/lib/xmalloc.c: Remove file.
* gnulib-local/lib/xstrdup.c: Remove file.
* gnulib-local/modules/xalloc: Remove file.
* gnulib-local/modules/xalloc-die: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove them.
* libtextstyle/lib/misc.c (xmalloc_exit_failure): Remove declaration.
(libtextstyle_set_failure_exit_code): Don't set xmalloc_exit_failure.

4 years agodoc: Document how file names with spaces are protected in PO files.
Bruno Haible [Sun, 4 Apr 2021 17:26:14 +0000 (19:26 +0200)] 
doc: Document how file names with spaces are protected in PO files.

* gettext-tools/doc/gettext.texi (PO Files): Document how file names with spaces
are protected in PO files.
* NEWS: Mention the change.

4 years agomsgcat: Handle protected file names with spaces.
Bruno Haible [Sun, 4 Apr 2021 17:23:47 +0000 (19:23 +0200)] 
msgcat: Handle protected file names with spaces.

* gettext-tools/src/msgl-cat.c: Include msgl-ofn.h.
(catenate_msgdomain_list): Handle references that contain file names with
spaces.
* gettext-tools/tests/msgcat-22: New file, based on
gettext-tools/tests/msgconv-8.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

4 years agomsgconv: Handle protected file names with spaces.
Bruno Haible [Sun, 4 Apr 2021 16:26:57 +0000 (18:26 +0200)] 
msgconv: Handle protected file names with spaces.

* gettext-tools/src/po-charset.h (po_lex_isolate_start, po_lex_isolate_end): New
declarations.
* gettext-tools/src/po-charset.c (po_lex_isolate_start, po_lex_isolate_end): New
variables.
(po_lex_charset_init, po_lex_charset_set, po_lex_charset_close): Initialize
them.
* gettext-tools/woe32dll/gettextsrc-exports.c: Export also po_lex_isolate_start,
po_lex_isolate_end.
* gettext-tools/src/read-catalog-abstract.c: Include <stdbool.h>, po-charset.h.
(po_parse_comment_filepos): Parse the syntax of file names surrounded by control
characters.
* gettext-tools/src/msgl-iconv.c: Include msgl-ofn.h.
(iconv_msgdomain_list): Signal error if the target encoding does not contain the
control characters needed for escaping file names with spaces.
* gettext-tools/tests/msgconv-8: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

4 years agoxgettext: Protect file names with spaces through Unicode U+2068, U+2069.
Bruno Haible [Sun, 4 Apr 2021 14:19:11 +0000 (16:19 +0200)] 
xgettext: Protect file names with spaces through Unicode U+2068, U+2069.

* gettext-tools/src/pos.h: Include <stdbool.h>.
(pos_filename_has_spaces): New declaration.
* gettext-tools/src/pos.c: New file.
* gettext-tools/src/msgl-ofn.h: New file.
* gettext-tools/src/msgl-ofn.c: New file.
* gettext-tools/src/FILES: Update.
* gettext-tools/src/Makefile.am (noinst_HEADERS): Add msgl-ofn.h.
(COMMON_SOURCE): Add pos.c.
(libgettextsrc_la_SOURCES): Add msgl-ofn.c.
* gettext-tools/libgettextpo/Makefile.am (libgettextpo_la_AUXSOURCES): Likewise.
* gettext-tools/src/write-catalog.h (struct catalog_output_format): Add field
requires_utf8_for_filenames_with_spaces.
* gettext-tools/src/xgettext.c: Include pos.h, msgl-ofn.h.
(finalize_header): Convert the message domain to UTF-8 also when some message
has file names with spaces.
* gettext-tools/src/write-po.h (message_print_comment_filepos): Add charset
parameter.
* gettext-tools/src/write-po.c: Include pos.h.
(message_print_comment_filepos): Add charset parameter. If a file name has
spaces, enclose it in U+2068 and U+2069 characters.
(message_print, message_print_obsolete, output_format_po): Update.
* gettext-tools/src/write-properties.c (write_message,
output_format_properties): Update.
* gettext-tools/src/write-stringtable.c (output_format_stringtable): Update.
* gettext-tools/tests/xgettext-17: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

4 years agoUpdate after gnulib changed on 2017-06-17.
Bruno Haible [Sun, 4 Apr 2021 11:46:34 +0000 (13:46 +0200)] 
Update after gnulib changed on 2017-06-17.

* gnulib-local/lib/diffseq.h.diff: Remove file.
* gnulib-local/Makefile.am (EXTRA_DIST): Remove it.

4 years agoUpdate NEWS.
Bruno Haible [Sun, 21 Mar 2021 15:08:10 +0000 (16:08 +0100)] 
Update NEWS.

* NEWS: Mention that a build failure on macOS 11/arm64 is now fixed (through
gnulib).

4 years agoUpdate DEPENDENCIES.
Bruno Haible [Sun, 28 Feb 2021 23:14:46 +0000 (00:14 +0100)] 
Update DEPENDENCIES.

* DEPENDENCIES: Update info regarding libiconv. List pre-built package names.
Add awk as a normal dependency of a package with an Autoconf-generated configure
file.
* libtextstyle/DEPENDENCIES: Likewise.

4 years agoSupport creating shared libraries on MidnightBSD.
Bruno Haible [Sun, 21 Feb 2021 01:30:09 +0000 (02:30 +0100)] 
Support creating shared libraries on MidnightBSD.

Patch from <https://savannah.gnu.org/patch/?10007>.

* m4/libtool.m4: Treat MidnightBSD like FreeBSD.
* build-aux/ltmain.sh: Likewise.

4 years agoSwitch to autoconf-2.71.
Bruno Haible [Sun, 21 Feb 2021 01:28:40 +0000 (02:28 +0100)] 
Switch to autoconf-2.71.

* libtextstyle/autogen.sh: Update comments.

4 years agobuild: Avoid a warning in a configure test.
Bruno Haible [Sun, 31 Jan 2021 20:01:44 +0000 (21:01 +0100)] 
build: Avoid a warning in a configure test.

Reported through MacPorts.

* gettext-runtime/m4/intdiv0.m4 (gt_INTDIV0): Avoid shadowing the global 'nan()'
function.

4 years agoUpdate copyright years.
Bruno Haible [Fri, 8 Jan 2021 01:44:35 +0000 (02:44 +0100)] 
Update copyright years.

* Makefile.am: Update copyright years.

4 years agoUpdate after gnulib changed.
Bruno Haible [Thu, 7 Jan 2021 22:15:05 +0000 (23:15 +0100)] 
Update after gnulib changed.

* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Test
gt_localename_enhances_locale_funcs instead of gt_nameless_locales. Set
ENHANCE_LOCALE_FUNCS, not HAVE_NAMELESS_LOCALES.
* gettext-runtime/intl/Makefile.am (libgnuintl.h, libintl.h): Substitute
ENHANCE_LOCALE_FUNCS, not HAVE_NAMELESS_LOCALES.
* gettext-runtime/intl/libgnuintl.in.h: Test ENHANCE_LOCALE_FUNCS, not
HAVE_NAMELESS_LOCALES.
* gettext-runtime/intl/localename.c: Update from gnulib.
* gettext-runtime/m4/iconv.m4: Likewise.

4 years agoUpdate to the newest gnulib.
Bruno Haible [Thu, 7 Jan 2021 22:11:57 +0000 (23:11 +0100)] 
Update to the newest gnulib.

4 years agotests: Fix autopoint-1 test failure.
Bruno Haible [Fri, 1 Jan 2021 19:28:23 +0000 (20:28 +0100)] 
tests: Fix autopoint-1 test failure.

* gettext-tools/tests/autopoint-1: Update after 2020-12-28 commit.

4 years agotests: Add comments.
Bruno Haible [Fri, 1 Jan 2021 13:37:21 +0000 (14:37 +0100)] 
tests: Add comments.

* gettext-tools/tests/init.cfg: More comments about the Solaris gettext() bug.

4 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 1 Jan 2021 13:04:29 +0000 (14:04 +0100)] 
Update after gnulib changed.

* gettext-runtime/intl/verify.h: Update copyright years.
* gettext-runtime/intl/xsize.h: Likewise.
* gettext-runtime/m4/fcntl-o.m4: Likewise.
* gettext-runtime/m4/flexmember.m4: Likewise.
* gettext-runtime/m4/iconv.m4: Likewise.
* gettext-runtime/m4/intlmacosx.m4: Likewise.
* gettext-runtime/m4/inttypes_h.m4: Likewise.
* gettext-runtime/m4/nls.m4: Likewise.
* gettext-runtime/m4/progtest.m4: Likewise.
* gettext-runtime/m4/size_max.m4: Likewise.
* gettext-runtime/m4/stdint_h.m4: Likewise.
* gettext-runtime/m4/xsize.m4: Likewise.
* Makefile.am (distcheck-hook): Update.

4 years agobuild: Remove glibc21.m4 (unused since 2018-09-17).
Bruno Haible [Mon, 28 Dec 2020 13:12:27 +0000 (14:12 +0100)] 
build: Remove glibc21.m4 (unused since 2018-09-17).

* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Don't require gl_GLIBC21.
* gettext-tools/configure.ac: Don't invoke gl_GLIBC21.
* gettext-runtime/m4/glibc21.m4: Remove file.
* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Remove it.

4 years agoautopoint: When both configure.ac and configure.in exist, use the former.
Bruno Haible [Mon, 28 Dec 2020 13:40:17 +0000 (14:40 +0100)] 
autopoint: When both configure.ac and configure.in exist, use the former.

Reported by Eric Gallager <egall@gwmail.gwu.edu> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-12/msg00051.html>.

* gettext-tools/misc/autopoint.in (configure_in): Test for configure.ac before
testing for configure.in.

4 years agoUpdate after gnulib changed: Fix link errors on native Windows.
Bruno Haible [Mon, 28 Dec 2020 13:05:05 +0000 (14:05 +0100)] 
Update after gnulib changed: Fix link errors on native Windows.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC, GNULIB_MODULES_LIBGETTEXTPO): Add
strdup-posix.
Avoid the *-list-tests, since they reference a variable, leading to a problem
with --enable-shared.
* gettext-tools/libgettextpo/Makefile.am (config.h): Undefine GNULIB_GETCWD and
REPLACE_FCHDIR that are defined in the parent config.h.

4 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 25 Dec 2020 18:25:13 +0000 (19:25 +0100)] 
Update after gnulib changed.

* libtextstyle/configure.ac: Set GNULIB_MDA_ISATTY. This fixes a link error on
native Windows.

4 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 20 Dec 2020 22:42:14 +0000 (23:42 +0100)] 
Update after gnulib changed.

* autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC, GNULIB_MODULES_LIBGETTEXTPO): Add
'free'.
* gnulib-local/lib/libxml/parser.in.h: Include <stdlib.h>.
* gettext-tools/src/format.h: Likewise.
* gettext-tools/tests/gettextpo-1-prg.c: Undefine free.

4 years agolibtextstyle: Add accessor functions.
Bruno Haible [Tue, 15 Dec 2020 20:03:50 +0000 (21:03 +0100)] 
libtextstyle: Add accessor functions.

* libtextstyle/gnulib-local/lib/fd-ostream.oo.h (fd_ostream): New methods
get_descriptor, get_filename, is_buffered.
* libtextstyle/gnulib-local/lib/fd-ostream.oo.c (fd_ostream::get_descriptor,
fd_ostream::get_filename, fd_ostream::is_buffered): New functions.
* libtextstyle/gnulib-local/lib/file-ostream.oo.h (file_ostream): New method
get_stdio_stream.
* libtextstyle/gnulib-local/lib/file-ostream.oo.c
(file_ostream::get_stdio_stream): New function.
* libtextstyle/gnulib-local/lib/html-ostream.oo.h (html_ostream): New method
get_destination.
* libtextstyle/gnulib-local/lib/html-ostream.oo.c
(html_ostream::get_destination): New function.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.h: Include
html-ostream.h.
(html_styled_ostream): New methods get_destination, get_html_destination,
get_css_filename.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c (html_styled_ostream):
Add field 'css_filename'.
(html_styled_ostream::free): Free it.
(html_styled_ostream_create): Initialize it.
(html_styled_ostream::get_destination,
html_styled_ostream::get_html_destination,
html_styled_ostream::get_css_filename): New functions.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.h (iconv_ostream): New methods
get_from_encoding, get_to_encoding, get_destination.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c
(iconv_ostream::get_from_encoding, iconv_ostream::get_to_encoding,
iconv_ostream::get_destination): New functions.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.h (noop_styled_ostream):
New methods get_destination, is_owning_destination.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.c
(noop_styled_ostream::get_destination,
noop_styled_ostream::is_owning_destination): New functions.
* libtextstyle/gnulib-local/lib/term-ostream.oo.h (term_ostream): New methods
get_descriptor, get_filename, get_tty_control, get_effective_tty_control.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream): Add field
'tty_control'.
(term_ostream_create): Initialize it.
(term_ostream::get_descriptor, term_ostream::get_filename,
term_ostream::get_tty_control, term_ostream::get_effective_tty_control): New
functions.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.h (term_styled_ostream):
New methods get_destination, get_css_filename.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c (term_styled_ostream):
Add field 'css_filename'.
(term_styled_ostream::free): Free it.
(term_styled_ostream_create): Initialize it.
(term_styled_ostream::get_destination, term_styled_ostream::get_css_filename):
New functions.
* libtextstyle/lib/textstyle.h (file_ostream_get_stdio_stream,
fd_ostream_get_descriptor, fd_ostream_get_filename, fd_ostream_is_buffered,
term_ostream_get_descriptor, term_ostream_get_filename,
term_ostream_get_tty_control, term_ostream_get_effective_tty_control,
iconv_ostream_get_from_encoding, iconv_ostream_get_to_encoding,
iconv_ostream_get_destination, html_ostream_get_destination,
term_styled_ostream_get_destination, term_styled_ostream_get_css_filename,
html_styled_ostream_get_destination, html_styled_ostream_get_html_destination,
html_styled_ostream_get_css_filename, noop_styled_ostream_get_destination,
noop_styled_ostream_is_owning_destination): New declarations.
* libtextstyle/tests/test-accessors.c: New file.
* libtextstyle/tests/Makefile.am: Arrange to compile it.
* libtextstyle/doc/libtextstyle.texi (Accessors): New subsection.
* libtextstyle/NEWS: Mention the new functions.

4 years agolibtextstyle: Doc update.
Bruno Haible [Tue, 15 Dec 2020 19:43:12 +0000 (20:43 +0100)] 
libtextstyle: Doc update.

* libtextstyle/doc/libtextstyle.texi (The output stream hierarchy): Add
is_instance_of_* functions to the index.

4 years agolibtextstyle: Add is_instance_of_* predicates.
Bruno Haible [Mon, 14 Dec 2020 22:31:41 +0000 (23:31 +0100)] 
libtextstyle: Add is_instance_of_* predicates.

* libtextstyle/gnulib-local/lib/fd-ostream.oo.h (is_instance_of_fd_ostream): New
declaration.
* libtextstyle/gnulib-local/lib/fd-ostream.oo.c (is_instance_of_fd_ostream): New
function.
* libtextstyle/gnulib-local/lib/file-ostream.oo.h (is_instance_of_file_ostream):
New declaration.
* libtextstyle/gnulib-local/lib/file-ostream.oo.c (is_instance_of_file_ostream):
New function.
* libtextstyle/gnulib-local/lib/html-ostream.oo.h (is_instance_of_html_ostream):
New declaration.
* libtextstyle/gnulib-local/lib/html-ostream.oo.c (is_instance_of_html_ostream):
New function.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.h
(is_instance_of_html_styled_ostream): New declaration.
* libtextstyle/gnulib-local/lib/html-styled-ostream.oo.c
(is_instance_of_html_styled_ostream): New function.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.h
(is_instance_of_iconv_ostream): New declaration.
* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c
(is_instance_of_iconv_ostream): New function.
* libtextstyle/gnulib-local/lib/memory-ostream.oo.h
(is_instance_of_memory_ostream): New declaration.
* libtextstyle/gnulib-local/lib/memory-ostream.oo.c
(is_instance_of_memory_ostream): New function.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.h
(is_instance_of_noop_styled_ostream): New declaration.
* libtextstyle/gnulib-local/lib/noop-styled-ostream.oo.c
(is_instance_of_noop_styled_ostream): New function.
* libtextstyle/gnulib-local/lib/styled-ostream.oo.h
(is_instance_of_styled_ostream): New declaration.
* libtextstyle/gnulib-local/lib/styled-ostream.oo.c
(is_instance_of_styled_ostream): New function.
* libtextstyle/gnulib-local/lib/term-ostream.oo.h (is_instance_of_term_ostream):
New declaration.
* libtextstyle/gnulib-local/lib/term-ostream.oo.c (is_instance_of_term_ostream):
New function.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.h
(is_instance_of_term_styled_ostream): New declaration.
* libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c
(is_instance_of_term_styled_ostream): New function.
* libtextstyle/lib/textstyle.h (is_instance_of_styled_ostream,
is_instance_of_file_ostream, is_instance_of_fd_ostream,
is_instance_of_term_ostream, is_instance_of_memory_ostream,
is_instance_of_iconv_ostream, is_instance_of_html_ostream,
is_instance_of_term_styled_ostream, is_instance_of_html_styled_ostream,
is_instance_of_noop_styled_ostream): New declarations.
* libtextstyle/tests/test-instanceof.c: New file.
* libtextstyle/tests/Makefile.am: Arrange to compile it.
* libtextstyle/doc/libtextstyle.texi (The output stream hierarchy): Mention the
is_instance_of_* predicates.
* libtextstyle/NEWS: Mention the new functions.

4 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 14 Dec 2020 09:05:44 +0000 (10:05 +0100)] 
Update after gnulib changed.

* gettext-runtime/intl/threadlib.c: Update from gnulib.

4 years agoUpdate after gnulib changed.
Bruno Haible [Sat, 12 Dec 2020 12:30:15 +0000 (13:30 +0100)] 
Update after gnulib changed.

* gettext-tools/src/read-csharp.c (execute_and_read_po_output): Does not need
write access to the elements of prog_argv.
* gettext-tools/src/read-java.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-resources.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/write-resources.c (execute_writing_input): Likewise.
* gettext-tools/src/urlget.c (execute_it): Likewise.
(fetch): Update variable types and remove casts to 'char *'.
* gettext-tools/src/msginit.c (project_id, project_id_version, get_user_email,
language_team_address, plural_forms): Likewise.
* gettext-tools/src/read-tcl.c (msgdomain_read_tcl): Likewise.
* gettext-tools/src/x-ruby.c (extract_ruby): Likewise.
* gettext-tools/src/msgexec.c (sub_argv): Change type to 'const char **'.
(main): Remove casts to 'char *'.

4 years agoUpdate to the newest gnulib.
Bruno Haible [Sat, 12 Dec 2020 12:20:50 +0000 (13:20 +0100)] 
Update to the newest gnulib.

4 years agointl: Support the AIX 7 locale names.
Bruno Haible [Thu, 10 Dec 2020 16:01:43 +0000 (17:01 +0100)] 
intl: Support the AIX 7 locale names.

* gettext-runtime/intl/explodename.c (_nl_find_language): Remove function.
(_nl_explode_name): Inline it here. On AIX, lowercase the language and map a
script identifier to a modifier.
* NEWS: Mention it.

4 years agobuild: Allow building with Autoconf 2.70.
Bruno Haible [Wed, 9 Dec 2020 20:43:31 +0000 (21:43 +0100)] 
build: Allow building with Autoconf 2.70.

* libtextstyle/autogen.sh: Update comment.

4 years agoxgettext: Make --directory option work right with Ruby input files.
Bruno Haible [Fri, 4 Dec 2020 21:49:27 +0000 (22:49 +0100)] 
xgettext: Make --directory option work right with Ruby input files.

* gettext-tools/src/xgettext.c (extract_from_file_func): Add found_in_dir
argument.
(xgettext_find_file): Return also the directory that was used to find the file.
(extract_from_file): Pass the directory to the extractor.
* gettext-tools/src/x-ruby.h (extract_ruby): Add found_in_dir argument.
* gettext-tools/src/x-ruby.c (extract_ruby): Add found_in_dir argument. Pass the
logical_filename to rxgettext, and run rxgettext in the given directory.
* gettext-tools/tests/xgettext-16: New file.
* gettext-tools/tests/Makefile.am (TESTS): Add it.

4 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 4 Dec 2020 06:48:53 +0000 (07:48 +0100)] 
Update after gnulib changed.

* gettext-tools/po/POTFILES.in: Update.

4 years agoUpdate after gnulib changed.
Bruno Haible [Wed, 2 Dec 2020 18:49:40 +0000 (19:49 +0100)] 
Update after gnulib changed.

* gettext-tools/src/urlget.c (execute_it, fetch): Update 'execute' invocations.
* gettext-tools/src/msginit.c (project_id, project_id_version, get_user_email,
language_team_address, plural_forms): Update create_pipe_in invocations.
* gettext-tools/src/read-csharp.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-java.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-resources.c (execute_and_read_po_output): Likewise.
* gettext-tools/src/read-tcl.c (msgdomain_read_tcl): Likewise.
* gettext-tools/src/x-ruby.c (extract_ruby): Likewise.
* gettext-tools/src/msgexec.c (process_string): Update create_pipe_out
invocation.
* gettext-tools/src/write-resources.c (execute_writing_input): Likewise.

4 years agoUpdate to newest gnulib.
Bruno Haible [Wed, 2 Dec 2020 17:34:48 +0000 (18:34 +0100)] 
Update to newest gnulib.

4 years agotests: Fix typos on scheme-format test.
Miguel Arruga Vivas [Mon, 31 Dec 2018 10:38:36 +0000 (11:38 +0100)] 
tests: Fix typos on scheme-format test.

* gettext-tools/tests/format-scheme-2: Fix typos.

4 years agobuild: Remove the need for an autoconf test.
Bruno Haible [Sat, 21 Nov 2020 21:37:30 +0000 (22:37 +0100)] 
build: Remove the need for an autoconf test.

* gettext-runtime/intl/intl-exports.c (IMP): Use predefined preprocessor symbol
tests, not USER_LABEL_PREFIX_UNDERSCORE.
* gettext-runtime/configure.ac (INTL_EXPORTS_FLAGS): Remove variable.
* gnulib-local/modules/gettext-runtime-misc (Makefile.am): Don't use
INTL_EXPORTS_FLAGS.
* gettext-tools/woe32dll/export.h (IMP): Use predefined preprocessor symbol
tests, not USER_LABEL_PREFIX_UNDERSCORE.
* gettext-tools/configure.ac (GETTEXTLIB_EXPORTS_FLAGS): Don't define USER_LABEL_PREFIX_UNDERSCORE.

4 years agoxgettext: Add support for gettext-like functions with wide string argument.
Bruno Haible [Sat, 14 Nov 2020 17:55:17 +0000 (18:55 +0100)] 
xgettext: Add support for gettext-like functions with wide string argument.

Reported by Érico Nogueira <ericonr@disroot.org> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-11/msg00013.html>.

* gettext-tools/src/x-c.c (phase5_get): Recognize also the string-literal
prefixes 'u', 'U', 'L'. Consider all types of C++ raw strings as relevant.
* gettext-tools/tests/xgettext-c-5: Add more test cases.
* gettext-tools/tests/xgettext-c-c++-1: Likewise.
* NEWS: Mention it.

4 years agobuild: Fix warnings emitted by autoconf-2.69d.
Bruno Haible [Sat, 14 Nov 2020 13:53:19 +0000 (14:53 +0100)] 
build: Fix warnings emitted by autoconf-2.69d.

* gettext-tools/configure.ac: Use AC_LINK_IFELSE instead of AC_TRY_LINK. Don't
invoke AC_FUNC_VFORK.
* gettext-tools/m4/exported.m4 (gt_GLOBAL_SYMBOL_PIPE): Require LT_PATH_NM
instead of AC_PROG_NM.
* gnulib-local/m4/libxml.m4 (gl_LIBXML): Use AC_LINK_IFELSE instead of
AC_TRY_LINK. Use AC_PREPROC_IFELSE instead of AC_TRY_CPP.
* libtextstyle/configure.ac: Use AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER.
* libtextstyle/gnulib-local/m4/libcroco.m4 (gl_LIBCROCO): Use AC_LINK_IFELSE
instead of AC_TRY_LINK.
* libtextstyle/gnulib-local/m4/libglib.m4 (gl_LIBGLIB): Use AC_LINK_IFELSE
instead of AC_TRY_LINK. Require AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
* libtextstyle/gnulib-local/m4/termcap.m4 (gl_TERMCAP_BODY): Use AC_LINK_IFELSE
instead of AC_TRY_LINK.
* libtextstyle/gnulib-local/m4/terminfo.m4 (gl_TERMINFO_BODY): Use
AC_LINK_IFELSE instead of AC_TRY_LINK.
* m4/woe32-dll.m4 (gl_WOE32_DLL): Use AC_LINK_IFELSE instead of AC_TRY_LINK.

4 years agobuild: Set permissions of test scripts consistently.
Bruno Haible [Sun, 25 Oct 2020 20:47:23 +0000 (21:47 +0100)] 
build: Set permissions of test scripts consistently.

Reported by Khem Raj <raj.khem@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2020-09/msg00007.html>.

* gettext-tools/tests/msgmerge-29: Make executable.

4 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 18 Oct 2020 11:52:32 +0000 (13:52 +0200)] 
Update after gnulib changed.

* gnulib-local/lib/hash.h.diff: Update.
* gnulib-local/lib/hash.c.diff: Likewise.

4 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 18 Oct 2020 11:48:15 +0000 (13:48 +0200)] 
Update to newest gnulib.

4 years agoFix "warning: implicit declaration of function 'open'/'read'/'close'".
Bruno Haible [Sun, 18 Oct 2020 11:42:41 +0000 (13:42 +0200)] 
Fix "warning: implicit declaration of function 'open'/'read'/'close'".

* gettext-runtime/intl/loadmsgcat.c: Include <io.h>.
(open, read, close): New macros on native Windows.

4 years agoFix "warning: 'max' macro redefined".
Bruno Haible [Sat, 17 Oct 2020 19:55:47 +0000 (21:55 +0200)] 
Fix "warning: 'max' macro redefined".

* gettext-tools/src/x-javascript.c (max): Undefine first.
* gettext-tools/src/x-python.c (max): Likewise.

4 years agoUpdate after gnulib changed.
Bruno Haible [Mon, 12 Oct 2020 00:09:10 +0000 (02:09 +0200)] 
Update after gnulib changed.

* autogen.sh: Don't copy attribute.h, as it would have the wrong copyright header.
* gettext-runtime/intl/attribute.h: New file, from gnulib.
* gettext-runtime/intl/arg-nonnull.h: Update from gnulib.
* gettext-runtime/intl/localename.c: Likewise.
* gettext-runtime/intl/vasnprintf.c: Likewise.
* gettext-runtime/intl/verify.h: Likewise.
* gettext-runtime/libasprintf/vasnprintf.c: Likewise.
* gettext-runtime/m4/fcntl-o.m4: Likewise.
* gettext-runtime/m4/iconv.m4: Likewise.
* gettext-runtime/intl/thread-optim.h: New file, from gnulib.
* gettext-runtime/intl/Makefile.am (EXTRA_DIST): Add thread-optim.h.
* Makefile.am (distcheck-hook): Check also thread-optim.h.

4 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 11 Oct 2020 23:58:46 +0000 (01:58 +0200)] 
Update to newest gnulib.

4 years agobuild: Modernize autoconf macros.
Bruno Haible [Sun, 4 Oct 2020 21:44:52 +0000 (23:44 +0200)] 
build: Modernize autoconf macros.

* gettext-runtime/m4/intdiv0.m4 (gt_INTDIV0): Improve m4 quoting.
* gettext-runtime/m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Improve indentation.
* gettext-tools/m4/hostname.m4 (gt_PREREQ_HOSTNAME): Improve m4 quoting. Use
AC_CACHE_CHECK and AC_COMPILE_IFELSE.
* gettext-tools/m4/siginfo.m4 (gt_SIGINFO): Improve m4 quoting. Use
AC_COMPILE_IFELSE.

4 years agobuild: Assume ANSI C declaration of 'setlocale'.
Bruno Haible [Sun, 4 Oct 2020 21:40:53 +0000 (23:40 +0200)] 
build: Assume ANSI C declaration of 'setlocale'.

* gettext-tools/tests/setlocale.c (setlocale): Assume SETLOCALE_CONST is
'const'.
* gettext-tools/tests/format-c-3-prg.c: Likewise.
* gettext-tools/tests/format-c-4-prg.c: Likewise.
* gettext-tools/tests/plural-1-prg.c: Likewise.
* gettext-tools/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise.
* gettext-tools/configure.ac: Don't invoke gt_SETLOCALE.
* gettext-tools/m4/setlocale.m4: Remove file.
* gettext-tools/m4/Makefile.am (EXTRA_DIST): Remove it.

4 years agoImprove code style.
Bruno Haible [Mon, 7 Sep 2020 00:08:26 +0000 (02:08 +0200)] 
Improve code style.

* gettext-tools/src/cldr-plural-exp.c: Indent and parenthesize for better
readability.

4 years agoFix "warning: no previous extern declaration for non-static variable".
Bruno Haible [Sun, 6 Sep 2020 23:43:59 +0000 (01:43 +0200)] 
Fix "warning: no previous extern declaration for non-static variable".

* gettext-tools/src/write-desktop.c (msgfmt_methods): Make 'static'.
* gettext-tools/src/x-desktop.c (extract_methods): Likewise.

4 years agoFix "warning: this function declaration is not a prototype".
Bruno Haible [Sun, 6 Sep 2020 23:33:56 +0000 (01:33 +0200)] 
Fix "warning: this function declaration is not a prototype".

* gnulib-local/lib/xgetcwd.c (xgetcwd): Use ANSI C prototype syntax.

4 years agoFix "warning: no previous prototype for function 'its_*_eval'".
Bruno Haible [Sun, 6 Sep 2020 23:31:26 +0000 (01:31 +0200)] 
Fix "warning: no previous prototype for function 'its_*_eval'".

* gettext-tools/src/its.c (its_translate_rule_eval,
its_localization_note_rule_eval, its_element_within_text_rule_eval,
its_preserve_space_rule_eval, its_extension_context_rule_eval,
its_extension_escape_rule_eval): Make 'static'.

4 years agoFix "warning: no previous prototype for function 'locating_rule_list_destroy'".
Bruno Haible [Sun, 6 Sep 2020 23:26:42 +0000 (01:26 +0200)] 
Fix "warning: no previous prototype for function 'locating_rule_list_destroy'".

* gettext-tools/src/locating-rule.c (locating_rule_list_destroy): Make 'static'.

4 years agoFix "warning: no previous prototype for function 'xgetcwd'".
Bruno Haible [Sun, 6 Sep 2020 23:24:03 +0000 (01:24 +0200)] 
Fix "warning: no previous prototype for function 'xgetcwd'".

* gnulib-local/lib/xgetcwd.c: Include "xgetcwd.h".

4 years agoFix "warning: unannotated fall-through between switch labels".
Bruno Haible [Sun, 6 Sep 2020 23:08:11 +0000 (01:08 +0200)] 
Fix "warning: unannotated fall-through between switch labels".

* autogen.sh (GNULIB_MODULES_RUNTIME_FOR_SRC, GNULIB_MODULES_TOOLS_FOR_SRC,
GNULIB_MODULES_LIBGETTEXTPO): Add 'attribute'.
* libtextstyle/autogen.sh (GNULIB_MODULES): Likewise.
* gettext-runtime/intl/plural.y: Include attribute.h. Use FALLTHROUGH annotated
empty statements instead of /* FALLTHROUGH */ comments.
* gettext-runtime/src/gettext.c: Likewise.
* gettext-runtime/src/ngettext.c: Likewise.
* gettext-tools/src/format-boost.c: Likewise.
* gettext-tools/src/read-stringtable.c: Likewise.
* gettext-tools/src/write-csharp.c: Likewise.
* gettext-tools/src/write-java.c: Likewise.
* gettext-tools/src/write-po.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-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-perl.c: Likewise.
* gettext-tools/src/x-php.c: Likewise.
* gettext-tools/src/x-python.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/tests/tstgettext.c: Likewise.
* gettext-tools/tests/tstngettext.c: Likewise.
* libtextstyle/gnulib-local/lib/tparm.c: Likewise.
* gettext-runtime/src/escapes.h: Use FALLTHROUGH annotated empty statements
instead of /* FALLTHROUGH */ comments.

4 years agoFix "warning: cast from 'const void *' to 'char *' drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 21:26:02 +0000 (23:26 +0200)] 
Fix "warning: cast from 'const void *' to 'char *' drops const qualifier".

* libtextstyle/gnulib-local/lib/iconv-ostream.oo.c (iconv_ostream::write_mem):
Add 'const'.

4 years agoFix "warning: cast from 'const void *' to 'char *' drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 21:23:58 +0000 (23:23 +0200)] 
Fix "warning: cast from 'const void *' to 'char *' drops const qualifier".

* libtextstyle/gnulib-local/lib/html-ostream.oo.c (html_ostream::write_mem): Add
'const'.

4 years agoFix "warning: cast from 'const void *' to 'char *' drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 21:07:51 +0000 (23:07 +0200)] 
Fix "warning: cast from 'const void *' to 'char *' drops const qualifier".

* libtextstyle/gnulib-local/lib/fd-ostream.oo.c (fd_ostream::write_mem): Add
'const'.

4 years agoFix "warning: cast ... drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 21:19:33 +0000 (23:19 +0200)] 
Fix "warning: cast ... drops const qualifier".

* gnulib-local/lib/markup.c (slow_name_validate): Add 'const'.

4 years agoFix "warning: cast from 'const void *' to 'struct pre_message *' drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 21:01:39 +0000 (23:01 +0200)] 
Fix "warning: cast from 'const void *' to 'struct pre_message *' drops const qualifier".

* gettext-tools/src/write-mo.c (compare_id): Add 'const'.

4 years agoFix "warning: cast from 'const char *' to 'char *' drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 20:42:44 +0000 (22:42 +0200)] 
Fix "warning: cast from 'const char *' to 'char *' drops const qualifier".

* gettext-tools/src/str-list.h (string_list_append_unique_desc,
string_list_member_desc): New declarations.
* gettext-tools/src/str-list.c (string_list_append_unique_desc,
string_list_member_desc): New functions.
* gettext-tools/src/msgfmt.c (add_languages): Don't modify the contents of
'line'.

4 years agoFix "warning: cast from 'const void *' to 'struct compiled_kwset *' drops const quali...
Bruno Haible [Sun, 6 Sep 2020 20:18:28 +0000 (22:18 +0200)] 
Fix "warning: cast from 'const void *' to 'struct compiled_kwset *' drops const qualifier".

* gettext-tools/libgrep/m-fgrep.c (Fexecute): Add 'const'.

4 years agoFix "warning: cast from 'const void *' to 'const char **' drops const qualifier".
Bruno Haible [Sun, 6 Sep 2020 20:13:05 +0000 (22:13 +0200)] 
Fix "warning: cast from 'const void *' to 'const char **' drops const qualifier".

* gettext-runtime/src/envsubst.c (cmp_string): Add 'const'.

4 years agomsgfmt: Simplify code.
Bruno Haible [Sun, 6 Sep 2020 20:59:49 +0000 (22:59 +0200)] 
msgfmt: Simplify code.

* gettext-tools/src/msgfmt.c (msgfmt_desktop_bulk): Simplify.

4 years agoFix matching of languages in the LINGUAS environment variable.
Bruno Haible [Sun, 6 Sep 2020 19:28:50 +0000 (21:28 +0200)] 
Fix matching of languages in the LINGUAS environment variable.

Setting LINGUAS e.g. to "frs" should not cause fr.mo to get installed,
because Frisian is not a variant of French.

Reported by <arfrever.fta@gmail.com> in <https://savannah.gnu.org/bugs/?59062>.

* gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Don't
consider $desiredlang a variant of $presentlang unless it has the syntax of a
variant.

4 years agoUpdate after gnulib changed.
Bruno Haible [Sun, 6 Sep 2020 10:04:35 +0000 (12:04 +0200)] 
Update after gnulib changed.

* configure.ac (AC_PREREQ): Bump minimum Autoconf version to 2.64.
* gettext-runtime/configure.ac (AC_PREREQ): Likewise.
* gettext-runtime/libasprintf/configure.ac (AC_PREREQ): Likewise.
* libtextstyle/configure.ac (AC_PREREQ): Likewise.
* gettext-tools/configure.ac (AC_PREREQ): Likewise.
* gettext-tools/examples/configure.ac (AC_PREREQ): Likewise.

4 years agoUpdate to newest gnulib.
Bruno Haible [Sun, 6 Sep 2020 10:04:08 +0000 (12:04 +0200)] 
Update to newest gnulib.

4 years agobuild: Add support for clang on Windows.
Bruno Haible [Sun, 6 Sep 2020 09:48:45 +0000 (11:48 +0200)] 
build: Add support for clang on Windows.

* m4/woe32-dll.m4 (gl_WOE32_DLL): Set gl_cv_ld_autoimport to 'no' on
MSVC and MSVC/clang.

5 years agoOptimize also for clang.
Bruno Haible [Sun, 16 Aug 2020 14:07:23 +0000 (16:07 +0200)] 
Optimize also for clang.

* gnulib-local/lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Set to 1
also on clang.

5 years agoOptimize also for clang.
Bruno Haible [Sun, 16 Aug 2020 14:00:40 +0000 (16:00 +0200)] 
Optimize also for clang.

* gnulib-local/lib/gettext.h (pgettext_aux, npgettext_aux, dcpgettext_expr,
dcnpgettext_expr): Inline also on clang.

5 years agoFix quoting of AC_LANG_SOURCE arguments.
Bruno Haible [Sun, 16 Aug 2020 12:02:31 +0000 (14:02 +0200)] 
Fix quoting of AC_LANG_SOURCE arguments.

* gettext-tools/m4/locale-de.m4 (gt_LOCALE_DE_UTF8): Simplify m4 quoting.

5 years agoUpdate after gnulib changed.
Bruno Haible [Fri, 7 Aug 2020 19:21:56 +0000 (21:21 +0200)] 
Update after gnulib changed.

* gettext-runtime/intl/verify.h: Update from gnulib.
* gettext-runtime/intl/vasnprintf.c: Likewise.
* gettext-runtime/libasprintf/vasnprintf.c: Likewise.

5 years agoUpdate to the newest gnulib.
Bruno Haible [Fri, 7 Aug 2020 19:21:10 +0000 (21:21 +0200)] 
Update to the newest gnulib.

5 years agoUpdate to newest gnulib.
Bruno Haible [Fri, 7 Aug 2020 00:37:46 +0000 (02:37 +0200)] 
Update to newest gnulib.

5 years agoPrefer documented autoconf macro 'm4_if' over 'ifelse'.
Bruno Haible [Sat, 1 Aug 2020 20:43:45 +0000 (22:43 +0200)] 
Prefer documented autoconf macro 'm4_if' over 'ifelse'.

* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Use m4_if instead of ifelse.
* gettext-runtime/m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.

5 years agoAdd comment about test failures on Cygwin.
Bruno Haible [Sat, 1 Aug 2020 16:31:23 +0000 (18:31 +0200)] 
Add comment about test failures on Cygwin.

* gettext-tools/tests/msginit-3: Add comment about a possible test failure.
* gettext-tools/tests/msginit-4: Likewise.

5 years agoFix build failure with bison 3.7. Revisit bison Makefile rules.
Bruno Haible [Sat, 1 Aug 2020 15:25:10 +0000 (17:25 +0200)] 
Fix build failure with bison 3.7. Revisit bison Makefile rules.

* gettext-runtime/intl/Makefile.am ($(srcdir)/plural.c): Keep and distribute the
plural.h file. Don't use --output option.
* gettext-tools/src/Makefile.am (YACC): Removed unused variable.
(po-gram-gen.c, po-gram-gen.h): Correct the #line statements in the generated
files.
(po-gram-gen2.h): Likewise.
(cldr-plural.c, cldr-plural.h): Likewise.

5 years agobuild: Fix build failure on Cygwin and mingw.
Michele Locati [Thu, 30 Jul 2020 16:58:02 +0000 (18:58 +0200)] 
build: Fix build failure on Cygwin and mingw.

* gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_ruby.

5 years agoUpdate to newest gnulib.
Bruno Haible [Wed, 29 Jul 2020 01:16:29 +0000 (03:16 +0200)] 
Update to newest gnulib.