summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-10-11 16:12:17 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:06 +0200
commit665afd6833bc84d154429a22b2de4627d9ed4190 (patch)
treeb5fbfaf6d68bba22df47dc930cd55e0cabc26cc5
parent5923cceb61ebcc303e64bee0ad7e7349423d036b (diff)
downloadexternal_gettext-665afd6833bc84d154429a22b2de4627d9ed4190.zip
external_gettext-665afd6833bc84d154429a22b2de4627d9ed4190.tar.gz
external_gettext-665afd6833bc84d154429a22b2de4627d9ed4190.tar.bz2
Use HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
-rw-r--r--gettext-runtime/intl/ChangeLog9
-rw-r--r--gettext-runtime/intl/printf-args.c4
-rw-r--r--gettext-runtime/intl/printf-args.h10
-rw-r--r--gettext-runtime/intl/printf-parse.c15
-rw-r--r--gettext-runtime/intl/vasnprintf.c12
-rw-r--r--gettext-runtime/libasprintf/ChangeLog9
-rw-r--r--gettext-runtime/libasprintf/printf-args.c4
-rw-r--r--gettext-runtime/libasprintf/printf-args.h10
-rw-r--r--gettext-runtime/libasprintf/printf-parse.c15
-rw-r--r--gettext-runtime/libasprintf/vasnprintf.c12
10 files changed, 68 insertions, 32 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog
index fa7239f..4e61988 100644
--- a/gettext-runtime/intl/ChangeLog
+++ b/gettext-runtime/intl/ChangeLog
@@ -1,3 +1,12 @@
+2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
+ Bruno Haible <bruno@clisp.org>
+
+ * printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
+ instead of HAVE_LONG_LONG.
+ * printf-args.c (printf_fetchargs): Likewise.
+ * printf-parse.c (PRINTF_PARSE): Likewise.
+ * vasnprintf.c (VASNPRINTF): Likewise.
+
2006-10-08 Bruno Haible <bruno@clisp.org>
* printf.c: Include errno.h, limits.h.
diff --git a/gettext-runtime/intl/printf-args.c b/gettext-runtime/intl/printf-args.c
index bf634d6..ee0faba 100644
--- a/gettext-runtime/intl/printf-args.c
+++ b/gettext-runtime/intl/printf-args.c
@@ -57,7 +57,7 @@ printf_fetchargs (va_list args, arguments *a)
case TYPE_ULONGINT:
ap->a.a_ulongint = va_arg (args, unsigned long int);
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_LONGLONGINT:
ap->a.a_longlongint = va_arg (args, long long int);
break;
@@ -129,7 +129,7 @@ printf_fetchargs (va_list args, arguments *a)
case TYPE_COUNT_LONGINT_POINTER:
ap->a.a_count_longint_pointer = va_arg (args, long int *);
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_COUNT_LONGLONGINT_POINTER:
ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
break;
diff --git a/gettext-runtime/intl/printf-args.h b/gettext-runtime/intl/printf-args.h
index 625b803..886febe 100644
--- a/gettext-runtime/intl/printf-args.h
+++ b/gettext-runtime/intl/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
@@ -48,7 +48,7 @@ typedef enum
TYPE_UINT,
TYPE_LONGINT,
TYPE_ULONGINT,
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
TYPE_LONGLONGINT,
TYPE_ULONGLONGINT,
#endif
@@ -69,7 +69,7 @@ typedef enum
TYPE_COUNT_SHORT_POINTER,
TYPE_COUNT_INT_POINTER,
TYPE_COUNT_LONGINT_POINTER
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
, TYPE_COUNT_LONGLONGINT_POINTER
#endif
} arg_type;
@@ -88,7 +88,7 @@ typedef struct
unsigned int a_uint;
long int a_longint;
unsigned long int a_ulongint;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
long long int a_longlongint;
unsigned long long int a_ulonglongint;
#endif
@@ -110,7 +110,7 @@ typedef struct
short * a_count_short_pointer;
int * a_count_int_pointer;
long int * a_count_longint_pointer;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
long long int * a_count_longlongint_pointer;
#endif
}
diff --git a/gettext-runtime/intl/printf-parse.c b/gettext-runtime/intl/printf-parse.c
index 503d812..1a06b1a 100644
--- a/gettext-runtime/intl/printf-parse.c
+++ b/gettext-runtime/intl/printf-parse.c
@@ -383,11 +383,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)
@@ -398,11 +401,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)
@@ -457,11 +463,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)
diff --git a/gettext-runtime/intl/vasnprintf.c b/gettext-runtime/intl/vasnprintf.c
index bc0f53a..8b07310 100644
--- a/gettext-runtime/intl/vasnprintf.c
+++ b/gettext-runtime/intl/vasnprintf.c
@@ -249,7 +249,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
case TYPE_COUNT_LONGINT_POINTER:
*a.arg[dp->arg_index].a.a_count_longint_pointer = length;
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_COUNT_LONGLONGINT_POINTER:
*a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
break;
@@ -323,7 +323,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
{
case 'd': case 'i': case 'u':
-# ifdef HAVE_LONG_LONG
+# ifdef HAVE_LONG_LONG_INT
if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
tmp_length =
(unsigned int) (sizeof (unsigned long long) * CHAR_BIT
@@ -353,7 +353,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
break;
case 'o':
-# ifdef HAVE_LONG_LONG
+# ifdef HAVE_LONG_LONG_INT
if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
tmp_length =
(unsigned int) (sizeof (unsigned long long) * CHAR_BIT
@@ -381,7 +381,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
break;
case 'x': case 'X':
-# ifdef HAVE_LONG_LONG
+# ifdef HAVE_LONG_LONG_INT
if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
tmp_length =
(unsigned int) (sizeof (unsigned long long) * CHAR_BIT
@@ -528,7 +528,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
switch (type)
{
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_LONGLONGINT:
case TYPE_ULONGLONGINT:
*p++ = 'l';
@@ -682,7 +682,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
SNPRINTF_BUF (arg);
}
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_LONGLONGINT:
{
long long int arg = a.arg[dp->arg_index].a.a_longlongint;
diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog
index 9fb5847..a9d5b98 100644
--- a/gettext-runtime/libasprintf/ChangeLog
+++ b/gettext-runtime/libasprintf/ChangeLog
@@ -1,3 +1,12 @@
+2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
+ Bruno Haible <bruno@clisp.org>
+
+ * printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
+ instead of HAVE_LONG_LONG.
+ * printf-args.c (printf_fetchargs): Likewise.
+ * printf-parse.c (PRINTF_PARSE): Likewise.
+ * vasnprintf.c (VASNPRINTF): Likewise.
+
2006-09-14 Bruno Haible <bruno@clisp.org>
* lib-asprintf.c: Include <config.h> unconditionally.
diff --git a/gettext-runtime/libasprintf/printf-args.c b/gettext-runtime/libasprintf/printf-args.c
index bf634d6..ee0faba 100644
--- a/gettext-runtime/libasprintf/printf-args.c
+++ b/gettext-runtime/libasprintf/printf-args.c
@@ -57,7 +57,7 @@ printf_fetchargs (va_list args, arguments *a)
case TYPE_ULONGINT:
ap->a.a_ulongint = va_arg (args, unsigned long int);
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_LONGLONGINT:
ap->a.a_longlongint = va_arg (args, long long int);
break;
@@ -129,7 +129,7 @@ printf_fetchargs (va_list args, arguments *a)
case TYPE_COUNT_LONGINT_POINTER:
ap->a.a_count_longint_pointer = va_arg (args, long int *);
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_COUNT_LONGLONGINT_POINTER:
ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
break;
diff --git a/gettext-runtime/libasprintf/printf-args.h b/gettext-runtime/libasprintf/printf-args.h
index 625b803..886febe 100644
--- a/gettext-runtime/libasprintf/printf-args.h
+++ b/gettext-runtime/libasprintf/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
@@ -48,7 +48,7 @@ typedef enum
TYPE_UINT,
TYPE_LONGINT,
TYPE_ULONGINT,
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
TYPE_LONGLONGINT,
TYPE_ULONGLONGINT,
#endif
@@ -69,7 +69,7 @@ typedef enum
TYPE_COUNT_SHORT_POINTER,
TYPE_COUNT_INT_POINTER,
TYPE_COUNT_LONGINT_POINTER
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
, TYPE_COUNT_LONGLONGINT_POINTER
#endif
} arg_type;
@@ -88,7 +88,7 @@ typedef struct
unsigned int a_uint;
long int a_longint;
unsigned long int a_ulongint;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
long long int a_longlongint;
unsigned long long int a_ulonglongint;
#endif
@@ -110,7 +110,7 @@ typedef struct
short * a_count_short_pointer;
int * a_count_int_pointer;
long int * a_count_longint_pointer;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
long long int * a_count_longlongint_pointer;
#endif
}
diff --git a/gettext-runtime/libasprintf/printf-parse.c b/gettext-runtime/libasprintf/printf-parse.c
index 503d812..1a06b1a 100644
--- a/gettext-runtime/libasprintf/printf-parse.c
+++ b/gettext-runtime/libasprintf/printf-parse.c
@@ -383,11 +383,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)
@@ -398,11 +401,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)
@@ -457,11 +463,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)
diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c
index bc0f53a..8b07310 100644
--- a/gettext-runtime/libasprintf/vasnprintf.c
+++ b/gettext-runtime/libasprintf/vasnprintf.c
@@ -249,7 +249,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
case TYPE_COUNT_LONGINT_POINTER:
*a.arg[dp->arg_index].a.a_count_longint_pointer = length;
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_COUNT_LONGLONGINT_POINTER:
*a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
break;
@@ -323,7 +323,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
{
case 'd': case 'i': case 'u':
-# ifdef HAVE_LONG_LONG
+# ifdef HAVE_LONG_LONG_INT
if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
tmp_length =
(unsigned int) (sizeof (unsigned long long) * CHAR_BIT
@@ -353,7 +353,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
break;
case 'o':
-# ifdef HAVE_LONG_LONG
+# ifdef HAVE_LONG_LONG_INT
if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
tmp_length =
(unsigned int) (sizeof (unsigned long long) * CHAR_BIT
@@ -381,7 +381,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
break;
case 'x': case 'X':
-# ifdef HAVE_LONG_LONG
+# ifdef HAVE_LONG_LONG_INT
if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
tmp_length =
(unsigned int) (sizeof (unsigned long long) * CHAR_BIT
@@ -528,7 +528,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
switch (type)
{
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_LONGLONGINT:
case TYPE_ULONGLONGINT:
*p++ = 'l';
@@ -682,7 +682,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar
SNPRINTF_BUF (arg);
}
break;
-#ifdef HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
case TYPE_LONGLONGINT:
{
long long int arg = a.arg[dp->arg_index].a.a_longlongint;