summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/fpclassify.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/fpclassify.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/fpclassify.c')
-rw-r--r--lib/libc/gen/fpclassify.c15
1 files changed, 10 insertions, 5 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 */