hppa: Fix feupdateenv and fesetexceptflag (Bug 18111).
[glibc.git] / libio / tst-setvbuf1.c
blob9222d4050d7633eca8deeca4426034aedb1dfc4d
1 /* Dereived from the test case in BZ #2337. */
2 #include <errno.h>
3 #include <error.h>
4 #include <fcntl.h>
5 #include <locale.h>
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 #include <unistd.h>
10 #include <wchar.h>
13 static char buf[512] __attribute__ ((aligned (4096)));
16 static int
17 do_test (void)
19 setlocale (LC_ALL, "de_DE.UTF-8");
21 FILE *fp = fdopen (dup (STDOUT_FILENO), "a");
22 if (fp == NULL)
23 error (EXIT_FAILURE, errno, "fdopen(,\"a\")");
25 setvbuf (fp, buf, _IOFBF, sizeof (buf));
27 /* fwprintf to unbuffered stream. */
28 fwprintf (fp, L"hello.\n");
30 fclose (fp);
32 /* touch my buffer */
33 buf[45] = 'a';
35 return 0;
38 #define TEST_FUNCTION do_test ()
39 #include "../test-skeleton.c"