* tests/test-vasnprintf-posix2.c (main): Disable the new test on
platforms where the 'long double' value range is insufficient.
* tests/test-vasnwprintf-posix2.c (main): Likewise.
+2025-04-13 Bruno Haible <bruno@clisp.org>
+
+ vasnprintf tests: Fix compilation error on MSVC (regression yesterday).
+ * tests/test-vasnprintf-posix2.c (main): Disable the new test on
+ platforms where the 'long double' value range is insufficient.
+ * tests/test-vasnwprintf-posix2.c (main): Likewise.
+
2025-04-13 Bruno Haible <bruno@clisp.org>
*printf: Document a Haiku bug.
#include "vasnprintf.h"
+#include <float.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
}
free (result);
}
+ #if LDBL_MAX_10_EXP > 500
/* This test used to crash in the Solaris libc, for all Solaris versions.
<https://www.illumos.org/issues/17383> */
{
char *result = asnprintf (NULL, &length, "%'.500Lg\n", 42351647362715016953416125033982098102569580078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0L);
free (result);
}
+ #endif
}
return test_exit_status;
#include "vasnwprintf.h"
+#include <float.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
&& wcscmp (result + 7, L"000") == 0);
free (result);
}
+ #if LDBL_MAX_10_EXP > 500
{
size_t length;
wchar_t *result = asnwprintf (NULL, &length, L"%'.500Lg\n", 42351647362715016953416125033982098102569580078125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0L);
free (result);
}
+ #endif
}
return test_exit_status;