This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wcstold implementation


Hi Nick,

On Jan 22 15:11, Nick Clifton wrote:
> Hi Corinna, Hi Yaakov,
> 
>   What do you think of the attached patch for an implementation of
>   wcstold() for sizeof (long double) > sizeof (double) ?  The patch is
>   against the devo sources, but it could be adapted for FSF newlib
>   easily enough.  One thing that you might not like is that the
>   _wcstold_r implementation calls _strtold and not _strtold_r.  I can
>   fix this too if you think that it is worth it.

We don't have a _strtold_r function, only _strtold.  Along these lines,
I think it should be sufficent to implement wcstold and just skip
_wcstold_r.

With this change, the patch looks ok to apply.

As an extension, for targets striving for smaller code size
(PREFER_SIZE_OVER_SPEED or __OPTIMIZE_SIZE__), but double != long double,
would it make sense to implement strtod in terms of strtold?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: pgpCSAdXnTOF7.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]