From patchwork Tue Dec 3 17:05:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gabriel F. T. Gomes" X-Patchwork-Id: 36468 Received: (qmail 86154 invoked by alias); 3 Dec 2019 17:05:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 86038 invoked by uid 89); 3 Dec 2019 17:05:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*F:D*br X-HELO: smtpout1.mo528.mail-out.ovh.net From: "Gabriel F. T. Gomes" To: Subject: [PATCH v3 01/11] ldbl-128ibm-compat: Fix selection of GNU and ISO C99 scanf Date: Tue, 3 Dec 2019 14:05:30 -0300 Message-ID: <20191203170540.18428-2-gabriel@inconstante.net.br> In-Reply-To: <20191203170540.18428-1-gabriel@inconstante.net.br> References: <20191203170540.18428-1-gabriel@inconstante.net.br> MIME-Version: 1.0 X-Ovh-Tracer-Id: 10804698459898236611 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrudejjedgleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdqfffguegfifdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkofgjfhgggfgtihesthekredtredttdenucfhrhhomhepfdfirggsrhhivghlucfhrdcuvfdrucfiohhmvghsfdcuoehgrggsrhhivghlsehinhgtohhnshhtrghnthgvrdhnvghtrdgsrheqnecukfhppedtrddtrddtrddtpddujeejrddukedrudelkedrudejheenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepgfgigedrvghmphdrlhhotggrlhdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepghgrsghrihgvlhesihhntghonhhsthgrnhhtvgdrvghtihdrsghrpdhrtghpthhtoheplhhisggtqdgrlhhphhgrsehsohhurhgtvgifrghrvgdrohhrghenucevlhhushhtvghrufhiiigvpedt From: "Gabriel F. T. Gomes" New since v2. -- 8< -- Since commit commit 03992356e6fedc5a5e9d32df96c1a2c79ea28a8f Author: Zack Weinberg Date: Sat Feb 10 11:58:35 2018 -0500 Use C99-compliant scanf under _GNU_SOURCE with modern compilers. the selection of the GNU versions of scanf functions requires both _GNU_SOURCE and -std=c89. This patch changes the tests in ldbl-128ibm-compat so that they actually test the GNU versions (without this change, the redirection to the ISO C99 version always happens, so GNU versions of the new implementation (e.g. __scanfieee128) were left untested). Tested for powerpc64le. --- sysdeps/ieee754/ldbl-128ibm-compat/Makefile | 8 ++++---- .../ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c | 4 ++++ .../ieee754/ldbl-128ibm-compat/test-wscanf-ldbl-compat.c | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile index b54eb04f22..21332bfbbb 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/Makefile +++ b/sysdeps/ieee754/ldbl-128ibm-compat/Makefile @@ -75,14 +75,14 @@ CFLAGS-test-obstack-chk-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi CFLAGS-test-obstack-chk-ibm128.c += -mabi=ibmlongdouble -Wno-psabi tests-internal += test-scanf-ieee128 test-scanf-ibm128 -CFLAGS-test-scanf-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi -CFLAGS-test-scanf-ibm128.c += -mabi=ibmlongdouble -Wno-psabi +CFLAGS-test-scanf-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi -std=c89 -D_GNU_SOURCE +CFLAGS-test-scanf-ibm128.c += -mabi=ibmlongdouble -Wno-psabi -std=c89 -D_GNU_SOURCE $(objpfx)test-scanf-ieee128: gnulib-tests += $(f128-loader-link) tests-internal += test-wscanf-ieee128 test-wscanf-ibm128 -CFLAGS-test-wscanf-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi -CFLAGS-test-wscanf-ibm128.c += -mabi=ibmlongdouble -Wno-psabi +CFLAGS-test-wscanf-ieee128.c += -mfloat128 -mabi=ieeelongdouble -Wno-psabi -std=c89 -D_GNU_SOURCE +CFLAGS-test-wscanf-ibm128.c += -mabi=ibmlongdouble -Wno-psabi -std=c89 -D_GNU_SOURCE $(objpfx)test-wscanf-ieee128: gnulib-tests += $(f128-loader-link) diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c b/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c index 0759d8afab..116808dffd 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-scanf-ldbl-compat.c @@ -1,3 +1,7 @@ +/* Include stdio.h from libio/, because include/stdio.h and -std=c89 do + not work together. */ +#include + #define CHAR char #define L(x) x #define FSCANF fscanf diff --git a/sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ldbl-compat.c b/sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ldbl-compat.c index e93cf3b9bd..4b8fd1b442 100644 --- a/sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ldbl-compat.c +++ b/sysdeps/ieee754/ldbl-128ibm-compat/test-wscanf-ldbl-compat.c @@ -1,3 +1,7 @@ +/* Include stdio.h from libio/, because include/stdio.h and -std=c89 do + not work together. */ +#include + #define CHAR wchar_t #define L(x) L##x #define FSCANF fwscanf