This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Correctly handle %p in wprintf


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]