From patchwork Mon Feb 1 16:21:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 576613 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 62CF31402ED for ; Tue, 2 Feb 2016 03:22:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=jBqk8Njk; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=Z+DQfdiWs4Tnib1q Jn5bU3rxvt+TzH2pr0mBbzIxGTDnV2wZttviZjOmh3d/CI551ijzOMF+A+554lkH uob5XL9jYOfzDxqigi5vVPyB/dN7o2AA2V3+JmUCwF1jPF1P+x1GFM04Cn3Or0rv ElPrmKopWv4rWiDpDPP/BeiU9A0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :mime-version:content-type; s=default; bh=UhQ30uF9QBWHZwNY0CR+JR T7q0k=; b=jBqk8NjkEj+7T6r8Z/dmP/AgCNPn3nPQ32pjLYUZ9uIP/0Az04XMTy UVkrtZxvdH0dEGLrldsnNqRziN7RllxO+DeJ12ep2FoK+qytJWcs3VjrAUQzb693 hNgTyfI1QBIU0+kCIyrJwrQPxhnsbOkp2piepCo7kLCwIC73M8dwA= Received: (qmail 79546 invoked by alias); 1 Feb 2016 16:22:00 -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 79528 invoked by uid 89); 1 Feb 2016 16:22:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=fl, 2327, 2349, infinity X-HELO: mx1.redhat.com Date: Mon, 1 Feb 2016 17:21:52 +0100 From: Jakub Jelinek To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Jonathan Wakely Subject: [PATCH] Preserve ::is{inf,nan}{f,l} prototypes even for C++11 and later Message-ID: <20160201162152.GH3017@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) The recent changes disable not just ::is{inf,nan} prototypes that are incompatible with C++11 and later and that are defined in or libstdc++ wrapper, but also the ::is{inf,nan}{f,l} prototypes, that are not incompatible with C++11. This patch adds them back. --- math/bits/mathcalls.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h index a48345d..1b82fcd 100644 --- a/math/bits/mathcalls.h +++ b/math/bits/mathcalls.h @@ -196,7 +196,9 @@ __MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); _Mdouble_END_NAMESPACE #ifdef __USE_MISC -# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11. */ +# if (!defined __cplusplus \ + || __cplusplus < 201103L /* isinf conflicts with C++11. */ \ + || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't. */ /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); @@ -232,7 +234,9 @@ __END_NAMESPACE_C99 __MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) -# if !defined __cplusplus || __cplusplus < 201103L /* Conflicts with C++11. */ +# if (!defined __cplusplus \ + || __cplusplus < 201103L /* isinf conflicts with C++11. */ \ + || __MATH_DECLARING_DOUBLE == 0) /* isinff or isinfl don't. */ /* Return nonzero if VALUE is not a number. */ __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); # endif