This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Correctly handle %p in wprintf
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 1 May 2014 19:37:25 +0200
- Subject: Re: [PATCH] Correctly handle %p in wprintf
- Authentication-results: sourceware.org; auth=none
- References: <877g65wq0l dot fsf at igel dot home>
Looks ok however
On Thu, May 01, 2014 at 04:08:10PM +0200, Andreas Schwab wrote:
> diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
> index f7e5f61..c4ff833 100644
> --- a/stdio-common/vfprintf.c
> +++ b/stdio-common/vfprintf.c
> @@ -936,7 +936,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
> /* Make sure the full string "(nil)" is printed. */ \
> if (prec < 5) \
> prec = 5; \
> - is_long = 0; /* This is no wide-char string. */ \
> + /* This is a wide string iff compiling wprintf. */ \
> + is_long = sizeof (CHAR_T) > 1; \
> goto LABEL (print_string); \
> } \
Should we do same thing here or not?
LABEL (form_strerror): \
/* Print description of error ERRNO. */ \
string = \
(CHAR_T *) __strerror_r (save_errno, (char *) work_buffer, \
sizeof work_buffer); \
is_long = 0; /* This is no wide-char string. */ \
goto LABEL (print_string)