From e26180ec72cb8fd5178554b1522eff308b4e2532 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Mon, 12 Mar 2018 06:19:20 +0000 Subject: Gah, rintl() is used internally, so add a macro for the fourth possiblity, a cloning a non-standard, long double function which _is_ used from the matching plain double function build failured pointed out by deraadt@ --- lib/libm/hidden/namespace.h | 7 ++++++- lib/libm/src/s_rint.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/libm/hidden/namespace.h b/lib/libm/hidden/namespace.h index 92d4efd9b6c..b95e46140cb 100644 --- a/lib/libm/hidden/namespace.h +++ b/lib/libm/hidden/namespace.h @@ -1,4 +1,4 @@ -/* $OpenBSD: namespace.h,v 1.2 2018/03/12 04:22:56 guenther Exp $ */ +/* $OpenBSD: namespace.h,v 1.3 2018/03/12 06:19:19 guenther Exp $ */ #ifndef _LIBM_NAMESPACE_H_ #define _LIBM_NAMESPACE_H_ @@ -106,6 +106,9 @@ #define LDBL_CLONE(x) LDBL_UNUSED_CLONE(x); \ __dso_hidden typeof(HIDDEN(x##l)) HIDDEN(x##l) \ __attribute__((alias (HIDDEN_STRING(x)))) +#define LDBL_NONSTD_CLONE(x) LDBL_NONSTD_UNUSED_CLONE(x); \ + __dso_hidden typeof(HIDDEN(x##l)) HIDDEN(x##l) \ + __attribute__((alias (HIDDEN_STRING(x)))) #if __LDBL_MANT_DIG__ == __DBL_MANT_DIG__ # define LDBL_PROTO_NORMAL(x) typeof(x) HIDDEN(x) @@ -113,12 +116,14 @@ # define LDBL_MAYBE_CLONE(x) LDBL_CLONE(x) # define LDBL_MAYBE_UNUSED_CLONE(x) LDBL_UNUSED_CLONE(x) # define LDBL_MAYBE_NONSTD_UNUSED_CLONE(x) LDBL_NONSTD_UNUSED_CLONE(x) +# define LDBL_MAYBE_NONSTD_CLONE(x) LDBL_NONSTD_CLONE(x) #else # define LDBL_PROTO_NORMAL(x) PROTO_NORMAL(x) # define LDBL_PROTO_STD_DEPRECATED(x) PROTO_STD_DEPRECATED(x) # define LDBL_MAYBE_CLONE(x) __asm("") # define LDBL_MAYBE_UNUSED_CLONE(x) __asm("") # define LDBL_MAYBE_NONSTD_UNUSED_CLONE(x) __asm("") +# define LDBL_MAYBE_NONSTD_CLONE(x) __asm("") #endif #endif /* _LIBM_NAMESPACE_H_ */ diff --git a/lib/libm/src/s_rint.c b/lib/libm/src/s_rint.c index 20f75d7c856..975d8a08140 100644 --- a/lib/libm/src/s_rint.c +++ b/lib/libm/src/s_rint.c @@ -76,4 +76,4 @@ rint(double x) return w-TWO52[sx]; } DEF_STD(rint); -LDBL_MAYBE_NONSTD_UNUSED_CLONE(rint); +LDBL_MAYBE_NONSTD_CLONE(rint); -- cgit v1.2.3