From patchwork Thu May 11 14:17:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Hongjiu" X-Patchwork-Id: 20395 Received: (qmail 60923 invoked by alias); 11 May 2017 14:17:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 60905 invoked by uid 89); 11 May 2017 14:17:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:936 X-HELO: mga05.intel.com X-ExtLoop1: 1 Date: Thu, 11 May 2017 07:17:57 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Check __cplusplus in addition to _ISOMAC Message-ID: <20170511141756.GA26086@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) When compiling for C++, only include and nothing else. Any comments? H.J. --- * include/wctype.h: Check __cplusplus in addition to _ISOMAC. --- include/wctype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wctype.h b/include/wctype.h index a71b103..74f9f47 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -1,6 +1,6 @@ #ifndef _WCTYPE_H -#ifndef _ISOMAC +#if !defined _ISOMAC && !defined __cplusplus /* We try to get wint_t from , but not all GCC versions define it there. So define it ourselves if it remains undefined. */ # define __need_wint_t @@ -38,7 +38,7 @@ libc_hidden_proto (towupper) #include -#ifndef _ISOMAC +#if !defined _ISOMAC && !defined __cplusplus /* Internal interfaces. */ extern int __iswspace (wint_t __wc); extern int __iswctype (wint_t __wc, wctype_t __desc);