Define in_int32_t_range to check if the 64 bit time_t syscall should be used
[glibc.git] / libio / tst-wmemstream1.c
blobf80655b2a418c290dbf08b7d502a2f87511a5899
1 #include <wchar.h>
3 extern int fclose (FILE*);
5 #if defined __GNUC__ && __GNUC__ >= 11
6 /* Verify that calling fclose on the result of open_wmemstream doesn't
7 trigger GCC -Wmismatched-dealloc with fclose forward-declared and
8 without <stdio.h> included first (it is included later, in.
9 "tst-memstream1.c"). */
10 #pragma GCC diagnostic push
11 #pragma GCC diagnostic error "-Wmismatched-dealloc"
12 #endif
14 int test_open_wmemstream_no_stdio (void)
17 wchar_t *buf;
18 size_t size;
19 FILE *f = open_wmemstream (&buf, &size);
20 fclose (f);
24 FILE* (*pf)(wchar_t**, size_t*) = open_wmemstream;
25 wchar_t *buf;
26 size_t size;
27 FILE *f = pf (&buf, &size);
28 fclose (f);
30 return 0;
33 #if defined __GNUC__ && __GNUC__ >= 11
34 /* Restore -Wmismatched-dealloc setting. */
35 # pragma GCC diagnostic pop
36 #endif
38 #define CHAR_T wchar_t
39 #define W(o) L##o
40 #define OPEN_MEMSTREAM open_wmemstream
42 #include "tst-memstream1.c"