Commit a7085816 by Jakub Jelinek Committed by Jakub Jelinek

re PR bootstrap/77569 (self tests fail when not using C locale)

	PR bootstrap/77569
	* input.c (ebcdic_execution_charset::on_error): Don't use strstr for
	a substring of the message, but strcmp with the whole message.  Ifdef
	ENABLE_NLS, translate the message first using dgettext.

From-SVN: r244047
parent 27e99c9b
2017-01-04 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/77569
* input.c (ebcdic_execution_charset::on_error): Don't use strstr for
a substring of the message, but strcmp with the whole message. Ifdef
ENABLE_NLS, translate the message first using dgettext.
2017-01-03 Jeff Law <law@redhat.com>
PR tree-optimizatin/78856
......
......@@ -2026,9 +2026,14 @@ class ebcdic_execution_charset : public lexer_test_options
ATTRIBUTE_FPTR_PRINTF(5,0)
{
gcc_assert (s_singleton);
/* Avoid exgettext from picking this up, it is translated in libcpp. */
const char *msg = "conversion from %s to %s not supported by iconv";
#ifdef ENABLE_NLS
msg = dgettext ("cpplib", msg);
#endif
/* Detect and record errors emitted by libcpp/charset.c:init_iconv_desc
when the local iconv build doesn't support the conversion. */
if (strstr (msgid, "not supported by iconv"))
if (strcmp (msgid, msg) == 0)
{
s_singleton->m_num_iconv_errors++;
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment