Module Name: src Committed By: drochner Date: Fri Apr 23 19:04:54 UTC 2010
Modified Files: src/lib/libc/compat/gen: Makefile.inc compat_frexp_ieee754.c compat_ldexp_ieee754.c compat_modf_ieee754.c Log Message: use the local versions of ldexp/frexp/modf again rather than pulling in libm source code. The libm functions depend on other libm functions, this requires symbol renaming, and with the reachover method this is going to be a mess. Also, bundling the dependencies into one .o file has the potential to cause symbol conflicts on static linking. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/lib/libc/compat/gen/Makefile.inc cvs rdiff -u -r1.4 -r1.5 src/lib/libc/compat/gen/compat_frexp_ieee754.c \ src/lib/libc/compat/gen/compat_ldexp_ieee754.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/compat/gen/compat_modf_ieee754.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/compat/gen/Makefile.inc diff -u src/lib/libc/compat/gen/Makefile.inc:1.12 src/lib/libc/compat/gen/Makefile.inc:1.13 --- src/lib/libc/compat/gen/Makefile.inc:1.12 Sun Aug 16 19:33:39 2009 +++ src/lib/libc/compat/gen/Makefile.inc Fri Apr 23 19:04:54 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.12 2009/08/16 19:33:39 christos Exp $ +# $NetBSD: Makefile.inc,v 1.13 2010/04/23 19:04:54 drochner Exp $ .PATH: ${COMPATDIR}/gen SRCS+=compat_errlist.c compat_fts.c compat___fts13.c compat___fts30.c \ @@ -9,9 +9,3 @@ compat__sys_errlist.c compat__sys_nerr.c compat__sys_siglist.c \ compat_time.c compat_utime.c compat_devname.c compat_alphasort.c \ compat_getpwent.c compat___fts32.c compat_utmp.c compat___fts50.c - -LIBMINC=-I${LIBCDIR}/../libm/src -DUSE_LIBM -CPPFLAGS.compat_frexp_ieee754.c += ${LIBMINC} -CPPFLAGS.compat_ldexp_ieee754.c += ${LIBMINC} -CPPFLAGS.compat_modf_ieee754.c += ${LIBMINC} - Index: src/lib/libc/compat/gen/compat_frexp_ieee754.c diff -u src/lib/libc/compat/gen/compat_frexp_ieee754.c:1.4 src/lib/libc/compat/gen/compat_frexp_ieee754.c:1.5 --- src/lib/libc/compat/gen/compat_frexp_ieee754.c:1.4 Sun Sep 28 15:19:09 2008 +++ src/lib/libc/compat/gen/compat_frexp_ieee754.c Fri Apr 23 19:04:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_frexp_ieee754.c,v 1.4 2008/09/28 15:19:09 christos Exp $ */ +/* $NetBSD: compat_frexp_ieee754.c,v 1.5 2010/04/23 19:04:54 drochner Exp $ */ /* * Copyright (c) 1992, 1993 @@ -35,21 +35,19 @@ * from: Header: frexp.c,v 1.1 91/07/07 04:45:01 torek Exp */ -#ifdef USE_LIBM -#include "s_frexp.c" -#else #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) #if 0 static char sccsid[] = "@(#)frexp.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: compat_frexp_ieee754.c,v 1.4 2008/09/28 15:19:09 christos Exp $"); +__RCSID("$NetBSD: compat_frexp_ieee754.c,v 1.5 2010/04/23 19:04:54 drochner Exp $"); #endif #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <machine/ieee.h> -#include <math.h> + +double frexp(double, int *); /* * Split the given value into a fraction in the range [0.5, 1.0) and @@ -83,4 +81,3 @@ return (value); } } -#endif Index: src/lib/libc/compat/gen/compat_ldexp_ieee754.c diff -u src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.4 src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.5 --- src/lib/libc/compat/gen/compat_ldexp_ieee754.c:1.4 Sun Sep 28 18:54:30 2008 +++ src/lib/libc/compat/gen/compat_ldexp_ieee754.c Fri Apr 23 19:04:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_ldexp_ieee754.c,v 1.4 2008/09/28 18:54:30 christos Exp $ */ +/* $NetBSD: compat_ldexp_ieee754.c,v 1.5 2010/04/23 19:04:54 drochner Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -29,20 +29,16 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifdef USE_LIBM -#include "s_finite.c" -#include "s_scalbn.c" -#include "s_ldexp.c" -#else #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.4 2008/09/28 18:54:30 christos Exp $"); +__RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.5 2010/04/23 19:04:54 drochner Exp $"); #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> #include <machine/ieee.h> #include <errno.h> -#include <math.h> + +double ldexp(double, int); /* * Multiply the given value by 2^expon. @@ -145,4 +141,3 @@ return (u.dblu_d); } } -#endif Index: src/lib/libc/compat/gen/compat_modf_ieee754.c diff -u src/lib/libc/compat/gen/compat_modf_ieee754.c:1.3 src/lib/libc/compat/gen/compat_modf_ieee754.c:1.4 --- src/lib/libc/compat/gen/compat_modf_ieee754.c:1.3 Wed Jan 27 14:10:41 2010 +++ src/lib/libc/compat/gen/compat_modf_ieee754.c Fri Apr 23 19:04:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_modf_ieee754.c,v 1.3 2010/01/27 14:10:41 drochner Exp $ */ +/* $NetBSD: compat_modf_ieee754.c,v 1.4 2010/04/23 19:04:54 drochner Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -27,13 +27,11 @@ * rights to redistribute these changes. */ -#ifdef USE_LIBM -#include "s_modf.c" -#else #include <sys/types.h> #include <machine/ieee.h> #include <errno.h> -#include <math.h> + +double modf(double, double *); /* * double modf(double val, double *iptr) @@ -103,4 +101,3 @@ u.dblu_dbl.dbl_sign = v.dblu_dbl.dbl_sign; return (u.dblu_d); } -#endif