This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

support printf(%lld) on non-gcc


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


-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net


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