From patchwork Tue Feb 12 11:57:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 219833 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 1534E2C0322 for ; Tue, 12 Feb 2013 22:58:13 +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=1361275094; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=gqxHAE0wdx8+BHgKpsXYF3ezsBA=; b=Tkxvc+2Bjnar003o9OlvE9KhPKNHNyBP7LvJrNZ5ZtTT3A7WpNsTLRM0+Xjl80 vMeciBZ7TFnyiIlUcQfuKkOmcYX9AFuN5ynOCDO1avgBgjsK0lD3c6vVKBoyyUVF 7b64H5cIk+ZCz733aP2TW+tLwrllp0VkPdeGLYcz6W/Z8= 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:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=x25IsGPYTKQkMhtXzc+iZxCW4cHbQsZ5dUWBnTUa7Div5nwYVzoFLNBn0MTr6m e1PfBPqRk8e3Y5zoopZj+3x0WZmvAvANCgggB0qmNLrjcp6FVVmCLUa47q8jpIBr 00JUWnHEVXcOoYiTWY+ORwOmUSXmZgt2uWJDbwBonZieY=; Received: (qmail 517 invoked by alias); 12 Feb 2013 11:58:08 -0000 Received: (qmail 504 invoked by uid 22791); 12 Feb 2013 11:58:08 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, FSL_NEW_HELO_USER, KHOP_THREADED, RCVD_IN_HOSTKARMA_NO, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Feb 2013 11:58:02 +0000 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r1CBw0iR030275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 12 Feb 2013 11:58:01 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r1CBvxln021259 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Feb 2013 11:58:00 GMT Received: from abhmt115.oracle.com (abhmt115.oracle.com [141.146.116.67]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r1CBvxoL025781; Tue, 12 Feb 2013 05:57:59 -0600 Received: from [192.168.1.4] (/79.43.214.182) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 12 Feb 2013 03:57:59 -0800 Message-ID: <511A2E44.2090404@oracle.com> Date: Tue, 12 Feb 2013 12:57:56 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 MIME-Version: 1.0 To: dominiq@lps.ens.fr CC: libstdc++@gcc.gnu.org, jason@redhat.com, gcc-patches@gcc.gnu.org, bkoz@redhat.com Subject: Re: RFA: v3 PATCH to add on_quick_exit/quick_exit to std References: <20130212112631.383213BE18@mailhost.lps.ens.fr> <511A283D.3010401@oracle.com> <20130212114043.2E91F3BE18@mailhost.lps.ens.fr> In-Reply-To: <20130212114043.2E91F3BE18@mailhost.lps.ens.fr> 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 On 02/12/2013 12:40 PM, dominiq@lps.ens.fr wrote: > IIRC I have already asked a similar question about atan2, erf, ... > which don't appear in the std namespace on darwin. You should check whether darwin by chance uses by default c_std instead of c_global. The former doesn't provide C++11 facilities. If, on the other hand, it uses c_global, it means _GLIBCXX_USE_C99_MATH_TR1 is undefined because a configure test fails on that specific darwin release you are using. But the last time I checked, modern darwin defined _GLIBCXX_USE_C99_MATH_TR1, no problems. Anyway, about the cstdlib issue the below makes available the new functions in c_std/cstdlib too, and I'm going to commit it, it's close to what Jason originally committed. But, as I said already we don't normally provide C++11 functions in c_std, Benjamin may want to review what we are doing in c_std vs c_global, he designed the split. Paolo. ////// Index: include/c_std/cstdlib =================================================================== --- include/c_std/cstdlib (revision 195968) +++ include/c_std/cstdlib (working copy) @@ -57,6 +57,14 @@ extern "C" void abort(void) throw () _GLIBCXX_NORETURN; extern "C" int atexit(void (*)()) throw (); extern "C" void exit(int) throw () _GLIBCXX_NORETURN; +#if __cplusplus >= 201103L +# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT + extern "C" int at_quick_exit(void (*)()) throw (); +# endif +# ifdef _GLIBCXX_HAVE_QUICK_EXIT + extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN; +# endif +#endif } // namespace #else @@ -67,6 +75,11 @@ #undef abort #undef abs #undef atexit +#if __cplusplus >= 201103L +# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT +# undef at_quick_exit +# endif +#endif #undef atof #undef atoi #undef atol @@ -83,6 +96,11 @@ #undef mbstowcs #undef mbtowc #undef qsort +#if __cplusplus >= 201103L +# ifdef _GLIBCXX_HAVE_QUICK_EXIT +# undef quick_exit +# endif +#endif #undef rand #undef realloc #undef srand @@ -103,6 +121,11 @@ using ::abort; using ::abs; using ::atexit; +#if __cplusplus >= 201103L +# ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT + using ::at_quick_exit; +# endif +#endif using ::atof; using ::atoi; using ::atol; @@ -121,6 +144,11 @@ using ::mbtowc; #endif // _GLIBCXX_HAVE_MBSTATE_T using ::qsort; +#if __cplusplus >= 201103L +# ifdef _GLIBCXX_HAVE_QUICK_EXIT + using ::quick_exit; +# endif +#endif using ::rand; using ::realloc; using ::srand;