From owner-svn-src-all@FreeBSD.ORG Sat Nov 10 21:22:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2AA645A2; Sat, 10 Nov 2012 21:22:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E3D798FC08; Sat, 10 Nov 2012 21:22:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAALMAqk014248; Sat, 10 Nov 2012 21:22:10 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAALMAnO014246; Sat, 10 Nov 2012 21:22:10 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201211102122.qAALMAnO014246@svn.freebsd.org> From: Dimitry Andric Date: Sat, 10 Nov 2012 21:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242879 - in head/lib: libc/gen msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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, 10 Nov 2012 21:22:11 -0000 Author: dim Date: Sat Nov 10 21:22:10 2012 New Revision: 242879 URL: http://svnweb.freebsd.org/changeset/base/242879 Log: Only define isnan, isnanf, __isnan and __isnanf in libc.so, not in libc.a and libc_p.a. In addition, define isnan in libm.a and libm_p.a, but not in libm.so. This makes it possible to statically link executables using both isnan and isnanf with libc and libm. Tested by: kargl MFC after: 1 week Modified: head/lib/libc/gen/isnan.c head/lib/msun/src/s_isnan.c Modified: head/lib/libc/gen/isnan.c ============================================================================== --- head/lib/libc/gen/isnan.c Sat Nov 10 21:09:17 2012 (r242878) +++ head/lib/libc/gen/isnan.c Sat Nov 10 21:22:10 2012 (r242879) @@ -35,6 +35,7 @@ * binary compat until we can bump libm's major version number. */ +#ifdef PIC __weak_reference(__isnan, isnan); __weak_reference(__isnanf, isnanf); @@ -55,3 +56,4 @@ __isnanf(float f) u.f = f; return (u.bits.exp == 255 && u.bits.man != 0); } +#endif /* PIC */ Modified: head/lib/msun/src/s_isnan.c ============================================================================== --- head/lib/msun/src/s_isnan.c Sat Nov 10 21:09:17 2012 (r242878) +++ head/lib/msun/src/s_isnan.c Sat Nov 10 21:22:10 2012 (r242879) @@ -30,8 +30,9 @@ #include "fpmath.h" -/* Provided by libc */ -#if 0 +/* Provided by libc.so */ +#ifndef PIC +#undef isnan int isnan(double d) { @@ -40,7 +41,7 @@ isnan(double d) u.d = d; return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); } -#endif +#endif /* !PIC */ int __isnanf(float f)