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: Use siprintf() in asctime_r.c


On May 23 13:01, Philip Munts wrote:
> When I called ctime() in a test program for an ARM9 target, I noticed that floating point libraries were linked in.
> 
> I eventually traced this to sprintf() in asctime_r.c.  This should be changed to siprintf().  There are perhaps many other places throughout newlib where calls to xprintf() should be changed to xiprintf().

There are not many sprintf calls, except for in the Linux subtree,
which shouldn't matter, and in ldtoa, which is floating point anyway.

However, wwhile greping for sprintf in newlib, it occured to me that
on REENT_ONLY targets we don't have sprintf, nor siprintf.  Shouldn't
we call sprintf_r or siprintf_r within newlib to avoid breaking 
REENT_ONLY targets?  OTOH, it's interesting that we never had a
complaint about this before.  Does nobody build REENT_ONLY targets?


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


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