+2007-03-17 Bruno Haible <bruno@clisp.org>
+
+ * lib/vasnprintf.c (VASNPRINTF): Clear out the memory used for arg_mem
+ before comparing it. Needed because on some platforms (e.g. x86) a
+ 'long double' occupies less bytes than sizeof (long double).
+
2007-03-17 Bruno Haible <bruno@clisp.org>
* tests/test-crc.c (main): Make printf statements 64-bit clean.
{
/* Distinguish 0.0L and -0.0L. */
static long double plus_zero = 0.0L;
- long double arg_mem = arg;
+ long double arg_mem;
+ memset (&arg_mem, 0, sizeof (long double));
+ arg_mem = arg;
if (memcmp (&plus_zero, &arg_mem, sizeof (long double)) != 0)
{
sign = -1;
{
/* Distinguish 0.0 and -0.0. */
static double plus_zero = 0.0;
- double arg_mem = arg;
+ double arg_mem;
+ memset (&arg_mem, 0, sizeof (double));
+ arg_mem = arg;
if (memcmp (&plus_zero, &arg_mem, sizeof (double)) != 0)
{
sign = -1;