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

string-buffer: Fixes.

* modules/string-buffer (License): Change to LGPL.
* tests/test-string-buffer.c (main): Add another sb_appendf call, that
is more likely to fail.
This commit is contained in:
Bruno Haible
2021-02-27 18:12:09 +01:00
parent 6466d2540a
commit 783f2967e2
3 changed files with 16 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
2021-02-27 Bruno Haible <bruno@clisp.org>
string-buffer: Fixes.
* modules/string-buffer (License): Change to LGPL.
* tests/test-string-buffer.c (main): Add another sb_appendf call, that
is more likely to fail.
2021-02-25 Bernhard Voelker <mail@bernhard-voelker.de> 2021-02-25 Bernhard Voelker <mail@bernhard-voelker.de>
gitlog-to-changelog: output SHA in "empty commit message" warning gitlog-to-changelog: output SHA in "empty commit message" warning

View File

@@ -20,7 +20,7 @@ Include:
"string-buffer.h" "string-buffer.h"
License: License:
LGPLv2+ LGPL
Maintainer: Maintainer:
all all

View File

@@ -90,12 +90,19 @@ main ()
free (s); free (s);
} }
/* Test printf-like formatting failure. */ /* Test printf-like formatting failure.
On all systems except AIX, trying to convert the wide-character 0x76543210
to a multibyte string (in the "C" locale) fails.
On all systems where REPLACE_VSNPRINTF=1 (this includes AIX), i.e. where
the Gnulib implementation of vsnprintf() is used), invalid format
directives make the *printf call fail. */
{ {
struct string_buffer buffer; struct string_buffer buffer;
sb_init (&buffer); sb_init (&buffer);
sb_append (&buffer, "<"); sb_append (&buffer, "<");
sb_appendf (&buffer, "%lc", 0x76543210);
sb_append (&buffer, "|");
sb_appendf (&buffer, invalid_format_string_1, 1); sb_appendf (&buffer, invalid_format_string_1, 1);
sb_append (&buffer, "|"); sb_append (&buffer, "|");
sb_appendf (&buffer, invalid_format_string_2, 2); sb_appendf (&buffer, invalid_format_string_2, 2);