From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5521 invoked by alias); 21 Jun 2017 12:05:01 -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 5476 invoked by uid 89); 21 Jun 2017 12:04:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=ages, Newlib, H*f:sk:kqQRxUp, H*f:sk:0205aa5 X-HELO: mail-ot0-f174.google.com Received: from mail-ot0-f174.google.com (HELO mail-ot0-f174.google.com) (74.125.82.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Jun 2017 12:04:57 +0000 Received: by mail-ot0-f174.google.com with SMTP id s7so110397068otb.3 for ; Wed, 21 Jun 2017 05:04:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=/UK7nRT/QgLUAkPVFnwwIMj7Rf49NH7A2OCcYhCsc0w=; b=qK0gKEmTE4/CmewH7fEgWrfCoCQG7nWaxlahcdXhB9EXwbBrit74/d+JWQUipsWk4x yvd+MGuzISnAR2g1zeSZFyimeWIDXJvjotM0FPU0LBUlsp6MTqxVsNLM2z16c5r4ZeFS 7MYF5s2MLdbalhnPbqvTuT6w5XpXTUD4/Uwkv5wzpcDVgJDQOJIZDKLISu2UnV30kCuZ yAUy2cwmsREQp6nZTt63RmU2DrDz+LsdWOR0PzaIhjSqaG21yir79pisP5RJ8rXKHGOc T+B3jhl2ZoxwotwBBLLbzepI7Js4Vz9rfBeaeMVf3S3EV0gBzQE5dh0C+ZxyI1tcK93I L3oQ== X-Gm-Message-State: AKS2vOzf3bAoDDII4AnmWElP/sA+PzFuGWT1R2FYX9JRwAjAT9dUVMpd GYLyp205Qg8+LPkIRyODnzgsUve5sq/0 X-Received: by 10.157.5.162 with SMTP id 31mr4883038otd.242.1498046695148; Wed, 21 Jun 2017 05:04:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.83.29 with HTTP; Wed, 21 Jun 2017 05:04:54 -0700 (PDT) In-Reply-To: <20170621082825.GD6658@calimero.vinschen.de> References: <0205aa55-7b80-245d-0af6-4fe67c15429f@embedded-brains.de> <20170621082825.GD6658@calimero.vinschen.de> From: aditya upadhyay Date: Wed, 21 Jun 2017 12:05:00 -0000 Message-ID: Subject: Re: Importing cacoshl.c and its dependent methos, To: newlib@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00446.txt.bz2 So ,To not rely on stdbool.h from c99, do i have to port stdbool.h 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 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 should add >> this dependency if its only needed by csqrtl.c (in overall NetBSD 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 newlib, > shouldn't we be able to rely on c99 being available? > > > Corinna > > -- > Corinna Vinschen > Cygwin Maintainer > Red Hat