]> git.ipfire.org Git - thirdparty/glibc.git/blob - include/printf.h
stdio-common: Move union printf_arg int <printf.h>
[thirdparty/glibc.git] / include / printf.h
1 #ifndef _PRINTF_H
2
3 /* Workaround PR90731 with GCC 9 when using ldbl redirects in C++. */
4 #include <bits/floatn.h>
5 #if defined __cplusplus && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
6 # if __GNUC_PREREQ (9, 0) && !__GNUC_PREREQ (9, 3)
7 # pragma GCC system_header
8 # endif
9 #endif
10
11 #include <stdio-common/printf.h>
12
13 # ifndef _ISOMAC
14
15 /* Internal interfaces for registered specifiers. */
16 extern printf_arginfo_size_function **__printf_arginfo_table attribute_hidden;
17 extern printf_function **__printf_function_table attribute_hidden;
18 extern printf_va_arg_function **__printf_va_arg_table attribute_hidden;
19 int __register_printf_specifier (int, printf_function,
20 printf_arginfo_size_function);
21 libc_hidden_proto (__register_printf_specifier)
22
23 /* The various kinds of arguments that can be passed to printf. */
24 union printf_arg
25 {
26 wchar_t pa_wchar;
27 int pa_int;
28 long int pa_long_int;
29 long long int pa_long_long_int;
30 unsigned int pa_u_int;
31 unsigned long int pa_u_long_int;
32 unsigned long long int pa_u_long_long_int;
33 double pa_double;
34 long double pa_long_double;
35 #if __HAVE_FLOAT128_UNLIKE_LDBL
36 _Float128 pa_float128;
37 #endif
38 const char *pa_string;
39 const wchar_t *pa_wstring;
40 void *pa_pointer;
41 void *pa_user;
42 };
43
44 #include <bits/types/locale_t.h>
45
46 /* Now define the internal interfaces. */
47 extern int __printf_fphex (FILE *, const struct printf_info *,
48 const void *const *) attribute_hidden;
49 extern int __printf_fp (FILE *, const struct printf_info *,
50 const void *const *);
51 libc_hidden_proto (__printf_fp)
52 extern int __printf_fp_l (FILE *, locale_t, const struct printf_info *,
53 const void *const *);
54 libc_hidden_proto (__printf_fp_l)
55
56 extern unsigned int __guess_grouping (unsigned int intdig_max,
57 const char *grouping)
58 attribute_hidden;
59
60 # endif /* !_ISOMAC */
61 #endif