From 6f637037e59f2b0084471802acefa97ceb7f4d5b Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 13 Mar 2001 09:42:52 +0000 Subject: * libc/stdio/vfprintf.c (QUADINT) [_NO_LONGLONG]: Make it equivalent to LONGINT. --- newlib/libc/stdio/vfprintf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'newlib/libc') diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index ab8202fc0..9a2cf4fb6 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -279,7 +279,13 @@ static int exponent _PARAMS((char *, int, int)); #define LADJUST 0x004 /* left adjustment */ #define LONGDBL 0x008 /* long double */ #define LONGINT 0x010 /* long integer */ +#ifndef _NO_LONGLONG #define QUADINT 0x020 /* quad integer */ +#else /* ifdef _NO_LONGLONG, make QUADINT equivalent to LONGINT, so + that %lld behaves the same as %ld, not as %d, as expected if: + sizeof (long long) = sizeof long > sizeof int */ +#define QUADINT LONGINT +#endif #define SHORTINT 0x040 /* short integer */ #define ZEROPAD 0x080 /* zero (as opposed to blank) pad */ #define FPT 0x100 /* Floating point number */ -- cgit v1.2.3