aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-11-21 22:05:41 +0800
committerYao Qi <yao@codesourcery.com>2014-11-21 22:05:41 +0800
commite01e2baa693e8d623e04dd66a55a75a2102bb7cb (patch)
tree9bc54840570ba22832f9392ad49dbf1917f2c1d8
parentf0c00af8b494001e2a49a2f9ee2df7f340f80f0d (diff)
downloadgdb-e01e2baa693e8d623e04dd66a55a75a2102bb7cb.zip
gdb-e01e2baa693e8d623e04dd66a55a75a2102bb7cb.tar.gz
gdb-e01e2baa693e8d623e04dd66a55a75a2102bb7cb.tar.bz2
Include wchar.h and wctype.h unconditionally
As gnulib modules wchar and wctype is imported, we can include wchar.h and wctype.h unconditionally. This patch is also to remove HAVE_WCHAR_H check. gdb: 2014-11-21 Yao Qi <yao@codesourcery.com> * gdb_wchar.h: Include wchar.h and wctype.h. [HAVE_ICONV && HAVE_BTOWC]: Don't check HAVE_WCHAR_T and don't include wchar.h and wctype.h. Don't check HAVE_WCHAR_H.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/gdb_wchar.h10
2 files changed, 12 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 108ae86..3b8a37b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2014-11-21 Yao Qi <yao@codesourcery.com>
+ * gdb_wchar.h: Include wchar.h and wctype.h.
+ [HAVE_ICONV && HAVE_BTOWC]: Don't check HAVE_WCHAR_T and don't
+ include wchar.h and wctype.h.
+ Don't check HAVE_WCHAR_H.
+
+2014-11-21 Yao Qi <yao@codesourcery.com>
+
* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add wchar
and wctype-h.
* gnulib/import/Makefile.am: Re-generated.
diff --git a/gdb/gdb_wchar.h b/gdb/gdb_wchar.h
index f88673b..c7a0f1e 100644
--- a/gdb/gdb_wchar.h
+++ b/gdb/gdb_wchar.h
@@ -49,18 +49,18 @@
#define PHONY_ICONV
#endif
+#include <wchar.h>
+#include <wctype.h>
+
/* We use "btowc" as a sentinel to detect functioning wchar_t support.
We check for either __STDC_ISO_10646__ or a new-enough libiconv in
order to ensure we can convert to and from wchar_t. We choose
libiconv version 0x108 because it is the first version with
iconvlist. */
-#if defined (HAVE_ICONV) && defined (HAVE_WCHAR_H) && defined (HAVE_BTOWC) \
+#if defined (HAVE_ICONV) && defined (HAVE_BTOWC) \
&& (defined (__STDC_ISO_10646__) \
|| (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108))
-#include <wchar.h>
-#include <wctype.h>
-
typedef wchar_t gdb_wchar_t;
typedef wint_t gdb_wint_t;
@@ -94,7 +94,7 @@ const char *intermediate_encoding (void);
/* If we got here and have wchar_t support, we might be on a system
with some problem. So, we just disable everything. */
-#if defined (HAVE_WCHAR_H) && defined (HAVE_BTOWC)
+#if defined (HAVE_BTOWC)
#define PHONY_ICONV
#endif