Subject: Re: Again: how how best handle libnbcompat (snprintf)?
To: Georg Schwarz <>
From: Alistair Crooks <>
List: tech-pkg
Date: 11/29/2005 14:03:17
On Tue, Nov 29, 2005 at 02:15:02PM +0100, Georg Schwarz wrote:
> pkgtools/digest needs snprintf() to compile, which IRIX 5.3 does not
> have. Fortunately libnbcompat provides that function.
> Adding
> .include "../../pkgtools/libnbcompat/" # for snprintf()
> in pkgtools/digest/Makefile nicely solves the issue. Now I am wondering
> whether this should simply be done unconditionally. Could this add
> unnecessary code for other OSes? Or is there some clever mechanism in
> libnbcompat to prevent this?

Snprintf is only used in tiger.c and whirlpool.c, and their use could
easily be done by sprintf() with no ill effects.

Cue the cargo cult gasps of "but sprintf is not secure".