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.
This commit is contained in:
parent
ba4f1cd0dd
commit
87941501db
@ -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 @@ SRCS+=compat_errlist.c compat_fts.c compat___fts13.c compat___fts30.c \
|
||||
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}
|
||||
|
||||
|
@ -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 @@ frexp(double value, int *eptr)
|
||||
return (value);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -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 @@ ldexp(double val, int expon)
|
||||
return (u.dblu_d);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -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 @@ modf(double val, double *iptr)
|
||||
u.dblu_dbl.dbl_sign = v.dblu_dbl.dbl_sign;
|
||||
return (u.dblu_d);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user