]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Fully remove snprintf requirement from the library.
authorNick Bowler <nbowler@draconx.ca>
Sat, 18 Nov 2023 21:41:44 +0000 (16:41 -0500)
committerNick Bowler <nbowler@draconx.ca>
Sat, 18 Nov 2023 21:41:44 +0000 (16:41 -0500)
There is only one remaining unconditional snprintf usage in the library,
which implements the cdecl__strlcpy function.  Replacing this with an
alternate implementation means we no longer need snprintf at all except
when NLS is enabled (in that case, we assume snprintf is available --
possibly provided by GNU libintl).

So we can drop quite a lot of gnulib code potentially going into the
library.  The usual gnulib behaviour is to substitute complete re-
implementations for almost any possible problem, even ones that are
totally irrelevant to the usage at hand.

Bumping dxcommon removes snprintf from the applications too so we can
drop all of this nonsense.  On systems that used the snprintf fallback,
this reduces the overall library size by about 30%.


No differences found