This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH,RFC] Change __convert_from_v to use snprintf and use it
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Mon, 18 Mar 2002 23:55:33 -0600 (CST)
- Subject: Re: [PATCH,RFC] Change __convert_from_v to use snprintf and use it
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
- References: <3C94AD6F.5FBDCE83@unitus.it>
>....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
FYI, snprintf() is a lot more widespread than just C99 hosts. E.g.,
this text was written in or before 1993 for the printf(3), et al man
page on BSD systems:
"[...] For safety, programmers should use the snprintf() inter-
face instead. Unfortunately, this interface is not portable."
I thought that the tao of autoconf says that we look for target
support at a granularity finer than any particular ISO standard level.
Grouping a bunch of stuff into GLIBCPP_ENABLE_C99 that affects QoI in
addition to what libstdc++-v3 exposes to users via its library headers
seems wrong to me. However, I will not complain after observing this
point since I can't offer to help at the moment (since I am having a
devil of a time just finding the time required to keep my targets
above water).
Regards,
Loren