Re: [Freeciv-Dev] GTK-client and snprintf
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Heikki Kantola wrote:
> There appears to be one portability issue in the GTK-client code: it
> requires snprintf-function, which unfortunately isn't available on
> every platform,
Indeed having snprintf available would be very useful not only
for the gtk client, since it would make it much easier to reliably
avoid buffer overruns in many places.
> However, it should be trivial to do same what many other programs do:
> check in configure whether if system has native function and if not
> use the one included.
Yes. We mainly need to find an implementation of snprintf
(presumably also vsnprintf?) which is:
- good quality
- suitably licenced
- easy to incorporate into freeciv (eg, standalone)
> In fact, I've already managed to compile the
> program by using the snprint.c from Mutt, but I'm not yet familiar
> enough with FreeCiv code and autoconf etc to make a patch for that...
So does the Mutt snprint.c meet the above criteria?
If so, some of us should be able to incorporate it into freeciv.
Regards,
-- David
|
|