long double (was "strtold?")

Ken Werner ken@linux.vnet.ibm.com
Thu Mar 12 10:04:00 GMT 2009


On Thursday 12 March 2009 09:35:00 Ralf Corsepius wrote:
> >> Hi,
> >> What about mapping the long double functions to their
> >> counterparts on platforms where a double is as wide as a long
> >> double? The attached patch introduces a flag defined in
> >> sys/features.h. You mentioned HAVE_LONG_DOUBLE_WIDER but the
> >> user may not define this flag. Do you want to generate a
> >> header file that exposes this flag? Wouldn't that result in
> >> something like config.h to be shipped with newlib or am I
> >> missing something?
> >
> > Hi,
> >
> > may I suggest deriving the flag (_DOUBLE_EQUALS_LONG_DOUBLE) from macros
> > defined by <float.h>?
>
> It likely can be done even simpler:
>
> Modern GCC's have internal defines
> __SIZEOF_LONG_DOUBLE__
> and
> __SIZEOF_DOUBLE__
Hi,
Thank you for your suggestions. The attached patch uses the macro defined in 
float.h as Konrad described. The GCC builtin macros have been submitted in 2007 
(released with GCC 4.3) while our users might use older versions.

Regards
Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: longdouble.patch
Type: text/x-patch
Size: 8289 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20090312/2c3dc937/attachment.bin>


More information about the Newlib mailing list