This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [PATCH,RFC] Change __convert_from_v to use snprintf and use it


Benjamin Kosnik wrote:

> > Please let me know what do you think of it, if perhaps may be only viable for the head,
> > being to invasive. Tested i686-pc-linux-gnu.
>
> I think the changed signature of __convert_from_v should be checked in,
> even if nothing is done with it at the moment.

Thanks. I will do.

> Also, the testsuite entries.

Those are now in as part of the bottomline fix for money_put::do_put overflows.

> Furthermore,
>
> > I have just learned :-( that snprintf is only part of C99, not of C89,
> > despite being quite widespread. Therefore, we cannot assume it to be
> > available on systems using glibc2.0.x or whatever not C99 compliant.
>
> ....just means that a check for snprintf should be added to
>
> acinclude.m4/GLIBCPP_ENABLE_C99
>
> and the code conditionalized, like
>
> #if _GLIBCPP_USE_C99
> //use snprintf
> #else
> //loose
> #endif

Thanks once more. I admit to be very ignorant about those matters. I'm indeed /very/ happy
to know that snprintf can be used when available (in the form standardized as part of C99,
indeed!)

Just to be reassure myself to understand what you mean: is it ok if what you call //loose
takes in fact 20-30 lines of code, not just a 2-3??

In that case, I'm very happy to work on this in the next few days! The management of the
staging buffers is /so/ nice with snprintf!

Ciao, Paolo.



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