long double (was "strtold?")
Ralf Corsepius
ralf.corsepius@rtems.org
Thu Mar 12 10:02:00 GMT 2009
Schwarz, Konrad wrote:
>> -----Original Message-----
>> From: newlib-owner@sourceware.org
>> [mailto:newlib-owner@sourceware.org] On Behalf Of Ken Werner
>> Sent: Wednesday, March 11, 2009 7:05 PM
>> To: newlib@sourceware.org; Howland Craig D (Craig)
>> Subject: Re: long double (was "strtold?")
>>
>> 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__
I.e. it's likely possible to apply similar tricks as in newlib's stdint.h.
Ralf
More information about the Newlib
mailing list