Liste des Groupes | Revenir à co vms |
On 6/23/2025 10:16 PM, Arne Vajhøj wrote:It turns out tds_vasprtintf already uses vsnprintf if HAVE_VSNPRINTF isOn 6/23/2025 9:49 PM, Craig A. Berry wrote:On the other side, then ditching existing code and taking thisThis one looks pretty simple and depends only on vsnprintf, which has>
been in VMS since 7.3-2, so it was probably in some ancient standard,
though I haven't looked yet:
>
https://github.com/jkaivo/asprintf/blob/asprintf/asprintf.h
>
It's MIT which I think can be included in a GPL project like FreeTDS. I
will try to remember to look at this when I get some other things sorted
out.
It could definitely be used.
>
But why not just steal the trick from it instead of the whole code?
>
The trick they use is va_copy.
>
I think tds_vasprintf could use va_copy to solve the problem as well!
would also switch form vfprintf to vsnprintf for length
determination, which Lawrence is correct would be
better.
Les messages affichés proviennent d'usenet.