Use binutils 2.38 branch in build-many-glibcs.py
[glibc.git] / stdlib / testmb2.c
blob3f754746374c0eacb15e650b0faf1d736d891274
1 #include <locale.h>
2 #include <stdint.h>
3 #include <stdlib.h>
4 #include <stdio.h>
6 int
7 main (void)
9 wchar_t wc;
11 if (setlocale (LC_CTYPE, "de_DE.UTF-8") == NULL)
13 puts ("setlocale failed");
14 return 1;
17 if (mbtowc (&wc, "\xc3\xa1", MB_CUR_MAX) != 2 || wc != 0xE1)
19 puts ("1st mbtowc failed");
20 return 1;
23 if (mbtowc (&wc, "\xc3\xa1", SIZE_MAX) != 2 || wc != 0xE1)
25 puts ("2nd mbtowc failed");
26 return 1;
29 return 0;