aboutsummaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/Makefile3
-rw-r--r--stdio-common/bug15.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index bfdef2b..35273f1 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -54,7 +54,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \
scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \
tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
- tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14
+ tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15
test-srcs = tst-unbputc tst-printf
@@ -87,6 +87,7 @@ tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata
bug14-ENV = LOCPATH=$(common-objpfx)localedata
+bug15-ENV = LOCPATH=$(common-objpfx)localedata
ifneq (,$(filter %REENTRANT, $(defines)))
CPPFLAGS += -D_IO_MTSAFE_IO
diff --git a/stdio-common/bug15.c b/stdio-common/bug15.c
new file mode 100644
index 0000000..825ca2f
--- /dev/null
+++ b/stdio-common/bug15.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+#include <locale.h>
+
+int
+main (void)
+{
+ char buf[10];
+ setlocale (LC_ALL, "vi_VN.TCVN-5712");
+ return sprintf (buf, "%.*s", 2, "vi") != 2;
+}