summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/isinf.c
diff options
context:
space:
mode:
authormartynas <martynas@openbsd.org>2011-05-30 17:28:15 +0000
committermartynas <martynas@openbsd.org>2011-05-30 17:28:15 +0000
commit9621c8b26014339ab759f206b9b55dd557e2c2b8 (patch)
tree4fa038b53dfac75ba94ab606e8ada6061bc40ba3 /lib/libc/gen/isinf.c
parenttypo; Alexander Polakov (diff)
downloadwireguard-openbsd-9621c8b26014339ab759f206b9b55dd557e2c2b8.tar.xz
wireguard-openbsd-9621c8b26014339ab759f206b9b55dd557e2c2b8.zip
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/isinf.c')
-rw-r--r--lib/libc/gen/isinf.c17
1 files changed, 10 insertions, 7 deletions
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 */