summaryrefslogtreecommitdiff
path: root/lib/libm
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-05-30 18:34:39 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-05-30 18:34:39 +0000
commitafbe27659d775f2cab2735cdcfa8d42dd7a5029a (patch)
tree69bf1dafd4d0740ab9757f8c366eebd9f8d3dfc6 /lib/libm
parent647144b24c6d697cb2192665f467baf6a8b5fcfa (diff)
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')
-rw-r--r--lib/libm/arch/hppa/e_sqrt.c11
-rw-r--r--lib/libm/arch/hppa/s_rint.c11
-rw-r--r--lib/libm/arch/sh/e_sqrt.c10
-rw-r--r--lib/libm/noieee_src/n_asincos.c20
-rw-r--r--lib/libm/noieee_src/n_atan.c11
-rw-r--r--lib/libm/noieee_src/n_atan2.c11
-rw-r--r--lib/libm/noieee_src/n_fdim.c9
-rw-r--r--lib/libm/noieee_src/n_floor.c11
-rw-r--r--lib/libm/noieee_src/n_fmax.c9
-rw-r--r--lib/libm/noieee_src/n_fmin.c11
-rw-r--r--lib/libm/noieee_src/n_sincos.c20
-rw-r--r--lib/libm/noieee_src/n_support.c36
-rw-r--r--lib/libm/noieee_src/n_tan.c11
-rw-r--r--lib/libm/src/e_acos.c13
-rw-r--r--lib/libm/src/e_asin.c13
-rw-r--r--lib/libm/src/e_atan2.c13
-rw-r--r--lib/libm/src/e_sqrt.c13
-rw-r--r--lib/libm/src/s_atan.c13
-rw-r--r--lib/libm/src/s_copysign.c13
-rw-r--r--lib/libm/src/s_cos.c13
-rw-r--r--lib/libm/src/s_exp2.c15
-rw-r--r--lib/libm/src/s_fabs.c13
-rw-r--r--lib/libm/src/s_fmax.c15
-rw-r--r--lib/libm/src/s_fmin.c15
-rw-r--r--lib/libm/src/s_frexp.c13
-rw-r--r--lib/libm/src/s_ilogb.c13
-rw-r--r--lib/libm/src/s_nan.c15
-rw-r--r--lib/libm/src/s_rint.c13
-rw-r--r--lib/libm/src/s_scalbn.c13
-rw-r--r--lib/libm/src/s_sin.c13
-rw-r--r--lib/libm/src/s_tan.c13
31 files changed, 301 insertions, 122 deletions
diff --git a/lib/libm/arch/hppa/e_sqrt.c b/lib/libm/arch/hppa/e_sqrt.c
index c18d2a8b425..bd9e61e9ffa 100644
--- a/lib/libm/arch/hppa/e_sqrt.c
+++ b/lib/libm/arch/hppa/e_sqrt.c
@@ -2,6 +2,8 @@
* Written by Michael Shalayeff. Public Domain
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -13,8 +15,9 @@ sqrt(double x)
return (x);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#ifdef lint
+/* PROTOLIB1 */
+long double sqrtl(long double);
+#else /* lint */
__weak_alias(sqrtl, sqrt);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
diff --git a/lib/libm/arch/hppa/s_rint.c b/lib/libm/arch/hppa/s_rint.c
index d2df79fc475..bca46032b56 100644
--- a/lib/libm/arch/hppa/s_rint.c
+++ b/lib/libm/arch/hppa/s_rint.c
@@ -2,6 +2,8 @@
* Written by Michael Shalayeff. Public Domain
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -14,8 +16,9 @@ rint(double x)
return (x);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#ifdef lint
+/* PROTOLIB1 */
+long double rintl(long double);
+#else /* lint */
__weak_alias(rintl, rint);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
diff --git a/lib/libm/arch/sh/e_sqrt.c b/lib/libm/arch/sh/e_sqrt.c
index 143e0d0529b..5b4ef8dcc81 100644
--- a/lib/libm/arch/sh/e_sqrt.c
+++ b/lib/libm/arch/sh/e_sqrt.c
@@ -1,9 +1,11 @@
-/* $OpenBSD: e_sqrt.c,v 1.1 2009/04/05 19:26:27 martynas Exp $ */
+/* $OpenBSD: e_sqrt.c,v 1.2 2011/05/30 18:34:38 martynas Exp $ */
/*
* Written by Martynas Venckus. Public domain
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <math.h>
@@ -34,5 +36,9 @@ sqrt(double d)
}
/* No extended-precision is present. */
+#ifdef lint
+/* PROTOLIB1 */
+long double sqrtl(long double);
+#else /* lint */
__weak_alias(sqrtl,sqrt);
-
+#endif /* lint */
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 */
diff --git a/lib/libm/src/e_acos.c b/lib/libm/src/e_acos.c
index 566dda2a9d1..55bef8e7ee0 100644
--- a/lib/libm/src/e_acos.c
+++ b/lib/libm/src/e_acos.c
@@ -34,6 +34,8 @@
* Function needed: sqrt
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -101,8 +103,11 @@ acos(double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double acosl(long double);
+#else /* lint */
__weak_alias(acosl, acos);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/e_asin.c b/lib/libm/src/e_asin.c
index 7b1bd3c0663..f2a3cac06ad 100644
--- a/lib/libm/src/e_asin.c
+++ b/lib/libm/src/e_asin.c
@@ -40,6 +40,8 @@
*
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -109,8 +111,11 @@ asin(double x)
if(hx>0) return t; else return -t;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double asinl(long double);
+#else /* lint */
__weak_alias(asinl, asin);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/e_atan2.c b/lib/libm/src/e_atan2.c
index 1c508b31675..a2a8f383d2a 100644
--- a/lib/libm/src/e_atan2.c
+++ b/lib/libm/src/e_atan2.c
@@ -37,6 +37,8 @@
* to produce the hexadecimal values shown.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -120,8 +122,11 @@ atan2(double y, double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double atan2l(long double, long double);
+#else /* lint */
__weak_alias(atan2l, atan2);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/e_sqrt.c b/lib/libm/src/e_sqrt.c
index a08cebb7ee5..d758e0ff4ca 100644
--- a/lib/libm/src/e_sqrt.c
+++ b/lib/libm/src/e_sqrt.c
@@ -80,6 +80,8 @@
*---------------
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -442,8 +444,11 @@ B. sqrt(x) by Reciproot Iteration
*/
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double sqrtl(long double);
+#else /* lint */
__weak_alias(sqrtl, sqrt);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_atan.c b/lib/libm/src/s_atan.c
index 01f40001ff4..36f64bdee0d 100644
--- a/lib/libm/src/s_atan.c
+++ b/lib/libm/src/s_atan.c
@@ -30,6 +30,8 @@
* to produce the hexadecimal values shown.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -117,8 +119,11 @@ atan(double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double atanl(long double);
+#else /* lint */
__weak_alias(atanl, atan);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_copysign.c b/lib/libm/src/s_copysign.c
index 8a6d645cd49..73b3234cfc0 100644
--- a/lib/libm/src/s_copysign.c
+++ b/lib/libm/src/s_copysign.c
@@ -16,6 +16,8 @@
* with the sign bit of y.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -32,8 +34,11 @@ copysign(double x, double y)
return x;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double copysignl(long double, long double);
+#else /* lint */
__weak_alias(copysignl, copysign);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_cos.c b/lib/libm/src/s_cos.c
index 2d057dc9b96..50475de7fa4 100644
--- a/lib/libm/src/s_cos.c
+++ b/lib/libm/src/s_cos.c
@@ -41,6 +41,8 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -76,8 +78,11 @@ cos(double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double cosl(long double);
+#else /* lint */
__weak_alias(cosl, cos);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_exp2.c b/lib/libm/src/s_exp2.c
index 7359265f86d..95d0408c6d8 100644
--- a/lib/libm/src/s_exp2.c
+++ b/lib/libm/src/s_exp2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_exp2.c,v 1.2 2008/12/09 20:00:35 martynas Exp $ */
+/* $OpenBSD: s_exp2.c,v 1.3 2011/05/30 18:34:38 martynas Exp $ */
/*-
* Copyright (c) 2005 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
@@ -25,6 +25,8 @@
* SUCH DAMAGE.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -390,8 +392,11 @@ exp2(double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double exp2l(long double);
+#else /* lint */
__weak_alias(exp2l, exp2);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_fabs.c b/lib/libm/src/s_fabs.c
index cbabb25bb5c..87502784d4c 100644
--- a/lib/libm/src/s_fabs.c
+++ b/lib/libm/src/s_fabs.c
@@ -14,6 +14,8 @@
* fabs(x) returns the absolute value of x.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -29,8 +31,11 @@ fabs(double x)
return x;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double fabsl(long double);
+#else /* lint */
__weak_alias(fabsl, fabs);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_fmax.c b/lib/libm/src/s_fmax.c
index 731f020952c..fb94abe12e7 100644
--- a/lib/libm/src/s_fmax.c
+++ b/lib/libm/src/s_fmax.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_fmax.c,v 1.4 2008/12/10 01:08:24 martynas Exp $ */
+/* $OpenBSD: s_fmax.c,v 1.5 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 <float.h>
#include <math.h>
@@ -48,8 +50,11 @@ fmax(double x, double y)
return (x > y ? x : y);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double fmaxl(long double, long double);
+#else /* lint */
__weak_alias(fmaxl, fmax);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_fmin.c b/lib/libm/src/s_fmin.c
index 48b07c2c0c1..d735aa7da7e 100644
--- a/lib/libm/src/s_fmin.c
+++ b/lib/libm/src/s_fmin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_fmin.c,v 1.4 2008/12/10 01:08:24 martynas Exp $ */
+/* $OpenBSD: s_fmin.c,v 1.5 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 <float.h>
#include <math.h>
@@ -48,8 +50,11 @@ fmin(double x, double y)
return (x < y ? x : y);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double fminl(long double, long double);
+#else /* lint */
__weak_alias(fminl, fmin);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_frexp.c b/lib/libm/src/s_frexp.c
index ae6552ff8d8..c290a058a13 100644
--- a/lib/libm/src/s_frexp.c
+++ b/lib/libm/src/s_frexp.c
@@ -20,6 +20,8 @@
* with *exp=0.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -49,8 +51,11 @@ frexp(double x, int *eptr)
return x;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double frexpl(long double, int *);
+#else /* lint */
__weak_alias(frexpl, frexp);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_ilogb.c b/lib/libm/src/s_ilogb.c
index e006abf6279..a700a3dce99 100644
--- a/lib/libm/src/s_ilogb.c
+++ b/lib/libm/src/s_ilogb.c
@@ -16,6 +16,8 @@
* ilogb(inf/NaN) = 0x7fffffff (no signal is raised)
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -45,8 +47,11 @@ ilogb(double x)
else return 0x7fffffff;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int ilogbl(long double);
+#else /* lint */
__weak_alias(ilogbl, ilogb);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_nan.c b/lib/libm/src/s_nan.c
index 37bae5028df..b3b4b523afc 100644
--- a/lib/libm/src/s_nan.c
+++ b/lib/libm/src/s_nan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s_nan.c,v 1.6 2008/12/10 01:08:25 martynas Exp $ */
+/* $OpenBSD: s_nan.c,v 1.7 2011/05/30 18:34:38 martynas Exp $ */
/*-
* Copyright (c) 2007 David Schultz
* All rights reserved.
@@ -27,6 +27,8 @@
* $FreeBSD: src/lib/msun/src/s_nan.c,v 1.2 2007/12/18 23:46:32 das Exp $
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/endian.h>
@@ -123,8 +125,11 @@ nanf(const char *s)
return (u.f);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double nanl(const char *);
+#else /* lint */
__weak_alias(nanl, nan);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_rint.c b/lib/libm/src/s_rint.c
index dc2c6aa0704..c509714c02f 100644
--- a/lib/libm/src/s_rint.c
+++ b/lib/libm/src/s_rint.c
@@ -20,6 +20,8 @@
* Inexact flag raised if x not equal to rint(x).
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -77,8 +79,11 @@ rint(double x)
return w-TWO52[sx];
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double rintl(long double);
+#else /* lint */
__weak_alias(rintl, rint);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_scalbn.c b/lib/libm/src/s_scalbn.c
index 2f8a36eb668..aa9973d43f6 100644
--- a/lib/libm/src/s_scalbn.c
+++ b/lib/libm/src/s_scalbn.c
@@ -17,6 +17,8 @@
* exponentiation or a multiplication.
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -56,8 +58,11 @@ scalbn (double x, int n)
return x*twom54;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double scalbnl(long double, int);
+#else /* lint */
__weak_alias(scalbnl, scalbn);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_sin.c b/lib/libm/src/s_sin.c
index 6c0ec362b70..6ffe6efaab8 100644
--- a/lib/libm/src/s_sin.c
+++ b/lib/libm/src/s_sin.c
@@ -41,6 +41,8 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -76,8 +78,11 @@ sin(double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double sinl(long double);
+#else /* lint */
__weak_alias(sinl, sin);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libm/src/s_tan.c b/lib/libm/src/s_tan.c
index d2d3e69298c..dda041b5183 100644
--- a/lib/libm/src/s_tan.c
+++ b/lib/libm/src/s_tan.c
@@ -40,6 +40,8 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+/* LINTLIBRARY */
+
#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -70,8 +72,11 @@ tan(double x)
}
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+long double tanl(long double);
+#else /* lint */
__weak_alias(tanl, tan);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */