wcstod/wcstof

Corinna Vinschen vinschen@redhat.com
Fri Feb 6 10:30:00 GMT 2009


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



More information about the Newlib mailing list