Module Name: src Committed By: jmcneill Date: Sat Sep 18 10:46:17 UTC 2021
Modified Files: src/usr.bin/xlint/lint1: lex.c tree.c Log Message: use isfinite(3) instead of finite(3) for portability Fixes tools build on macOS 11.6 arm64 hosts. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/usr.bin/xlint/lint1/lex.c cvs rdiff -u -r1.381 -r1.382 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.83 src/usr.bin/xlint/lint1/lex.c:1.84 --- src/usr.bin/xlint/lint1/lex.c:1.83 Fri Sep 17 21:06:04 2021 +++ src/usr.bin/xlint/lint1/lex.c Sat Sep 18 10:46:17 2021 @@ -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 @@ lex_floating_constant(const char *yytext 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; Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.381 src/usr.bin/xlint/lint1/tree.c:1.382 --- src/usr.bin/xlint/lint1/tree.c:1.381 Sun Sep 12 10:06:03 2021 +++ src/usr.bin/xlint/lint1/tree.c Sat Sep 18 10:46:17 2021 @@ -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 @@ fold_float(tnode_t *tn) } 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 &&