* sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for
[glibc.git] / stdlib / testmb2.c
blob3a3e3546295fd0e67b685d17cde98644182c3a13
1 /* Test case by Miloslav Trmac <mitr@volny.cz>. */
2 #include <locale.h>
3 #include <stdint.h>
4 #include <stdlib.h>
5 #include <stdio.h>
7 int
8 main (void)
10 wchar_t wc;
12 if (setlocale (LC_CTYPE, "de_DE.UTF-8") == NULL)
14 puts ("setlocale failed");
15 return 1;
18 if (mbtowc (&wc, "\xc3\xa1", MB_CUR_MAX) != 2 || wc != 0xE1)
20 puts ("1st mbtowc failed");
21 return 1;
24 if (mbtowc (&wc, "\xc3\xa1", SIZE_MAX) != 2 || wc != 0xE1)
26 puts ("2nd mbtowc failed");
27 return 1;
30 return 0;