diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 99ee8f0d3..7b56b5b6e 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2001-03-13 Alexandre Oliva + + * libc/stdio/vfprintf.c (QUADINT) [_NO_LONGLONG]: Make it + equivalent to LONGINT. + 2001-03-08 Richard Sandiford * (libc/include/machine/setjmp.h): Use 23 long long ints for a 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 */