diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-05 12:55:34 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-05 12:55:34 +0000 |
commit | d77de17ac6b97da2392f9d90055fef8657c89bec (patch) | |
tree | 96f6806c6b02b8e184410e62a7ee53d2251faaa9 | |
parent | ae27a2418129b6718c2159a5124a4c9179cce1a5 (diff) | |
download | mpfr-d77de17ac6b97da2392f9d90055fef8657c89bec.tar.gz |
[tests/tsprintf.c] With MPFR_CHECK_LIBC_PRINTF, disable the test of
the "'" flag with a non-glibc C library (SUS extension in printf).
In particular, it is not supported by AIX 7.2.
(merged changesets r11704,11706 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11708 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tsprintf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/tsprintf.c b/tests/tsprintf.c index 737ff86db..51051a1f4 100644 --- a/tests/tsprintf.c +++ b/tests/tsprintf.c @@ -900,8 +900,8 @@ random_double (void) '+', ' ', '#', - '0', /* no ambiguity: first zeros are flag zero*/ - '\'' + '0', /* no ambiguity: first zeros are flag zero */ + '\'' /* SUS extension */ }; /* no 'a': mpfr and glibc do not have the same semantic */ char specifier[] = @@ -965,8 +965,12 @@ random_double (void) *ptr_mpfr++ = *ptr++ = '%'; /* random specifier 'e', 'f', 'g', 'E', 'F', or 'G' */ spec = (int) (randlimb() % 6); - /* random flags, but no ' flag with %e */ + /* random flags, but no ' flag with %e or with non-glibc */ +#if __MPFR_GLIBC(1,0) jmax = (spec == 0 || spec == 3) ? 5 : 6; +#else + jmax = 5; +#endif for (j = 0; j < jmax; j++) { if (randlimb() % 3 == 0) |