From patchwork Fri Aug 4 22:42:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 21927 Received: (qmail 103812 invoked by alias); 4 Aug 2017 22:43:00 -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 103783 invoked by uid 89); 4 Aug 2017 22:43:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Fri, 4 Aug 2017 22:42:51 +0000 From: Joseph Myers To: Subject: Remove __long_double_t Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) sys/cdefs.h has a macro __long_double_t used in two places in glibc. long double is a standard part of C since C89; there is no need for such an alias for it. This patch removes that macro and uses long double directly everywhere. As an implementation-namespace, undocumented symbol, it should not be considered part of the API for users, and codesearch.debian.net shows no sign of it being used outside glibc in a way that would break with this patch. Tested for x86_64. 2017-08-04 Joseph Myers * misc/sys/cdefs.h (__long_double_t): Remove. * stdio-common/printf_fp.c (__printf_fp_l): Use long double instead of __long_double_t, * stdlib/strfmon_l.c (__vstrfmon_l): Likewise. diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 06523bf..b3e7f3b 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -102,7 +102,6 @@ /* This is not a typedef so `const __ptr_t' does the right thing. */ #define __ptr_t void * -#define __long_double_t long double /* C++ needs to know that types and declarations are C, not C++. */ diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index 514b698..3ed4037 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -217,7 +217,7 @@ __printf_fp_l (FILE *fp, locale_t loc, union { double dbl; - __long_double_t ldbl; + long double ldbl; #if __HAVE_DISTINCT_FLOAT128 _Float128 f128; #endif diff --git a/stdlib/strfmon_l.c b/stdlib/strfmon_l.c index 69ca9d5..98554df 100644 --- a/stdlib/strfmon_l.c +++ b/stdlib/strfmon_l.c @@ -100,7 +100,7 @@ __vstrfmon_l (char *s, size_t maxsize, locale_t loc, const char *format, union { double dbl; - __long_double_t ldbl; + long double ldbl; } fpnum; int int_format;