EmbDev.net

Forum: ARM programming with GCC/GNU tools Replacement for itoa


von Sameer P. (sameer_pat)


Rate this post
useful
not useful
hi,
        i have a old code which uses "itoa" of stdlib .....how can i
complie it with WINARM as newlib has no function named "itoa". Is there
any replacement for itoa in newlib?

Sameer.

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Sameer Patil wrote:
>         i have a old code which uses "itoa" of stdlib .....how can i
> complie it with WINARM as newlib has no function named "itoa". Is there
> any replacement for itoa in newlib?

For some reason there is no itoa in newlib (yet), maybe because it's not
in the Standard. As a replacement there is always sprintf, but this by
cause an unacceptable memory-footprint if you do not use stdio already.
But there are a lot of itoa implementations freely available. Search for
example koders.com for itoa.c (check if the licenses match your needs).

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.