From 556b13a0c2a94c35ddcb373232d31d99e9a661d7 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 20 Nov 2014 14:05:28 +0000 Subject: * libc/stdio/nano-vfprintf_i.c (_printf_i): Use LONGINT when void* is larger than an int. --- newlib/ChangeLog | 5 +++++ newlib/libc/stdio/nano-vfprintf_i.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'newlib') diff --git a/newlib/ChangeLog b/newlib/ChangeLog index da7671c..b3c16e6 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2014-11-20 Peter A. Bigot + + * libc/stdio/nano-vfprintf_i.c (_printf_i): Use LONGINT when void* is + larger than an int. + 2014-11-20 Sebastian Huber * libc/sys/rtems/sys/syslimits.h (NGROUPS_MAX): Adjust value so diff --git a/newlib/libc/stdio/nano-vfprintf_i.c b/newlib/libc/stdio/nano-vfprintf_i.c index b75a142..46945b3 100644 --- a/newlib/libc/stdio/nano-vfprintf_i.c +++ b/newlib/libc/stdio/nano-vfprintf_i.c @@ -150,8 +150,10 @@ _printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp, * defined manner.'' * -- ANSI X3J11 */ - /* NOSTRICT. */ pdata->flags |= HEXPREFIX; + if (sizeof (void*) > sizeof (int)) + pdata->flags |= LONGINT; + /* NOSTRICT. */ case 'x': pdata->l_buf[2] = 'x'; xdigs = "0123456789abcdef"; -- cgit v1.1