From patchwork Tue Dec 5 18:02:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 24743 Received: (qmail 83623 invoked by alias); 5 Dec 2017 18:02:29 -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 83603 invoked by uid 89); 5 Dec 2017 18:02:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Tue, 5 Dec 2017 18:02:19 +0000 From: Joseph Myers To: Subject: Support defining strfromf64, strfromf32x aliases [committed] 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-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) This patch adds support for defining strfromf64 and strfromf32x aliases of strfromd when the corresponding types are enabled. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float64 / _Float32x changes. Committed. 2017-12-05 Joseph Myers * stdlib/strfromd.c: Include . [__HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strfromf64): Define and later undefine as macro and define as weak alias. [__HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strfromf32x): Likewise. diff --git a/stdlib/strfromd.c b/stdlib/strfromd.c index 5342059..85c5555 100644 --- a/stdlib/strfromd.c +++ b/stdlib/strfromd.c @@ -16,7 +16,32 @@ License along with the GNU C Library; if not, see . */ +#include + #define FLOAT double #define STRFROM strfromd +#if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64 +# define strfromf64 __hide_strfromf64 +#endif +#if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X +# define strfromf32x __hide_strfromf32x +#endif + +#include + +#if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64 +# undef strfromf64 +#endif +#if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X +# undef strfromf32x +#endif + #include "strfrom-skeleton.c" + +#if __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64 +weak_alias (strfromd, strfromf64) +#endif +#if __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X +weak_alias (strfromd, strfromf32x) +#endif