Fix selftest::test_lexer_string_locations_ebcdic for systems without iconv (PR bootst...
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 8 Aug 2016 20:46:19 +0000 (20:46 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 8 Aug 2016 20:46:19 +0000 (20:46 +0000)
selftest::test_lexer_string_locations_ebcdic has this clause:

  /* EBCDIC support requires iconv.  */
  if (!HAVE_ICONV)
    return;

leading to a build failure on systems without iconv.  This conditional
works in libcpp due to this in libcpp/internal.h:

  #if HAVE_ICONV
  #include <iconv.h>
  #else
  #define HAVE_ICONV 0
  typedef int iconv_t;  /* dummy */
  #endif

Fix the problem by ensuring that HAVE_ICONV is always defined within
gcc/input.c.

gcc/ChangeLog:
PR bootstrap/72844
* input.c: Ensure that HAVE_ICONV is defined.

From-SVN: r239257

gcc/ChangeLog
gcc/input.c

index 3cf7074def521c1af23e7bb010ea0833d54ada5d..34cf61e7d6dd583456587428bff8ff5ced135380 100644 (file)
@@ -1,3 +1,8 @@
+2016-08-08  David Malcolm  <dmalcolm@redhat.com>
+
+       PR bootstrap/72844
+       * input.c: Ensure that HAVE_ICONV is defined.
+
 2016-08-08  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/72781
index d058b8aa81f1639156210f86e9722ed1cdcd940b..790de936bacfba9f833355eac9bae125df30cb7e 100644 (file)
@@ -25,6 +25,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "selftest.h"
 #include "cpplib.h"
 
+#ifndef HAVE_ICONV
+#define HAVE_ICONV 0
+#endif
+
 /* This is a cache used by get_next_line to store the content of a
    file to be searched for file lines.  */
 struct fcache