This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Importing cacoshl.c and its dependent methos,
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: aditya upadhyay <aadit0402 at gmail dot com>, newlib at sourceware dot org
- Date: Wed, 21 Jun 2017 08:46:03 +0200
- Subject: Re: Importing cacoshl.c and its dependent methos,
- Authentication-results: sourceware.org; auth=none
- References: <CAMZxAxe-Gj+kqQRxUp3g9OK0Mk57uAVmTKqL4N5T-hPBUXXWYQ@mail.gmail.com>
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 ?
<stdbool.h> 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 <stdbool.h> with
#ifndef __cplusplus
typedef enum { false, true } bool;
#endif
and keep the rest of the code unchanged.
--
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äftliche Mitteilung im Sinne des EHUG.