2019-05-12  Bruno Haible  <bruno@clisp.org>

	intl: Fix wrong libtool versioning information.
	Reported by Ken Takata <ktakata65536@gmail.com>
	in <https://savannah.gnu.org/bugs/?56305>.

	* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 9:6:1, not 9:6:2.
	* NEWS: Mention the change.

2019-05-11  Bruno Haible  <bruno@clisp.org>

	intl: Remove obsolete code.
	* gettext-runtime/intl/plural.y: Assume bison >= 2.0.

	Update after gnulib changed.
	* autogen.sh: Don't copy intl.m4.
	* Makefile.am (distcheck-hook): Don't check glibc2.m4, glibc21.m4, intdiv0.m4,
	intl.m4, intmax.m4, printf-posix.m4, uintmax_t.m4, visibility.m4.
	* gettext-runtime/intl/verify.h: Update from gnulib.

2019-04-28  Bruno Haible  <bruno@clisp.org>

	Update after gnulib changed.

2019-04-27  Bruno Haible  <bruno@clisp.org>

	intl: Use the lookup optimization also on platforms without per-thread locales.
	This bug was introduced on 2007-01-27.

	* gettext-runtime/intl/dcigettext.c (DCIGETTEXT): Fix #ifdef/#endif chain.

2019-04-27  Bruno Haible  <bruno@clisp.org>

	intl: Fix a gcc warning.
	* gettext-runtime/intl/langprefs.c (_nl_language_preferences_win32_95): Declare
	data as BYTE array, not char array.

2019-04-26  Bruno Haible  <bruno@clisp.org>

	build: Fix build failure on mingw with --disable-shared --enable-relocatable.
	Reported by Michele Locati <michele@locati.it>
	in <https://lists.gnu.org/archive/html/bug-gettext/2019-04/msg00052.html>.

	* gettext-runtime/intl/Makefile.am (AM_CPPFLAGS): Map 'relocate2' to a different
	symbol.

2019-04-14  Bruno Haible  <bruno@clisp.org>

	Prepare for 0.20 release.
	* gettext-runtime/intl/libgnuintl.in.h (LIBINTL_VERSION): Update.
	* gettext-tools/libgettextpo/gettext-po.in.h (LIBGETTEXTPO_VERSION): Update.
	* gettext-runtime/m4/gettext.m4: Bump version number in comment.
	* gettext-runtime/m4/intl.m4: Likewise.
	* gettext-runtime/m4/intlmacosx.m4: Likewise.
	* gettext-runtime/m4/po.m4: Likewise.
	(GETTEXT_MACRO_VERSION): Bump to 0.20.
	* gettext-runtime/po/Makefile.in.in (GETTEXT_MACRO_VERSION): Likewise.
	* gettext-runtime/intl/Makefile.am (LTV_*): Bump to 9:6:2.
	* gettext-tools/libgettextpo/Makefile.am (LTV_*): Bump to 5:5:5.
	* gettext-tools/configure.ac (ARCHIVE_VERSION): Set to 0.20.
	* gettext-tools/misc/autopoint.in: Accept version 0.20.
	* gettext-runtime/doc/matrix.texi: Update from TP.
	* gettext-runtime/doc/nls.texi (STATUS): Update.
	* gettext-runtime/src/envsubst.c (main): Update copyright year in --version
	output.
	* gettext-runtime/src/gettext.c (main): Likewise.
	* gettext-runtime/src/ngettext.c (main): Likewise.
	* gettext-tools/src/cldr-plurals.c (main): Likewise.
	* gettext-tools/src/hostname.c (main): Likewise.
	* gettext-tools/src/msgattrib.c (main): Likewise.
	* gettext-tools/src/msgcat.c (main): Likewise.
	* gettext-tools/src/msgcmp.c (main): Likewise.
	* gettext-tools/src/msgcomm.c (main): Likewise.
	* gettext-tools/src/msgconv.c (main): Likewise.
	* gettext-tools/src/msgen.c (main): Likewise.
	* gettext-tools/src/msgexec.c (main): Likewise.
	* gettext-tools/src/msgfilter.c (main): Likewise.
	* gettext-tools/src/msgfmt.c (main): Likewise.
	* gettext-tools/src/msggrep.c (main): Likewise.
	* gettext-tools/src/msginit.c (main): Likewise.
	* gettext-tools/src/msgmerge.c (main): Likewise.
	* gettext-tools/src/msgunfmt.c (main): Likewise.
	* gettext-tools/src/msguniq.c (main): Likewise.
	* gettext-tools/src/recode-sr-latin.c (main): Likewise.
	* gettext-tools/src/urlget.c (main): Likewise.
	* gettext-tools/src/xgettext.c (main): Likewise.
	* gettext-runtime/src/gettext.sh.in (func_version): Update copyright year.
	* gettext-tools/misc/convert-archive.in (func_version): Likewise.
	* gettext-tools/misc/gettextize.in (func_version): Likewise.
	* libtextstyle/version.sh: Use version number 0.20 here as well.
	* gettext-runtime/NEWS: Mention changes (from main NEWS).
	* libtextstyle/NEWS: Mention changes.

2019-03-30  Bruno Haible  <bruno@clisp.org>

	Update after gnulib changed.

2019-03-13  Bruno Haible  <bruno@clisp.org>

	build: Update Windows support.
	* gettext-runtime/intl/libintl.rc: Update.
	* gettext-tools/libgettextpo/libgettextpo.rc: Likewise.
	* windows/gettext.rc: Likewise.

2019-02-24  Bruno Haible  <bruno@clisp.org>

	libintl: Fix installation with BSD 'make'.
	* gettext-runtime/intl/Makefile.am (install-exec-libintl): Create destination
	directory first.

2019-02-04  Bruno Haible  <bruno@clisp.org>

	Fix copyright years.

2019-01-06  Bruno Haible  <bruno@clisp.org>

	Update after gnulib changed.

2018-11-25  Bruno Haible  <bruno@clisp.org>

	intl: Really uninstall the intl/ subdir sources.
	* gettext-runtime/intl/Makefile.am (uninstall-sources): New target.

	build: Use Automake in intl subdirectory.
	* gettext-runtime/intl/Makefile.am: New file, based on
	gettext-runtime/intl/Makefile.in.
	* gettext-runtime/intl/Makefile.in: Remove file.
	* autogen.sh: Copy gettext-runtime/intl/Makefile.am to
	gettext-tools/intl/Makefile.am.
	* gettext-runtime/configure.ac (USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL,
	PACKAGE_IS_GETTEXT_TOOLS, PRELOADABLE_LIBINTL): New conditionals.
	* gettext-tools/configure.ac: Likewise.

	build: Stop generating a VERSION file.
	* gettext-tools/configure.ac: Don't create intl/VERSION.
	* gettext-runtime/intl/Makefile.in (DISTFILES.normal): Remove variable.
	(distclean): Simplify accordingly.

	build: Fix #line statements in bison-generated files.
	* gettext-tools/src/plural-exp.c: Revert changes from 2014-12-03 and 2014-12-04.
	* gettext-runtime/intl/Makefile.in (PLURAL_OBJECT): Remove variable.
	(OBJECTS): Use plural.lo always.
	($(srcdir)/plural.c): New rule.
	(.y.c, pluralx.c, pluralx.lo): Remove rules.
	(mostlyclean): Delete the temporary file of the plural.c rule.
	(maintainer-clean): Delete plural.c.
	* gettext-tools/configure.ac (intl/Makefile): Remove PLURAL_OBJECT hack.

	intl: Fix gettext test failures on mingw.
	* gettext-runtime/intl/localename.c (gl_locale_name_posix): Convert the result
	of gl_locale_name_environ to XPG syntax.

	Amend 'Stop installing the intl/ subdir sources.' commit from 2018-11-11.
	* gettext-runtime/intl/Makefile.in (install-data, uninstall): Remove the entire
	$prefix/share/gettext/intl directory.

2018-11-18  Bruno Haible  <bruno@clisp.org>

	Simplify Autoconf macros.
	* gettext-runtime/m4/intldir.m4: Remove file.
	* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Remove intldir.m4.
	* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Disallow 'no-libtool'
	argument. Use libtool always. Remove variables that existed only for backward
	compatibility.
	* gettext-runtime/m4/intl.m4: Update comments.
	* autogen.sh: Ignore gettext.m4 and intl.m4 from gnulib.
	* gettext-runtime/intl/Makefile.in: Use libtool always.
	(libintl.a, libgnuintl.a): Remove rule.
	(.o): Remove suffix rule.
	(install-exec, installdirs, uninstall, distclean, dist, distdir): PACKAGE cannot
	be anything else than gettext-runtime and gettext-tools any more.
	* gettext-tools/configure.ac (intl/Makefile): Update.
	* NEWS: Mention that AM_GNU_GETTEXT_INTL_SUBDIR is gone.

2018-11-11  Bruno Haible  <bruno@clisp.org>

	Stop installing the intl/ subdir sources.
	* gettext-runtime/intl/Makefile.in (gettextsrcdir): Remove variable.
	(DISTFILES.obsolete): Remove variable.
	(install-data): Don't install nor remove anything.
	(installdirs): Don't create $(gettextsrcdir).
	* gettext-tools/misc/add-to-archive: Don't add the intl directory to the
	archive.
	* PACKAGING: Remove mention of $prefix/share/gettext/intl/ directory.

2018-10-23  Bruno Haible  <bruno@clisp.org>

	intl: Improve support for per-thread locales on Solaris 11.4.
	* gettext-runtime/intl/localename.c: Update from gnulib:
	Handle HAVE_SOLARIS114_LOCALES through Solaris specific code.
	* gettext-runtime/intl/localename-table.in.h: Update from gnulib's
	localename-table.h.
	* gettext-runtime/intl/localename-table.c: Update from gnulib.
	* gettext-runtime/m4/intl-thread-locale.m4: Renamed from
	gettext-runtime/m4/intlsolaris.m4.
	(gt_INTL_THREAD_LOCALE_NAME): Renamed from gt_INTL_SOLARIS. Define
	HAVE_SOLARIS114_LOCALES instead of HAVE_NAMELESS_LOCALES.
	* gettext-runtime/m4/intl.m4: Update from gnulib:
	(AM_INTL_SUBDIR): Require gt_INTL_THREAD_LOCALE_NAME. Test for 'uselocale'. Set
	HAVE_NAMELESS_LOCALES.
	(gt_INTL_SUBDIR_CORE): Don't invoke gt_INTL_SOLARIS. Don't set
	HAVE_NAMELESS_LOCALES here.
	* gettext-runtime/m4/Makefile.am (EXTRA_DIST): List intl-thread-locale.m4, not
	intlsolaris.m4.
	* gettext-tools/m4/Makefile.am (aclocal_DATA): List intl-thread-locale.m4, not
	intlsolaris.m4.
	* gettext-tools/misc/gettextize.in (m4filelist): List intl-thread-locale.m4, not
	intlsolaris.m4.
	* Makefile.am (distcheck-hook): Check intl-thread-locale.m4, not intlsolaris.m4.
	* gettext-tools/doc/gettext.texi (aclocal): List intl-thread-locale.m4, not
	intlsolaris.m4.
	* PACKAGING: List intl-thread-locale.m4, not intlsolaris.m4.

	intl: Fix support for per-thread locales on Solaris 11.4.
	* gettext-runtime/intl/localename-table.in.h: Renamed from
	gettext-runtime/intl/localename-table.h.
	* gettext-runtime/intl/Makefile.in (HEADERS): Add localename-table.in.h. Remove
	localename-table.h.
	(localename-table.h): New target.
	(localename.$lo, localename-table.$lo): Update dependencies.
	(mostlyclean): Remove localename-table.h.

2018-10-23  Bruno Haible  <bruno@clisp.org>

	intl: Add support for per-thread locales on Solaris 11.4.
	Relies on the recent changes to the 'localename' module in gnulib.

	* gettext-runtime/intl/localename.c: Apply changes from gnulib.
	* gettext-runtime/intl/localename-table.h: New file, from gnulib.
	* gettext-runtime/intl/localename-table.c: New file, from gnulib.
	* gettext-runtime/intl/libgnuintl.in.h (newlocale, duplocale, freelocale): New
	overriding declarations.
	* gettext-runtime/intl/Makefile.in (HEADERS): Add localename-table.h.
	(SOURCES): Add localename-table.c.
	(OBJECTS): Add localename-table.$lo.
	(localename-table.lo): New target.
	(libgnuintl.h, libintl.h): Substitute also HAVE_NAMELESS_LOCALES.
	* gettext-runtime/m4/intl.m4: Apply changes from gnulib:
	(gt_INTL_SUBDIR_CORE): Don't test for 'uselocale' and 'getlocalename_l'.
	Instead, invoke gt_INTL_SOLARIS. Set HAVE_NAMELESS_LOCALES.
	* gettext-runtime/m4/intlsolaris.m4: New file, from gnulib.
	* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Add it.
	* gettext-tools/m4/Makefile.am (aclocal_DATA): Add intlsolaris.m4.
	* gettext-tools/misc/gettextize.in (m4filelist): Add intlsolaris.m4.
	* Makefile.am (distcheck-hook): Verify that intlsolaris.m4 is consistent with
	gnulib.
	* gettext-tools/doc/gettext.texi (aclocal): Add intlsolaris.m4 to the file list.
	* PACKAGING: Add intlsolaris.m4 to the list of installed files.
	* NEWS: Mention the change.

2018-10-05  Bruno Haible  <bruno@clisp.org>

	Update after gnulib changed.
	* gettext-runtime/intl/vasnprintf.c: Update from gnulib.
	* gettext-runtime/libasprintf/vasnprintf.c: Update from gnulib.

2018-09-17  Bruno Haible  <bruno@clisp.org>

	Update after gnulib changed.
	* gnulib-local/modules/fnmatch.diff: Update.
	* gettext-runtime/intl/config.charset: Remove file.
	* gettext-runtime/intl/localcharset.h: Update from gnulib.
	* gettext-runtime/intl/localcharset.c: Likewise.
	* gettext-runtime/intl/Makefile.in (DISTFILES.common): Remove config.charset.
	(charset.alias): Remove target.
	(install-exec): Don't install charset.alias.
	(install-data): Don't chmod config.charset.
	(installdirs): Don't create $(libdir).
	(uninstall): Don't uninstall charset.alias.
	(mostlyclean): Don't remove charset.alias.
	* gettext-runtime/intl/lock.h: Update from gnulib.
	* gettext-runtime/intl/verify.h: Likewise.
	* gettext-runtime/intl/printf-parse.c: Likewise.
	* gettext-runtime/libasprintf/printf-parse.c: Likewise.
	* gettext-runtime/m4/extern-inline.m4: Likewise.
	* gettext-runtime/m4/threadlib.m4: Likewise.
	* Makefile.am (distcheck-hook): Don't compare config.charset, ref-add.sin,
	ref-del.sin.

2018-09-16  Bruno Haible  <bruno@clisp.org>

	libintl: Improve locale handling on macOS 10.12 or newer.
	* gettext-runtime/intl/langprefs.c (_nl_language_preferences_default): Make the
	logic also work in locales such as "zh-Hans-DE".
	* gettext-runtime/intl/setlocale.c: Include header files for CoreFoundation.
	(libintl_setlocale): Try harder to set a locale for categories LC_CTYPE and
	LC_MESSAGES.

	Update list of locale names with scripts on macOS.
	* gettext-runtime/intl/localename.c (gl_locale_name_canonicalize): Update
	tables to match Mac OS X 10.13 and recent glibc.

	Use newer macOS APIs when possible.
	* gettext-runtime/m4/intlmacosx.m4 (gt_INTL_MACOSX): Check for
	CFLocaleCopyPreferredLanguages.
	* gettext-runtime/intl/langprefs.c (_nl_language_preferences_default): Use
	CFLocaleCopyPreferredLanguages when it exists.

	Revisit macOS specific code.
	* gettext-runtime/intl/localename.c (gl_locale_name_default): Reduce code
	duplication. Fix comments about Mac OS X versions.

2018-09-16  Bruno Haible  <bruno@clisp.org>

	libintl: Fix language preferences on macOS 10.12 or newer.
	Reported by Kristian Rietveld <kris@loopnest.org> at
	<https://savannah.gnu.org/bugs/?49560>.

	* gettext-runtime/intl/langprefs.c (_nl_language_preferences_default): Handle
	preferences elements of the form "ll-CC" in a reasonable way.
	* NEWS: Mention the change.

2018-09-16  Bruno Haible  <bruno@clisp.org>

	setlocale: Improve support for locales not supported by libc.
	Reported by Dapeng Gao <peter@dpgao.cc> at
	<https://savannah.gnu.org/bugs/?54479>.

	* gettext-runtime/intl/setlocale.c: Include <stdio.h>.
	(libintl_setlocale): Use a more error-tolerant strategy when the locale to be
	set is not supported by libc: Emit warnings instead of failing.

2018-09-16  Bruno Haible  <bruno@clisp.org>

	Fix link error when linking with libintl.a on macOS.
	* gettext-runtime/intl/loadmsgcat.c (_nl_msg_cat_cntr): Zero-initialize on
	macOS.

2018-08-12  Bruno Haible  <bruno@clisp.org>

	gettext-runtime/intl/setlocale.c: Add fixes from gnulib.
	2018-08-11  Bruno Haible  <bruno@clisp.org>

	        setlocale: Trivial simplification.
	        * lib/setlocale.c (setlocale_unixlike): Remove redundant #if.

	2017-04-21  Bruno Haible  <bruno@clisp.org>

	        Fix test-mbrtowc5.sh failure on native Windows.
	        * setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
	        "C".

	2016-03-22  Geert Janssens  <janssens-geert@telenet.be>

	        setlocale: add "sv" to Windows language table
	        * setlocale.c (language_table) [W32]: Add "sv".
	        Reported in <https://savannah.gnu.org/bugs/?44588>.

	2012-01-04  Bruno Haible  <bruno@clisp.org>

	        Talk about "native Windows API", not "Win32".
	        * setlocale.c: Update comments to mention native Windows.

2018-07-03  Bruno Haible  <bruno@clisp.org>

	Enable the format_arg attribute also on clang on Mac OS X.
	Reported by Tom Tromey <tom@tromey.com>
	in <https://lists.gnu.org/archive/html/bug-gettext/2018-07/msg00000.html>.

	* gettext-runtime/intl/libgnuintl.in.h (_INTL_MAY_RETURN_STRING_ARG): On macOS,
	use attribute __format_arg__ if the compiler is based on clang >= 3.0.

2018-07-03  Bruno Haible  <bruno@clisp.org>

	Make the format_arg attribute effective also in the case _INTL_REDIRECT_INLINE.
	Reported by Tom Tromey <tom@tromey.com>
	in <https://lists.gnu.org/archive/html/bug-gettext/2018-07/msg00000.html>.

	* gettext-runtime/intl/libgnuintl.in.h (gettext, dgettext, dcgettext,
	ngettext, dngettext, dcngettext): Add attribute __format_arg__ also to the
	'static inline' functions.

2018-05-12  Bruno Haible  <bruno@clisp.org>

	libintl: Ensure the *printf function overrides are POSIX compatible.
	Reported by Eli Zaretskii <eliz@gnu.org>.

	* gettext-runtime/intl/printf.c (USE_REPLACEMENT_CODE_ALWAYS): New macro.
	(libintl_vfprintf, libintl_vsprintf, libintl_vsnprintf, libintl_vfwprintf,
	libintl_vswprintf): Use it.
	* NEWS: Mention the change.

2018-05-05  Bruno Haible  <bruno@clisp.org>

	all: Replace http URLs by https URLs in copyright notices.

	Simplify code. Drop support for Borland C++ on Windows.
	* gettext-runtime/intl/dcigettext.c: Simplify
	'defined _WIN32 || defined __WIN32__' to just 'defined _WIN32'.
	* gettext-runtime/intl/l10nflist.c: Likewise.
	* gettext-runtime/intl/langprefs.c: Likewise.
	* gettext-runtime/intl/libgnuintl.in.h: Likewise.
	* gettext-runtime/intl/loadinfo.h: Likewise.
	* gettext-runtime/intl/setlocale.c: Likewise.
	* gettext-runtime/intl/printf-parse.c: Likewise.
	* gettext-runtime/libasprintf/printf-parse.c: Likewise.
	* gettext-tools/src/format-c-parse.h: Likewise.
	* gettext-tools/src/hostname.c: Likewise.
	* gnulib-local/lib/basename.c: Likewise.

	Update after gnulib changed.
	* Makefile.am (distcheck-hook): Update comparison of flexmember.h.
	* gettext-runtime/intl/localcharset.c: Update from gnulib.
	* gettext-runtime/intl/localename.c: Likewise.
	* gettext-runtime/intl/lock.h: Likewise.
	* gettext-runtime/intl/relocatable.c: Likewise.
	* gettext-runtime/intl/vasnprintf.c: Likewise.
	* gettext-runtime/intl/verify.h: Likewise.
	* gettext-runtime/intl/xsize.h: Likewise.
	* gettext-runtime/libasprintf/vasnprintf.c: Likewise.
	* gettext-runtime/m4/*.m4: Likewise.
	* gettext-tools/examples/po/remove-potcdate.sin: Likewise.
	* gnulib-local/lib/execute.c.diff: Update.

2018-01-27  Bruno Haible  <bruno@clisp.org>

	Rename some files.
	* INSTALL.windows: Renamed from README.windows.
	* Makefile.am (EXTRA_DIST): Update.
	* gettext-runtime/INSTALL.windows: Renamed from gettext-runtime/README.windows.
	* gettext-runtime/Makefile.am (EXTRA_DIST): Update.
	* gettext-runtime/intl/INSTALL.windows: Renamed from gettext-runtime/intl/README.windows.
	* gettext-runtime/intl/Makefile.in (DISTFILES.gettext): Update.
	* gettext-runtime/libasprintf/INSTALL.windows: Renamed from gettext-runtime/libasprintf/README.windows.
	* gettext-runtime/libasprintf/Makefile.am (EXTRA_DIST): Update.
	* gettext-tools/INSTALL.windows: Renamed from gettext-tools/README.windows.
	* gettext-tools/Makefile.am (EXTRA_DIST): Update.

2018-01-02  Bruno Haible  <bruno@clisp.org>

	Fix 'ar' invocation when cross-compiling and in 64-bit mode on AIX.
	Reported by Benedikt Morbach <bmorbach@redhat.com>
	at <https://savannah.gnu.org/bugs/?43037>.

	* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Require gl_PROG_AR_RANLIB if
	available. Otherwise, use AC_PROG_RANLIB and set AR and ARFLAGS.
	* gettext-runtime/intl/Makefile.in (AR): Use the value determined through
	autoconf.
	(ARFLAGS): New variable.
	(libintl.a, libgnuintl.a): Use it.
	* gettext-runtime/configure.ac: Invoke gl_PROG_AR_RANLIB.
	* gettext-runtime/libasprintf/configure.ac: Likewise.
	* gettext-tools/configure.ac: Likewise.

2018-01-02  Bruno Haible  <bruno@clisp.org>

	Don't use -lc explicitly when linking with libtool.
	libtool has logic that determines whether it should add -lc, and this logic
	works fine on all modern platforms.

	Reported by Michael Forney <mforney@mforney.org>
	at <https://savannah.gnu.org/bugs/?40192>.

	* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Don't set LTLIBC.
	* gettext-runtime/intl/Makefile.in (libintl.la, libgnuintl.la): Don't use
	LTLIBC.

2017-09-24  Bruno Haible  <bruno@clisp.org>

	Verify that system dependent strings in .mo files are NUL terminated.
	Reported by Jakub Wilk <jwilk@jwilk.net> in
	<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876498>.

	* gettext-runtime/intl/loadmsgcat.c (_nl_load_domain): Bail out if some of the
	system-dependent strings has a last static segment that is not NUL terminated.
	* gettext-tools/src/read-mo.c (get_sysdep_string): Likewise.

2017-09-24  Bruno Haible  <bruno@clisp.org>

	libintl: Fix pointer use after free.
	* gettext-runtime/intl/loadmsgcat.c (_nl_load_domain): Perform the same lock
	deallocation outside libc as in libc (patch from 2013-09-06).

2017-05-19  Bruno Haible  <bruno@clisp.org>

	Fix memory leaks.
	Found by Coverity.

	* gettext-runtime/intl/loadmsgcat.c (_nl_load_domain): Free allocated memory
	before returning in out-of-memory case.
	* gettext-runtime/intl/localealias.c (relocate2): Define fallback.
	(read_alias_file): Invoke relocate2 instead of relocate. Free the allocated
	memory.

2017-05-19  Bruno Haible  <bruno@clisp.org>

	Fix missing unlock.
	Found by Coverity.

	* gettext-runtime/intl/dcigettext.c (_nl_find_msg): Unlock the lock and
	free allocated memory before returning.

2017-05-19  Bruno Haible  <bruno@clisp.org>

	Update gettext-runtime files from gnulib.
	* Makefile.am (distcheck-hook): Check also flexmember.m4, flexmember.h.
	* gettext-runtime/intl/Makefile.in (SOURCES): Add flexmember.h.
	* gettext-runtime/intl/flexmember.h: New file, from gnulib.
	* gettext-runtime/intl/localcharset.c:
	  * localcharset.c (relocate2): Define fallback.
	  (get_charset_aliases): Invoke relocate2 instead of relocate. Free the
	  allocated memory.
	  * localcharset.c (WINDOWS_NATIVE): Don't define on Cygwin.
	  * localcharset.c (locale_charset) [WINDOWS_NATIVE]: Don't use the
	  return value from setlocale if it would lead to a buffer overrun.
	* gettext-runtime/intl/localename.c:
	  * localename.c [__CYGWIN__]: Include <langinfo.h>, since this is
	  where NL_LOCALE_NAME is defined.
	  * localename.c (WINDOWS_NATIVE): Don't define on Cygwin.
	  * localename.c (gl_locale_name_thread_unsafe): Add clause for
	  Cygwin.
	  * localename.c (struct hash_node): Use FLEXIBLE_ARRAY_MEMBER.
	* gettext-runtime/intl/lock.c:
	  * lock.c: On glibc systems without
	  PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
	  implementation of rwlocks.
	  * lock.c [USE_POSIX_THREADS]
	  (glthread_rwlock_init_for_glibc): New function.
	  [USE_POSIX_THREADS] (glthread_rwlock_rdlock_multithreaded): Update
	  comment.
	  [USE_PTH_THREADS]: New implementation of rwlocks.
	  [USE_WINDOWS_THREADS] (glthread_rwlock_rdlock_func): Prefer writers over
	  readers.
	* gettext-runtime/intl/lock.h:
	  * lock.h (pthread_rwlockattr_setkind_np): Don't declare
	  weak on non-glibc platforms.
	  * lock.h: On glibc systems without
	  PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback
	  implementation of rwlocks.
	  * lock.h [USE_POSIX_THREADS_WEAK]: Declare also
	  pthread_rwlockattr_init, pthread_rwlockattr_setkind_np,
	  pthread_rwlockattr_destroy weak.
	  * lock.h [USE_POSIX_THREADS]: Test
	  HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
	  of rwlock initialization on glibc systems without
	  HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER. Use a different implementation
	  of rwlocks altogether on non-glibc systems without
	  HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
	  [USE_PTH_THREADS]: Use a different implementation of rwlocks altogether.
	* gettext-runtime/intl/relocatable.c:
	  * relocatable.c (relocate2): New function.
	  * relocatable.c (relocate): Assume pathname is non-NULL. Use
	  ISSLASH macro consistently. Avoid dangerous string concatenation idiom.
	* gettext-runtime/intl/relocatable.h:
	  * relocatable.h (relocate2): New declaration/macro.
	* gettext-runtime/intl/vasnprintf.c, gettext-runtime/libasprintf/vasnprintf.c:
	  * vasnprintf.c (FALLTHROUGH): New macro.
	  Use it whenever one switch case falls through into the next.
	  * vasnprintf.c (USE_MSVC__SNPRINTF): New macro.
	  Everywhere, use !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF instead
	  of !HAVE_SNPRINTF_RETVAL_C99.
	  * vasnprintf.c (VASNPRINTF): Move comment down past two cpp
	  directives, so that it takes effect once again.  This is clearly
	  not a proper change, and I will revert it once this bug is fixed:
	  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817
	  * vasnprintf.c (IF_LINT): Treat GCC_LINT like lint.
	* gettext-runtime/intl/verify.h:
	  * verify.h (verify) [!__GNUC__]:
	  Use shorter albeit meaningless string to bypass silly compiler limits.
	  * verify.h (assume): Treat GCC_LINT like lint.
	* gettext-runtime/intl/xsize.h: Update.
	* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Add flexmember.m4.
	* gettext-runtime/m4/extern-inline.m4: Update.
	* gettext-runtime/m4/fcntl-o.m4: Update.
	* gettext-runtime/m4/flexmember.m4: New file, from gnulib.
	* gettext-runtime/m4/glibc2.m4: Update.
	* gettext-runtime/m4/glibc21.m4: Update.
	* gettext-runtime/m4/intdiv0.m4: Update.
	* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Require AC_C_FLEXIBLE_ARRAY_MEMBER.
	* gettext-runtime/m4/intmax.m4: Update.
	* gettext-runtime/m4/inttypes-pri.m4: Update.
	* gettext-runtime/m4/inttypes_h.m4: Update.
	* gettext-runtime/m4/lock.m4 (gl_LOCK): Invoke gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER.
	* gettext-runtime/m4/longlong.m4: Update.
	* gettext-runtime/m4/printf-posix.m4: Update.
	* gettext-runtime/m4/progtest.m4: Update.
	* gettext-runtime/m4/size_max.m4: Update.
	* gettext-runtime/m4/stdint_h.m4: Update.
	* gettext-runtime/m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
	PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
	Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.
	* gettext-runtime/m4/uintmax_t.m4: Update.
	* gettext-runtime/m4/visibility.m4: Update.
	* gettext-runtime/m4/wchar_t.m4: Update.
	* gettext-runtime/m4/xsize.m4: Update.
	* gettext-runtime/tests/test-lock.c:
	  * test-lock.c: On Mac OS X, use named semaphores, not unnamed
	  semaphores.
	  (USE_NAMED_SEMAPHORE, USE_UNNAMED_SEMAPHORE): New macros.
	  (atomic_int_semaphore): New macro.
	  * test-lock.c (USE_SEMAPHORE): Don't set if <semaphore.h> does not
	  exist.
	  * test-lock.c (USE_SEMAPHORE): New constant.
	  (struct atomic_int, init_atomic_int, get_atomic_int_value,
	  set_atomic_int_value) [USE_SEMAPHORE]: Define using a POSIX semaphore.
	  Suggested by Torvald Riegel <triegel@redhat.com>.

2017-05-15  Bruno Haible  <bruno@clisp.org>

	Respect the configure option --localedir.
	Reported by Markus Gothe at https://savannah.gnu.org/bugs/index.php?49862 .

	The AC_SUBSTed variable @localedir@ is supported since Autoconf 2.60.

	* gettext-runtime/intl/Makefile.in (localedir): Set to @localedir@. Suggested
	by Markus Gothe <nietzsche@lysator.liu.se>.
	* gettext-runtime/m4/intldir.m4: Require Autoconf 2.60 or newer.
	* gettext-tools/doc/gettext.texi (src/Makefile): Assume Autoconf 2.60 or newer.

2017-03-20  Bruno Haible  <bruno@clisp.org>

	Fix compilation error in <libintl.h> on Cygwin.
	Reported by Michael Haubenwallner at https://savannah.gnu.org/bugs/?50595 .

	* gettext-runtime/intl/libgnuintl.in.h (newlocale): Hide declaration if
	  locale_t type is not visible on Cygwin.

2016-12-11  Bruno Haible  <bruno@clisp.org>

	Merge all .gitignore files into a single .gitignore file.

	Update and organize the .gitignore files.

2016-12-05  KO Myung-Hun  <komh78-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

	intl: Fix that /@unixroot prefix is not working on OS/2 kLIBC
	OS/2 kLIBC has a feature to rewrite some path components. For example,
	'/@unixroot' is replaced with a value of $UNIXROOT if it is.

	So prepending a drive letter to the path starting with '/' makes the
	path starting with '/@unixroot' to 'x:/@unixroot' which is unexpected.

	This will breaks the behavior of some programs depending on /@unixroot
	prefix.

	* gettext-runtime/intl/bindtextdom.c (BINDTEXTDOMAIN): Do not touch
	dirname if it is started with '/@unixroot'.
	* gettext-runtime/intl/relocatable.c (relocate): Do not touch pathname
	if it is started with '/@unixroot'.

2016-11-23  Bruno Haible  <bruno@clisp.org>

	Update installation instructions for Windows.
	* README.windows: Assume a 64-bit Windows. Explain both 32-bit and 64-bit
	builds. Add instructions for the MS Visual C/C++ tool chain. Revamp instructions
	for Cygwin.
	* gettext-runtime/README.windows: Generic reference to top-level file.
	* gettext-runtime/intl/README.windows: Likewise.
	* gettext-runtime/libasprintf/README.windows: Likewise.
	* gettext-tools/README.windows: Likewise.

	Drop the nickname "woe32".
	* README.windows: Renamed from README.woe32.
	* Makefile.am (EXTRA_DIST): Update.
	* gettext-runtime/README.windows: Renamed from gettext-runtime/README.woe32.
	* gettext-runtime/Makefile.am (EXTRA_DIST): Update.
	* gettext-runtime/intl/README.windows: Renamed from gettext-runtime/intl/README.woe32.
	* gettext-runtime/intl/Makefile.in (DISTFILES.gettext): Update.
	* gettext-runtime/libasprintf/README.windows: Renamed from gettext-runtime/libasprintf/README.woe32.
	* gettext-runtime/libasprintf/Makefile.am (EXTRA_DIST): Update.
	* gettext-tools/README.windows: Renamed from gettext-tools/README.woe32.
	* gettext-tools/Makefile.am (EXTRA_DIST): Update.

2016-11-14  Daiki Ueno  <ueno@gnu.org>

	intl: Fix compilation on a system without alloca
	* gettext-runtime/intl/dcigettext.c (DCIGETTEXT): Fix typo 'tmp_dirname'
	-> 'resolved_dirname'.  Reported by Egor Pugin in:
	http://lists.gnu.org/archive/html/bug-gettext/2016-09/msg00008.html

2016-06-11  Daiki Ueno  <ueno@gnu.org>

	build: Fix unintentional soname bump
	* gettext-runtime/intl/Makefile.in: Revert LTV_CURRENT and increment
	LTV_REVISION.
	* gettext-tools/libgettextpo/Makefile.am: Likewise.

2016-06-09  Daiki Ueno  <ueno@gnu.org>

	Prepare for 0.19.8

2016-05-25  Daiki Ueno  <ueno@gnu.org>

	intl: Pacify pre-C99 compilers
	* gettext-runtime/intl/plural-exp.h (HAVE_STRUCT_INITIALIZER): New
	macro, based on the check previously in plural-exp.c.  Also add check
	for __SUNPRO_C for Solaris Studio C compiler.
	(GERMANIC_PLURAL): Define as 'struct expression' not 'const struct
	expression' if struct/union initializers are not supported by the
	compiler.
	* gettext-runtime/intl/plural-exp.c: Use HAVE_STRUCT_INITIALIZER.
	Reported by Dagobert Michelsen and investigated by pan7 in:
	https://savannah.gnu.org/support/?108743

2016-01-20  KO Myung-Hun  <komh78@gmail.com>

	intl: Support UNIXROOT in BINDTEXTDOMAIN () on EMX
	$UNIXROOT is a drive on which a root of FHS is.

	* gettext-runtime/intl/bindtextdom.c (BINDTEXTDOMAIN): Prepend
	$UNIXROOT to dirname if it is started '/' or it is an empty string.

2016-01-02  Daiki Ueno  <ueno@gnu.org>

	maint: Update copyright year

2015-12-27  Daiki Ueno  <ueno@gnu.org>

	Prepare for 0.19.7

2015-12-10  KO Myung-Hun  <komh78@gmail.com>  (tiny change)

	intl: Fix name resolution failures on kLIBC
	kLIBC already has _nl_default_dirname and _nl_msg_cat_cntr in its own
	gettext implmenetation.
	* gettext-runtime/intl/dcigettext.c: Do not declare _nl_default_dirname
	on kLIBC.
	* gettext-runtime/intl/gettextP.h: Define _nl_msg_cat_cntr to
	libintl_nl_msg_cat_cntr on kLIBC.

	build: Do not include os2compat.[ch]
	kLIBC does not need os2compat.[ch]
	* gettext-runtime/configure.ac (AH_BOTTOM): Do not include
	intl/os2compat.h on kLIBC.
	* gettext-runtime/intl/osdep.c: Do not include os2compat.c on kLIBC.
	* gettext-tools/configure.ac (AH_BOTTOM): Do not include
	intl/os2compat.h on kLIBC.

2015-10-15  Daiki Ueno  <ueno@gnu.org>

	build: Generate ChangeLogs for intl and po
	* autogen.sh: Create empty ChangeLog files under intl and po.
	* Makefile.am (gen-ChangeLogs): Rename from gen-ChangeLog.  Generate
	ChangeLog files for */intl and */po as well as top-level.
	* gettext-runtime/intl/ChangeLog.0: Rename from ChangeLog.
	* gettext-runtime/po/ChangeLog.0: Rename from ChangeLog.
	* gettext-tools/po/ChangeLog.1: Rename from ChangeLog.

2015-10-14  Mike Frysinger  <vapier@chromium.org>

	intl/localename: control langinfo.h inclusion
	This header is only used to work around buggy behavior in old versions
	of glibc, so do not include it all the time.  Otherwise we get build
	failures on systems that do not provide langinfo.h.

	* gettext-runtime/intl/localename.c: Wrap langinfo.h include with same
	ifdefs used in the source later on.
