From patchwork Sat Nov 15 13:20:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3765 Received: (qmail 29187 invoked by alias); 15 Nov 2014 13:20:41 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 29119 invoked by uid 89); 15 Nov 2014 13:20:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 15 Nov 2014 13:20:39 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XpdHI-0005Uq-Ir from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Sat, 15 Nov 2014 05:20:36 -0800 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.181.6; Sat, 15 Nov 2014 05:20:35 -0800 From: Yao Qi To: Subject: [PATCH 6/7] Include wchar.h and wctype.h unconditionally Date: Sat, 15 Nov 2014 21:20:11 +0800 Message-ID: <1416057612-16155-7-git-send-email-yao@codesourcery.com> In-Reply-To: <1416057612-16155-1-git-send-email-yao@codesourcery.com> References: <1416057612-16155-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes 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-15 Yao Qi * 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. --- gdb/gdb_wchar.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 +#include + /* 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 -#include - 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