From patchwork Wed Mar 6 07:44:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shakthi Kannan X-Patchwork-Id: 225392 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5488A2C03A2 for ; Wed, 6 Mar 2013 18:45:00 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1363160701; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Date:Message-ID:Subject:From:To: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=3Oo1JGc 72eGj1J2l963CGhFdSUM=; b=pQ69oNFwK+7rv/Fdh0IlpxcEkFhoVfgP0ZE7FPs W4iWY1rlD+TzLF2jhaIVmFywgVee2BAwUga8i3P8yXgJuVDlliqUTpbtwX6Vhs+5 9eu3yeKjXBfVycZqhordYUI/WRPRby3E8t604xohL1YqMk+IpghzxcW1ytFwSIlq JfoA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:X-Received:Received:Date:Message-ID:Subject:From:To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=BBgbLuV+mzL1VEQdt6MPcG3/ACSE8Iu2CIOwELvgRYIJfrWA/Uow8pQg8ruYPq NhAWG7hyTnrOhLKHodq+bxPFFphQWJL04lSAwuQgha9YVWDY9OZ607RogHkxZQQ/ 7jLiCggQa2XwdWhiLg80Yka8IPtPExUlGIQ/xpH/+hI9g=; Received: (qmail 28564 invoked by alias); 6 Mar 2013 07:44:53 -0000 Received: (qmail 28553 invoked by uid 22791); 6 Mar 2013 07:44:52 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Mar 2013 07:44:47 +0000 Received: by mail-lb0-f175.google.com with SMTP id n3so5369173lbo.6 for ; Tue, 05 Mar 2013 23:44:46 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.112.26.10 with SMTP id h10mr7196484lbg.63.1362555886027; Tue, 05 Mar 2013 23:44:46 -0800 (PST) Received: by 10.114.67.236 with HTTP; Tue, 5 Mar 2013 23:44:45 -0800 (PST) Date: Wed, 6 Mar 2013 13:14:45 +0530 Message-ID: Subject: [PATCH] Fix PR 55473 From: Shakthi Kannan To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The libquadmath/quadmath.h file cannot be used with C++. The following patch allows inclusion and use of the quadmath.h header file. 2013-03-06 Shakthi Kannan PR libquadmath/55473 * quadmath.h: Add ifdef __cplusplus macros. --- libquadmath/quadmath.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libquadmath/quadmath.h b/libquadmath/quadmath.h index 863fe44..aa9ef51 100644 --- a/libquadmath/quadmath.h +++ b/libquadmath/quadmath.h @@ -23,6 +23,10 @@ Boston, MA 02110-1301, USA. */ #include +#ifdef __cplusplus +extern "C" { +#endif + /* Define the complex type corresponding to __float128 ("_Complex __float128" is not allowed) */ typedef _Complex float __attribute__((mode(TC))) __complex128; @@ -189,4 +193,8 @@ __quadmath_nth (conjq (__complex128 __z)) return __extension__ ~__z; } +#ifdef __cplusplus +} +#endif + #endif