From patchwork Thu Nov 2 23:36:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 833587 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-86693-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="pmMZZHps"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yShM63MCbz9t16 for ; Fri, 3 Nov 2017 10:37:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=bMQMh0SLC8fjGoF4eheUPLXvUYu/w bOEngtgjrEZ73jmxk68J63H6Pj8vrHvWRf218im8286zSBotR+Cd6Sdt2xgpBgEJ JHenATzsqdV/BAaUfwU6aY0TyYRvhbRjZ1vEAvLsGd06GHQKhCHgv3wSR37uC1qk NlD1y5M8KvbFP4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=WF575Hub4fy4X3zo5vVRnVTb2RA=; b=pmM ZZHpsjRBYMcvLV3H83RKdJaM3uKePED8HxeVRNTkH/ckp7iYN+Xme3g+37ubIwie 7xG8UwdoO04G6ICx8aAQQBF4D4fHPpEAjgZWJKNww1Kpdux7Ujuryasbk1QtQewY Cc2R40fYLRuILOPSbeessMqR0z6vhdDfeP083wO4= Received: (qmail 81008 invoked by alias); 2 Nov 2017 23:37: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 80999 invoked by uid 89); 2 Nov 2017 23:36:59 -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, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Thu, 2 Nov 2017 23:36:49 +0000 From: Joseph Myers To: Subject: Declare wcstof functions for more _FloatN, _FloatNx types [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-IES-MBX-03.mgc.mentorg.com (139.181.222.3) Continuing the preparation for additional _FloatN / _FloatNx type support, this patch arranges for to declare wcstof functions for all such types, similarly to the declarations already present for _Float128. Tested for x86_64. Committed. 2017-11-02 Joseph Myers * wcsmbs/wchar.h [__HAVE_FLOAT16 && __USE_GNU] (wcstof16): Declare. [__HAVE_FLOAT32 && __USE_GNU] (wcstof32): Likewise. [__HAVE_FLOAT64 && __USE_GNU] (wcstof64): Likewise. [__HAVE_FLOAT32X && __USE_GNU] (wcstof32x): Likewise. [__HAVE_FLOAT64X && __USE_GNU] (wcstof64x): Likewise. [__HAVE_FLOAT128X && __USE_GNU] (wcstof128x): Likewise. [__HAVE_FLOAT16 && __USE_GNU] (wcstof16_l): Likewise. [__HAVE_FLOAT32 && __USE_GNU] (wcstof32_l): Likewise. [__HAVE_FLOAT64 && __USE_GNU] (wcstof64_l): Likewise. [__HAVE_FLOAT32X && __USE_GNU] (wcstof32x_l): Likewise. [__HAVE_FLOAT64X && __USE_GNU] (wcstof64x_l): Likewise. [__HAVE_FLOAT128X && __USE_GNU] (wcstof128x_l): Likewise. diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h index 4f16f98..e3133d7 100644 --- a/wcsmbs/wchar.h +++ b/wcsmbs/wchar.h @@ -385,12 +385,43 @@ extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif /* C99 */ -/* Likewise for `_Float128' when support is enabled. */ +/* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */ + +#if __HAVE_FLOAT16 && defined __USE_GNU +extern _Float16 wcstof16 (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +#endif + +#if __HAVE_FLOAT32 && defined __USE_GNU +extern _Float32 wcstof32 (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +#endif + +#if __HAVE_FLOAT64 && defined __USE_GNU +extern _Float64 wcstof64 (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +#endif + #if __HAVE_FLOAT128 && defined __USE_GNU extern _Float128 wcstof128 (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; #endif +#if __HAVE_FLOAT32X && defined __USE_GNU +extern _Float32x wcstof32x (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +#endif + +#if __HAVE_FLOAT64X && defined __USE_GNU +extern _Float64x wcstof64x (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +#endif + +#if __HAVE_FLOAT128X && defined __USE_GNU +extern _Float128x wcstof128x (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) __THROW; +#endif + /* Convert initial portion of wide string NPTR to `long int' representation. */ @@ -470,11 +501,47 @@ extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; +# if __HAVE_FLOAT16 +extern _Float16 wcstof16_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) __THROW; +# endif + +# if __HAVE_FLOAT32 +extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) __THROW; +# endif + +# if __HAVE_FLOAT64 +extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) __THROW; +# endif + # if __HAVE_FLOAT128 extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, locale_t __loc) __THROW; # endif + +# if __HAVE_FLOAT32X +extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) __THROW; +# endif + +# if __HAVE_FLOAT64X +extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) __THROW; +# endif + +# if __HAVE_FLOAT128X +extern _Float128x wcstof128x_l (const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + locale_t __loc) __THROW; +# endif #endif /* use GNU */