aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-01-04 08:53:30 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2017-01-04 08:53:30 +0100
commita7085816dcd1a8a0bb5f9dfb8191e16e76ac205f (patch)
tree56c9c7317b4179b79b611a19f79726e1a2fa3916 /gcc
parent27e99c9b9dec2945316548378eaec935c3b64b50 (diff)
downloadgcc-a7085816dcd1a8a0bb5f9dfb8191e16e76ac205f.zip
gcc-a7085816dcd1a8a0bb5f9dfb8191e16e76ac205f.tar.gz
gcc-a7085816dcd1a8a0bb5f9dfb8191e16e76ac205f.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/input.c7
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c1965e..944ac44 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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
diff --git a/gcc/input.c b/gcc/input.c
index 22cc74c..0294034 100644
--- a/gcc/input.c
+++ b/gcc/input.c
@@ -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;