support printf(%lld) on non-gcc

Jeff Johnston jjohnstn@redhat.com
Thu May 17 18:54:00 GMT 2007


Yes.

-- Jeff J.

Eric Blake wrote:
> OK to commit?
> 
> 2007-05-17  Eric Blake  <ebb9@byu.net>
> 
> 	* libc/stdio/vfprintf.c [_WANT_IO_LONG_LONG]: Allow non-gcc
> 	compilers.
> 	* libc/stdio/vfscanf.c: Likewise.
> 
> Index: libc/stdio/vfprintf.c
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/stdio/vfprintf.c,v
> retrieving revision 1.59
> diff -u -p -r1.59 vfprintf.c
> --- libc/stdio/vfprintf.c	14 May 2007 19:42:47 -0000	1.59
> +++ libc/stdio/vfprintf.c	17 May 2007 12:59:19 -0000
> @@ -153,7 +153,8 @@ static char *rcsid = "$Id: vfprintf.c,v
>  #endif
> 
>  #define _NO_LONGLONG
> -#if defined _WANT_IO_LONG_LONG && defined __GNUC__
> +#if defined _WANT_IO_LONG_LONG \
> +	&& (defined __GNUC__ || __STDC_VERSION__ >= 199901L)
>  # undef _NO_LONGLONG
>  #endif
> 
> Index: libc/stdio/vfscanf.c
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/stdio/vfscanf.c,v
> retrieving revision 1.35
> diff -u -p -r1.35 vfscanf.c
> --- libc/stdio/vfscanf.c	11 May 2007 20:09:00 -0000	1.35
> +++ libc/stdio/vfscanf.c	17 May 2007 12:59:19 -0000
> @@ -164,7 +164,8 @@ extern _LONG_DOUBLE _strtold _PARAMS((ch
>  #endif
> 
>  #define _NO_LONGLONG
> -#if defined _WANT_IO_LONG_LONG && defined __GNUC__
> +#if defined _WANT_IO_LONG_LONG \
> +	&& (defined __GNUC__ || __STDC_VERSION__ >= 199901L)
>  # undef _NO_LONGLONG
>  #endif
> 
> 



More information about the Newlib mailing list