From owner-svn-src-all@FreeBSD.ORG Sat Jun 12 17:32:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31374106566C; Sat, 12 Jun 2010 17:32:06 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08E258FC18; Sat, 12 Jun 2010 17:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5CHW5TX065726; Sat, 12 Jun 2010 17:32:05 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5CHW5Cs065722; Sat, 12 Jun 2010 17:32:05 GMT (envelope-from das@svn.freebsd.org) Message-Id: <201006121732.o5CHW5Cs065722@svn.freebsd.org> From: David Schultz Date: Sat, 12 Jun 2010 17:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209110 - in head/lib/msun: . src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jun 2010 17:32:06 -0000 Author: das Date: Sat Jun 12 17:32:05 2010 New Revision: 209110 URL: http://svn.freebsd.org/changeset/base/209110 Log: Introduce __isnanf() as an alias for isnanf(), and make the isnan() macro expand to __isnanf() instead of isnanf() for float arguments. This change is needed because isnanf() isn't declared in strict POSIX or C99 mode. Compatibility note: Apps using isnan(float) that are compiled after this change won't link against an older libm. Reported by: Florian Forster Modified: head/lib/msun/Symbol.map head/lib/msun/src/math.h head/lib/msun/src/s_isnan.c Modified: head/lib/msun/Symbol.map ============================================================================== --- head/lib/msun/Symbol.map Sat Jun 12 16:04:29 2010 (r209109) +++ head/lib/msun/Symbol.map Sat Jun 12 17:32:05 2010 (r209110) @@ -218,3 +218,8 @@ FBSD_1.1 { cprojf; cprojl; }; + +/* First added in 9.0-CURRENT */ +FBSD_1.2 { + __isnanf; +}; Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Sat Jun 12 16:04:29 2010 (r209109) +++ head/lib/msun/src/math.h Sat Jun 12 17:32:05 2010 (r209110) @@ -97,7 +97,7 @@ extern const union __nan_un { : (sizeof (x) == sizeof (double)) ? isinf(x) \ : __isinfl(x)) #define isnan(x) \ - ((sizeof (x) == sizeof (float)) ? isnanf(x) \ + ((sizeof (x) == sizeof (float)) ? __isnanf(x) \ : (sizeof (x) == sizeof (double)) ? isnan(x) \ : __isnanl(x)) #define isnormal(x) \ @@ -179,6 +179,7 @@ int __isfinite(double) __pure2; int __isfinitel(long double) __pure2; int __isinff(float) __pure2; int __isinfl(long double) __pure2; +int __isnanf(float) __pure2; int __isnanl(long double) __pure2; int __isnormalf(float) __pure2; int __isnormal(double) __pure2; Modified: head/lib/msun/src/s_isnan.c ============================================================================== --- head/lib/msun/src/s_isnan.c Sat Jun 12 16:04:29 2010 (r209109) +++ head/lib/msun/src/s_isnan.c Sat Jun 12 17:32:05 2010 (r209110) @@ -43,7 +43,7 @@ isnan(double d) #endif int -isnanf(float f) +__isnanf(float f) { union IEEEf2bits u; @@ -60,3 +60,5 @@ __isnanl(long double e) mask_nbit_l(u); return (u.bits.exp == 32767 && (u.bits.manl != 0 || u.bits.manh != 0)); } + +__weak_reference(__isnanf, isnanf);