1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-08 17:22:05 +03:00

string-buffer: Link to vasnprintf implementation only when needed.

* lib/string-buffer-printf.c: New file, extracted from
lib/string-buffer.c.
* lib/string-buffer.c: Don't include <stdarg.h>.
(sb_ensure_more_bytes): Declare. Make non-static.
(sb_appendvf, sb_appendf): Moved to lib/string-buffer-printf.c.
* modules/string-buffer (Files): Add lib/string-buffer-printf.c.
(Makefile.am): Arrange to compile string-buffer-printf.c.
This commit is contained in:
Bruno Haible
2024-09-24 17:28:07 +02:00
parent 5a7754d11e
commit 413cbae0c2
4 changed files with 207 additions and 162 deletions

View File

@@ -4,6 +4,7 @@ A buffer that accumulates a string by piecewise concatenation.
Files:
lib/string-buffer.h
lib/string-buffer.c
lib/string-buffer-printf.c
Depends-on:
stdbool
@@ -14,7 +15,7 @@ vsnprintf-posix
configure.ac:
Makefile.am:
lib_SOURCES += string-buffer.c
lib_SOURCES += string-buffer.c string-buffer-printf.c
Include:
"string-buffer.h"