From d77de17ac6b97da2392f9d90055fef8657c89bec Mon Sep 17 00:00:00 2001 From: vlefevre Date: Tue, 5 Sep 2017 12:55:34 +0000 Subject: [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 --- tests/tsprintf.c | 10 +++++++--- 1 file 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) -- cgit v1.2.1