Daiki Ueno [Thu, 4 Dec 2014 03:21:35 +0000 (12:21 +0900)]
examples: Don't forcibly regenerate POT files on 'make dist'
Previously we generated POT files on 'make dist'. However, it
take some time to complete and require autotools bootstrap for
each project.
* Makefile.am (distdir1): Don't invoke update-po rule in po/Makefile.
* po/Makefile.am (distdir1): Don't invoke update-po rule.
Daiki Ueno [Thu, 4 Dec 2014 02:59:53 +0000 (11:59 +0900)]
intl: Make the LCOV workaround non-intrusive
* gettext-runtime/intl/Makefile.in (PLURAL_OBJECT): New variable.
(OBJECTS): Refer to $(PLURAL_OBJECT) instead of plural.$lo.
(pluralx.c, pluralx.lo): New rule.
(mostlyclean): Remove pluralx.c.
* gettext-tools/configure.ac: Replace PLURAL_OBJECT in intl/Makefile.
Daiki Ueno [Wed, 3 Dec 2014 06:14:44 +0000 (15:14 +0900)]
intl: Work around LCOV relative base directory resolution
* gettext-runtime/intl/Makefile.in (plural.lo): Resolve relative
source file name given with '#line' directive, when $(srcdir) !=
$(builddir).
(mostlyclean): Remove plural.c generated in the 'plural.lo' rule.
* gettext-tools/src/plural-exp.c: Include "../intl/plural.c" instead
of "../../gettext-runtime/intl/plural.c".
Daiki Ueno [Mon, 1 Dec 2014 07:45:57 +0000 (16:45 +0900)]
doc: Document placement of extracted comment blocks
* xgettext.texi: Mention that extracted comment blocks must be
adjacent to keyword lines.
Reported by Yves-Gwenael Bourhis at:
<https://savannah.gnu.org/bugs/index.php?42376>.
Daiki Ueno [Mon, 1 Dec 2014 04:39:30 +0000 (13:39 +0900)]
c#: Recognize Unicode surrogate character pair
* x-csharp.c (accumulate_escaped): Change the first argument type
from 'struct string_buffer *' to 'struct mixed_string_buffer *',
for Unicode surrogate character pair handling; all callers
changed. Reported by Petr Kadlec at:
<https://savannah.gnu.org/bugs/?32505>.
Daiki Ueno [Mon, 1 Dec 2014 03:18:04 +0000 (12:18 +0900)]
build: Update libtool files to 2.4.4
* m4/libtool.m4: Update from libtool-2.4.4, with modifications.
2008-04-06 Bruno Haible <bruno@clisp.org>
* m4/libtool.m4 (LT_INIT): When setting LIBTOOL, use
CONFIG_SHELL; don't assume that the Makefile.in will set SHELL
to ${CONFIG_SHELL}.
* m4/ltoptions.m4: Likewise.
* m4/ltversion.m4: Likewise.
* build-aux/ltmain.sh: Likewise.
Daiki Ueno [Fri, 28 Nov 2014 04:21:37 +0000 (13:21 +0900)]
msgfilter: Fix read buffer allocation for empty input
* msgfilter.c (prepare_read): Increase allocated buffer size even
if the original size is < 2.
Reported by Robin McCorkell at:
<https://savannah.gnu.org/bugs/?43720>.
Daiki Ueno [Fri, 28 Nov 2014 03:17:06 +0000 (12:17 +0900)]
build: Update libtool files to 2.4.3
* m4/libtool.m4: Update from libtool-2.4.3, with modifications.
2008-04-06 Bruno Haible <bruno@clisp.org>
* m4/libtool.m4 (LT_INIT): When setting LIBTOOL, use
CONFIG_SHELL; don't assume that the Makefile.in will set SHELL
to ${CONFIG_SHELL}.
* m4/ltoptions.m4: Likewise.
* m4/ltsuger.m4: Likewise.
* m4/ltversion.m4: Likewise.
* m4/lt~obsolete.m4: Likewise.
* build-aux/ltmain.sh: Likewise.
Daiki Ueno [Thu, 27 Nov 2014 09:32:23 +0000 (18:32 +0900)]
javascript: Simplify Unicode character escape handling
ECMA-262 only supports "\uXXXX" style Unicode character escape and
we don't need extra space for character names.
* x-javascript.c: Don't include "uniname.h".
(phase2_pushback): Decrease to 5. Don't refer to UNINAME_MAX.
Daiki Ueno [Tue, 18 Nov 2014 03:11:22 +0000 (12:11 +0900)]
read-mo: Check size_t overflow
* read-mo.c: Include "xsize.h".
(get_string): Use xsum3 to avoid overflow, when checking length
and offset fields.
Reported by Jakub Wilk at:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769901>.
Daiki Ueno [Tue, 28 Oct 2014 07:38:40 +0000 (16:38 +0900)]
xgettext: Allow plural extraction from a single argument function
The commit 8137d2b4 was a wrong fix since both singular/plural
msgids may point to the same address for Qt4 plural forms. This
reverts the commit and fix the original double-free problem in the
right way. Thanks to Jesper Fehrlund for suggestions.
* gettext-tools/src/xgettext.c (arglist_parser_remember_literal):
Don't ignore plural argument even if ARGNUM1 equals to ARGNUM2.
(arglist_parser_done): Make a copy of best_cp->msgid_plural when
passing it to remember_a_message_plural, if it equals to
best_cp->msgid. Also move code conversion logic earlier taking into
account of the ownership transfer of best_cp->msgid.
* gettext-tools/src/xgettext-12: Test a single argument function.
Daiki Ueno [Tue, 28 Oct 2014 06:51:01 +0000 (15:51 +0900)]
xgettext: Fix double-free in singular/plural argument extraction
After commit 6aa7b7ed in 2009, xgettext assumed that ARGNUM1 and
ARGNUM2 of -k are different. That could cause an double-free in
exceptional cases.
Reported by Johan Liljegren in:
<https://lists.gnu.org/archive/html/bug-gettext/2014-10/msg00028.html>.
* xgettext.c (arglist_parser_remember_literal): Don't assume that
ARGNUM1 and ARGNUM2 are different.
Daiki Ueno [Wed, 15 Oct 2014 03:37:45 +0000 (12:37 +0900)]
tests: Support newer ncurses with italic caps in xterm terminfo
* tests/test-term-ostream-xterm-basic-italic.out: New file.
* tests/test-term-ostream-xterm: Use it as possible test result.
* Makefile.am (EXTRA_DIST): Add new files.
Needed for ncurses >= 5.9-20140906 that defines sitm/ritm in the
xterm-basic terminfo definition.
Daiki Ueno [Sun, 12 Oct 2014 00:26:21 +0000 (09:26 +0900)]
tests: Avoid sed error on Mac OS X when dealing with binary input
Reported by Ramsey Dow in:
<http://lists.gnu.org/archive/html/bug-gettext/2014-07/msg00002.html>.
* msgmerge-compendium-6: Run sed with LC_ALL=C, to avoid 'illegal
byte sequence' error on Mac OS X.
* format-sh-1: Likewise.
Daiki Ueno [Wed, 8 Oct 2014 07:12:35 +0000 (16:12 +0900)]
msgunfmt: Error on incomplete multibyte sequence at EOF
* write-po.c (wrap): Report error on incomplete multibyte sequence
at the end of input bytes.
Reported by Jakub Wilk at:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763820>.
Daiki Ueno [Wed, 8 Oct 2014 06:17:08 +0000 (15:17 +0900)]
po: Make it possible to pass custom options to msginit
* Makevars (MSGINIT_OPTIONS): New variable.
* Rules-quot: Use it when invoking msginit.
If one wants to use '--no-wrap' in MSGMERGE_OPTIONS and
XGETTEXT_OPTIONS, there should be a way to pass the option to
msginit. Reported by Ludovic Courtès in:
<https://lists.gnu.org/archive/html/bug-gettext/2014-08/msg00004.html>.
Daiki Ueno [Thu, 2 Oct 2014 08:44:41 +0000 (17:44 +0900)]
Fix C++ compiler check to auto-disable building libasprintf
* gettext-runtime/configure.ac: To automatically disable building
libasprintf when no C++ is found, check if CXX is "no", not ":". This
seems to be a left over of commit 09963c23. Reported by Assaf Gordon in:
<https://lists.gnu.org/archive/html/bug-gettext/2014-10/msg00003.html>.
Daiki Ueno [Wed, 1 Oct 2014 05:40:08 +0000 (14:40 +0900)]
tests: Adjust textdomain directory for Solaris 11
Solaris 11 doesn't strip the CODESET part from the locale name,
when looking for a message catalog. Create a directory link with
CODESET, to work around this.
This was introduced by commit 3533f6cc when we didn't use separate
test directory for each test. Now that we switched to init.sh, we
don't need to worry about filename conflicts.
Paul Eggert [Tue, 30 Sep 2014 09:24:06 +0000 (18:24 +0900)]
Fix gettext-runtime compilation error on Solaris 10
* gettext-runtime/configure.ac: Invoke AM_PROG_CC_C_O so that the
system stdbool.h will be used on Solaris. Suggested by Paul Eggert in:
<https://lists.gnu.org/archive/html/bug-gnulib/2013-11/msg00053.html>.
* gettext-tools/src/x-c.c (literalstring_parse): Fix octal character
escape handling.
Reported by Kjartan Maraas at:
<https://bugzilla.redhat.com/show_bug.cgi?id=1147535>.
intl: Consolidate fallback _GL_* macro definitions into intl.m4
We had defined _GL_* macros used by libintl itself in the corresponding
C files. However, it will increase divergence between Gnulib and gettext.
This patch moves the fallback macro definitions into M4 and emit them only
when the project is not using Gnulib.
* gettext-runtime/m4/intl.m4 (gt_GL_ATTRIBUTE): New macro.
(AM_INTL_SUBDIR): Require gt_GL_ATTRIBUTE.
* gettext-runtime/intl/localename.c: Update from Gnulib.
2014-07-10 Assaf Gordon <assafgordon@gmail.com>
localename: avoid -Wsuggest-attribute={const,pure} warnings
* lib/localename.c (string_hash): Tag internal function as pure.
* gettext-runtime/intl/xsize.c (XSIZE_INLINE): Remove _GL_UNUSED definition.
It will be set through intl.m4.
* Makefile.am (distcheck-hook): Add back localename.c check.
build: Work around undefined _GL_ATTRIBUTE_PURE in libintl
* Makefile.am (distcheck-hook): Ignore the difference between our
localename.c and the latest Gnulib's, which utilizes
_GL_ATTRIBUTE_PURE not available from libintl. This is a
temporary fix for the 0.19.2 release and should be reverted once
it is fixed either in gettext or Gnulib.
There was an implicit dependency between the prerequisites of
install-exec-local, which may have caused error with make -jN.
Use install-exec-hook to remove the dependency.
Reported by Christian Weisgerber in:
<https://lists.gnu.org/archive/html/bug-gettext/2014-07/msg00008.html>.
* Makefile.am (install-exec-local): Remove.
(install-exec-hook): New rule, depend on install-exec-clean.
autopoint: Select macro tracing method by Autoconf version
Reported and analyzed by Pádraig Brady in:
<http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00071.html>.
* autopoint.in (func_trace_autoconf): Rename from func_trace.
($func_trace): Set to func_trace_autoconf if Autoconf >= 2.69 is
availabl, otherwise to func_trace_sed.
* gettextize.in: Likewise.
Problem reported by Bernhard Voelker in:
<http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00059.html>.
* x-c.c (phase5_get): Add missing memory allocation for empty
string literal.
* loadmsgcat.c: Include assert.h.
(_nl_load_domain): Add semicolon to end of line.
(_nl_load_domain)[HAVE_MMAP]: Use MAP_FAILED and assert that
it is (void *) -1.
(_nl_load_domain)[_LIBC]: Call __libc_rwlock_init instead of
gl_rwlock_init.
(_nl_unload_domain): Cast convd->encoding to non-const.
Daiki Ueno [Mon, 16 Jun 2014 08:42:25 +0000 (17:42 +0900)]
tests: Test "make dist" in autopoint test
* autopoint-3: Run "make dist" after "make"; add a workaround for
a bug in 0.19 and 0.19.1, where intl/ChangeLog is required but
missing in the archive.
Daiki Ueno [Mon, 16 Jun 2014 07:48:33 +0000 (16:48 +0900)]
intl: Stop installing ChangeLog.inst
After the git-version-gen migration (commit fbf4e276), the
creation of gettext-tools/intl/ChangeLog.inst in configure.ac was
removed because we lost access to $RELEASE_DATE. Given that
intl/VERSION provides enough information, simply drop the
ChangeLog file.
Problem reported by Bruce Korb in
<https://lists.gnu.org/archive/html/bug-gettext/2014-06/msg00022.html>.
* Makefile.in (install-data): Don't install ChangeLog.inst.
(distclean): Don't remove ChangeLog.inst.
(uninstall): Don't remove ChangeLog under $(gettextsrcdir)/intl.
(dist): Don't include ChangeLog in the distribution.
Daiki Ueno [Thu, 12 Jun 2014 08:56:23 +0000 (17:56 +0900)]
doc: Update licenses from GNU
* gpl.texi, lgpl.texi, fdl.texi: Update from GNU.
* gettext.texi (GNU GPL, GNU LGPL, GNU LGPL): Define nodes here,
instead of in those license documents.
Daiki Ueno [Tue, 10 Jun 2014 01:57:05 +0000 (10:57 +0900)]
Temporarily add Language: field to all PO file headers
Due to a bug in 0.19, the Language: field is considered mandatory.
This was fixed in commit 31744906, but better avoid error when
building with 0.19 at the moment. This should be overwritten with the
next translations update.