summaryrefslogtreecommitdiff
path: root/lib/printf-parse.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-10-11 16:09:38 +0000
committerBruno Haible <bruno@clisp.org>2006-10-11 16:09:38 +0000
commitcfc2c6cad8ee96eb8e7f8d9fa9f6739533867047 (patch)
treebc2c8f18b2167ccca79a282dc0c7d27329dd851c /lib/printf-parse.c
parentce401f14c2ef12dc46725ffd6f076b75c6ec72a0 (diff)
downloadgnulib-cfc2c6cad8ee96eb8e7f8d9fa9f6739533867047.tar.gz
Use HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
Diffstat (limited to 'lib/printf-parse.c')
-rw-r--r--lib/printf-parse.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/printf-parse.c b/lib/printf-parse.c
index d9440f35d4..bd8caf9f44 100644
--- a/lib/printf-parse.c
+++ b/lib/printf-parse.c
@@ -382,11 +382,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
switch (c)
{
case 'd': case 'i':
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
+ /* If 'long long' exists and 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 (flags >= 8)
type = TYPE_LONGINT;
else if (flags & 2)
@@ -397,11 +400,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
type = TYPE_INT;
break;
case 'o': case 'u': case 'x': case 'X':
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than '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 (flags >= 8)
type = TYPE_ULONGINT;
else if (flags & 2)
@@ -456,11 +462,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
type = TYPE_POINTER;
break;
case 'n':
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
+ /* If 'long long' exists and 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 (flags >= 8)
type = TYPE_COUNT_LONGINT_POINTER;
else if (flags & 2)