summaryrefslogtreecommitdiff
path: root/tests/tprintf.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2013-05-22 11:50:08 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2013-05-22 11:50:08 +0000
commitac8ca02b894a0a71e8ffae756ef97117d833841a (patch)
treee982b0c2c379b7415d63e510006720d6d84cb8e7 /tests/tprintf.c
parente23499093f66dff85e10d7192d34f2f2891d65e5 (diff)
downloadmpfr-ac8ca02b894a0a71e8ffae756ef97117d833841a.tar.gz
replaced macros NPRINTF_T and NPRINTF_L by positive versions
PRINTF_T and PRINTF_L, now we don't assume that %td and %Lf are supported when we don't check it (for example when cross-compiling, or under Windows when GMP is a dynamic library) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8523 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tprintf.c')
-rw-r--r--tests/tprintf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tprintf.c b/tests/tprintf.c
index 4d2731c64..288c9b13d 100644
--- a/tests/tprintf.c
+++ b/tests/tprintf.c
@@ -255,11 +255,11 @@ check_mixed (void)
unsigned long ulo = 1;
float f = -1.25;
double d = -1.25;
-#if !defined(NPRINTF_T) || !defined(NPRINTF_L)
+#if defined(PRINTF_T) || defined(PRINTF_L)
long double ld = -1.25;
#endif
-#ifndef NPRINTF_T
+#ifdef PRINTF_T
ptrdiff_t p = 1, saved_p;
#endif
size_t sz = 1;
@@ -298,7 +298,7 @@ check_mixed (void)
mpfr, mpq, &mpfr, (void *) &i);
check_length_with_cmp (7, mpfr, 15, mpfr_cmp_ui (mpfr, 15), Rg);
-#ifndef NPRINTF_T
+#ifdef PRINTF_T
saved_p = p;
check_vprintf ("%% a. %RNg, b. %Qx, c. %td%tn", mpfr, mpq, p, &p);
if (p != 20)
@@ -306,7 +306,7 @@ check_mixed (void)
check_length (8, (long) p, 20, ld); /* no format specifier '%td' in C89 */
#endif
-#ifndef NPRINTF_L
+#ifdef PRINTF_L
check_vprintf ("a. %RA, b. %Lf, c. %QX%zn", mpfr, ld, mpq, &sz);
check_length (9, (unsigned long) sz, 30, lu); /* no format specifier '%zu' in C89 */
#endif