1 --- printf-pos.c.orig 2010-10-25 19:45:24.000000000 -0700
2 +++ printf-pos.c 2010-10-25 19:47:02.000000000 -0700
3 @@ -63,7 +63,10 @@ enum typeid {
4 T_LONG, T_U_LONG, TP_LONG, T_LLONG, T_U_LLONG, TP_LLONG,
5 T_PTRDIFFT, TP_PTRDIFFT, T_SSIZET, T_SIZET, TP_SSIZET,
6 T_INTMAXT, T_UINTMAXT, TP_INTMAXT, TP_VOID, TP_CHAR, TP_SCHAR,
7 - T_DOUBLE, T_LONG_DOUBLE, T_WINT, TP_WCHAR
8 + T_DOUBLE, T_LONG_DOUBLE, T_WINT, TP_WCHAR,
14 /* An expandable array of types. */
15 @@ -240,7 +243,7 @@ addwaster(struct typetable *types, wchar
16 * It will be replaces with a malloc-ed one if it overflows.
17 * Returns 0 on success. On failure, returns nonzero and sets errno.
20 +__private_extern__ int
21 __find_arguments (const char *fmt0, va_list ap, union arg **argtable)
23 char *fmt; /* format string */
24 @@ -342,7 +345,11 @@ reswitch: switch (ch) {
27 error = addtype(&types,
29 + (flags & LONGINT) ? T_WINT : ((flags & VECTOR) ? T_VECTOR : T_INT));
31 (flags & LONGINT) ? T_WINT : T_INT);
36 @@ -351,6 +358,12 @@ reswitch: switch (ch) {
41 + if (flags & VECTOR) {
42 + if ((error = addtype(&types, T_VECTOR)))
46 if ((error = addsarg(&types, flags)))
49 @@ -360,10 +373,15 @@ reswitch: switch (ch) {
56 error = addtype(&types,
58 + (flags & VECTOR) ? T_VECTOR : ((flags & LONGDBL) ? T_LONG_DOUBLE : T_DOUBLE));
60 (flags & LONGDBL) ? T_LONG_DOUBLE : T_DOUBLE);
65 @@ -392,11 +410,21 @@ reswitch: switch (ch) {
70 + if (flags & VECTOR) {
71 + if ((error = addtype(&types, T_VECTOR)))
75 if ((error = adduarg(&types, flags)))
80 + if ((error = addtype(&types, (flags & VECTOR) ? T_VECTOR : TP_VOID)))
82 if ((error = addtype(&types, TP_VOID)))
87 @@ -414,6 +442,12 @@ reswitch: switch (ch) {
92 + if (flags & VECTOR) {
93 + if ((error = addtype(&types, T_VECTOR)))
97 if ((error = adduarg(&types, flags)))
100 @@ -431,7 +465,7 @@ error:
103 /* wchar version of __find_arguments. */
105 +__private_extern__ int
106 __find_warguments (const wchar_t *fmt0, va_list ap, union arg **argtable)
108 wchar_t *fmt; /* format string */
109 @@ -551,6 +585,7 @@ reswitch: switch (ch) {
116 error = addtype(&types,
117 @@ -741,6 +776,11 @@ build_arg_table(struct typetable *types,
118 (*argtable) [n].longdoublearg = va_arg (ap, long double);
123 + (*argtable) [n].vectorarg = va_arg (ap, VECTORTYPE);
125 +#endif /* VECTORS */
127 (*argtable) [n].pchararg = va_arg (ap, char *);