[Python-Dev] CVS build breakage: snprintf finds its way into socketmodule.c

Mark Favas m.favas@per.dem.csiro.au
Tue, 24 Jul 2001 05:26:28 +0800

"Barry A. Warsaw" wrote:
> =

> >>>>> "MF" =3D=3D Mark Favas <m.favas@per.dem.csiro.au> writes:
> =

>     MF> In the current CVS of 2.2, a call to snprintf now occurs in
>     MF> socketmodule.c, breaking builds on those systems without such
>     MF> a library call (such as Tru64 Unix, and older Solarises).
> =

> I have a GPL'd version of vsnprintf() -- taken from GNU screen -- in
> Mailman for systems that don't have native support.  That's not
> appropriate for Python, but I seem to remember a few other LGPL or
> MIT-ish licensed versions floating around when I did a search a couple
> of years ago.  Maybe it's time to add our own which would only be
> linked in if the platform didn't have native support?
> =

> -Barry

How about the one at http://www.ijs.si/software/snprintf/ ?

=46rom the URL:


Mark Martinec <mark.martinec@ijs.si>, April 1999, June 2000 =

Copyright =A9 1999, Mark Martinec =

Terms and conditions ...

This program is free software; you can redistribute it and/or modify it
under the terms of the Frontier Artistic License which comes with this
Kit. =


    careful adherence to specs regarding flags, field width and
precision; =

    good performance for large string handling (large format, large
argument or large paddings). Performance is similar to system's sprintf
    and in several cases significantly better (make sure you compile
with optimizations turned on, tell the compiler the code is strict ANSI
    necessary to give it more freedom for optimizations); =

    return value semantics per ISO/IEC 9899:1999 ("ISO C99"); =

    written in standard ISO/ANSI C - requires an ANSI C compiler.
""" =

-- =

Mark Favas  -   m.favas@per.dem.csiro.au
CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA