summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2013-07-03 15:17:25 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2013-07-03 15:17:25 +0000
commitdf075bab477333f8d4eed2e1770bf43c2adea218 (patch)
treeaf46678beab66f0610095e83bed7eadbfd31d86f /gnu
parent627ebcc3dbdcfe3927833d56e83134805cb7cae8 (diff)
add support for %td for ptrdiff_t in kernel printf
this also adds support in gcc 4.x kprintf format checks ok kettenis@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gcc/gcc/c-format.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/gcc/gcc/c-format.c b/gnu/gcc/gcc/c-format.c
index b9eecee413c..1b1734bd30f 100644
--- a/gnu/gcc/gcc/c-format.c
+++ b/gnu/gcc/gcc/c-format.c
@@ -325,6 +325,7 @@ static const format_length_info kprintf_length_specs[] =
{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L },
{ "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 },
{ "z", FMT_LEN_z, STD_C99, NULL, 0, 0 },
+ { "t", FMT_LEN_t, STD_C99, NULL, 0, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
};
@@ -552,9 +553,9 @@ static const format_char_info asm_fprintf_char_table[] =
static const format_char_info kprint_char_table[] =
{
/* C89 conversion specifiers. */
- { "di", 0, STD_C89, { T89_I, BADLEN, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +'I", "i", NULL },
- { "oxX", 0, STD_C89, { T89_UI, BADLEN, T89_US, T89_UL, T9L_ULL, BADLEN, T99_ST, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL },
- { "u", 0, STD_C89, { T89_UI, BADLEN, T89_US, T89_UL, T9L_ULL, BADLEN, T99_ST, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0'I", "i", NULL },
+ { "di", 0, STD_C89, { T89_I, BADLEN, T89_S, T89_L, T9L_LL, BADLEN, T99_SST, T99_PD, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0 +'I", "i", NULL },
+ { "oxX", 0, STD_C89, { T89_UI, BADLEN, T89_US, T89_UL, T9L_ULL, BADLEN, T99_ST, T99_UPD, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0#", "i", NULL },
+ { "u", 0, STD_C89, { T89_UI, BADLEN, T89_US, T89_UL, T9L_ULL, BADLEN, T99_ST, T99_UPD, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0'I", "i", NULL },
{ "c", 0, STD_C89, { T89_I, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-w", "", NULL },
{ "s", 1, STD_C89, { T89_C, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp", "cR", NULL },
{ "p", 1, STD_C89, { T89_V, BADLEN, BADLEN, T89_UL, T9L_LL, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "-wp0", "c", NULL },