Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 use isfinite(3) instead of finite(3) for...
details: https://anonhg.NetBSD.org/src/rev/53fc3eba052c
branches: trunk
changeset: 1023612:53fc3eba052c
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Sep 18 10:46:17 2021 +0000
description:
use isfinite(3) instead of finite(3) for portability
Fixes tools build on macOS 11.6 arm64 hosts.
diffstat:
usr.bin/xlint/lint1/lex.c | 6 +++---
usr.bin/xlint/lint1/tree.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 45058121fe45 -r 53fc3eba052c usr.bin/xlint/lint1/lex.c
--- a/usr.bin/xlint/lint1/lex.c Sat Sep 18 10:45:11 2021 +0000
+++ b/usr.bin/xlint/lint1/lex.c Sat Sep 18 10:46:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.83 2021/09/17 21:06:04 christos Exp $ */
+/* $NetBSD: lex.c,v 1.84 2021/09/18 10:46:17 jmcneill Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.83 2021/09/17 21:06:04 christos Exp $");
+__RCSID("$NetBSD: lex.c,v 1.84 2021/09/18 10:46:17 jmcneill Exp $");
#endif
#include <ctype.h>
@@ -735,7 +735,7 @@
if (typ == FLOAT) {
f = (float)d;
- if (finite(f) == 0) {
+ if (isfinite(f) == 0) {
/* floating-point constant out of range */
warning(248);
f = f > 0 ? FLT_MAX : -FLT_MAX;
diff -r 45058121fe45 -r 53fc3eba052c usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Sat Sep 18 10:45:11 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c Sat Sep 18 10:46:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.381 2021/09/12 10:06:03 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.382 2021/09/18 10:46:17 jmcneill Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.381 2021/09/12 10:06:03 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.382 2021/09/18 10:46:17 jmcneill Exp $");
#endif
#include <float.h>
@@ -3333,7 +3333,7 @@
}
lint_assert(fpe != 0 || isnan((double)v->v_ldbl) == 0);
- if (fpe != 0 || finite((double)v->v_ldbl) == 0 ||
+ if (fpe != 0 || isfinite((double)v->v_ldbl) == 0 ||
(t == FLOAT &&
(v->v_ldbl > FLT_MAX || v->v_ldbl < -FLT_MAX)) ||
(t == DOUBLE &&
Home |
Main Index |
Thread Index |
Old Index