This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
wcstod/wcstof
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 6 Feb 2009 11:29:54 +0100
- Subject: wcstod/wcstof
- Reply-to: newlib at sourceware dot org
Hi,
there are two possible ways to implement wcstod/wcstof:
o Convert the wchar string to multibyte and call strtod.
+ Very tiny code. Good for embedded targets.
- The endptr position is not reliable.
- Slower than strtod.
o Copy the entire code from strtod.c and just
+ As fast as strtod.
+ Reliable endptr.
- Much bigger code.
Which solution is preferrable for newlib? Maybe both, dependent on
PREFER_SIZE_OVER_SPEED/__OPTIMIZE_SIZE__?
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat