1 From 82c87f1c64a9e2d96c862203ebc5c397bccd2e90 Mon Sep 17 00:00:00 2001
2 From: Yuri Pankov <yuri.pankov@nexenta.com>
3 Date: Sat, 5 Nov 2016 05:26:47 +0300
4 Subject: [PATCH 10/34] 16 update cmn_err format specifier Reviewed by: Richard
5 Lowe <richlowe@richlowe.net> Reviewed by: Robert Mustacchi <rm@joyent.com>
8 gcc/config/sol2-c.c | 22 +++++++++++++---------
9 1 file changed, 13 insertions(+), 9 deletions(-)
11 diff --git a/gcc/config/sol2-c.c b/gcc/config/sol2-c.c
12 index 9eaf43c4c98..202de74d360 100644
13 --- a/gcc/config/sol2-c.c
14 +++ b/gcc/config/sol2-c.c
15 @@ -40,7 +40,10 @@ static const format_length_info cmn_err_length_specs[] =
17 static const format_flag_spec cmn_err_flag_specs[] =
19 + { '0', 0, 0, 0, N_("'0' flag"), N_("the '0' flag"), STD_C89 },
20 + { '-', 0, 0, 0, N_("'-' flag"), N_("the '-' flag"), STD_C89 },
21 { 'w', 0, 0, 0, N_("field width"), N_("field width in printf format"), STD_C89 },
22 + { 'p', 0, 0, 0, N_("precision"), N_("precision in printf format"), STD_C89 },
23 { 'L', 0, 0, 0, N_("length modifier"), N_("length modifier in printf format"), STD_C89 },
24 { 0, 0, 0, 0, NULL, NULL, STD_C89 }
26 @@ -48,6 +51,7 @@ static const format_flag_spec cmn_err_flag_specs[] =
28 static const format_flag_pair cmn_err_flag_pairs[] =
34 @@ -57,21 +61,21 @@ static const format_char_info bitfield_string_type =
35 static const format_char_info cmn_err_char_table[] =
37 /* C89 conversion specifiers. */
38 - { "dD", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", NULL },
39 - { "oOxX",0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", NULL },
40 - { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", NULL },
41 - { "c", 0, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", NULL },
42 - { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "c", NULL },
43 - { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "cR", NULL },
44 - { "b", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "w", "", &bitfield_string_type },
45 + { "dD", 0, STD_C89, { T89_I, BADLEN, BADLEN, T89_L, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "", NULL },
46 + { "oOxX",0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "", NULL },
47 + { "u", 0, STD_C89, { T89_UI, BADLEN, BADLEN, T89_UL, T9L_ULL, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "", NULL },
48 + { "c", 0, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
49 + { "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "c", NULL },
50 + { "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
51 + { "b", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", &bitfield_string_type },
52 { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
55 EXPORTED_CONST format_kind_info solaris_format_types[] = {
56 - { "cmn_err", cmn_err_length_specs, cmn_err_char_table, "", NULL,
57 + { "cmn_err", cmn_err_length_specs, cmn_err_char_table, "0-", NULL,
58 cmn_err_flag_specs, cmn_err_flag_pairs,
59 FMT_FLAG_ARG_CONVERT|FMT_FLAG_EMPTY_PREC_OK,
60 - 'w', 0, 0, 0, 'L', 0,
61 + 'w', 0, 'p', 0, 'L', 0,
62 &integer_type_node, &integer_type_node