diff options
author | Bruno Haible <bruno@clisp.org> | 2019-12-22 09:55:04 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-12-22 09:55:04 +0100 |
commit | 5ceaccc072d0aa464dbfd611564eb553f0a29dec (patch) | |
tree | 9f952d55955cb64cd381c51faa344684ef3a1f48 /lib/printf-parse.c | |
parent | 896daf273035e889c50dc5b33e74b5fb891851bc (diff) | |
download | gnulib-5ceaccc072d0aa464dbfd611564eb553f0a29dec.tar.gz |
vasnprintf: Assume that the compiler supports 'long long'.
* lib/printf-args.h: Assume HAVE_LONG_LONG_INT to be 1.
* lib/printf-args.c (PRINTF_FETCHARGS): Likewise.
* lib/printf-parse.c (PRINTF_PARSE): Likewise.
* lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Likewise.
* m4/intmax_t.m4 (gl_AC_TYPE_INTMAX_T, gt_AC_TYPE_INTMAX_T): Don't
require AC_TYPE_LONG_LONG_INT.
* m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
gl_PREREQ_VASNPRINTF): Likewise.
* modules/vasnprintf (Files): Remove longlong.m4.
* modules/c-vasnprintf (Files): Likewise.
* modules/unistdio/u8-vasnprintf (Files): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Files): Likewise.
* modules/unistdio/u16-vasnprintf (Files): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Files): Likewise.
* modules/unistdio/u32-vasnprintf (Files): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Files): Likewise.
* modules/unistdio/ulc-vasnprintf (Files): Likewise.
Diffstat (limited to 'lib/printf-parse.c')
-rw-r--r-- | lib/printf-parse.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/lib/printf-parse.c b/lib/printf-parse.c index 76a1b486ba..ba1585a54b 100644 --- a/lib/printf-parse.c +++ b/lib/printf-parse.c @@ -447,14 +447,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) switch (c) { case 'd': case 'i': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ + /* If 'long long' is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_LONGLONGINT; else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lld" into TYPE_LONGINT. */ + /* If 'long long' is the same as 'long', we parse "lld" into + TYPE_LONGINT. */ if (flags >= 8) type = TYPE_LONGINT; else if (flags & 2) @@ -465,14 +463,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) type = TYPE_INT; break; case 'o': case 'u': case 'x': case 'X': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ + /* If 'unsigned long long' is larger than 'unsigned long': */ if (flags >= 16 || (flags & 4)) type = TYPE_ULONGLONGINT; else -#endif - /* If 'unsigned long long' exists and is the same as - 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ + /* If 'unsigned long long' is the same as 'unsigned long', we + parse "llu" into TYPE_ULONGINT. */ if (flags >= 8) type = TYPE_ULONGINT; else if (flags & 2) @@ -525,14 +521,12 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) type = TYPE_POINTER; break; case 'n': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ + /* If 'long long' is larger than 'long': */ if (flags >= 16 || (flags & 4)) type = TYPE_COUNT_LONGLONGINT_POINTER; else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lln" into TYPE_COUNT_LONGINT_POINTER. */ + /* If 'long long' is the same as 'long', we parse "lln" into + TYPE_COUNT_LONGINT_POINTER. */ if (flags >= 8) type = TYPE_COUNT_LONGINT_POINTER; else if (flags & 2) |