From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57701 invoked by alias); 26 Jun 2017 06:05:02 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 56483 invoked by uid 89); 26 Jun 2017 06:03:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL,BAYES_00,FOREIGN_BODY,RCVD_IN_DNSWL_NONE,SPF_PASS,T_FILL_THIS_FORM_SHORT autolearn=no version=3.3.2 spammy=ages, Nachricht, nachricht, H*f:sk:CAMZxAx X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Jun 2017 06:03:44 +0000 Received: from [88.198.220.130] (helo=sslproxy01.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dPN7e-0006Bz-St for newlib@sourceware.org; Mon, 26 Jun 2017 08:03:42 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dPN7e-0007Q3-JF for newlib@sourceware.org; Mon, 26 Jun 2017 08:03:42 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 609312A004F for ; Mon, 26 Jun 2017 08:03:40 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id doCcKeObGzys for ; Mon, 26 Jun 2017 08:03:40 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 068162A160A for ; Mon, 26 Jun 2017 08:03:40 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jIzdieILUoTv for ; Mon, 26 Jun 2017 08:03:39 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id E24C82A004F for ; Mon, 26 Jun 2017 08:03:39 +0200 (CEST) Subject: Re: Importing cacoshl.c and its dependent methos, To: newlib@sourceware.org References: <0205aa55-7b80-245d-0af6-4fe67c15429f@embedded-brains.de> <20170621082825.GD6658@calimero.vinschen.de> From: Sebastian Huber Message-ID: <3f8caf5f-ed3a-515d-0cac-67280486ce59@embedded-brains.de> Date: Mon, 26 Jun 2017 06:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00473.txt.bz2 On 21/06/17 17:02, Craig Howland wrote: > On 06/21/2017 08:04 AM, aditya upadhyay wrote: >> So ,To not rely on stdbool.h from c99, do i have to port stdbool.h=20 >> here also ? >> Otherwise we can use >> #ifndef __cplusplus >> typedef enum { false, true } bool; >> #endif >> >> Thanks a lot for your suggested modification. I am applying the >> required the modification. >> >> Regards, >> Aditya Upadhyay >> >> On Wed, Jun 21, 2017 at 1:58 PM, Corinna Vinschen=20 >> wrote: >>> On Jun 21 08:46, Sebastian Huber wrote: >>>> On 21/06/17 04:24, aditya upadhyay wrote: >>>> >>>>> Hello Developers, >>>>> In cacoshl.c, There is a dependency between cacoshl.c and csqrtl.c. >>>>> In ported csqrtl.c from NetBSD, stdbool.h is there, But i saw there >>>>> is no stdbool.h. >>>>> >>>>> So for bool data type, I have used enum. Is it a right way or not. >>>>> please suggest or do i have to use stdbool.h from gcc library ? >>>> is currently not used by Newlib. I am not sure if we=20 >>>> should add >>>> this dependency if its only needed by csqrtl.c (in overall NetBSD=20 >>>> libm) and >>>> not visible to the user. >>>> >>>> I would replace the #include with >>>> >>>> #ifndef __cplusplus >>>> typedef enum { false, true } bool; >>>> #endif >>>> >>>> and keep the rest of the code unchanged. >>> Wait. Isn't stdbool.h available in gcc for ages? When building=20 >>> newlib, >>> shouldn't we be able to rely on c99 being available? >>> >>> >>> Corinna >>> > Yes, we can, and should. That's because complex.h and stdbool.h were=20 > added in C99, making C99 required for these functions. I did a quick=20 > check on some older cross-compiler installs that I have, and GCC 4.1.1=20 > has stdbool.h (and 4.6.4 has complex.h). > Craig Yes, since is C99 it makes sense to use as well.=20 In GCC the is available since 1998. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG.