diff options
Diffstat (limited to 'newlib/libm')
62 files changed, 967 insertions, 920 deletions
diff --git a/newlib/libm/Makefile.am b/newlib/libm/Makefile.am index 51ea06fa4..3b8d9a586 100644 --- a/newlib/libm/Makefile.am +++ b/newlib/libm/Makefile.am @@ -39,8 +39,6 @@ info_TEXINFOS = libm.texinfo libm.info: targetdep.tex math/stmp-def -libm.dvi: targetdep.tex math/stmp-def - stmp-targetdep: force rm -f tmp.texi targetdoc=`pwd`/tmp.texi; \ diff --git a/newlib/libm/Makefile.in b/newlib/libm/Makefile.in index d471e6bde..8efc5611a 100644 --- a/newlib/libm/Makefile.in +++ b/newlib/libm/Makefile.in @@ -604,8 +604,6 @@ $(SUBLIBS): libm.info: targetdep.tex math/stmp-def -libm.dvi: targetdep.tex math/stmp-def - stmp-targetdep: force rm -f tmp.texi targetdoc=`pwd`/tmp.texi; \ diff --git a/newlib/libm/aclocal.m4 b/newlib/libm/aclocal.m4 index 34da4a63f..2067f3115 100644 --- a/newlib/libm/aclocal.m4 +++ b/newlib/libm/aclocal.m4 @@ -60,6 +60,33 @@ AC_ARG_ENABLE(malloc-debugging, *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;; esac], [malloc_debugging=])dnl +dnl Support --enable-newlib-mb +AC_ARG_ENABLE(newlib-mb, +[ --enable-newlib-mb enable multibyte support], +[case "${enableval}" in + yes) newlib_mb=yes ;; + no) newlib_mb=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;; + esac], [newlib_mb=])dnl + +dnl Support --enable-newlib-iconv +AC_ARG_ENABLE(newlib-iconv, +[ --enable-newlib-iconv enable iconv library support], +[case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; + esac], [newlib_iconv=])dnl + +dnl Support --enable-newlib-builtin-converters +AC_ARG_ENABLE(newlib-builtin-converters, +[ --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in], +[if test x${enableval} = x; then + AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list) + fi + builtin_converters=${enableval} + ], [builtin_converters=])dnl + dnl Support --enable-newlib-multithread AC_ARG_ENABLE(newlib-multithread, [ --enable-newlib-multithread enable support for multiple threads], @@ -69,17 +96,6 @@ AC_ARG_ENABLE(newlib-multithread, *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;; esac], [newlib_multithread=yes])dnl -dnl Support --enable-newlib-iconv -AC_ARG_ENABLE(newlib-iconv, -[ --enable-newlib-iconv enable iconv library support], -[if test "${newlib_iconv+set}" != set; then - case "${enableval}" in - yes) newlib_iconv=yes ;; - no) newlib_iconv=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; - esac - fi], [newlib_iconv=${newlib_iconv}])dnl - dnl Support --enable-newlib-elix-level AC_ARG_ENABLE(newlib-elix-level, [ --enable-newlib-elix-level supply desired elix library level (1-4)], @@ -130,7 +146,7 @@ AC_SUBST(newlib_basedir) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(newlib, 1.14.0) +AM_INIT_AUTOMAKE(newlib, 1.12.0) # FIXME: We temporarily define our own version of AC_PROG_CC. This is # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We @@ -178,9 +194,6 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) AC_PROG_INSTALL -# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ -ac_given_INSTALL=$INSTALL - AM_MAINTAINER_MODE # We need AC_EXEEXT to keep automake happy in cygnus mode. However, diff --git a/newlib/libm/common/Makefile.am b/newlib/libm/common/Makefile.am index d6d7e510d..685219dd0 100644 --- a/newlib/libm/common/Makefile.am +++ b/newlib/libm/common/Makefile.am @@ -5,9 +5,8 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) src = s_finite.c s_copysign.c s_modf.c s_scalbn.c \ - s_cbrt.c s_expm1.c s_ilogb.c s_infconst.c \ - s_infinity.c s_isinf.c s_isinfd.c s_isnan.c s_isnand.c \ - s_log1p.c s_nan.c s_nextafter.c \ + s_cbrt.c s_expm1.c s_ilogb.c \ + s_infinity.c s_log1p.c s_nan.c s_nextafter.c \ s_rint.c s_logb.c s_matherr.c s_lib_ver.c \ s_fdim.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c s_lrint.c \ s_lround.c s_nearbyint.c s_remquo.c s_round.c s_scalbln.c \ @@ -15,8 +14,7 @@ src = s_finite.c s_copysign.c s_modf.c s_scalbn.c \ fsrc = sf_finite.c sf_copysign.c sf_modf.c sf_scalbn.c \ sf_cbrt.c sf_expm1.c sf_ilogb.c \ - sf_infinity.c sf_isinf.c sf_isinff.c sf_isnan.c sf_isnanf.c \ - sf_log1p.c sf_nan.c sf_nextafter.c \ + sf_infinity.c sf_log1p.c sf_nan.c sf_nextafter.c \ sf_rint.c sf_logb.c \ sf_fdim.c sf_fma.c sf_fmax.c sf_fmin.c sf_lrint.c \ sf_lround.c sf_nearbyint.c sf_remquo.c sf_round.c \ @@ -37,7 +35,7 @@ endif # USE_LIBTOOL include $(srcdir)/../../Makefile.shared chobj = scbrt.def scopysign.def sexpm1.def silogb.def \ - sinfinity.def sisnan.def slog1p.def smatherr.def smodf.def \ + sinfinity.def slog1p.def smatherr.def smodf.def \ snan.def snextafter.def sscalbn.def SUFFIXES = .def @@ -51,6 +49,7 @@ CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str TARGETDOC = ../tmp.texi doc: $(chobj) + cat $(srcdir)/common.tex >> $(TARGETDOC) CLEANFILES = $(chobj) *.ref @@ -93,10 +92,6 @@ sinfinity.def: s_infinity.c $(CHEW) < $(srcdir)/s_infinity.c >$@ 2>/dev/null touch stmp-def -sisnan.def: s_isnan.c - $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null - touch stmp-def - slog1p.def: s_log1p.c $(CHEW) < $(srcdir)/s_log1p.c >$@ 2>/dev/null touch stmp-def diff --git a/newlib/libm/common/Makefile.in b/newlib/libm/common/Makefile.in index 4e9db8b25..81c78f50a 100644 --- a/newlib/libm/common/Makefile.in +++ b/newlib/libm/common/Makefile.in @@ -98,10 +98,10 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -src = s_finite.c s_copysign.c s_modf.c s_scalbn.c s_cbrt.c s_expm1.c s_ilogb.c s_infconst.c s_infinity.c s_isinf.c s_isinfd.c s_isnan.c s_isnand.c s_log1p.c s_nan.c s_nextafter.c s_rint.c s_logb.c s_matherr.c s_lib_ver.c s_fdim.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c s_lrint.c s_lround.c s_nearbyint.c s_remquo.c s_round.c s_scalbln.c s_signbit.c s_trunc.c +src = s_finite.c s_copysign.c s_modf.c s_scalbn.c s_cbrt.c s_expm1.c s_ilogb.c s_infinity.c s_log1p.c s_nan.c s_nextafter.c s_rint.c s_logb.c s_matherr.c s_lib_ver.c s_fdim.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c s_lrint.c s_lround.c s_nearbyint.c s_remquo.c s_round.c s_scalbln.c s_signbit.c s_trunc.c -fsrc = sf_finite.c sf_copysign.c sf_modf.c sf_scalbn.c sf_cbrt.c sf_expm1.c sf_ilogb.c sf_infinity.c sf_isinf.c sf_isinff.c sf_isnan.c sf_isnanf.c sf_log1p.c sf_nan.c sf_nextafter.c sf_rint.c sf_logb.c sf_fdim.c sf_fma.c sf_fmax.c sf_fmin.c sf_lrint.c sf_lround.c sf_nearbyint.c sf_remquo.c sf_round.c sf_scalbln.c sf_trunc.c +fsrc = sf_finite.c sf_copysign.c sf_modf.c sf_scalbn.c sf_cbrt.c sf_expm1.c sf_ilogb.c sf_infinity.c sf_log1p.c sf_nan.c sf_nextafter.c sf_rint.c sf_logb.c sf_fdim.c sf_fma.c sf_fmax.c sf_fmin.c sf_lrint.c sf_lround.c sf_nearbyint.c sf_remquo.c sf_round.c sf_scalbln.c sf_trunc.c libcommon_la_LDFLAGS = -Xcompiler -nostdlib @@ -113,7 +113,7 @@ libcommon_la_LDFLAGS = -Xcompiler -nostdlib @USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a @USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) -chobj = scbrt.def scopysign.def sexpm1.def silogb.def sinfinity.def sisnan.def slog1p.def smatherr.def smodf.def snan.def snextafter.def sscalbn.def +chobj = scbrt.def scopysign.def sexpm1.def silogb.def sinfinity.def slog1p.def smatherr.def smodf.def snan.def snextafter.def sscalbn.def SUFFIXES = .def @@ -136,47 +136,41 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@s_copysign.$(OBJEXT) s_modf.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_scalbn.$(OBJEXT) s_cbrt.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_expm1.$(OBJEXT) s_ilogb.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_infconst.$(OBJEXT) s_infinity.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_isinf.$(OBJEXT) s_isinfd.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_isnan.$(OBJEXT) s_isnand.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_log1p.$(OBJEXT) s_nan.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_nextafter.$(OBJEXT) s_rint.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_logb.$(OBJEXT) s_matherr.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_lib_ver.$(OBJEXT) s_fdim.$(OBJEXT) s_fma.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_fmax.$(OBJEXT) s_fmin.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_fpclassify.$(OBJEXT) s_lrint.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_lround.$(OBJEXT) s_nearbyint.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_remquo.$(OBJEXT) s_round.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_scalbln.$(OBJEXT) s_signbit.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_trunc.$(OBJEXT) sf_finite.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_copysign.$(OBJEXT) sf_modf.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_scalbn.$(OBJEXT) sf_cbrt.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_expm1.$(OBJEXT) sf_ilogb.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_infinity.$(OBJEXT) sf_isinf.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_isinff.$(OBJEXT) sf_isnan.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_isnanf.$(OBJEXT) sf_log1p.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_nan.$(OBJEXT) sf_nextafter.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_rint.$(OBJEXT) sf_logb.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_fdim.$(OBJEXT) sf_fma.$(OBJEXT) sf_fmax.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_fmin.$(OBJEXT) sf_lrint.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_lround.$(OBJEXT) sf_nearbyint.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_remquo.$(OBJEXT) sf_round.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_scalbln.$(OBJEXT) sf_trunc.$(OBJEXT) +@USE_LIBTOOL_FALSE@s_infinity.$(OBJEXT) s_log1p.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_nan.$(OBJEXT) s_nextafter.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_rint.$(OBJEXT) s_logb.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_matherr.$(OBJEXT) s_lib_ver.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_fdim.$(OBJEXT) s_fma.$(OBJEXT) s_fmax.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_fmin.$(OBJEXT) s_fpclassify.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_lrint.$(OBJEXT) s_lround.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_nearbyint.$(OBJEXT) s_remquo.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_round.$(OBJEXT) s_scalbln.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_signbit.$(OBJEXT) s_trunc.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_finite.$(OBJEXT) sf_copysign.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_modf.$(OBJEXT) sf_scalbn.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_cbrt.$(OBJEXT) sf_expm1.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_ilogb.$(OBJEXT) sf_infinity.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_log1p.$(OBJEXT) sf_nan.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_nextafter.$(OBJEXT) sf_rint.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_logb.$(OBJEXT) sf_fdim.$(OBJEXT) sf_fma.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_fmax.$(OBJEXT) sf_fmin.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_lrint.$(OBJEXT) sf_lround.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_nearbyint.$(OBJEXT) sf_remquo.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_round.$(OBJEXT) sf_scalbln.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_trunc.$(OBJEXT) LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_LIBADD = @USE_LIBTOOL_TRUE@libcommon_la_OBJECTS = s_finite.lo s_copysign.lo \ @USE_LIBTOOL_TRUE@s_modf.lo s_scalbn.lo s_cbrt.lo s_expm1.lo s_ilogb.lo \ -@USE_LIBTOOL_TRUE@s_infconst.lo s_infinity.lo s_isinf.lo s_isinfd.lo \ -@USE_LIBTOOL_TRUE@s_isnan.lo s_isnand.lo s_log1p.lo s_nan.lo \ -@USE_LIBTOOL_TRUE@s_nextafter.lo s_rint.lo s_logb.lo s_matherr.lo \ -@USE_LIBTOOL_TRUE@s_lib_ver.lo s_fdim.lo s_fma.lo s_fmax.lo s_fmin.lo \ +@USE_LIBTOOL_TRUE@s_infinity.lo s_log1p.lo s_nan.lo s_nextafter.lo \ +@USE_LIBTOOL_TRUE@s_rint.lo s_logb.lo s_matherr.lo s_lib_ver.lo \ +@USE_LIBTOOL_TRUE@s_fdim.lo s_fma.lo s_fmax.lo s_fmin.lo \ @USE_LIBTOOL_TRUE@s_fpclassify.lo s_lrint.lo s_lround.lo s_nearbyint.lo \ @USE_LIBTOOL_TRUE@s_remquo.lo s_round.lo s_scalbln.lo s_signbit.lo \ @USE_LIBTOOL_TRUE@s_trunc.lo sf_finite.lo sf_copysign.lo sf_modf.lo \ @USE_LIBTOOL_TRUE@sf_scalbn.lo sf_cbrt.lo sf_expm1.lo sf_ilogb.lo \ -@USE_LIBTOOL_TRUE@sf_infinity.lo sf_isinf.lo sf_isinff.lo sf_isnan.lo \ -@USE_LIBTOOL_TRUE@sf_isnanf.lo sf_log1p.lo sf_nan.lo sf_nextafter.lo \ +@USE_LIBTOOL_TRUE@sf_infinity.lo sf_log1p.lo sf_nan.lo sf_nextafter.lo \ @USE_LIBTOOL_TRUE@sf_rint.lo sf_logb.lo sf_fdim.lo sf_fma.lo sf_fmax.lo \ @USE_LIBTOOL_TRUE@sf_fmin.lo sf_lrint.lo sf_lround.lo sf_nearbyint.lo \ @USE_LIBTOOL_TRUE@sf_remquo.lo sf_round.lo sf_scalbln.lo sf_trunc.lo @@ -416,6 +410,7 @@ objectlist.awk.in: $(noinst_LTLIBRARIES) touch stmp-def doc: $(chobj) + cat $(srcdir)/common.tex >> $(TARGETDOC) # Texinfo does not appear to support underscores in file names, so we # name the .def files without underscores. @@ -456,10 +451,6 @@ sinfinity.def: s_infinity.c $(CHEW) < $(srcdir)/s_infinity.c >$@ 2>/dev/null touch stmp-def -sisnan.def: s_isnan.c - $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null - touch stmp-def - slog1p.def: s_log1p.c $(CHEW) < $(srcdir)/s_log1p.c >$@ 2>/dev/null touch stmp-def diff --git a/newlib/libm/common/common.tex b/newlib/libm/common/common.tex new file mode 100644 index 000000000..0e8a9863f --- /dev/null +++ b/newlib/libm/common/common.tex @@ -0,0 +1,12 @@ +@page +@include common/scbrt.def +@include common/scopysign.def +@include common/sexpm1.def +@include common/silogb.def +@include common/sinfinity.def +@include common/slog1p.def +@include common/smatherr.def +@include common/smodf.def +@include common/snan.def +@include common/snextafter.def +@include common/sscalbn.def diff --git a/newlib/libm/common/fdlibm.h b/newlib/libm/common/fdlibm.h index 7a0f28db4..2b1bb79c0 100644 --- a/newlib/libm/common/fdlibm.h +++ b/newlib/libm/common/fdlibm.h @@ -71,13 +71,13 @@ #define FLT_UWORD_IS_FINITE(x) ((x)<0x7f800000L) #define FLT_UWORD_IS_NAN(x) ((x)>0x7f800000L) #define FLT_UWORD_IS_INFINITE(x) ((x)==0x7f800000L) -#define FLT_UWORD_MAX 0x7f7fffffL +#define FLT_UWORD_MAX 0x7f7fffff #define FLT_UWORD_EXP_MAX 0x43000000 #define FLT_UWORD_LOG_MAX 0x42b17217 #define FLT_UWORD_LOG_2MAX 0x42b2d4fc #define HUGE ((float)3.40282346638528860e+38) #endif -#define FLT_UWORD_HALF_MAX (FLT_UWORD_MAX-(1L<<23)) +#define FLT_UWORD_HALF_MAX (FLT_UWORD_MAX-(1<<23)) #define FLT_LARGEST_EXP (FLT_UWORD_MAX>>23) /* Many routines check for zero and subnormal numbers. Such things depend diff --git a/newlib/libm/common/s_fmax.c b/newlib/libm/common/s_fmax.c index 53e1559e3..2de04efab 100644 --- a/newlib/libm/common/s_fmax.c +++ b/newlib/libm/common/s_fmax.c @@ -17,9 +17,9 @@ #endif { if (__fpclassifyd(x) == FP_NAN) - return y; - if (__fpclassifyd(y) == FP_NAN) return x; + if (__fpclassifyd(y) == FP_NAN) + return y; return x > y ? x : y; } diff --git a/newlib/libm/common/s_fmin.c b/newlib/libm/common/s_fmin.c index 65e0b1c6d..f9eb51cdd 100644 --- a/newlib/libm/common/s_fmin.c +++ b/newlib/libm/common/s_fmin.c @@ -17,9 +17,9 @@ #endif { if (__fpclassifyd(x) == FP_NAN) - return y; - if (__fpclassifyd(y) == FP_NAN) return x; + if (__fpclassifyd(y) == FP_NAN) + return y; return x < y ? x : y; } diff --git a/newlib/libm/common/s_fpclassify.c b/newlib/libm/common/s_fpclassify.c index 111d70923..2820f0373 100644 --- a/newlib/libm/common/s_fpclassify.c +++ b/newlib/libm/common/s_fpclassify.c @@ -9,7 +9,7 @@ int __fpclassifyf (float x) { - __uint32_t w; + unsigned int w; GET_FLOAT_WORD(w,x); @@ -30,7 +30,7 @@ __fpclassifyf (float x) int __fpclassifyd (double x) { - __uint32_t msw, lsw; + unsigned int msw, lsw; EXTRACT_WORDS(msw,lsw,x); diff --git a/newlib/libm/common/s_infconst.c b/newlib/libm/common/s_infconst.c deleted file mode 100644 index 9447b97cc..000000000 --- a/newlib/libm/common/s_infconst.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Infinity as a constant value. This is used for HUGE_VAL. - * Added by Cygnus Support. - */ - -#include <float.h> -#include "fdlibm.h" - -/* Float version of infinity. */ -const union __fmath __infinityf[1] = {{{0x7f800000}}}; - -/* Double version of infinity. */ -#ifndef _DOUBLE_IS_32BITS - #ifdef __IEEE_BIG_ENDIAN - const union __dmath __infinity[1] = {{{0x7ff00000, 0}}}; - #else - const union __dmath __infinity[1] = {{{0, 0x7ff00000}}}; - #endif -#else /* defined (_DOUBLE_IS_32BITS) */ - const union __dmath __infinity[1] = {{{0x7f800000, 0}}}; -#endif /* defined (_DOUBLE_IS_32BITS) */ - -/* Long double version of infinity. */ -#ifdef __IEEE_BIG_ENDIAN - #if LDBL_MANT_DIG == 24 - const union __ldmath __infinityld[1] = {{{0x7f800000, 0, 0, 0}}}; - #elif LDBL_MANT_DIG == 53 - const union __ldmath __infinityld[1] = {{{0x7ff00000, 0, 0, 0}}}; - #else - const union __ldmath __infinityld[1] = {{{0x7fff0000, 0, 0, 0}}}; - #endif /* LDBL_MANT_DIG size */ -#else /* __IEEE_LITTLE_ENDIAN */ - #if LDBL_MANT_DIG == 24 - const union __ldmath __infinityld[1] = {{{0x7f800000, 0, 0, 0}}}; - #elif LDBL_MANT_DIG == 53 - const union __ldmath __infinityld[1] = {{{0, 0x7ff00000, 0, 0}}}; - #else - const union __ldmath __infinityld[1] = {{{0, 0x80000000, 0x00007fff, 0}}}; - #endif /* LDBL_MANT_DIG size */ -#endif /* __IEEE_LITTLE_ENDIAN */ - diff --git a/newlib/libm/common/s_isinf.c b/newlib/libm/common/s_isinf.c deleted file mode 100644 index db8e8f82b..000000000 --- a/newlib/libm/common/s_isinf.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * isinf(x) returns 1 if x is infinity, else 0; - * no branching! - * - * isinf is a <math.h> macro in the C99 standard. It was previously - * implemented as a function by newlib and is declared as such in - * <ieeefp.h>. Newlib supplies it here as a function if the user - * chooses to use <ieeefp.h> or needs to link older code compiled with the - * previous <math.h> declaration. - */ - -#include "fdlibm.h" -#include <ieeefp.h> - -#ifndef _DOUBLE_IS_32BITS - -int -_DEFUN (isinf, (x), - double x) -{ - __int32_t hx,lx; - EXTRACT_WORDS(hx,lx,x); - hx &= 0x7fffffff; - hx |= (__uint32_t)(lx|(-lx))>>31; - hx = 0x7ff00000 - hx; - return 1 - (int)((__uint32_t)(hx|(-hx))>>31); -} - -#endif /* _DOUBLE_IS_32BITS */ diff --git a/newlib/libm/common/s_isnan.c b/newlib/libm/common/s_isnan.c deleted file mode 100644 index b0c40369a..000000000 --- a/newlib/libm/common/s_isnan.c +++ /dev/null @@ -1,135 +0,0 @@ - -/* @(#)s_isnan.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* -FUNCTION - <<isnan>>, <<isnanf>>, <<isinf>>, <<isinff>>, <<finite>>, <<finitef>>---test for exceptional numbers - -INDEX - isnan -INDEX - isinf -INDEX - finite - -INDEX - isnanf -INDEX - isinff -INDEX - finitef - -ANSI_SYNOPSIS - #include <ieeefp.h> - int isnan(double <[arg]>); - int isinf(double <[arg]>); - int finite(double <[arg]>); - int isnanf(float <[arg]>); - int isinff(float <[arg]>); - int finitef(float <[arg]>); - -TRAD_SYNOPSIS - #include <ieeefp.h> - int isnan(<[arg]>) - double <[arg]>; - int isinf(<[arg]>) - double <[arg]>; - int finite(<[arg]>); - double <[arg]>; - int isnanf(<[arg]>); - float <[arg]>; - int isinff(<[arg]>); - float <[arg]>; - int finitef(<[arg]>); - float <[arg]>; - - -DESCRIPTION - These functions provide information on the floating-point - argument supplied. - - There are five major number formats: - o+ - o zero - A number which contains all zero bits. - o subnormal - A number with a zero exponent but a nonzero fraction. - o normal - A number with an exponent and a fraction. - o infinity - A number with an all 1's exponent and a zero fraction. - o NAN - A number with an all 1's exponent and a nonzero fraction. - - o- - - <<isnan>> returns 1 if the argument is a nan. <<isinf>> - returns 1 if the argument is infinity. <<finite>> returns 1 if the - argument is zero, subnormal or normal. - - The <<isnanf>>, <<isinff>> and <<finitef>> functions perform the same - operations as their <<isnan>>, <<isinf>> and <<finite>> - counterparts, but on single-precision floating-point numbers. - - It should be noted that the C99 standard dictates that <<isnan>> - and <<isinf>> are macros that operate on multiple types of - floating-point. The SUSv2 standard declares <<isnan>> as - a function taking double. Newlib has decided to declare - them both as macros in math.h and as functions in ieeefp.h. - -QUICKREF - isnan - pure -QUICKREF - isinf - pure -QUICKREF - finite - pure -QUICKREF - isnan - pure -QUICKREF - isinf - pure -QUICKREF - finite - pure -*/ - -/* - * isnan(x) returns 1 is x is nan, else 0; - * no branching! - * - * The C99 standard dictates that isnan is a macro taking - * multiple floating-point types while the SUSv2 standard - * notes it is a function taking a double argument. Newlib - * has chosen to implement it as a macro in <math.h> and - * declare it as a function in <ieeefp.h>. - */ - -#include "fdlibm.h" -#include <ieeefp.h> - -#ifndef _DOUBLE_IS_32BITS - -#ifdef __STDC__ - int isnan(double x) -#else - int isnan(x) - double x; -#endif -{ - __int32_t hx,lx; - EXTRACT_WORDS(hx,lx,x); - hx &= 0x7fffffff; - hx |= (__uint32_t)(lx|(-lx))>>31; - hx = 0x7ff00000 - hx; - return (int)(((__uint32_t)(hx))>>31); -} - -#endif /* _DOUBLE_IS_32BITS */ diff --git a/newlib/libm/common/s_lrint.c b/newlib/libm/common/s_lrint.c index 7d3b561b1..541bf2c7e 100644 --- a/newlib/libm/common/s_lrint.c +++ b/newlib/libm/common/s_lrint.c @@ -54,11 +54,7 @@ TWO52[2]={ long int result; EXTRACT_WORDS(i0,i1,x); - - /* Extract sign bit. */ sx = (i0>>31)&1; - - /* Extract exponent field. */ j0 = ((i0 & 0x7ff00000) >> 20) - 1023; if(j0 < 20) @@ -70,21 +66,16 @@ TWO52[2]={ w = TWO52[sx] + x; t = w - TWO52[sx]; GET_HIGH_WORD(i0, t); - /* Detect the all-zeros representation of plus and - minus zero, which fails the calculation below. */ - if ((i0 & ~(1 << 31)) == 0) - return 0; j0 = ((i0 & 0x7ff00000) >> 20) - 1023; i0 &= 0x000fffff; i0 |= 0x00100000; result = i0 >> (20 - j0); } } - else if (j0 < (int)(8 * sizeof (long int)) - 1) + else if (j0 < (8 * sizeof (long int)) - 1) { if (j0 >= 52) - result = ((long int) ((i0 & 0x000fffff) | 0x0010000) << (j0 - 20)) | - (i1 << (j0 - 52)); + result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52)); else { w = TWO52[sx] + x; diff --git a/newlib/libm/common/s_modf.c b/newlib/libm/common/s_modf.c index 2e9bfb125..01151397d 100644 --- a/newlib/libm/common/s_modf.c +++ b/newlib/libm/common/s_modf.c @@ -41,7 +41,7 @@ DESCRIPTION storing the integer part in <<*<[ipart]>>>. No rounding whatsoever is done; the sum of the integer and fractional parts is guaranteed to be exactly equal to <[val]>. That - is, if <[realpart]> = modf(<[val]>, &<[intpart]>); then + is, if . <[realpart]> = modf(<[val]>, &<[intpart]>); then `<<<[realpart]>+<[intpart]>>>' is the same as <[val]>. <<modff>> is identical, save that it takes and returns <<float>> rather than <<double>> values. diff --git a/newlib/libm/common/sf_fmax.c b/newlib/libm/common/sf_fmax.c index ac1bf46f5..292b99edf 100644 --- a/newlib/libm/common/sf_fmax.c +++ b/newlib/libm/common/sf_fmax.c @@ -15,9 +15,9 @@ #endif { if (__fpclassifyf(x) == FP_NAN) - return y; - if (__fpclassifyf(y) == FP_NAN) return x; + if (__fpclassifyf(y) == FP_NAN) + return y; return x > y ? x : y; } diff --git a/newlib/libm/common/sf_fmin.c b/newlib/libm/common/sf_fmin.c index f0e344455..4ef3510aa 100644 --- a/newlib/libm/common/sf_fmin.c +++ b/newlib/libm/common/sf_fmin.c @@ -15,9 +15,9 @@ #endif { if (__fpclassifyf(x) == FP_NAN) - return y; - if (__fpclassifyf(y) == FP_NAN) return x; + if (__fpclassifyf(y) == FP_NAN) + return y; return x < y ? x : y; } diff --git a/newlib/libm/common/sf_isinff.c b/newlib/libm/common/sf_isinff.c deleted file mode 100644 index 9d0e742e5..000000000 --- a/newlib/libm/common/sf_isinff.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * __isinff(x) returns 1 if x is +-infinity, else 0; - * Added by Cygnus Support. - */ - -#include "fdlibm.h" - -int -_DEFUN (__isinff, (x), - float x) -{ - __int32_t ix; - GET_FLOAT_WORD(ix,x); - ix &= 0x7fffffff; - return FLT_UWORD_IS_INFINITE(ix); -} - -#ifdef _DOUBLE_IS_32BITS - -int -_DEFUN (__isinfd, (x), - double x) -{ - return __isinff((float) x); -} - -#endif /* defined(_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/common/sf_isnanf.c b/newlib/libm/common/sf_isnanf.c deleted file mode 100644 index 0b0d9bbaf..000000000 --- a/newlib/libm/common/sf_isnanf.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * __isnanf(x) returns 1 is x is nan, else 0; - */ - -#include "fdlibm.h" - -int -_DEFUN (__isnanf, (x), - float x) -{ - __int32_t ix; - GET_FLOAT_WORD(ix,x); - ix &= 0x7fffffff; - return FLT_UWORD_IS_NAN(ix); -} - -#ifdef _DOUBLE_IS_32BITS - -int -_DEFUN (__isnand, (x), - double x) -{ - return __isnanf((float) x); -} - -#endif /* defined(_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/common/sf_lrint.c b/newlib/libm/common/sf_lrint.c index 3165705d1..a58508f02 100644 --- a/newlib/libm/common/sf_lrint.c +++ b/newlib/libm/common/sf_lrint.c @@ -28,10 +28,6 @@ static const float #else static float #endif -/* Adding a float, x, to 2^23 will cause the result to be rounded based on - the fractional part of x, according to the implementation's current rounding - mode. 2^23 is the smallest float that can be represented using all 23 significant - digits. */ TWO23[2]={ 8.3886080000e+06, /* 0x4b000000 */ -8.3886080000e+06, /* 0xcb000000 */ @@ -58,21 +54,17 @@ TWO23[2]={ /* Extract exponent field. */ j0 = ((i0 & 0x7f800000) >> 23) - 127; - if (j0 < (int)(sizeof (long int) * 8) - 1) + if (j0 < (sizeof (long int) * 8) - 1) { if (j0 < -1) return 0; else if (j0 >= 23) - result = (long int) ((i0 & 0x7fffff) | 0x800000) << (j0 - 23); + result = (long int) i0 << (j0 - 23); else { w = TWO23[sx] + x; t = w - TWO23[sx]; GET_FLOAT_WORD (i0, t); - /* Detect the all-zeros representation of plus and - minus zero, which fails the calculation below. */ - if ((i0 & ~(1 << 31)) == 0) - return 0; j0 = ((i0 >> 23) & 0xff) - 0x7f; i0 &= 0x7fffff; i0 |= 0x800000; diff --git a/newlib/libm/common/sf_round.c b/newlib/libm/common/sf_round.c index 6c9087db0..75a72fe75 100644 --- a/newlib/libm/common/sf_round.c +++ b/newlib/libm/common/sf_round.c @@ -19,7 +19,7 @@ #endif { int signbit; - __uint32_t w; + int w; /* Most significant word, least significant word. */ int exponent_less_127; @@ -29,7 +29,7 @@ signbit = w & 0x80000000; /* Extract exponent field. */ - exponent_less_127 = (int)((w & 0x7f800000) >> 23) - 127; + exponent_less_127 = ((w & 0x7f800000) >> 23) - 127; if (exponent_less_127 < 23) { diff --git a/newlib/libm/configure b/newlib/libm/configure index 075165c8d..f54902fac 100755 --- a/newlib/libm/configure +++ b/newlib/libm/configure @@ -20,10 +20,14 @@ ac_help="$ac_help ac_help="$ac_help --enable-malloc-debugging indicate malloc debugging requested" ac_help="$ac_help - --enable-newlib-multithread enable support for multiple threads" + --enable-newlib-mb enable multibyte support" ac_help="$ac_help --enable-newlib-iconv enable iconv library support" ac_help="$ac_help + --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in" +ac_help="$ac_help + --enable-newlib-multithread enable support for multiple threads" +ac_help="$ac_help --enable-newlib-elix-level supply desired elix library level (1-4)" ac_help="$ac_help --disable-newlib-io-float disable printf/scanf family float support" @@ -610,7 +614,7 @@ am__api_version="1.4" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:614: checking for a BSD compatible install" >&5 +echo "configure:618: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -663,7 +667,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:667: checking whether build environment is sane" >&5 +echo "configure:671: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -720,7 +724,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:724: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:728: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -753,12 +757,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:757: checking for Cygwin environment" >&5 +echo "configure:761: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 762 "configure" +#line 766 "configure" #include "confdefs.h" int main() { @@ -769,7 +773,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -786,19 +790,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:790: checking for mingw32 environment" >&5 +echo "configure:794: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 795 "configure" +#line 799 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -851,30 +855,52 @@ else malloc_debugging= fi -# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given. -if test "${enable_newlib_multithread+set}" = set; then - enableval="$enable_newlib_multithread" +# Check whether --enable-newlib-mb or --disable-newlib-mb was given. +if test "${enable_newlib_mb+set}" = set; then + enableval="$enable_newlib_mb" case "${enableval}" in - yes) newlib_multithread=yes ;; - no) newlib_multithread=no ;; - *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;; + yes) newlib_mb=yes ;; + no) newlib_mb=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;; esac else - newlib_multithread=yes + newlib_mb= fi # Check whether --enable-newlib-iconv or --disable-newlib-iconv was given. if test "${enable_newlib_iconv+set}" = set; then enableval="$enable_newlib_iconv" - if test "${newlib_iconv+set}" != set; then - case "${enableval}" in - yes) newlib_iconv=yes ;; - no) newlib_iconv=no ;; - *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;; - esac + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;; + esac +else + newlib_iconv= +fi + +# Check whether --enable-newlib-builtin-converters or --disable-newlib-builtin-converters was given. +if test "${enable_newlib_builtin_converters+set}" = set; then + enableval="$enable_newlib_builtin_converters" + if test x${enableval} = x; then + { echo "configure: error: bad value ${enableval} for newlib-builtin-converters option - use comma-separated list" 1>&2; exit 1; } fi + builtin_converters=${enableval} + +else + builtin_converters= +fi + +# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then + enableval="$enable_newlib_multithread" + case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;; + esac else - newlib_iconv=${newlib_iconv} + newlib_multithread=yes fi # Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given. @@ -968,7 +994,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:972: checking host system type" >&5 +echo "configure:998: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -989,7 +1015,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:993: checking target system type" >&5 +echo "configure:1019: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -1007,7 +1033,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1011: checking build system type" >&5 +echo "configure:1037: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1033,7 +1059,7 @@ test "$host_alias" != "$target_alias" && PACKAGE=newlib -VERSION=1.14.0 +VERSION=1.12.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1050,7 +1076,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 -echo "configure:1054: checking for working aclocal-${am__api_version}" >&5 +echo "configure:1080: checking for working aclocal-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1063,7 +1089,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1067: checking for working autoconf" >&5 +echo "configure:1093: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1076,7 +1102,7 @@ else fi echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 -echo "configure:1080: checking for working automake-${am__api_version}" >&5 +echo "configure:1106: checking for working automake-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1089,7 +1115,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1093: checking for working autoheader" >&5 +echo "configure:1119: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1102,7 +1128,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1106: checking for working makeinfo" >&5 +echo "configure:1132: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1127,7 +1153,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1131: checking for $ac_word" >&5 +echo "configure:1157: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1157,7 +1183,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1161: checking for $ac_word" >&5 +echo "configure:1187: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1206,7 +1232,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1210: checking whether we are using GNU C" >&5 +echo "configure:1236: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1215,7 +1241,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1230,7 +1256,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1234: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1260: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1261,7 +1287,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1265: checking for $ac_word" >&5 +echo "configure:1291: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1293,7 +1319,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1297: checking for $ac_word" >&5 +echo "configure:1323: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1325,7 +1351,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1329: checking for $ac_word" >&5 +echo "configure:1355: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1357,7 +1383,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1361: checking for $ac_word" >&5 +echo "configure:1387: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1402,7 +1428,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1406: checking for a BSD compatible install" >&5 +echo "configure:1432: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1455,11 +1481,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ -ac_given_INSTALL=$INSTALL - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1463: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1486: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1493,7 +1516,7 @@ if false; then echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1497: checking for executable suffix" >&5 +echo "configure:1520: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1503,7 +1526,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1679,7 +1702,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1683: checking for $ac_word" >&5 +echo "configure:1706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1709,7 +1732,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1713: checking for $ac_word" >&5 +echo "configure:1736: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1760,7 +1783,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1764: checking for $ac_word" >&5 +echo "configure:1787: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1792,7 +1815,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1819: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1803,12 +1826,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1807 "configure" +#line 1830 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1834,12 +1857,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1838: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1861: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1843: checking whether we are using GNU C" >&5 +echo "configure:1866: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1848,7 +1871,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1867,7 +1890,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1871: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1894: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1910,7 +1933,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1914: checking for ld used by GCC" >&5 +echo "configure:1937: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1940,10 +1963,10 @@ echo "configure:1914: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1944: checking for GNU ld" >&5 +echo "configure:1967: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1947: checking for non-GNU ld" >&5 +echo "configure:1970: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1978,7 +2001,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1982: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:2005: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1995,7 +2018,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1999: checking for $LD option to reload object files" >&5 +echo "configure:2022: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2007,7 +2030,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:2011: checking for BSD-compatible nm" >&5 +echo "configure:2034: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2045,7 +2068,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2049: checking whether ln -s works" >&5 +echo "configure:2072: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2066,7 +2089,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:2070: checking how to recognise dependant libraries" >&5 +echo "configure:2093: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2239,13 +2262,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:2243: checking for object suffix" >&5 +echo "configure:2266: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -2269,7 +2292,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:2273: checking for ${ac_tool_prefix}file" >&5 +echo "configure:2296: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2331,7 +2354,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:2335: checking for file" >&5 +echo "configure:2358: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2402,7 +2425,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2406: checking for $ac_word" >&5 +echo "configure:2429: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2434,7 +2457,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2438: checking for $ac_word" >&5 +echo "configure:2461: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2469,7 +2492,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2473: checking for $ac_word" >&5 +echo "configure:2496: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2501,7 +2524,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2505: checking for $ac_word" >&5 +echo "configure:2528: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2568,8 +2591,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2572 "configure"' > conftest.$ac_ext - if { (eval echo configure:2573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2595 "configure"' > conftest.$ac_ext + if { (eval echo configure:2596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2588,7 +2611,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2606,7 +2629,7 @@ ia64-*-hpux*) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2610: checking whether the C compiler needs -belf" >&5 +echo "configure:2633: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2619,14 +2642,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 2623 "configure" +#line 2646 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2656,7 +2679,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2660: checking for $ac_word" >&5 +echo "configure:2683: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2688,7 +2711,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2692: checking for $ac_word" >&5 +echo "configure:2715: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2723,7 +2746,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2727: checking for $ac_word" >&5 +echo "configure:2750: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2755,7 +2778,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2759: checking for $ac_word" >&5 +echo "configure:2782: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2790,7 +2813,7 @@ fi # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2794: checking for $ac_word" >&5 +echo "configure:2817: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2822,7 +2845,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2826: checking for $ac_word" >&5 +echo "configure:2849: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2858,12 +2881,12 @@ fi # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 -echo "configure:2862: checking if libtool should supply DllMain function" >&5 +echo "configure:2885: checking if libtool should supply DllMain function" >&5 if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2867 "configure" +#line 2890 "configure" #include "confdefs.h" int main() { @@ -2871,7 +2894,7 @@ extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); DllMain (0, 0, 0); ; return 0; } EOF -if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else @@ -2892,19 +2915,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 -echo "configure:2896: checking how to link DLLs" >&5 +echo "configure:2919: checking how to link DLLs" >&5 if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2901 "configure" +#line 2924 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_dll_switch=-mdll else diff --git a/newlib/libm/libm.texinfo b/newlib/libm/libm.texinfo index 309f39f30..82b8b8b8e 100644 --- a/newlib/libm/libm.texinfo +++ b/newlib/libm/libm.texinfo @@ -61,8 +61,8 @@ into another language, under the above conditions for modified versions. @titlepage @title The Red Hat newlib C Math Library @sp 1 -@subtitle @code{libm} 1.14.0 -@subtitle December 2005 +@subtitle @code{libm} 1.12.0 +@subtitle January 2004 @author {Steve Chamberlain} @author {Roland Pesch} @author {Red Hat Support} diff --git a/newlib/libm/machine/aclocal.m4 b/newlib/libm/machine/aclocal.m4 index 35519acf9..db846f456 100644 --- a/newlib/libm/machine/aclocal.m4 +++ b/newlib/libm/machine/aclocal.m4 @@ -47,6 +47,33 @@ AC_ARG_ENABLE(malloc-debugging, *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;; esac], [malloc_debugging=])dnl +dnl Support --enable-newlib-mb +AC_ARG_ENABLE(newlib-mb, +[ --enable-newlib-mb enable multibyte support], +[case "${enableval}" in + yes) newlib_mb=yes ;; + no) newlib_mb=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;; + esac], [newlib_mb=])dnl + +dnl Support --enable-newlib-iconv +AC_ARG_ENABLE(newlib-iconv, +[ --enable-newlib-iconv enable iconv library support], +[case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; + esac], [newlib_iconv=])dnl + +dnl Support --enable-newlib-builtin-converters +AC_ARG_ENABLE(newlib-builtin-converters, +[ --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in], +[if test x${enableval} = x; then + AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list) + fi + builtin_converters=${enableval} + ], [builtin_converters=])dnl + dnl Support --enable-newlib-multithread AC_ARG_ENABLE(newlib-multithread, [ --enable-newlib-multithread enable support for multiple threads], @@ -56,17 +83,6 @@ AC_ARG_ENABLE(newlib-multithread, *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;; esac], [newlib_multithread=yes])dnl -dnl Support --enable-newlib-iconv -AC_ARG_ENABLE(newlib-iconv, -[ --enable-newlib-iconv enable iconv library support], -[if test "${newlib_iconv+set}" != set; then - case "${enableval}" in - yes) newlib_iconv=yes ;; - no) newlib_iconv=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; - esac - fi], [newlib_iconv=${newlib_iconv}])dnl - dnl Support --enable-newlib-elix-level AC_ARG_ENABLE(newlib-elix-level, [ --enable-newlib-elix-level supply desired elix library level (1-4)], @@ -117,7 +133,7 @@ AC_SUBST(newlib_basedir) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(newlib, 1.14.0) +AM_INIT_AUTOMAKE(newlib, 1.12.0) # FIXME: We temporarily define our own version of AC_PROG_CC. This is # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We @@ -165,9 +181,6 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) AC_PROG_INSTALL -# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ -ac_given_INSTALL=$INSTALL - AM_MAINTAINER_MODE # We need AC_EXEEXT to keep automake happy in cygnus mode. However, diff --git a/newlib/libm/machine/configure b/newlib/libm/machine/configure index 09ca607a9..764050e23 100755 --- a/newlib/libm/machine/configure +++ b/newlib/libm/machine/configure @@ -18,10 +18,14 @@ ac_help="$ac_help ac_help="$ac_help --enable-malloc-debugging indicate malloc debugging requested" ac_help="$ac_help - --enable-newlib-multithread enable support for multiple threads" + --enable-newlib-mb enable multibyte support" ac_help="$ac_help --enable-newlib-iconv enable iconv library support" ac_help="$ac_help + --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in" +ac_help="$ac_help + --enable-newlib-multithread enable support for multiple threads" +ac_help="$ac_help --enable-newlib-elix-level supply desired elix library level (1-4)" ac_help="$ac_help --disable-newlib-io-float disable printf/scanf family float support" @@ -586,7 +590,7 @@ am__api_version="1.4" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:590: checking for a BSD compatible install" >&5 +echo "configure:594: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -639,7 +643,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:643: checking whether build environment is sane" >&5 +echo "configure:647: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -696,7 +700,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:704: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -729,12 +733,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:733: checking for Cygwin environment" >&5 +echo "configure:737: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 738 "configure" +#line 742 "configure" #include "confdefs.h" int main() { @@ -745,7 +749,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -762,19 +766,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:766: checking for mingw32 environment" >&5 +echo "configure:770: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 771 "configure" +#line 775 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -827,30 +831,52 @@ else malloc_debugging= fi -# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given. -if test "${enable_newlib_multithread+set}" = set; then - enableval="$enable_newlib_multithread" +# Check whether --enable-newlib-mb or --disable-newlib-mb was given. +if test "${enable_newlib_mb+set}" = set; then + enableval="$enable_newlib_mb" case "${enableval}" in - yes) newlib_multithread=yes ;; - no) newlib_multithread=no ;; - *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;; + yes) newlib_mb=yes ;; + no) newlib_mb=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;; esac else - newlib_multithread=yes + newlib_mb= fi # Check whether --enable-newlib-iconv or --disable-newlib-iconv was given. if test "${enable_newlib_iconv+set}" = set; then enableval="$enable_newlib_iconv" - if test "${newlib_iconv+set}" != set; then - case "${enableval}" in - yes) newlib_iconv=yes ;; - no) newlib_iconv=no ;; - *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;; - esac + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;; + esac +else + newlib_iconv= +fi + +# Check whether --enable-newlib-builtin-converters or --disable-newlib-builtin-converters was given. +if test "${enable_newlib_builtin_converters+set}" = set; then + enableval="$enable_newlib_builtin_converters" + if test x${enableval} = x; then + { echo "configure: error: bad value ${enableval} for newlib-builtin-converters option - use comma-separated list" 1>&2; exit 1; } fi + builtin_converters=${enableval} + +else + builtin_converters= +fi + +# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then + enableval="$enable_newlib_multithread" + case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;; + esac else - newlib_iconv=${newlib_iconv} + newlib_multithread=yes fi # Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given. @@ -944,7 +970,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:948: checking host system type" >&5 +echo "configure:974: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -965,7 +991,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:969: checking target system type" >&5 +echo "configure:995: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -983,7 +1009,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:987: checking build system type" >&5 +echo "configure:1013: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1009,7 +1035,7 @@ test "$host_alias" != "$target_alias" && PACKAGE=newlib -VERSION=1.14.0 +VERSION=1.12.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1026,7 +1052,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 -echo "configure:1030: checking for working aclocal-${am__api_version}" >&5 +echo "configure:1056: checking for working aclocal-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1039,7 +1065,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1043: checking for working autoconf" >&5 +echo "configure:1069: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1052,7 +1078,7 @@ else fi echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 -echo "configure:1056: checking for working automake-${am__api_version}" >&5 +echo "configure:1082: checking for working automake-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1065,7 +1091,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1069: checking for working autoheader" >&5 +echo "configure:1095: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1078,7 +1104,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1082: checking for working makeinfo" >&5 +echo "configure:1108: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1103,7 +1129,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1107: checking for $ac_word" >&5 +echo "configure:1133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1133,7 +1159,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1137: checking for $ac_word" >&5 +echo "configure:1163: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1182,7 +1208,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1186: checking whether we are using GNU C" >&5 +echo "configure:1212: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1191,7 +1217,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1206,7 +1232,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1236: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1237,7 +1263,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1241: checking for $ac_word" >&5 +echo "configure:1267: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1269,7 +1295,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1273: checking for $ac_word" >&5 +echo "configure:1299: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1301,7 +1327,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1305: checking for $ac_word" >&5 +echo "configure:1331: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1333,7 +1359,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1337: checking for $ac_word" >&5 +echo "configure:1363: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1378,7 +1404,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1382: checking for a BSD compatible install" >&5 +echo "configure:1408: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1431,11 +1457,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ -ac_given_INSTALL=$INSTALL - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1439: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1462: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1469,7 +1492,7 @@ if false; then echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1473: checking for executable suffix" >&5 +echo "configure:1496: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1479,7 +1502,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1655,7 +1678,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1659: checking for $ac_word" >&5 +echo "configure:1682: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1685,7 +1708,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1689: checking for $ac_word" >&5 +echo "configure:1712: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1736,7 +1759,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1740: checking for $ac_word" >&5 +echo "configure:1763: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1768,7 +1791,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1779,12 +1802,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1783 "configure" +#line 1806 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1810,12 +1833,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1819: checking whether we are using GNU C" >&5 +echo "configure:1842: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1824,7 +1847,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1843,7 +1866,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1847: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1870: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1886,7 +1909,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1890: checking for ld used by GCC" >&5 +echo "configure:1913: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1916,10 +1939,10 @@ echo "configure:1890: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1920: checking for GNU ld" >&5 +echo "configure:1943: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1923: checking for non-GNU ld" >&5 +echo "configure:1946: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1954,7 +1977,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1958: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1981: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1971,7 +1994,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1975: checking for $LD option to reload object files" >&5 +echo "configure:1998: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1983,7 +2006,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1987: checking for BSD-compatible nm" >&5 +echo "configure:2010: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2021,7 +2044,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2025: checking whether ln -s works" >&5 +echo "configure:2048: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2042,7 +2065,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:2046: checking how to recognise dependant libraries" >&5 +echo "configure:2069: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2215,13 +2238,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:2219: checking for object suffix" >&5 +echo "configure:2242: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -2245,7 +2268,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:2249: checking for ${ac_tool_prefix}file" >&5 +echo "configure:2272: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2307,7 +2330,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:2311: checking for file" >&5 +echo "configure:2334: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2378,7 +2401,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2382: checking for $ac_word" >&5 +echo "configure:2405: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2410,7 +2433,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2414: checking for $ac_word" >&5 +echo "configure:2437: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2445,7 +2468,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2449: checking for $ac_word" >&5 +echo "configure:2472: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2477,7 +2500,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2481: checking for $ac_word" >&5 +echo "configure:2504: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2544,8 +2567,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2548 "configure"' > conftest.$ac_ext - if { (eval echo configure:2549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2571 "configure"' > conftest.$ac_ext + if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2564,7 +2587,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2582,7 +2605,7 @@ ia64-*-hpux*) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2586: checking whether the C compiler needs -belf" >&5 +echo "configure:2609: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2595,14 +2618,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 2599 "configure" +#line 2622 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2632,7 +2655,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2636: checking for $ac_word" >&5 +echo "configure:2659: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2664,7 +2687,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2668: checking for $ac_word" >&5 +echo "configure:2691: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2699,7 +2722,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2703: checking for $ac_word" >&5 +echo "configure:2726: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2731,7 +2754,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2735: checking for $ac_word" >&5 +echo "configure:2758: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2766,7 +2789,7 @@ fi # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2770: checking for $ac_word" >&5 +echo "configure:2793: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2798,7 +2821,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2802: checking for $ac_word" >&5 +echo "configure:2825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2834,12 +2857,12 @@ fi # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 -echo "configure:2838: checking if libtool should supply DllMain function" >&5 +echo "configure:2861: checking if libtool should supply DllMain function" >&5 if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2843 "configure" +#line 2866 "configure" #include "confdefs.h" int main() { @@ -2847,7 +2870,7 @@ extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); DllMain (0, 0, 0); ; return 0; } EOF -if { (eval echo configure:2851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else @@ -2868,19 +2891,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 -echo "configure:2872: checking how to link DLLs" >&5 +echo "configure:2895: checking how to link DLLs" >&5 if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2877 "configure" +#line 2900 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_dll_switch=-mdll else diff --git a/newlib/libm/machine/i386/aclocal.m4 b/newlib/libm/machine/i386/aclocal.m4 index 35519acf9..db846f456 100644 --- a/newlib/libm/machine/i386/aclocal.m4 +++ b/newlib/libm/machine/i386/aclocal.m4 @@ -47,6 +47,33 @@ AC_ARG_ENABLE(malloc-debugging, *) AC_MSG_ERROR(bad value ${enableval} for malloc-debugging option) ;; esac], [malloc_debugging=])dnl +dnl Support --enable-newlib-mb +AC_ARG_ENABLE(newlib-mb, +[ --enable-newlib-mb enable multibyte support], +[case "${enableval}" in + yes) newlib_mb=yes ;; + no) newlib_mb=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-mb option) ;; + esac], [newlib_mb=])dnl + +dnl Support --enable-newlib-iconv +AC_ARG_ENABLE(newlib-iconv, +[ --enable-newlib-iconv enable iconv library support], +[case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; + esac], [newlib_iconv=])dnl + +dnl Support --enable-newlib-builtin-converters +AC_ARG_ENABLE(newlib-builtin-converters, +[ --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in], +[if test x${enableval} = x; then + AC_MSG_ERROR(bad value ${enableval} for newlib-builtin-converters option - use comma-separated list) + fi + builtin_converters=${enableval} + ], [builtin_converters=])dnl + dnl Support --enable-newlib-multithread AC_ARG_ENABLE(newlib-multithread, [ --enable-newlib-multithread enable support for multiple threads], @@ -56,17 +83,6 @@ AC_ARG_ENABLE(newlib-multithread, *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;; esac], [newlib_multithread=yes])dnl -dnl Support --enable-newlib-iconv -AC_ARG_ENABLE(newlib-iconv, -[ --enable-newlib-iconv enable iconv library support], -[if test "${newlib_iconv+set}" != set; then - case "${enableval}" in - yes) newlib_iconv=yes ;; - no) newlib_iconv=no ;; - *) AC_MSG_ERROR(bad value ${enableval} for newlib-iconv option) ;; - esac - fi], [newlib_iconv=${newlib_iconv}])dnl - dnl Support --enable-newlib-elix-level AC_ARG_ENABLE(newlib-elix-level, [ --enable-newlib-elix-level supply desired elix library level (1-4)], @@ -117,7 +133,7 @@ AC_SUBST(newlib_basedir) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(newlib, 1.14.0) +AM_INIT_AUTOMAKE(newlib, 1.12.0) # FIXME: We temporarily define our own version of AC_PROG_CC. This is # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We @@ -165,9 +181,6 @@ AC_CHECK_TOOL(RANLIB, ranlib, :) AC_PROG_INSTALL -# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ -ac_given_INSTALL=$INSTALL - AM_MAINTAINER_MODE # We need AC_EXEEXT to keep automake happy in cygnus mode. However, diff --git a/newlib/libm/machine/i386/configure b/newlib/libm/machine/i386/configure index 6a01f4342..29659bbd2 100755 --- a/newlib/libm/machine/i386/configure +++ b/newlib/libm/machine/i386/configure @@ -18,10 +18,14 @@ ac_help="$ac_help ac_help="$ac_help --enable-malloc-debugging indicate malloc debugging requested" ac_help="$ac_help - --enable-newlib-multithread enable support for multiple threads" + --enable-newlib-mb enable multibyte support" ac_help="$ac_help --enable-newlib-iconv enable iconv library support" ac_help="$ac_help + --enable-newlib-builtin-converters enable specific comma-separated list of iconv converters to be built-in" +ac_help="$ac_help + --enable-newlib-multithread enable support for multiple threads" +ac_help="$ac_help --enable-newlib-elix-level supply desired elix library level (1-4)" ac_help="$ac_help --disable-newlib-io-float disable printf/scanf family float support" @@ -586,7 +590,7 @@ am__api_version="1.4" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:590: checking for a BSD compatible install" >&5 +echo "configure:594: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -639,7 +643,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:643: checking whether build environment is sane" >&5 +echo "configure:647: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -696,7 +700,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:700: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:704: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -729,12 +733,12 @@ else fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:733: checking for Cygwin environment" >&5 +echo "configure:737: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 738 "configure" +#line 742 "configure" #include "confdefs.h" int main() { @@ -745,7 +749,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -762,19 +766,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:766: checking for mingw32 environment" >&5 +echo "configure:770: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 771 "configure" +#line 775 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -827,30 +831,52 @@ else malloc_debugging= fi -# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given. -if test "${enable_newlib_multithread+set}" = set; then - enableval="$enable_newlib_multithread" +# Check whether --enable-newlib-mb or --disable-newlib-mb was given. +if test "${enable_newlib_mb+set}" = set; then + enableval="$enable_newlib_mb" case "${enableval}" in - yes) newlib_multithread=yes ;; - no) newlib_multithread=no ;; - *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;; + yes) newlib_mb=yes ;; + no) newlib_mb=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-mb option" 1>&2; exit 1; } ;; esac else - newlib_multithread=yes + newlib_mb= fi # Check whether --enable-newlib-iconv or --disable-newlib-iconv was given. if test "${enable_newlib_iconv+set}" = set; then enableval="$enable_newlib_iconv" - if test "${newlib_iconv+set}" != set; then - case "${enableval}" in - yes) newlib_iconv=yes ;; - no) newlib_iconv=no ;; - *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;; - esac + case "${enableval}" in + yes) newlib_iconv=yes ;; + no) newlib_iconv=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-iconv option" 1>&2; exit 1; } ;; + esac +else + newlib_iconv= +fi + +# Check whether --enable-newlib-builtin-converters or --disable-newlib-builtin-converters was given. +if test "${enable_newlib_builtin_converters+set}" = set; then + enableval="$enable_newlib_builtin_converters" + if test x${enableval} = x; then + { echo "configure: error: bad value ${enableval} for newlib-builtin-converters option - use comma-separated list" 1>&2; exit 1; } fi + builtin_converters=${enableval} + +else + builtin_converters= +fi + +# Check whether --enable-newlib-multithread or --disable-newlib-multithread was given. +if test "${enable_newlib_multithread+set}" = set; then + enableval="$enable_newlib_multithread" + case "${enableval}" in + yes) newlib_multithread=yes ;; + no) newlib_multithread=no ;; + *) { echo "configure: error: bad value ${enableval} for newlib-multithread option" 1>&2; exit 1; } ;; + esac else - newlib_iconv=${newlib_iconv} + newlib_multithread=yes fi # Check whether --enable-newlib-elix-level or --disable-newlib-elix-level was given. @@ -944,7 +970,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:948: checking host system type" >&5 +echo "configure:974: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -965,7 +991,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:969: checking target system type" >&5 +echo "configure:995: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -983,7 +1009,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:987: checking build system type" >&5 +echo "configure:1013: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1009,7 +1035,7 @@ test "$host_alias" != "$target_alias" && PACKAGE=newlib -VERSION=1.14.0 +VERSION=1.12.0 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1026,7 +1052,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6 -echo "configure:1030: checking for working aclocal-${am__api_version}" >&5 +echo "configure:1056: checking for working aclocal-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1039,7 +1065,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1043: checking for working autoconf" >&5 +echo "configure:1069: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1052,7 +1078,7 @@ else fi echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6 -echo "configure:1056: checking for working automake-${am__api_version}" >&5 +echo "configure:1082: checking for working automake-${am__api_version}" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1065,7 +1091,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1069: checking for working autoheader" >&5 +echo "configure:1095: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1078,7 +1104,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1082: checking for working makeinfo" >&5 +echo "configure:1108: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1103,7 +1129,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1107: checking for $ac_word" >&5 +echo "configure:1133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1133,7 +1159,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1137: checking for $ac_word" >&5 +echo "configure:1163: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1182,7 +1208,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1186: checking whether we are using GNU C" >&5 +echo "configure:1212: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1191,7 +1217,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1206,7 +1232,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1210: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1236: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1237,7 +1263,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1241: checking for $ac_word" >&5 +echo "configure:1267: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1269,7 +1295,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1273: checking for $ac_word" >&5 +echo "configure:1299: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1301,7 +1327,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1305: checking for $ac_word" >&5 +echo "configure:1331: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1333,7 +1359,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1337: checking for $ac_word" >&5 +echo "configure:1363: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1378,7 +1404,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1382: checking for a BSD compatible install" >&5 +echo "configure:1408: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1431,11 +1457,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Hack to ensure that INSTALL won't be set to "../" with autoconf 2.13. */ -ac_given_INSTALL=$INSTALL - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1439: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1462: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1469,7 +1492,7 @@ if false; then echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1473: checking for executable suffix" >&5 +echo "configure:1496: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1479,7 +1502,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -1655,7 +1678,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1659: checking for $ac_word" >&5 +echo "configure:1682: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1685,7 +1708,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1689: checking for $ac_word" >&5 +echo "configure:1712: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1736,7 +1759,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1740: checking for $ac_word" >&5 +echo "configure:1763: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1768,7 +1791,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1795: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1779,12 +1802,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1783 "configure" +#line 1806 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1810,12 +1833,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1814: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1837: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1819: checking whether we are using GNU C" >&5 +echo "configure:1842: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1824,7 +1847,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1843,7 +1866,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1847: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1870: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1886,7 +1909,7 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1890: checking for ld used by GCC" >&5 +echo "configure:1913: checking for ld used by GCC" >&5 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -1916,10 +1939,10 @@ echo "configure:1890: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1920: checking for GNU ld" >&5 +echo "configure:1943: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1923: checking for non-GNU ld" >&5 +echo "configure:1946: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1954,7 +1977,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1958: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1981: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1971,7 +1994,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6 -echo "configure:1975: checking for $LD option to reload object files" >&5 +echo "configure:1998: checking for $LD option to reload object files" >&5 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1983,7 +2006,7 @@ reload_flag=$lt_cv_ld_reload_flag test -n "$reload_flag" && reload_flag=" $reload_flag" echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1987: checking for BSD-compatible nm" >&5 +echo "configure:2010: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2021,7 +2044,7 @@ NM="$lt_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:2025: checking whether ln -s works" >&5 +echo "configure:2048: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2042,7 +2065,7 @@ else fi echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 -echo "configure:2046: checking how to recognise dependant libraries" >&5 +echo "configure:2069: checking how to recognise dependant libraries" >&5 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2215,13 +2238,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method echo $ac_n "checking for object suffix""... $ac_c" 1>&6 -echo "configure:2219: checking for object suffix" >&5 +echo "configure:2242: checking for object suffix" >&5 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* echo 'int i = 1;' > conftest.$ac_ext -if { (eval echo configure:2225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then for ac_file in conftest.*; do case $ac_file in *.c) ;; @@ -2245,7 +2268,7 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 -echo "configure:2249: checking for ${ac_tool_prefix}file" >&5 +echo "configure:2272: checking for ${ac_tool_prefix}file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2307,7 +2330,7 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo $ac_n "checking for file""... $ac_c" 1>&6 -echo "configure:2311: checking for file" >&5 +echo "configure:2334: checking for file" >&5 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2378,7 +2401,7 @@ esac # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2382: checking for $ac_word" >&5 +echo "configure:2405: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2410,7 +2433,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2414: checking for $ac_word" >&5 +echo "configure:2437: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2445,7 +2468,7 @@ fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2449: checking for $ac_word" >&5 +echo "configure:2472: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2477,7 +2500,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2481: checking for $ac_word" >&5 +echo "configure:2504: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2544,8 +2567,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 2548 "configure"' > conftest.$ac_ext - if { (eval echo configure:2549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2571 "configure"' > conftest.$ac_ext + if { (eval echo configure:2572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" @@ -2564,7 +2587,7 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo configure:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *ELF-32*) HPUX_IA64_MODE="32" @@ -2582,7 +2605,7 @@ ia64-*-hpux*) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:2586: checking whether the C compiler needs -belf" >&5 +echo "configure:2609: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2595,14 +2618,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 2599 "configure" +#line 2622 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -2632,7 +2655,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2636: checking for $ac_word" >&5 +echo "configure:2659: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2664,7 +2687,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2668: checking for $ac_word" >&5 +echo "configure:2691: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2699,7 +2722,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2703: checking for $ac_word" >&5 +echo "configure:2726: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2731,7 +2754,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2735: checking for $ac_word" >&5 +echo "configure:2758: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2766,7 +2789,7 @@ fi # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2770: checking for $ac_word" >&5 +echo "configure:2793: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2798,7 +2821,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2802: checking for $ac_word" >&5 +echo "configure:2825: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2834,12 +2857,12 @@ fi # recent cygwin and mingw systems supply a stub DllMain which the user # can override, but on older systems we have to supply one echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6 -echo "configure:2838: checking if libtool should supply DllMain function" >&5 +echo "configure:2861: checking if libtool should supply DllMain function" >&5 if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2843 "configure" +#line 2866 "configure" #include "confdefs.h" int main() { @@ -2847,7 +2870,7 @@ extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); DllMain (0, 0, 0); ; return 0; } EOF -if { (eval echo configure:2851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_need_dllmain=no else @@ -2868,19 +2891,19 @@ echo "$ac_t""$lt_cv_need_dllmain" 1>&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mdll" echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6 -echo "configure:2872: checking how to link DLLs" >&5 +echo "configure:2895: checking how to link DLLs" >&5 if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2877 "configure" +#line 2900 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_dll_switch=-mdll else diff --git a/newlib/libm/math/Makefile.am b/newlib/libm/math/Makefile.am index f5971fac9..6f7195a38 100644 --- a/newlib/libm/math/Makefile.am +++ b/newlib/libm/math/Makefile.am @@ -22,9 +22,10 @@ src = k_standard.c k_rem_pio2.c \ w_cabs.c w_drem.c \ s_asinh.c s_atan.c s_ceil.c \ s_cos.c s_erf.c s_fabs.c s_floor.c \ - s_frexp.c s_ldexp.c \ + s_frexp.c s_isnan.c s_ldexp.c \ s_signif.c s_sin.c \ s_tan.c s_tanh.c \ + s_isinf.c s_infconst.c \ w_exp2.c w_tgamma.c fsrc = kf_rem_pio2.c \ @@ -45,9 +46,10 @@ fsrc = kf_rem_pio2.c \ wf_cabs.c wf_drem.c \ sf_asinh.c sf_atan.c sf_ceil.c \ sf_cos.c sf_erf.c sf_fabs.c sf_floor.c \ - sf_frexp.c sf_ldexp.c \ + sf_frexp.c sf_isnan.c sf_ldexp.c \ sf_signif.c sf_sin.c \ sf_tan.c sf_tanh.c \ + sf_isinf.c \ wf_exp2.c wf_tgamma.c libmath_la_LDFLAGS = -Xcompiler -nostdlib @@ -71,7 +73,8 @@ chobj = wacos.def wacosh.def wasin.def sasinh.def \ wgamma.def whypot.def sldexp.def wlog.def \ wlog10.def \ wpow.def wremainder.def ssin.def wsinh.def \ - wsqrt.def stan.def stanh.def + wsqrt.def stan.def stanh.def \ + sisnan.def SUFFIXES = .def @@ -175,6 +178,9 @@ stan.def: s_tan.c stanh.def: s_tanh.c $(CHEW) < $(srcdir)/s_tanh.c >$@ 2>/dev/null touch stmp-def +sisnan.def: s_isnan.c + $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null + touch stmp-def # A partial dependency list. diff --git a/newlib/libm/math/Makefile.in b/newlib/libm/math/Makefile.in index f00e189c7..49a8daf5e 100644 --- a/newlib/libm/math/Makefile.in +++ b/newlib/libm/math/Makefile.in @@ -98,10 +98,10 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = -I$(srcdir)/../common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -src = k_standard.c k_rem_pio2.c k_cos.c k_sin.c k_tan.c e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c e_exp.c e_fmod.c er_gamma.c e_hypot.c e_j0.c e_j1.c e_jn.c er_lgamma.c e_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c e_scalb.c e_sinh.c e_sqrt.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cosh.c w_exp.c w_fmod.c w_gamma.c wr_gamma.c w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c wr_lgamma.c w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c w_sqrt.c w_sincos.c w_cabs.c w_drem.c s_asinh.c s_atan.c s_ceil.c s_cos.c s_erf.c s_fabs.c s_floor.c s_frexp.c s_ldexp.c s_signif.c s_sin.c s_tan.c s_tanh.c w_exp2.c w_tgamma.c +src = k_standard.c k_rem_pio2.c k_cos.c k_sin.c k_tan.c e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c e_exp.c e_fmod.c er_gamma.c e_hypot.c e_j0.c e_j1.c e_jn.c er_lgamma.c e_log.c e_log10.c e_pow.c e_rem_pio2.c e_remainder.c e_scalb.c e_sinh.c e_sqrt.c w_acos.c w_acosh.c w_asin.c w_atan2.c w_atanh.c w_cosh.c w_exp.c w_fmod.c w_gamma.c wr_gamma.c w_hypot.c w_j0.c w_j1.c w_jn.c w_lgamma.c wr_lgamma.c w_log.c w_log10.c w_pow.c w_remainder.c w_scalb.c w_sinh.c w_sqrt.c w_sincos.c w_cabs.c w_drem.c s_asinh.c s_atan.c s_ceil.c s_cos.c s_erf.c s_fabs.c s_floor.c s_frexp.c s_isnan.c s_ldexp.c s_signif.c s_sin.c s_tan.c s_tanh.c s_isinf.c s_infconst.c w_exp2.c w_tgamma.c -fsrc = kf_rem_pio2.c kf_cos.c kf_sin.c kf_tan.c ef_acos.c ef_acosh.c ef_asin.c ef_atan2.c ef_atanh.c ef_cosh.c ef_exp.c ef_fmod.c erf_gamma.c ef_hypot.c ef_j0.c ef_j1.c ef_jn.c erf_lgamma.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c ef_sinh.c ef_sqrt.c wf_acos.c wf_acosh.c wf_asin.c wf_atan2.c wf_atanh.c wf_cosh.c wf_exp.c wf_fmod.c wf_gamma.c wrf_gamma.c wf_hypot.c wf_j0.c wf_j1.c wf_jn.c wf_lgamma.c wrf_lgamma.c wf_log.c wf_log10.c wf_pow.c wf_remainder.c wf_scalb.c wf_sinh.c wf_sqrt.c wf_sincos.c wf_cabs.c wf_drem.c sf_asinh.c sf_atan.c sf_ceil.c sf_cos.c sf_erf.c sf_fabs.c sf_floor.c sf_frexp.c sf_ldexp.c sf_signif.c sf_sin.c sf_tan.c sf_tanh.c wf_exp2.c wf_tgamma.c +fsrc = kf_rem_pio2.c kf_cos.c kf_sin.c kf_tan.c ef_acos.c ef_acosh.c ef_asin.c ef_atan2.c ef_atanh.c ef_cosh.c ef_exp.c ef_fmod.c erf_gamma.c ef_hypot.c ef_j0.c ef_j1.c ef_jn.c erf_lgamma.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c ef_sinh.c ef_sqrt.c wf_acos.c wf_acosh.c wf_asin.c wf_atan2.c wf_atanh.c wf_cosh.c wf_exp.c wf_fmod.c wf_gamma.c wrf_gamma.c wf_hypot.c wf_j0.c wf_j1.c wf_jn.c wf_lgamma.c wrf_lgamma.c wf_log.c wf_log10.c wf_pow.c wf_remainder.c wf_scalb.c wf_sinh.c wf_sqrt.c wf_sincos.c wf_cabs.c wf_drem.c sf_asinh.c sf_atan.c sf_ceil.c sf_cos.c sf_erf.c sf_fabs.c sf_floor.c sf_frexp.c sf_isnan.c sf_ldexp.c sf_signif.c sf_sin.c sf_tan.c sf_tanh.c sf_isinf.c wf_exp2.c wf_tgamma.c libmath_la_LDFLAGS = -Xcompiler -nostdlib @@ -113,7 +113,7 @@ libmath_la_LDFLAGS = -Xcompiler -nostdlib @USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a @USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) -chobj = wacos.def wacosh.def wasin.def sasinh.def satan.def watan2.def watanh.def wj0.def wcosh.def serf.def wexp.def sfabs.def sfloor.def wfmod.def sfrexp.def wgamma.def whypot.def sldexp.def wlog.def wlog10.def wpow.def wremainder.def ssin.def wsinh.def wsqrt.def stan.def stanh.def +chobj = wacos.def wacosh.def wasin.def sasinh.def satan.def watan2.def watanh.def wj0.def wcosh.def serf.def wexp.def sfabs.def sfloor.def wfmod.def sfrexp.def wgamma.def whypot.def sldexp.def wlog.def wlog10.def wpow.def wremainder.def ssin.def wsinh.def wsqrt.def stan.def stanh.def sisnan.def SUFFIXES = .def @@ -154,14 +154,16 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@w_cabs.$(OBJEXT) w_drem.$(OBJEXT) s_asinh.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_atan.$(OBJEXT) s_ceil.$(OBJEXT) s_cos.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_erf.$(OBJEXT) s_fabs.$(OBJEXT) s_floor.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_frexp.$(OBJEXT) s_ldexp.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_signif.$(OBJEXT) s_sin.$(OBJEXT) s_tan.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_tanh.$(OBJEXT) w_exp2.$(OBJEXT) w_tgamma.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@kf_rem_pio2.$(OBJEXT) kf_cos.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@kf_sin.$(OBJEXT) kf_tan.$(OBJEXT) ef_acos.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@ef_acosh.$(OBJEXT) ef_asin.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@ef_atan2.$(OBJEXT) ef_atanh.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@ef_cosh.$(OBJEXT) ef_exp.$(OBJEXT) ef_fmod.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_frexp.$(OBJEXT) s_isnan.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_ldexp.$(OBJEXT) s_signif.$(OBJEXT) s_sin.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_tan.$(OBJEXT) s_tanh.$(OBJEXT) s_isinf.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_infconst.$(OBJEXT) w_exp2.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@w_tgamma.$(OBJEXT) kf_rem_pio2.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@kf_cos.$(OBJEXT) kf_sin.$(OBJEXT) kf_tan.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@ef_acos.$(OBJEXT) ef_acosh.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@ef_asin.$(OBJEXT) ef_atan2.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@ef_atanh.$(OBJEXT) ef_cosh.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@ef_exp.$(OBJEXT) ef_fmod.$(OBJEXT) \ @USE_LIBTOOL_FALSE@erf_gamma.$(OBJEXT) ef_hypot.$(OBJEXT) \ @USE_LIBTOOL_FALSE@ef_j0.$(OBJEXT) ef_j1.$(OBJEXT) ef_jn.$(OBJEXT) \ @USE_LIBTOOL_FALSE@erf_lgamma.$(OBJEXT) ef_log.$(OBJEXT) \ @@ -184,9 +186,11 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@sf_atan.$(OBJEXT) sf_ceil.$(OBJEXT) sf_cos.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_erf.$(OBJEXT) sf_fabs.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_floor.$(OBJEXT) sf_frexp.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_ldexp.$(OBJEXT) sf_signif.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_sin.$(OBJEXT) sf_tan.$(OBJEXT) sf_tanh.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@wf_exp2.$(OBJEXT) wf_tgamma.$(OBJEXT) +@USE_LIBTOOL_FALSE@sf_isnan.$(OBJEXT) sf_ldexp.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_signif.$(OBJEXT) sf_sin.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_tan.$(OBJEXT) sf_tanh.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_isinf.$(OBJEXT) wf_exp2.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@wf_tgamma.$(OBJEXT) LTLIBRARIES = $(noinst_LTLIBRARIES) libmath_la_LIBADD = @@ -203,24 +207,25 @@ libmath_la_LIBADD = @USE_LIBTOOL_TRUE@w_remainder.lo w_scalb.lo w_sinh.lo w_sqrt.lo \ @USE_LIBTOOL_TRUE@w_sincos.lo w_cabs.lo w_drem.lo s_asinh.lo s_atan.lo \ @USE_LIBTOOL_TRUE@s_ceil.lo s_cos.lo s_erf.lo s_fabs.lo s_floor.lo \ -@USE_LIBTOOL_TRUE@s_frexp.lo s_ldexp.lo s_signif.lo s_sin.lo s_tan.lo \ -@USE_LIBTOOL_TRUE@s_tanh.lo w_exp2.lo w_tgamma.lo kf_rem_pio2.lo \ -@USE_LIBTOOL_TRUE@kf_cos.lo kf_sin.lo kf_tan.lo ef_acos.lo ef_acosh.lo \ -@USE_LIBTOOL_TRUE@ef_asin.lo ef_atan2.lo ef_atanh.lo ef_cosh.lo \ -@USE_LIBTOOL_TRUE@ef_exp.lo ef_fmod.lo erf_gamma.lo ef_hypot.lo \ -@USE_LIBTOOL_TRUE@ef_j0.lo ef_j1.lo ef_jn.lo erf_lgamma.lo ef_log.lo \ -@USE_LIBTOOL_TRUE@ef_log10.lo ef_pow.lo ef_rem_pio2.lo ef_remainder.lo \ -@USE_LIBTOOL_TRUE@ef_scalb.lo ef_sinh.lo ef_sqrt.lo wf_acos.lo \ -@USE_LIBTOOL_TRUE@wf_acosh.lo wf_asin.lo wf_atan2.lo wf_atanh.lo \ -@USE_LIBTOOL_TRUE@wf_cosh.lo wf_exp.lo wf_fmod.lo wf_gamma.lo \ -@USE_LIBTOOL_TRUE@wrf_gamma.lo wf_hypot.lo wf_j0.lo wf_j1.lo wf_jn.lo \ -@USE_LIBTOOL_TRUE@wf_lgamma.lo wrf_lgamma.lo wf_log.lo wf_log10.lo \ -@USE_LIBTOOL_TRUE@wf_pow.lo wf_remainder.lo wf_scalb.lo wf_sinh.lo \ -@USE_LIBTOOL_TRUE@wf_sqrt.lo wf_sincos.lo wf_cabs.lo wf_drem.lo \ -@USE_LIBTOOL_TRUE@sf_asinh.lo sf_atan.lo sf_ceil.lo sf_cos.lo sf_erf.lo \ -@USE_LIBTOOL_TRUE@sf_fabs.lo sf_floor.lo sf_frexp.lo sf_ldexp.lo \ +@USE_LIBTOOL_TRUE@s_frexp.lo s_isnan.lo s_ldexp.lo s_signif.lo s_sin.lo \ +@USE_LIBTOOL_TRUE@s_tan.lo s_tanh.lo s_isinf.lo s_infconst.lo w_exp2.lo \ +@USE_LIBTOOL_TRUE@w_tgamma.lo kf_rem_pio2.lo kf_cos.lo kf_sin.lo \ +@USE_LIBTOOL_TRUE@kf_tan.lo ef_acos.lo ef_acosh.lo ef_asin.lo \ +@USE_LIBTOOL_TRUE@ef_atan2.lo ef_atanh.lo ef_cosh.lo ef_exp.lo \ +@USE_LIBTOOL_TRUE@ef_fmod.lo erf_gamma.lo ef_hypot.lo ef_j0.lo ef_j1.lo \ +@USE_LIBTOOL_TRUE@ef_jn.lo erf_lgamma.lo ef_log.lo ef_log10.lo \ +@USE_LIBTOOL_TRUE@ef_pow.lo ef_rem_pio2.lo ef_remainder.lo ef_scalb.lo \ +@USE_LIBTOOL_TRUE@ef_sinh.lo ef_sqrt.lo wf_acos.lo wf_acosh.lo \ +@USE_LIBTOOL_TRUE@wf_asin.lo wf_atan2.lo wf_atanh.lo wf_cosh.lo \ +@USE_LIBTOOL_TRUE@wf_exp.lo wf_fmod.lo wf_gamma.lo wrf_gamma.lo \ +@USE_LIBTOOL_TRUE@wf_hypot.lo wf_j0.lo wf_j1.lo wf_jn.lo wf_lgamma.lo \ +@USE_LIBTOOL_TRUE@wrf_lgamma.lo wf_log.lo wf_log10.lo wf_pow.lo \ +@USE_LIBTOOL_TRUE@wf_remainder.lo wf_scalb.lo wf_sinh.lo wf_sqrt.lo \ +@USE_LIBTOOL_TRUE@wf_sincos.lo wf_cabs.lo wf_drem.lo sf_asinh.lo \ +@USE_LIBTOOL_TRUE@sf_atan.lo sf_ceil.lo sf_cos.lo sf_erf.lo sf_fabs.lo \ +@USE_LIBTOOL_TRUE@sf_floor.lo sf_frexp.lo sf_isnan.lo sf_ldexp.lo \ @USE_LIBTOOL_TRUE@sf_signif.lo sf_sin.lo sf_tan.lo sf_tanh.lo \ -@USE_LIBTOOL_TRUE@wf_exp2.lo wf_tgamma.lo +@USE_LIBTOOL_TRUE@sf_isinf.lo wf_exp2.lo wf_tgamma.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -546,6 +551,9 @@ stan.def: s_tan.c stanh.def: s_tanh.c $(CHEW) < $(srcdir)/s_tanh.c >$@ 2>/dev/null touch stmp-def +sisnan.def: s_isnan.c + $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null + touch stmp-def # A partial dependency list. diff --git a/newlib/libm/math/ef_atan2.c b/newlib/libm/math/ef_atan2.c index d57480b03..45b5acb0c 100644 --- a/newlib/libm/math/ef_atan2.c +++ b/newlib/libm/math/ef_atan2.c @@ -25,8 +25,8 @@ tiny = 1.0e-30, zero = 0.0, pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */ pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */ -pi = 3.1415927410e+00, /* 0x40490fdb */ -pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */ +pi = 3.1415925026e+00, /* 0x40490fda */ +pi_lo = 1.5099578832e-07; /* 0x34222168 */ #ifdef __STDC__ float __ieee754_atan2f(float y, float x) diff --git a/newlib/libm/math/ef_hypot.c b/newlib/libm/math/ef_hypot.c index 9368eb41c..b78b968ef 100644 --- a/newlib/libm/math/ef_hypot.c +++ b/newlib/libm/math/ef_hypot.c @@ -50,7 +50,7 @@ if(FLT_UWORD_IS_ZERO(hb)) { return a; } else if(FLT_UWORD_IS_SUBNORMAL(hb)) { - SET_FLOAT_WORD(t1,0x7e800000L); /* t1=2^126 */ + SET_FLOAT_WORD(t1,0x3f000000L); /* t1=2^126 */ b *= t1; a *= t1; k -= 126; diff --git a/newlib/libm/math/math.tex b/newlib/libm/math/math.tex index 7bc56ce9a..0b1e596fb 100644 --- a/newlib/libm/math/math.tex +++ b/newlib/libm/math/math.tex @@ -25,7 +25,7 @@ Since the error handling code calls @code{fputs}, the mathematical subroutines require stubs or minimal implementations for the same list of OS subroutines as @code{fputs}: @code{close}, @code{fstat}, @code{isatty}, @code{lseek}, @code{read}, @code{sbrk}, @code{write}. -@xref{syscalls,,System Calls, libc.info, The Red Hat newlib C Library}, +@xref{syscalls,,System Calls, libc.info, The Cygnus C Support Library}, for a discussion and for sample minimal implementations of these support subroutines. @@ -139,12 +139,6 @@ The library is set to X/Open mode by default. @include math/wj0.def @page -@include common/scbrt.def - -@page -@include common/scopysign.def - -@page @include math/wcosh.def @page @@ -154,9 +148,6 @@ The library is set to X/Open mode by default. @include math/wexp.def @page -@include common/sexpm1.def - -@page @include math/sfabs.def @page @@ -175,13 +166,7 @@ The library is set to X/Open mode by default. @include math/whypot.def @page -@include common/silogb.def - -@page -@include common/sinfinity.def - -@page -@include common/sisnan.def +@include math/sisnan.def @page @include math/sldexp.def @@ -193,30 +178,12 @@ The library is set to X/Open mode by default. @include math/wlog10.def @page -@include common/slog1p.def - -@page -@include common/smatherr.def - -@page -@include common/smodf.def - -@page -@include common/snan.def - -@page -@include common/snextafter.def - -@page @include math/wpow.def @page @include math/wremainder.def @page -@include common/sscalbn.def - -@page @include math/wsqrt.def @page diff --git a/newlib/libm/math/s_infconst.c b/newlib/libm/math/s_infconst.c new file mode 100644 index 000000000..6b63afbca --- /dev/null +++ b/newlib/libm/math/s_infconst.c @@ -0,0 +1,15 @@ +/* Infinity as a constant value. This is used for HUGE_VAL. + * Added by Cygnus Support. + */ + +#include "fdlibm.h" + +#ifndef _DOUBLE_IS_32BITS +#ifdef __IEEE_BIG_ENDIAN +const union __dmath __infinity[1] = {{{ 0x7ff00000, 0 }}}; +#else +const union __dmath __infinity[1] = {{{ 0, 0x7ff00000 }}}; +#endif +#else /* defined (_DOUBLE_IS_32BITS) */ +const union __dmath __infinity[1] = {{{ 0x7f800000, 0 }}}; +#endif /* defined (_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/common/s_isinfd.c b/newlib/libm/math/s_isinf.c index 5a2b04d4e..87f099566 100644 --- a/newlib/libm/common/s_isinfd.c +++ b/newlib/libm/math/s_isinf.c @@ -1,5 +1,5 @@ /* - * __isinfd(x) returns 1 if x is infinity, else 0; + * isinf(x) returns 1 if x is infinity, else 0; * no branching! * Added by Cygnus Support. */ @@ -8,9 +8,12 @@ #ifndef _DOUBLE_IS_32BITS -int -_DEFUN (__isinfd, (x), - double x) +#ifdef __STDC__ + int isinf(double x) +#else + int isinf(x) + double x; +#endif { __int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/newlib/libm/common/s_isnand.c b/newlib/libm/math/s_isnan.c index 75538d907..0338cfe47 100644 --- a/newlib/libm/common/s_isnand.c +++ b/newlib/libm/math/s_isnan.c @@ -1,3 +1,5 @@ + +/* @(#)s_isnan.c 5.1 93/09/24 */ /* * ==================================================== * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. @@ -11,7 +13,7 @@ /* FUNCTION - <<isnan>>, <<isnanf>>, <<isinf>>, <<isinff>>, <<finite>>, <<finitef>>---test for exceptional numbers + <<isnan>>,<<isnanf>>,<<isinf>>,<<isinff>>,<<finite>>,<<finitef>>---test for exceptional numbers INDEX isnan @@ -56,14 +58,14 @@ DESCRIPTION These functions provide information on the floating-point argument supplied. - There are five major number formats: + There are five major number formats - o+ o zero - A number which contains all zero bits. + a number which contains all zero bits. o subnormal - A number with a zero exponent but a nonzero fraction. - o normal - A number with an exponent and a fraction. + Is used to represent number with a zero exponent, but a nonzero fraction. + o normal + A number with an exponent, and a fraction o infinity A number with an all 1's exponent and a zero fraction. o NAN @@ -74,13 +76,8 @@ DESCRIPTION <<isnan>> returns 1 if the argument is a nan. <<isinf>> returns 1 if the argument is infinity. <<finite>> returns 1 if the argument is zero, subnormal or normal. - - Note that by the C99 standard, <<isnan>> and <<isinf>> are macros - taking any type of floating-point and are declared in - <<math.h>>. Newlib has chosen to declare these as macros in - <<math.h>> and as functions in <<ieeefp.h>>. - The <<isnanf>>, <<isinff>> and <<finitef>> functions perform the same + The <<isnanf>>, <<isinff>> and <<finitef>> perform the same operations as their <<isnan>>, <<isinf>> and <<finite>> counterparts, but on single-precision floating-point numbers. @@ -99,7 +96,7 @@ QUICKREF */ /* - * __isnand(x) returns 1 is x is nan, else 0; + * isnan(x) returns 1 is x is nan, else 0; * no branching! */ @@ -107,9 +104,12 @@ QUICKREF #ifndef _DOUBLE_IS_32BITS -int -_DEFUN (__isnand, (x), - double x) +#ifdef __STDC__ + int isnan(double x) +#else + int isnan(x) + double x; +#endif { __int32_t hx,lx; EXTRACT_WORDS(hx,lx,x); diff --git a/newlib/libm/math/s_ldexp.c b/newlib/libm/math/s_ldexp.c index adc7d5d0e..e5d45633d 100644 --- a/newlib/libm/math/s_ldexp.c +++ b/newlib/libm/math/s_ldexp.c @@ -56,7 +56,7 @@ On underflow, <<ldexp>> and <<ldexpf>> return 0.0. On overflow, <<ldexp>> returns plus or minus <<HUGE_VAL>>. PORTABILITY -<<ldexp>> is ANSI. <<ldexpf>> is an extension. +<<ldexp>> is ANSI, <<ldexpf>> is an extension. */ diff --git a/newlib/libm/common/sf_isinf.c b/newlib/libm/math/sf_isinf.c index 74ba4edf7..43a8abdf2 100644 --- a/newlib/libm/common/sf_isinf.c +++ b/newlib/libm/math/sf_isinf.c @@ -1,15 +1,16 @@ /* * isinff(x) returns 1 if x is +-infinity, else 0; - * - * isinff is an extension declared in <ieeefp.h> and - * <math.h>. + * Added by Cygnus Support. */ #include "fdlibm.h" -int -_DEFUN (isinff, (x), - float x) +#ifdef __STDC__ + int isinff(float x) +#else + int isinff(x) + float x; +#endif { __int32_t ix; GET_FLOAT_WORD(ix,x); @@ -19,11 +20,12 @@ _DEFUN (isinff, (x), #ifdef _DOUBLE_IS_32BITS -#undef isinf - -int -_DEFUN (isinf, (x), - double x) +#ifdef __STDC__ + int isinf(double x) +#else + int isinf(x) + double x; +#endif { return isinff((float) x); } diff --git a/newlib/libm/common/sf_isnan.c b/newlib/libm/math/sf_isnan.c index befc3b2b2..0b4be3e9c 100644 --- a/newlib/libm/common/sf_isnan.c +++ b/newlib/libm/math/sf_isnan.c @@ -1,4 +1,5 @@ -/* sf_c_isnan.c -- float version of s_c_isnan.c. +/* sf_isnan.c -- float version of s_isnan.c. + * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. */ /* @@ -14,15 +15,16 @@ /* * isnanf(x) returns 1 is x is nan, else 0; - * - * isnanf is an extension declared in <ieeefp.h> and <math.h>. */ #include "fdlibm.h" -int -_DEFUN (isnanf, (x), - float x) +#ifdef __STDC__ + int isnanf(float x) +#else + int isnanf(x) + float x; +#endif { __int32_t ix; GET_FLOAT_WORD(ix,x); @@ -32,11 +34,12 @@ _DEFUN (isnanf, (x), #ifdef _DOUBLE_IS_32BITS -#undef isnan - -int -_DEFUN (isnan, (x), - double x) +#ifdef __STDC__ + int isnan(double x) +#else + int isnan(x) + double x; +#endif { return isnanf((float) x); } diff --git a/newlib/libm/math/w_j0.c b/newlib/libm/math/w_j0.c index e4dde5ccb..2bf663316 100644 --- a/newlib/libm/math/w_j0.c +++ b/newlib/libm/math/w_j0.c @@ -13,7 +13,7 @@ /* FUNCTION -<<jN>>, <<jNf>>, <<yN>>, <<yNf>>---Bessel functions +<<jN>>,<<jNf>>,<<yN>>,<<yNf>>---Bessel functions INDEX j0 diff --git a/newlib/libm/math/w_log.c b/newlib/libm/math/w_log.c index 3e750ad85..dcc8b9762 100644 --- a/newlib/libm/math/w_log.c +++ b/newlib/libm/math/w_log.c @@ -49,7 +49,7 @@ When <[x]> is negative, the returned value is <<-HUGE_VAL>> and <<matherr>>. PORTABILITY -<<log>> is ANSI. <<logf>> is an extension. +<<log>> is ANSI, <<logf>> is an extension. */ /* diff --git a/newlib/libm/mathfp/Makefile.am b/newlib/libm/mathfp/Makefile.am index e529022a6..92688c43d 100644 --- a/newlib/libm/mathfp/Makefile.am +++ b/newlib/libm/mathfp/Makefile.am @@ -16,12 +16,12 @@ src = s_acos.c s_frexp.c s_mathcnst.c \ s_sincos.c \ s_atangent.c s_logarithm.c \ s_sineh.c \ - s_ceil.c \ + s_ceil.c s_isnan.c s_isinf.c \ e_acosh.c e_atanh.c e_remainder.c \ er_gamma.c er_lgamma.c \ s_erf.c e_j0.c e_j1.c w_jn.c e_hypot.c \ w_cabs.c w_drem.c s_asinh.c s_fmod.c \ - e_scalb.c s_signif.c \ + e_scalb.c s_infconst.c s_signif.c \ s_exp2.c s_tgamma.c fsrc = sf_ceil.c \ @@ -36,6 +36,7 @@ fsrc = sf_ceil.c \ sf_sincos.c \ sf_atangent.c sf_logarithm.c sf_sineh.c \ sf_log.c sf_sineh.c \ + sf_isnan.c sf_isinf.c \ ef_acosh.c ef_atanh.c ef_remainder.c \ erf_gamma.c erf_lgamma.c \ sf_erf.c ef_j0.c ef_j1.c wf_jn.c ef_hypot.c \ @@ -75,6 +76,7 @@ chobj = eacosh.def \ sfloor.def \ sfmod.def \ sfrexp.def \ + sisnan.def \ sldexp.def \ slog10.def \ slogarithm.def \ @@ -158,6 +160,9 @@ sfmod.def: s_fmod.c sfrexp.def: s_frexp.c $(CHEW) < $(srcdir)/s_frexp.c >$@ 2>/dev/null touch stmp-def +sisnan.def: s_isnan.c + $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null + touch stmp-def sldexp.def: s_ldexp.c $(CHEW) < $(srcdir)/s_ldexp.c >$@ 2>/dev/null touch stmp-def diff --git a/newlib/libm/mathfp/Makefile.in b/newlib/libm/mathfp/Makefile.in index b11e8130f..8157e1273 100644 --- a/newlib/libm/mathfp/Makefile.in +++ b/newlib/libm/mathfp/Makefile.in @@ -98,10 +98,10 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = -I$(srcdir)/../common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -src = s_acos.c s_frexp.c s_mathcnst.c s_cos.c s_sinh.c s_asin.c s_asine.c s_cosh.c s_ispos.c s_numtest.c s_sqrt.c s_exp.c s_ldexp.c s_pow.c s_tan.c s_atan.c s_atan2.c s_fabs.c s_log.c s_tanh.c s_log10.c s_sin.c s_floor.c s_sine.c s_sincos.c s_atangent.c s_logarithm.c s_sineh.c s_ceil.c e_acosh.c e_atanh.c e_remainder.c er_gamma.c er_lgamma.c s_erf.c e_j0.c e_j1.c w_jn.c e_hypot.c w_cabs.c w_drem.c s_asinh.c s_fmod.c e_scalb.c s_signif.c s_exp2.c s_tgamma.c +src = s_acos.c s_frexp.c s_mathcnst.c s_cos.c s_sinh.c s_asin.c s_asine.c s_cosh.c s_ispos.c s_numtest.c s_sqrt.c s_exp.c s_ldexp.c s_pow.c s_tan.c s_atan.c s_atan2.c s_fabs.c s_log.c s_tanh.c s_log10.c s_sin.c s_floor.c s_sine.c s_sincos.c s_atangent.c s_logarithm.c s_sineh.c s_ceil.c s_isnan.c s_isinf.c e_acosh.c e_atanh.c e_remainder.c er_gamma.c er_lgamma.c s_erf.c e_j0.c e_j1.c w_jn.c e_hypot.c w_cabs.c w_drem.c s_asinh.c s_fmod.c e_scalb.c s_infconst.c s_signif.c s_exp2.c s_tgamma.c -fsrc = sf_ceil.c sf_acos.c sf_frexp.c sf_cos.c sf_sinh.c sf_asine.c sf_cosh.c sf_ispos.c sf_numtest.c sf_sqrt.c sf_asin.c sf_exp.c sf_ldexp.c sf_pow.c sf_tan.c sf_atan2.c sf_fabs.c sf_tanh.c sf_atan.c sf_log10.c sf_sin.c sf_floor.c sf_sine.c sf_sincos.c sf_atangent.c sf_logarithm.c sf_sineh.c sf_log.c sf_sineh.c ef_acosh.c ef_atanh.c ef_remainder.c erf_gamma.c erf_lgamma.c sf_erf.c ef_j0.c ef_j1.c wf_jn.c ef_hypot.c wf_cabs.c wf_drem.c sf_asinh.c sf_fmod.c ef_scalb.c sf_signif.c sf_exp2.c sf_tgamma.c +fsrc = sf_ceil.c sf_acos.c sf_frexp.c sf_cos.c sf_sinh.c sf_asine.c sf_cosh.c sf_ispos.c sf_numtest.c sf_sqrt.c sf_asin.c sf_exp.c sf_ldexp.c sf_pow.c sf_tan.c sf_atan2.c sf_fabs.c sf_tanh.c sf_atan.c sf_log10.c sf_sin.c sf_floor.c sf_sine.c sf_sincos.c sf_atangent.c sf_logarithm.c sf_sineh.c sf_log.c sf_sineh.c sf_isnan.c sf_isinf.c ef_acosh.c ef_atanh.c ef_remainder.c erf_gamma.c erf_lgamma.c sf_erf.c ef_j0.c ef_j1.c wf_jn.c ef_hypot.c wf_cabs.c wf_drem.c sf_asinh.c sf_fmod.c ef_scalb.c sf_signif.c sf_exp2.c sf_tgamma.c libmathfp_la_LDFLAGS = -Xcompiler -nostdlib @@ -113,7 +113,7 @@ libmathfp_la_LDFLAGS = -Xcompiler -nostdlib @USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a @USE_LIBTOOL_FALSE@lib_a_SOURCES = $(src) $(fsrc) -chobj = eacosh.def eatanh.def ehypot.def eremainder.def erlgamma.def sacos.def sasine.def sasinh.def satan.def satan2.def satangent.def scosh.def serf.def sexp.def sfabs.def sfloor.def sfmod.def sfrexp.def sldexp.def slog10.def slogarithm.def spow.def ssine.def ssineh.def ssqrt.def stan.def stanh.def wjn.def +chobj = eacosh.def eatanh.def ehypot.def eremainder.def erlgamma.def sacos.def sasine.def sasinh.def satan.def satan2.def satangent.def scosh.def serf.def sexp.def sfabs.def sfloor.def sfmod.def sfrexp.def sisnan.def sldexp.def slog10.def slogarithm.def spow.def ssine.def ssineh.def ssqrt.def stan.def stanh.def wjn.def SUFFIXES = .def @@ -143,19 +143,21 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@s_sin.$(OBJEXT) s_floor.$(OBJEXT) s_sine.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_sincos.$(OBJEXT) s_atangent.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_logarithm.$(OBJEXT) s_sineh.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_ceil.$(OBJEXT) e_acosh.$(OBJEXT) e_atanh.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_ceil.$(OBJEXT) s_isnan.$(OBJEXT) s_isinf.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@e_acosh.$(OBJEXT) e_atanh.$(OBJEXT) \ @USE_LIBTOOL_FALSE@e_remainder.$(OBJEXT) er_gamma.$(OBJEXT) \ @USE_LIBTOOL_FALSE@er_lgamma.$(OBJEXT) s_erf.$(OBJEXT) e_j0.$(OBJEXT) \ @USE_LIBTOOL_FALSE@e_j1.$(OBJEXT) w_jn.$(OBJEXT) e_hypot.$(OBJEXT) \ @USE_LIBTOOL_FALSE@w_cabs.$(OBJEXT) w_drem.$(OBJEXT) s_asinh.$(OBJEXT) \ @USE_LIBTOOL_FALSE@s_fmod.$(OBJEXT) e_scalb.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_signif.$(OBJEXT) s_exp2.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@s_tgamma.$(OBJEXT) sf_ceil.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_acos.$(OBJEXT) sf_frexp.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_cos.$(OBJEXT) sf_sinh.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_asine.$(OBJEXT) sf_cosh.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_ispos.$(OBJEXT) sf_numtest.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@sf_sqrt.$(OBJEXT) sf_asin.$(OBJEXT) sf_exp.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_infconst.$(OBJEXT) s_signif.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@s_exp2.$(OBJEXT) s_tgamma.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_ceil.$(OBJEXT) sf_acos.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_frexp.$(OBJEXT) sf_cos.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_sinh.$(OBJEXT) sf_asine.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_cosh.$(OBJEXT) sf_ispos.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_numtest.$(OBJEXT) sf_sqrt.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_asin.$(OBJEXT) sf_exp.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_ldexp.$(OBJEXT) sf_pow.$(OBJEXT) sf_tan.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_atan2.$(OBJEXT) sf_fabs.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_tanh.$(OBJEXT) sf_atan.$(OBJEXT) \ @@ -164,6 +166,7 @@ lib_a_LIBADD = @USE_LIBTOOL_FALSE@sf_sincos.$(OBJEXT) sf_atangent.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_logarithm.$(OBJEXT) sf_sineh.$(OBJEXT) \ @USE_LIBTOOL_FALSE@sf_log.$(OBJEXT) sf_sineh.$(OBJEXT) \ +@USE_LIBTOOL_FALSE@sf_isnan.$(OBJEXT) sf_isinf.$(OBJEXT) \ @USE_LIBTOOL_FALSE@ef_acosh.$(OBJEXT) ef_atanh.$(OBJEXT) \ @USE_LIBTOOL_FALSE@ef_remainder.$(OBJEXT) erf_gamma.$(OBJEXT) \ @USE_LIBTOOL_FALSE@erf_lgamma.$(OBJEXT) sf_erf.$(OBJEXT) \ @@ -182,10 +185,11 @@ libmathfp_la_LIBADD = @USE_LIBTOOL_TRUE@s_ldexp.lo s_pow.lo s_tan.lo s_atan.lo s_atan2.lo \ @USE_LIBTOOL_TRUE@s_fabs.lo s_log.lo s_tanh.lo s_log10.lo s_sin.lo \ @USE_LIBTOOL_TRUE@s_floor.lo s_sine.lo s_sincos.lo s_atangent.lo \ -@USE_LIBTOOL_TRUE@s_logarithm.lo s_sineh.lo s_ceil.lo e_acosh.lo \ -@USE_LIBTOOL_TRUE@e_atanh.lo e_remainder.lo er_gamma.lo er_lgamma.lo \ -@USE_LIBTOOL_TRUE@s_erf.lo e_j0.lo e_j1.lo w_jn.lo e_hypot.lo w_cabs.lo \ -@USE_LIBTOOL_TRUE@w_drem.lo s_asinh.lo s_fmod.lo e_scalb.lo s_signif.lo \ +@USE_LIBTOOL_TRUE@s_logarithm.lo s_sineh.lo s_ceil.lo s_isnan.lo \ +@USE_LIBTOOL_TRUE@s_isinf.lo e_acosh.lo e_atanh.lo e_remainder.lo \ +@USE_LIBTOOL_TRUE@er_gamma.lo er_lgamma.lo s_erf.lo e_j0.lo e_j1.lo \ +@USE_LIBTOOL_TRUE@w_jn.lo e_hypot.lo w_cabs.lo w_drem.lo s_asinh.lo \ +@USE_LIBTOOL_TRUE@s_fmod.lo e_scalb.lo s_infconst.lo s_signif.lo \ @USE_LIBTOOL_TRUE@s_exp2.lo s_tgamma.lo sf_ceil.lo sf_acos.lo \ @USE_LIBTOOL_TRUE@sf_frexp.lo sf_cos.lo sf_sinh.lo sf_asine.lo \ @USE_LIBTOOL_TRUE@sf_cosh.lo sf_ispos.lo sf_numtest.lo sf_sqrt.lo \ @@ -193,12 +197,12 @@ libmathfp_la_LIBADD = @USE_LIBTOOL_TRUE@sf_atan2.lo sf_fabs.lo sf_tanh.lo sf_atan.lo \ @USE_LIBTOOL_TRUE@sf_log10.lo sf_sin.lo sf_floor.lo sf_sine.lo \ @USE_LIBTOOL_TRUE@sf_sincos.lo sf_atangent.lo sf_logarithm.lo \ -@USE_LIBTOOL_TRUE@sf_sineh.lo sf_log.lo sf_sineh.lo ef_acosh.lo \ -@USE_LIBTOOL_TRUE@ef_atanh.lo ef_remainder.lo erf_gamma.lo \ -@USE_LIBTOOL_TRUE@erf_lgamma.lo sf_erf.lo ef_j0.lo ef_j1.lo wf_jn.lo \ -@USE_LIBTOOL_TRUE@ef_hypot.lo wf_cabs.lo wf_drem.lo sf_asinh.lo \ -@USE_LIBTOOL_TRUE@sf_fmod.lo ef_scalb.lo sf_signif.lo sf_exp2.lo \ -@USE_LIBTOOL_TRUE@sf_tgamma.lo +@USE_LIBTOOL_TRUE@sf_sineh.lo sf_log.lo sf_sineh.lo sf_isnan.lo \ +@USE_LIBTOOL_TRUE@sf_isinf.lo ef_acosh.lo ef_atanh.lo ef_remainder.lo \ +@USE_LIBTOOL_TRUE@erf_gamma.lo erf_lgamma.lo sf_erf.lo ef_j0.lo \ +@USE_LIBTOOL_TRUE@ef_j1.lo wf_jn.lo ef_hypot.lo wf_cabs.lo wf_drem.lo \ +@USE_LIBTOOL_TRUE@sf_asinh.lo sf_fmod.lo ef_scalb.lo sf_signif.lo \ +@USE_LIBTOOL_TRUE@sf_exp2.lo sf_tgamma.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -494,6 +498,9 @@ sfmod.def: s_fmod.c sfrexp.def: s_frexp.c $(CHEW) < $(srcdir)/s_frexp.c >$@ 2>/dev/null touch stmp-def +sisnan.def: s_isnan.c + $(CHEW) < $(srcdir)/s_isnan.c >$@ 2>/dev/null + touch stmp-def sldexp.def: s_ldexp.c $(CHEW) < $(srcdir)/s_ldexp.c >$@ 2>/dev/null touch stmp-def diff --git a/newlib/libm/mathfp/er_gamma.c b/newlib/libm/mathfp/er_gamma.c index 0060ed031..63758bb43 100644 --- a/newlib/libm/mathfp/er_gamma.c +++ b/newlib/libm/mathfp/er_gamma.c @@ -30,8 +30,3 @@ { return exp (lgamma_r(x,signgamp)); } - -double gamma(double x) -{ - return gamma_r(x, &(_REENT_SIGNGAM(_REENT))); -} diff --git a/newlib/libm/mathfp/er_lgamma.c b/newlib/libm/mathfp/er_lgamma.c index fd49c252e..65d60026e 100644 --- a/newlib/libm/mathfp/er_lgamma.c +++ b/newlib/libm/mathfp/er_lgamma.c @@ -422,9 +422,3 @@ static double zero= 0.00000000000000000000e+00; if(hx<0) r = nadj - r; return r; } - -double -lgamma(double x) -{ - return lgamma_r(x, &(_REENT_SIGNGAM(_REENT))); -} diff --git a/newlib/libm/mathfp/erf_gamma.c b/newlib/libm/mathfp/erf_gamma.c index 246645d25..16be0d040 100644 --- a/newlib/libm/mathfp/erf_gamma.c +++ b/newlib/libm/mathfp/erf_gamma.c @@ -16,7 +16,7 @@ /* gammaf_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function - * with user provided pointer for the sign of Gamma(x). + * with user provide pointer for the sign of Gamma(x). * * Method: See lgammaf_r */ @@ -32,8 +32,3 @@ { return expf (lgammaf_r(x,signgamp)); } - -float gammaf(float x) -{ - return gammaf_r(x, &(_REENT_SIGNGAM(_REENT))); -} diff --git a/newlib/libm/mathfp/erf_lgamma.c b/newlib/libm/mathfp/erf_lgamma.c index 4f092147b..64bec0aca 100644 --- a/newlib/libm/mathfp/erf_lgamma.c +++ b/newlib/libm/mathfp/erf_lgamma.c @@ -244,8 +244,3 @@ static float zero= 0.0000000000e+00; if(hx<0) r = nadj - r; return r; } - -float lgammaf(float x) -{ - return lgammaf_r(x, &(_REENT_SIGNGAM(_REENT))); -} diff --git a/newlib/libm/mathfp/mathfp.tex b/newlib/libm/mathfp/mathfp.tex index 0b9f08557..6286405a0 100644 --- a/newlib/libm/mathfp/mathfp.tex +++ b/newlib/libm/mathfp/mathfp.tex @@ -25,7 +25,7 @@ Since the error handling code calls @code{fputs}, the mathematical subroutines require stubs or minimal implementations for the same list of OS subroutines as @code{fputs}: @code{close}, @code{fstat}, @code{isatty}, @code{lseek}, @code{read}, @code{sbrk}, @code{write}. -@xref{syscalls,,System Calls, libc.info, The Red Hat newlib C Library}, +@xref{syscalls,,System Calls, libc.info, The Cygnus C Support Library}, for a discussion and for sample minimal implementations of these support subroutines. @@ -139,12 +139,6 @@ The library is set to X/Open mode by default. @include mathfp/wjn.def @page -@include common/scbrt.def - -@page -@include common/scopysign.def - -@page @include mathfp/scosh.def @page @@ -154,9 +148,6 @@ The library is set to X/Open mode by default. @include mathfp/sexp.def @page -@include common/sexpm1.def - -@page @include mathfp/sfabs.def @page @@ -175,13 +166,7 @@ The library is set to X/Open mode by default. @include mathfp/ehypot.def @page -@include common/silogb.def - -@page -@include common/sinfinity.def - -@page -@include common/sisnan.def +@include mathfp/sisnan.def @page @include mathfp/sldexp.def @@ -193,30 +178,12 @@ The library is set to X/Open mode by default. @include mathfp/slog10.def @page -@include common/slog1p.def - -@page -@include common/smatherr.def - -@page -@include common/smodf.def - -@page -@include common/snan.def - -@page -@include common/snextafter.def - -@page @include mathfp/spow.def @page @include mathfp/eremainder.def @page -@include common/sscalbn.def - -@page @include mathfp/ssqrt.def @page diff --git a/newlib/libm/mathfp/s_atangent.c b/newlib/libm/mathfp/s_atangent.c index 0a7c4d2f8..981e1c822 100644 --- a/newlib/libm/mathfp/s_atangent.c +++ b/newlib/libm/mathfp/s_atangent.c @@ -197,9 +197,9 @@ _DEFUN (atangent, (double, double, double, int), if (arctan2) { - if (u < 0.0) + if (u < 0.0 || branch == 2) res = __PI - res; - if (v < 0.0) + if (v < 0.0 || branch == 1) res = -res; } else if (x < 0.0) diff --git a/newlib/libm/mathfp/s_frexp.c b/newlib/libm/mathfp/s_frexp.c index 54fa336c8..08611e9a7 100644 --- a/newlib/libm/mathfp/s_frexp.c +++ b/newlib/libm/mathfp/s_frexp.c @@ -82,17 +82,6 @@ double frexp (double d, int *exp) double f; __uint32_t hd, ld, hf, lf; - /* Check for special values. */ - switch (numtest (d)) - { - case NAN: - case INF: - errno = EDOM; - case 0: - *exp = 0; - return (d); - } - EXTRACT_WORDS (hd, ld, d); /* Get the exponent. */ @@ -105,6 +94,16 @@ double frexp (double d, int *exp) INSERT_WORDS (f, hf, lf); + /* Check for special values. */ + switch (numtest (f)) + { + case NAN: + case INF: + errno = EDOM; + *exp = 0; + return (f); + } + return (f); } diff --git a/newlib/libm/mathfp/s_infconst.c b/newlib/libm/mathfp/s_infconst.c new file mode 100644 index 000000000..e6b86d497 --- /dev/null +++ b/newlib/libm/mathfp/s_infconst.c @@ -0,0 +1,15 @@ +/* Infinity as a constant value. This is used for HUGE_VAL. + * Added by Cygnus Support. + */ + +#include "fdlibm.h" + +#ifndef _DOUBLE_IS_32BITS +#ifdef __IEEE_BIG_ENDIAN +const union __dmath __infinity[1] = {{ 0x7ff00000, 0 }}; +#else +const union __dmath __infinity[1] = {{ 0, 0x7ff00000 }}; +#endif +#else /* defined (_DOUBLE_IS_32BITS) */ +const union __dmath __infinity[1] = {{ 0x7f800000, 0 }}; +#endif /* defined (_DOUBLE_IS_32BITS) */ diff --git a/newlib/libm/mathfp/s_isinf.c b/newlib/libm/mathfp/s_isinf.c new file mode 100644 index 000000000..fe9f54799 --- /dev/null +++ b/newlib/libm/mathfp/s_isinf.c @@ -0,0 +1,37 @@ + +/* @(#)z_isinf.c 1.0 98/08/13 */ +/****************************************************************** + * isinf + * + * Input: + * x - pointer to a floating point value + * + * Output: + * An integer that indicates if the number is infinite. + * + * Description: + * This routine returns an integer that indicates if the number + * passed in is infinite (1) or is finite (0). + * + *****************************************************************/ + +#include "fdlibm.h" +#include "zmath.h" + +#ifndef _DOUBLE_IS_32BITS + +int isinf (double x) +{ + __uint32_t lx, hx; + int exp; + + EXTRACT_WORDS (hx, lx, x); + exp = (hx & 0x7ff00000) >> 20; + + if ((exp == 0x7ff) && ((hx & 0xf0000 || lx) == 0)) + return (1); + else + return (0); +} + +#endif /* _DOUBLE_IS_32BITS */ diff --git a/newlib/libm/mathfp/s_isnan.c b/newlib/libm/mathfp/s_isnan.c new file mode 100644 index 000000000..03cfeee59 --- /dev/null +++ b/newlib/libm/mathfp/s_isnan.c @@ -0,0 +1,125 @@ + +/* @(#)z_isnan.c 1.0 98/08/13 */ + +/* +FUNCTION + <<isnan>>,<<isnanf>>,<<isinf>>,<<isinff>>,<<finite>>,<<finitef>>---test +for exceptional numbers + +INDEX + isnan +INDEX + isinf +INDEX + finite + +INDEX + isnanf +INDEX + isinff +INDEX + finitef + +ANSI_SYNOPSIS + #include <ieeefp.h> + int isnan(double <[arg]>); + int isinf(double <[arg]>); + int finite(double <[arg]>); + int isnanf(float <[arg]>); + int isinff(float <[arg]>); + int finitef(float <[arg]>); + +TRAD_SYNOPSIS + #include <ieeefp.h> + int isnan(<[arg]>) + double <[arg]>; + int isinf(<[arg]>) + double <[arg]>; + int finite(<[arg]>); + double <[arg]>; + int isnanf(<[arg]>); + float <[arg]>; + int isinff(<[arg]>); + float <[arg]>; + int finitef(<[arg]>); + float <[arg]>; + + +DESCRIPTION + These functions provide information on the floating-point + argument supplied. + + There are five major number formats - + o+ + o zero + a number which contains all zero bits. + o subnormal + Is used to represent number with a zero exponent, but a nonzero fract +ion. + o normal + A number with an exponent, and a fraction + o infinity + A number with an all 1's exponent and a zero fraction. + o NAN + A number with an all 1's exponent and a nonzero fraction. + + o- + + <<isnan>> returns 1 if the argument is a nan. <<isinf>> + returns 1 if the argument is infinity. <<finite>> returns 1 if the + argument is zero, subnormal or normal. + + The <<isnanf>>, <<isinff>> and <<finitef>> perform the same + operations as their <<isnan>>, <<isinf>> and <<finite>> + counterparts, but on single-precision floating-point numbers. + +QUICKREF + isnan - pure +QUICKREF + isinf - pure +QUICKREF + finite - pure +QUICKREF + isnan - pure +QUICKREF + isinf - pure +QUICKREF + finite - pure +*/ + + +/****************************************************************** + * isnan + * + * Input: + * x - pointer to a floating-point value + * + * Output: + * An integer that indicates if the number is NaN. + * + * Description: + * This routine returns an integer that indicates if the number + * passed in is NaN (1) or is finite (0). + * + *****************************************************************/ + +#include "fdlibm.h" +#include "zmath.h" + +#ifndef _DOUBLE_IS_32BITS + +int isnan (double x) +{ + __uint32_t lx, hx; + int exp; + + EXTRACT_WORDS (hx, lx, x); + exp = (hx & 0x7ff00000) >> 20; + + if ((exp == 0x7ff) && (hx & 0xf0000 || lx)) + return (1); + else + return (0); +} + +#endif /* _DOUBLE_IS_32BITS */ diff --git a/newlib/libm/mathfp/s_ldexp.c b/newlib/libm/mathfp/s_ldexp.c index 6da41284b..5ce2710ac 100644 --- a/newlib/libm/mathfp/s_ldexp.c +++ b/newlib/libm/mathfp/s_ldexp.c @@ -45,7 +45,7 @@ On underflow, <<ldexp>> and <<ldexpf>> return 0.0. On overflow, <<ldexp>> returns plus or minus <<HUGE_VAL>>. PORTABILITY -<<ldexp>> is ANSI. <<ldexpf>> is an extension. +<<ldexp>> is ANSI, <<ldexpf>> is an extension. */ diff --git a/newlib/libm/mathfp/s_logarithm.c b/newlib/libm/mathfp/s_logarithm.c index 3e07949c8..ee7c7069e 100644 --- a/newlib/libm/mathfp/s_logarithm.c +++ b/newlib/libm/mathfp/s_logarithm.c @@ -56,9 +56,8 @@ When <[x]> is negative, the returned value is <<-HUGE_VAL>> and <<matherr>>. PORTABILITY -<<log>> is ANSI. <<logf>> is an extension. - -<<log10>> is ANSI. <<log10f>> is an extension. +<<log>> is ANSI, <<logf>> is an extension. +<<log10>> is ANSI, <<log10f>> is an extension. */ diff --git a/newlib/libm/mathfp/s_mathcnst.c b/newlib/libm/mathfp/s_mathcnst.c index a847ee430..7865c7f78 100644 --- a/newlib/libm/mathfp/s_mathcnst.c +++ b/newlib/libm/mathfp/s_mathcnst.c @@ -12,13 +12,13 @@ ufloat z_hugeval_f = { 0x7f800000 }; ufloat z_infinity_f = { 0x7f800000 }; ufloat z_notanum_f = { 0xffd00000 }; -#ifdef __IEEE_BIG_ENDIAN +#ifdef ___IEEE_LITTLE_ENDIAN udouble z_hugeval = { 0x7ff00000, 0 }; udouble z_infinity = { 0x7ff00000, 0 }; udouble z_notanum = { 0xfff80000, 0 }; -#else /* __IEEE_LITTLE_ENDIAN */ +#else udouble z_hugeval = { 0, 0x7ff00000 }; udouble z_infinity = { 0, 0x7ff00000 }; udouble z_notanum = { 0, 0xfff80000 }; -#endif /* __IEEE_LITTLE_ENDIAN */ +#endif /* ___IEEE_LITTLE_ENDIAN */ diff --git a/newlib/libm/mathfp/s_pow.c b/newlib/libm/mathfp/s_pow.c index 90d9d0b5f..3514510d0 100644 --- a/newlib/libm/mathfp/s_pow.c +++ b/newlib/libm/mathfp/s_pow.c @@ -75,10 +75,9 @@ double pow (double x, double y) } } - if (x == 0.0) + if (x == 0.0 && y <= 0.0) { - if (y <= 0.0) - errno = EDOM; + errno = EDOM; } else if ((t = y * log (fabs (x))) >= BIGX) { diff --git a/newlib/libm/mathfp/sf_atangent.c b/newlib/libm/mathfp/sf_atangent.c index 7a8f0cebe..55a90063c 100644 --- a/newlib/libm/mathfp/sf_atangent.c +++ b/newlib/libm/mathfp/sf_atangent.c @@ -126,9 +126,9 @@ _DEFUN (atangentf, (float, float, float, int), if (arctan2) { - if (u < 0.0) + if (u < 0.0 || branch == 2) res = __PI - res; - if (v < 0.0) + if (v < 0.0 || branch == 1) res = -res; } else if (x < 0.0) diff --git a/newlib/libm/mathfp/sf_frexp.c b/newlib/libm/mathfp/sf_frexp.c index 7f25195c8..c2751f65c 100644 --- a/newlib/libm/mathfp/sf_frexp.c +++ b/newlib/libm/mathfp/sf_frexp.c @@ -24,17 +24,6 @@ float frexpf (float d, int *exp) float f; __int32_t wf, wd; - /* Check for special values. */ - switch (numtestf (d)) - { - case NAN: - case INF: - errno = EDOM; - case 0: - *exp = 0; - return (d); - } - GET_FLOAT_WORD (wd, d); /* Get the exponent. */ @@ -46,6 +35,16 @@ float frexpf (float d, int *exp) SET_FLOAT_WORD (f, wf); + /* Check for special values. */ + switch (numtestf (f)) + { + case NAN: + case INF: + errno = EDOM; + *exp = 0; + return (f); + } + return (f); } diff --git a/newlib/libm/mathfp/sf_isinf.c b/newlib/libm/mathfp/sf_isinf.c new file mode 100644 index 000000000..84ab3f71c --- /dev/null +++ b/newlib/libm/mathfp/sf_isinf.c @@ -0,0 +1,48 @@ + +/* @(#)z_isinff.c 1.0 98/08/13 */ +/****************************************************************** + * isinff + * + * Input: + * x - pointer to a floating point value + * + * Output: + * An integer that indicates if the number is infinite. + * + * Description: + * This routine returns an integer that indicates if the number + * passed in is infinite (1) or is finite (0). + * + *****************************************************************/ + +#include "fdlibm.h" +#include "zmath.h" + +int +_DEFUN (isinff, (float), + float x) +{ + __uint32_t wx; + int exp; + + GET_FLOAT_WORD (wx, x); + exp = (wx & 0x7f800000) >> 23; + + if ((exp == 0x7f8) && !(wx & 0xf0000)) + return (1); + else + return (0); +} + +#ifdef _DOUBLE_IS_32BITS + +int +_DEFUN (isinf, (double), + double x) +{ + return isinff ((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ + + diff --git a/newlib/libm/mathfp/sf_isnan.c b/newlib/libm/mathfp/sf_isnan.c new file mode 100644 index 000000000..ac557a6b8 --- /dev/null +++ b/newlib/libm/mathfp/sf_isnan.c @@ -0,0 +1,48 @@ + +/* @(#)z_isnanf.c 1.0 98/08/13 */ +/****************************************************************** + * isnanf + * + * Input: + * x - pointer to a floating point value + * + * Output: + * An integer that indicates if the number is NaN. + * + * Description: + * This routine returns an integer that indicates if the number + * passed in is NaN (1) or is finite (0). + * + *****************************************************************/ + +#include "fdlibm.h" +#include "zmath.h" + +int +_DEFUN (isnanf, (float), + float x) +{ + __int32_t wx; + int exp; + + GET_FLOAT_WORD (wx, x); + exp = (wx & 0x7f800000) >> 23; + + if ((exp == 0x7f8) && (wx & 0x7fffff)) + return (1); + else + return (0); +} + + +#ifdef _DOUBLE_IS_32BITS + +int +_DEFUN (isnan, (double), + double x) +{ + return isnanf((float) x); +} + +#endif /* defined(_DOUBLE_IS_32BITS) */ + diff --git a/newlib/libm/mathfp/sf_pow.c b/newlib/libm/mathfp/sf_pow.c index 489a71dd0..932e75dbb 100644 --- a/newlib/libm/mathfp/sf_pow.c +++ b/newlib/libm/mathfp/sf_pow.c @@ -29,10 +29,9 @@ float powf (float x, float y) } } - if (x == 0.0) + if (x == 0.0 && y <= 0.0) { - if (y <= 0.0) - errno = EDOM; + errno = EDOM; } else if ((t = y * log (fabsf (x))) >= BIGX) { diff --git a/newlib/libm/mathfp/w_jn.c b/newlib/libm/mathfp/w_jn.c index 14c2225f0..bd7878104 100644 --- a/newlib/libm/mathfp/w_jn.c +++ b/newlib/libm/mathfp/w_jn.c @@ -13,7 +13,7 @@ /* FUNCTION -<<jN>>, <<jNf>>, <<yN>>, <<yNf>>---Bessel functions +<<jN>>,<<jNf>>,<<yN>>,<<yNf>>---Bessel functions INDEX j0 |