summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2011-05-30 17:28:16 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2011-05-30 17:28:16 +0000
commit647144b24c6d697cb2192665f467baf6a8b5fcfa (patch)
tree7b2995ef14891a3a0e10a55797a5eba41864e836 /lib/libc/gen
parent4a487e9af55dd98a2674c9ed8b50171ceacb776f (diff)
Trick lint into recording the right prototypes in the llib-lc.ln
database on platforms without extended-precision floating-point support. Seems like a reasonable approach to millert@.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/fpclassify.c15
-rw-r--r--lib/libc/gen/frexp.c15
-rw-r--r--lib/libc/gen/isfinite.c17
-rw-r--r--lib/libc/gen/isinf.c17
-rw-r--r--lib/libc/gen/isnan.c17
-rw-r--r--lib/libc/gen/isnormal.c15
-rw-r--r--lib/libc/gen/ldexp.c17
-rw-r--r--lib/libc/gen/signbit.c15
8 files changed, 79 insertions, 49 deletions
diff --git a/lib/libc/gen/fpclassify.c b/lib/libc/gen/fpclassify.c
index 6f0636044dc..f38b67d64a1 100644
--- a/lib/libc/gen/fpclassify.c
+++ b/lib/libc/gen/fpclassify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpclassify.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: fpclassify.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -65,8 +67,11 @@ __fpclassifyf(float f)
return FP_NORMAL;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int __fpclassifyl(long double);
+#else /* lint */
__weak_alias(__fpclassifyl, __fpclassify);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libc/gen/frexp.c b/lib/libc/gen/frexp.c
index e52c1b85d30..29d416f6701 100644
--- a/lib/libc/gen/frexp.c
+++ b/lib/libc/gen/frexp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frexp.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: frexp.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
/*-
* Copyright (c) 2004 David Schultz <das@FreeBSD.ORG>
@@ -28,6 +28,8 @@
* $FreeBSD: frexp.c,v 1.1 2004/07/18 21:23:39 das Exp $
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -67,8 +69,11 @@ frexp(double v, int *ex)
return (u.v);
}
-#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/libc/gen/isfinite.c b/lib/libc/gen/isfinite.c
index c7e68a1d825..8ac908f2bc8 100644
--- a/lib/libc/gen/isfinite.c
+++ b/lib/libc/gen/isfinite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isfinite.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: isfinite.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -37,16 +39,17 @@ __isfinitef(float f)
return (p->sng_exp != SNG_EXP_INFNAN);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int __isfinitel(long double);
+#else /* lint */
__weak_alias(__isfinitel, __isfinite);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
/*
* 3BSD compatibility aliases.
*/
-#ifdef __weak_alias
__weak_alias(finite, __isfinite);
__weak_alias(finitef, __isfinitef);
-#endif /* __weak_alias */
diff --git a/lib/libc/gen/isinf.c b/lib/libc/gen/isinf.c
index 67287fd50b7..167636bb094 100644
--- a/lib/libc/gen/isinf.c
+++ b/lib/libc/gen/isinf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isinf.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: isinf.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -37,16 +39,17 @@ __isinff(float f)
return (p->sng_exp == SNG_EXP_INFNAN && p->sng_frac == 0);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int __isinfl(long double);
+#else /* lint */
__weak_alias(__isinfl, __isinf);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* __weak_alias */
+#endif /* LDBL_MANT_DIG == 53 */
/*
* 3BSD compatibility aliases.
*/
-#ifdef __weak_alias
__weak_alias(isinf, __isinf);
__weak_alias(isinff, __isinff);
-#endif /* __weak_alias */
diff --git a/lib/libc/gen/isnan.c b/lib/libc/gen/isnan.c
index 6faefac3236..378df5bf5b3 100644
--- a/lib/libc/gen/isnan.c
+++ b/lib/libc/gen/isnan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isnan.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: isnan.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -37,16 +39,17 @@ __isnanf(float f)
return (p->sng_exp == SNG_EXP_INFNAN && p->sng_frac != 0);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int __isnanl(long double);
+#else /* lint */
__weak_alias(__isnanl, __isnan);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
/*
* 3BSD compatibility aliases.
*/
-#ifdef __weak_alias
__weak_alias(isnan, __isnan);
__weak_alias(isnanf, __isnanf);
-#endif /* __weak_alias */
diff --git a/lib/libc/gen/isnormal.c b/lib/libc/gen/isnormal.c
index 8ca65aa7091..ecb7972932f 100644
--- a/lib/libc/gen/isnormal.c
+++ b/lib/libc/gen/isnormal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isnormal.c,v 1.4 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: isnormal.c,v 1.5 2011/05/30 17:28:15 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -37,8 +39,11 @@ __isnormalf(float f)
return (p->sng_exp != 0 && p->sng_exp != SNG_EXP_INFNAN);
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int __isnormall(long double);
+#else /* lint */
__weak_alias(__isnormall, __isnormal);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libc/gen/ldexp.c b/lib/libc/gen/ldexp.c
index 451950889b2..0240e861c80 100644
--- a/lib/libc/gen/ldexp.c
+++ b/lib/libc/gen/ldexp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldexp.c,v 1.1 2009/04/19 16:42:06 martynas Exp $ */
+/* $OpenBSD: ldexp.c,v 1.2 2011/05/30 17:28:15 martynas Exp $ */
/* @(#)s_scalbn.c 5.1 93/09/24 */
/* @(#)fdlibm.h 5.1 93/09/24 */
/*
@@ -12,9 +12,7 @@
* ====================================================
*/
-#if 0
-__FBSDID("$FreeBSD: src/lib/libc/gen/ldexp.c,v 1.1 2005/01/22 06:03:40 das Exp $");
-#endif
+/* LINTLIBRARY */
#include <sys/types.h>
#include <sys/cdefs.h>
@@ -126,8 +124,11 @@ ldexp(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 ldexpl(long double, int);
+#else /* lint */
__weak_alias(ldexpl, ldexp);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */
diff --git a/lib/libc/gen/signbit.c b/lib/libc/gen/signbit.c
index d2caa82dd19..35b6f4c07c0 100644
--- a/lib/libc/gen/signbit.c
+++ b/lib/libc/gen/signbit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signbit.c,v 1.3 2008/12/10 01:15:02 martynas Exp $ */
+/* $OpenBSD: signbit.c,v 1.4 2011/05/30 17:28:15 martynas Exp $ */
/*
* Copyright (c) 2008 Martynas Venckus <martynas@openbsd.org>
*
@@ -15,6 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+/* LINTLIBRARY */
+
#include <sys/types.h>
#include <sys/cdefs.h>
#include <machine/ieee.h>
@@ -37,8 +39,11 @@ __signbitf(float f)
return p->sng_sign;
}
-#if LDBL_MANT_DIG == 53
-#ifdef __weak_alias
+#if LDBL_MANT_DIG == 53
+#ifdef lint
+/* PROTOLIB1 */
+int __signbitl(long double);
+#else /* lint */
__weak_alias(__signbitl, __signbit);
-#endif /* __weak_alias */
-#endif /* LDBL_MANT_DIG == 53 */
+#endif /* lint */
+#endif /* LDBL_MANT_DIG == 53 */