From 0c003f59996a1e1552cee4f4937cca4430733cdc Mon Sep 17 00:00:00 2001 From: kamil Date: Sat, 27 Apr 2019 23:04:31 +0000 Subject: [PATCH] Add a C99 symbol to libm: nexttowardl It's an alias for an already existing symbol nextafterl. Patch obtained from Detected by the LLVM buildbot breakage in tests. --- distrib/sets/lists/comp/mi | 5 ++++- lib/libm/Makefile | 5 +++-- lib/libm/man/nextafter.3 | 17 ++++++++--------- lib/libm/src/s_nextafterl.c | 6 ++++-- usr.sbin/makemandb/nostem.txt | 1 + 5 files changed, 20 insertions(+), 14 deletions(-) diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi index 260ca2038cdf..df55e3cbdf89 100644 --- a/distrib/sets/lists/comp/mi +++ b/distrib/sets/lists/comp/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2271 2019/04/25 23:17:24 maya Exp $ +# $NetBSD: mi,v 1.2272 2019/04/27 23:04:31 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.comp comp-sys-root @@ -8535,6 +8535,7 @@ ./usr/share/man/cat3/nextafterl.0 comp-c-catman .cat ./usr/share/man/cat3/nexttoward.0 comp-c-catman .cat ./usr/share/man/cat3/nexttowardf.0 comp-c-catman .cat +./usr/share/man/cat3/nexttowardl.0 comp-c-catman .cat ./usr/share/man/cat3/nftw.0 comp-c-catman .cat ./usr/share/man/cat3/ngettext.0 comp-c-catman .cat ./usr/share/man/cat3/nice.0 comp-c-catman .cat @@ -16510,6 +16511,7 @@ ./usr/share/man/html3/nextafterl.html comp-c-htmlman html ./usr/share/man/html3/nexttoward.html comp-c-htmlman html ./usr/share/man/html3/nexttowardf.html comp-c-htmlman html +./usr/share/man/html3/nexttowardl.html comp-c-htmlman html ./usr/share/man/html3/nftw.html comp-c-htmlman html ./usr/share/man/html3/ngettext.html comp-c-htmlman html ./usr/share/man/html3/nice.html comp-c-htmlman html @@ -24492,6 +24494,7 @@ ./usr/share/man/man3/nextafterl.3 comp-c-man .man ./usr/share/man/man3/nexttoward.3 comp-c-man .man ./usr/share/man/man3/nexttowardf.3 comp-c-man .man +./usr/share/man/man3/nexttowardl.3 comp-c-man .man ./usr/share/man/man3/nftw.3 comp-c-man .man ./usr/share/man/man3/ngettext.3 comp-c-man .man ./usr/share/man/man3/nice.3 comp-c-man .man diff --git a/lib/libm/Makefile b/lib/libm/Makefile index b621ecb451bf..de2d31b6d14a 100644 --- a/lib/libm/Makefile +++ b/lib/libm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.209 2019/04/25 23:17:24 maya Exp $ +# $NetBSD: Makefile,v 1.210 2019/04/27 23:04:32 kamil Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -424,7 +424,8 @@ MLINKS+=modf.3 modff.3 \ MLINKS+=nextafter.3 nextafterf.3 \ nextafter.3 nextafterl.3 \ nextafter.3 nexttoward.3 \ - nextafter.3 nexttowardf.3 + nextafter.3 nexttowardf.3 \ + nextafter.3 nexttowardl.3 MLINKS+=lrint.3 lrintf.3 lrint.3 llrint.3 lrint.3 llrintf.3 MLINKS+=remainder.3 remainderf.3 \ remainder.3 remquo.3 \ diff --git a/lib/libm/man/nextafter.3 b/lib/libm/man/nextafter.3 index 3b8b51c5869e..eb924980060f 100644 --- a/lib/libm/man/nextafter.3 +++ b/lib/libm/man/nextafter.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: nextafter.3,v 1.5 2015/09/13 10:58:30 he Exp $ +.\" $NetBSD: nextafter.3,v 1.6 2019/04/27 23:04:32 kamil Exp $ .\" .\" Copyright (c) 2011 Jukka Ruohonen .\" All rights reserved. @@ -32,12 +32,8 @@ .Nm nextafterf , .Nm nextafterl , .Nm nexttoward , -.Nm nexttowardf -.\" -.\" XXX: Not yet implemented. -.\" -.\" .Nm nexttowardl -.\" +.Nm nexttowardf , +.Nm nexttowardl .Nd next representable floating-point number .Sh LIBRARY .Lb libm @@ -53,6 +49,8 @@ .Fn nexttoward "double x" "long double y" .Ft float .Fn nexttowardf "float x" "long double y" +.Ft long double +.Fn nexttowardl "long double x" "long double y" .Sh DESCRIPTION The .Fn nextafter , @@ -80,9 +78,10 @@ The three functions differ only in the type of the return value and .Fa x . .Pp The -.Fn nexttoward -and +.Fn nexttoward , .Fn nexttowardf +and +.Fn nexttowardl functions are equivalent to the .Fn nextafter family of functions with two exceptions: diff --git a/lib/libm/src/s_nextafterl.c b/lib/libm/src/s_nextafterl.c index 97efe4d584b2..73c3308fb01a 100644 --- a/lib/libm/src/s_nextafterl.c +++ b/lib/libm/src/s_nextafterl.c @@ -1,4 +1,4 @@ -/* $NetBSD: s_nextafterl.c,v 1.5 2014/01/31 19:38:47 matt Exp $ */ +/* $NetBSD: s_nextafterl.c,v 1.6 2019/04/27 23:04:32 kamil Exp $ */ /* @(#)s_nextafter.c 5.1 93/09/24 */ /* @@ -13,7 +13,7 @@ */ #include -__RCSID("$NetBSD: s_nextafterl.c,v 1.5 2014/01/31 19:38:47 matt Exp $"); +__RCSID("$NetBSD: s_nextafterl.c,v 1.6 2019/04/27 23:04:32 kamil Exp $"); #include #include @@ -30,6 +30,8 @@ __RCSID("$NetBSD: s_nextafterl.c,v 1.5 2014/01/31 19:38:47 matt Exp $"); #define LDBL_NBIT 0 #endif +__strong_alias(nexttowardl, nextafterl) + /* * IEEE functions * nextafterl(x,y) diff --git a/usr.sbin/makemandb/nostem.txt b/usr.sbin/makemandb/nostem.txt index 29d79d09dfff..d8e6cc9e9de9 100644 --- a/usr.sbin/makemandb/nostem.txt +++ b/usr.sbin/makemandb/nostem.txt @@ -2703,6 +2703,7 @@ nextkey nextscn nexttoward nexttowardf +nexttowardl nfe nfs nfsd