diff options
author | 2011-05-30 18:34:38 +0000 | |
---|---|---|
committer | 2011-05-30 18:34:38 +0000 | |
commit | 07efc9a601613df23075b760e2c4385ff2c3918b (patch) | |
tree | 83233e16467a7a3c4b2473d074821f1a56f110c8 /lib/libm/noieee_src | |
parent | Trick lint into recording the right prototypes in the llib-lc.ln (diff) | |
download | wireguard-openbsd-07efc9a601613df23075b760e2c4385ff2c3918b.tar.xz wireguard-openbsd-07efc9a601613df23075b760e2c4385ff2c3918b.zip |
Trick lint into recording the right prototypes in the llib-lm.ln
database on platforms without extended-precision floating-point
support.
Seems like a reasonable approach to millert@.
Diffstat (limited to 'lib/libm/noieee_src')
-rw-r--r-- | lib/libm/noieee_src/n_asincos.c | 20 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_atan.c | 11 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_atan2.c | 11 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_fdim.c | 9 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_floor.c | 11 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_fmax.c | 9 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_fmin.c | 11 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_sincos.c | 20 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_support.c | 36 | ||||
-rw-r--r-- | lib/libm/noieee_src/n_tan.c | 11 |
10 files changed, 113 insertions, 36 deletions
diff --git a/lib/libm/noieee_src/n_asincos.c b/lib/libm/noieee_src/n_asincos.c index 30fa0473edd..ee5c19dc162 100644 --- a/lib/libm/noieee_src/n_asincos.c +++ b/lib/libm/noieee_src/n_asincos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_asincos.c,v 1.10 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_asincos.c,v 1.11 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_asincos.c,v 1.1 1995/10/10 23:36:34 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -81,6 +81,8 @@ * 1.99 ulps. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -102,9 +104,13 @@ asin(double x) } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double asinl(long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(asinl, asin); -#endif /* __weak_alias */ +#endif /* lint */ /* ACOS(X) * RETURNS ARC COS OF X @@ -173,6 +179,10 @@ acos(double x) return(t+t); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double acosl(long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(acosl, acos); -#endif /* __weak_alias */ +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_atan.c b/lib/libm/noieee_src/n_atan.c index 98f1e67be54..782945ac002 100644 --- a/lib/libm/noieee_src/n_atan.c +++ b/lib/libm/noieee_src/n_atan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_atan.c,v 1.8 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_atan.c,v 1.9 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_atan.c,v 1.1 1995/10/10 23:36:36 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -73,6 +73,8 @@ * 0.85 ulps. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -83,6 +85,9 @@ atan(double x) return(atan2(x,one)); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double atanl(long double); +#else /* lint */ __weak_alias(atanl, atan); -#endif /* __weak_alias */ +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_atan2.c b/lib/libm/noieee_src/n_atan2.c index c7d31f9febb..763d7f6cbb1 100644 --- a/lib/libm/noieee_src/n_atan2.c +++ b/lib/libm/noieee_src/n_atan2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_atan2.c,v 1.13 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_atan2.c,v 1.14 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_atan2.c,v 1.1 1995/10/10 23:36:37 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -103,6 +103,8 @@ * shown. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -239,6 +241,9 @@ begin: return(copysign((signx>zero)?z:PI-z,signy)); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double atan2l(long double, long double); +#else /* lint */ __weak_alias(atan2l, atan2); -#endif /* __weak_alias */ +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_fdim.c b/lib/libm/noieee_src/n_fdim.c index e887a5a332b..ee251bc41ca 100644 --- a/lib/libm/noieee_src/n_fdim.c +++ b/lib/libm/noieee_src/n_fdim.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_fdim.c,v 1.3 2008/12/10 01:08:24 martynas Exp $ */ +/* $OpenBSD: n_fdim.c,v 1.4 2011/05/30 18:34:38 martynas Exp $ */ /*- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> * All rights reserved. @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -42,4 +44,9 @@ fn(type x, type y) \ DECL(double, fdim) DECL(float, fdimf) +#ifdef lint +/* PROTOLIB1 */ +long double fdiml(long double, long double); +#else /* lint */ __weak_alias(fdiml, fdim); +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_floor.c b/lib/libm/noieee_src/n_floor.c index c978b1164c2..268662a7ca5 100644 --- a/lib/libm/noieee_src/n_floor.c +++ b/lib/libm/noieee_src/n_floor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_floor.c,v 1.13 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_floor.c,v 1.14 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_floor.c,v 1.1 1995/10/10 23:36:48 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -29,6 +29,8 @@ * SUCH DAMAGE. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -114,6 +116,9 @@ rint(double x) return (t - s); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double rintl(long double); +#else /* lint */ __weak_alias(rintl, rint); -#endif /* __weak_alias */ +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_fmax.c b/lib/libm/noieee_src/n_fmax.c index e997a937c2c..5ef76e52143 100644 --- a/lib/libm/noieee_src/n_fmax.c +++ b/lib/libm/noieee_src/n_fmax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_fmax.c,v 1.3 2008/12/10 01:08:24 martynas Exp $ */ +/* $OpenBSD: n_fmax.c,v 1.4 2011/05/30 18:34:38 martynas Exp $ */ /*- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> * All rights reserved. @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -47,4 +49,9 @@ fmax(double x, double y) return (x > y ? x : y); } +#ifdef lint +/* PROTOLIB1 */ +long double fmaxl(long double, long double); +#else /* lint */ __weak_alias(fmaxl, fmax); +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_fmin.c b/lib/libm/noieee_src/n_fmin.c index 3215b5136d5..ae7f2698115 100644 --- a/lib/libm/noieee_src/n_fmin.c +++ b/lib/libm/noieee_src/n_fmin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_fmin.c,v 1.3 2008/12/10 01:08:24 martynas Exp $ */ +/* $OpenBSD: n_fmin.c,v 1.4 2011/05/30 18:34:38 martynas Exp $ */ /*- * Copyright (c) 2004 David Schultz <das@FreeBSD.ORG> * All rights reserved. @@ -25,6 +25,8 @@ * SUCH DAMAGE. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -47,6 +49,9 @@ fmin(double x, double y) return (x < y ? x : y); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double fminl(long double, long double); +#else /* lint */ __weak_alias(fminl, fmin); -#endif /* __weak_alias */ +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_sincos.c b/lib/libm/noieee_src/n_sincos.c index ddea151ff2b..8c41228795e 100644 --- a/lib/libm/noieee_src/n_sincos.c +++ b/lib/libm/noieee_src/n_sincos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_sincos.c,v 1.9 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_sincos.c,v 1.10 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_sincos.c,v 1.1 1995/10/10 23:37:04 ragge Exp $ */ /* * Copyright (c) 1987, 1993 @@ -29,6 +29,8 @@ * SUCH DAMAGE. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -63,9 +65,13 @@ sin(double x) return x+x*sin__S(x*x); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double sinl(long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(sinl, sin); -#endif /* __weak_alias */ +#endif /* lint */ double cos(double x) @@ -97,6 +103,10 @@ cos(double x) return copysign(a,s); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double cosl(long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(cosl, cos); -#endif /* __weak_alias */ +#endif /* lint */ diff --git a/lib/libm/noieee_src/n_support.c b/lib/libm/noieee_src/n_support.c index 9e69da73085..afd273f2d1f 100644 --- a/lib/libm/noieee_src/n_support.c +++ b/lib/libm/noieee_src/n_support.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_support.c,v 1.18 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_support.c,v 1.19 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_support.c,v 1.1 1995/10/10 23:37:06 ragge Exp $ */ /* * Copyright (c) 1985, 1993 @@ -64,6 +64,8 @@ * REVISED BY K.C. NG on 1/22/85, 2/13/85, 3/24/85. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -117,9 +119,13 @@ scalbn(double x, int N) return(x); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double scalbnl(long double, int); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(scalbnl, scalbn); -#endif /* __weak_alias */ +#endif /* lint */ double copysign(double x, double y) @@ -135,9 +141,13 @@ copysign(double x, double y) return(x); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double copysignl(long double, long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(copysignl, copysign); -#endif /* __weak_alias */ +#endif /* lint */ double logb(double x) @@ -162,9 +172,13 @@ logb(double x) #endif /* defined(__vax__) */ } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double logbl(long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(logbl, logb); -#endif /* __weak_alias */ +#endif /* lint */ double remainder(double x, double p) @@ -315,9 +329,13 @@ sqrt(double x) end: return(scalbn(q,n)); } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double sqrtl(long double); +/* PROTOLIB0 */ +#else /* lint */ __weak_alias(sqrtl, sqrt); -#endif /* __weak_alias */ +#endif /* lint */ #if 0 /* REMAINDER(X,Y) diff --git a/lib/libm/noieee_src/n_tan.c b/lib/libm/noieee_src/n_tan.c index 395fa314324..83e16f8cdda 100644 --- a/lib/libm/noieee_src/n_tan.c +++ b/lib/libm/noieee_src/n_tan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: n_tan.c,v 1.9 2009/10/27 23:59:29 deraadt Exp $ */ +/* $OpenBSD: n_tan.c,v 1.10 2011/05/30 18:34:38 martynas Exp $ */ /* $NetBSD: n_tan.c,v 1.1 1995/10/10 23:37:07 ragge Exp $ */ /* * Copyright (c) 1987, 1993 @@ -29,6 +29,8 @@ * SUCH DAMAGE. */ +/* LINTLIBRARY */ + #include <sys/cdefs.h> #include <math.h> @@ -66,6 +68,9 @@ tan(double x) return c/(x+x*ss); /* ... cos/sin */ } -#ifdef __weak_alias +#ifdef lint +/* PROTOLIB1 */ +long double tanl(long double); +#else /* lint */ __weak_alias(tanl, tan); -#endif /* __weak_alias */ +#endif /* lint */ |