]> git.draconx.ca Git - cdecl99.git/commit
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)
commiteda9528293fbc32857a5856a30ebd6585b281215
tree82a73e0861a38b9aee7b1186204045234570c373
parent72aedaedd7afa666f7c69dfe7ef4b7ec3dbc2458
libcdecl: Fully remove snprintf requirement from the library.

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%.
bootstrap
common
m4/gnulib-cache.m4
src/output.c