summaryrefslogtreecommitdiffstats
path: root/gettext-runtime/libasprintf/vasnprintf.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-06-03 11:22:58 +0200
committerBruno Haible <bruno@clisp.org>2011-06-07 23:39:49 +0200
commitd02e4106522a0c6437dafd3b43b7cd58317b678d (patch)
tree7ac755e7c716a9eb5fc0eb2882d42ebc62edeff6 /gettext-runtime/libasprintf/vasnprintf.c
parentb671c3bef6b56892d3dc69144f5f41a989f50ed6 (diff)
downloadexternal_gettext-d02e4106522a0c6437dafd3b43b7cd58317b678d.zip
external_gettext-d02e4106522a0c6437dafd3b43b7cd58317b678d.tar.gz
external_gettext-d02e4106522a0c6437dafd3b43b7cd58317b678d.tar.bz2
Update from gnulib, use verify.h.
Diffstat (limited to 'gettext-runtime/libasprintf/vasnprintf.c')
-rw-r--r--gettext-runtime/libasprintf/vasnprintf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c
index fb4463c..76c8841 100644
--- a/gettext-runtime/libasprintf/vasnprintf.c
+++ b/gettext-runtime/libasprintf/vasnprintf.c
@@ -87,6 +87,8 @@
/* Checked size_t computations. */
#include "xsize.h"
+#include "verify.h"
+
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
# include <math.h>
# include "float+.h"
@@ -321,11 +323,11 @@ is_infinite_or_zerol (long double x)
typedef unsigned int mp_limb_t;
# define GMP_LIMB_BITS 32
-typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1];
+verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
typedef unsigned long long mp_twolimb_t;
# define GMP_TWOLIMB_BITS 64
-typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1];
+verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
/* Representation of a bignum >= 0. */
typedef struct
@@ -2621,7 +2623,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t characters;
# if !DCHAR_IS_TCHAR
/* This code assumes that TCHAR_T is 'char'. */
- typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1];
+ verify (sizeof (TCHAR_T) == 1);
TCHAR_T *tmpsrc;
DCHAR_T *tmpdst;
size_t tmpdst_len;
@@ -5292,8 +5294,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
DCHAR_T *tmpdst;
size_t tmpdst_len;
/* This code assumes that TCHAR_T is 'char'. */
- typedef int TCHAR_T_verify
- [2 * (sizeof (TCHAR_T) == 1) - 1];
+ verify (sizeof (TCHAR_T) == 1);
# if USE_SNPRINTF
tmpsrc = (TCHAR_T *) (result + length);
# else