Update syscall lists for Linux 6.6
[glibc.git] / stdio-common / bug14.c
blob69a5b0ba4cbaaabb2bab714453dee6b67b7beebe
1 #include <locale.h>
2 #include <wchar.h>
3 #include <stdio.h>
4 #include <stdlib.h>
6 /* MB_CUR_MAX multibyte ones (6 UTF+0080, in this case) */
7 static const char string[] = "\
8 \xc2\x80\xc2\x80\xc2\x80\xc2\x80\xc2\x80\xc2\x80";
10 int
11 main (void)
13 if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
15 puts ("cannot set locale");
16 exit (1);
19 wchar_t s[7];
20 int n = sscanf (string, "%l[\x80\xc2]", s);
21 if (n != 1)
23 printf ("return values %d != 1\n", n);
24 exit (1);
27 return 0;