Commit graph

24 commits

Author SHA1 Message Date
Zack Weinberg c75772e3f0 Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl.
On platforms where long double used to have the same format as double,
but later switched to a different format (alpha, s390, sparc, and
powerpc), accessing the older behavior is possible and it happens via
__nldbl_* functions (not on the API, but accessible from header
redirection and from compat symbols).  These functions write to the
global flag __ldbl_is_dbl, which tells other functions that long double
variables should be handled as double.  This patch takes the first step
towards removing this global flag and creates __vstrfmon_l_internal,
which takes an explicit flags parameter.

This change arguably makes the generated code slightly worse on
architectures where __ldbl_is_dbl is never true; right now, on those
architectures, it's a compile-time constant; after this change, the
compiler could theoretically prove that __vstrfmon_l_internal was
never called with a nonzero flags argument, but it would probably need
LTO to do it.  This is not performance critical code and I tend to
think that the maintainability benefits of removing action at a
distance are worth it.  However, we _could_ wrap the runtime flag
check with a macro that was defined to ignore its argument and always
return false on architectures where __ldbl_is_dbl is never true, if
people think the codegen benefits are important.

Tested for powerpc and powerpc64le.
2018-11-16 09:21:14 -02:00
Joseph Myers a19876214a Fix libnldbl_nonshared.a references to internal libm symbols (bug 23735).
The redirection of built-in functions such as sqrt in include/math.h
applies when the wrappers for those functions in libnldbl_nonshared.a
are built, resulting in references to internal names such as
__ieee754_sqrt that aren't actually exported from the shared libm.
(This applies for sqrt in 2.28, also for the round-to-integer
functions in current master because of my changes there.)  This patch
arranges for NO_MATH_REDIRECT to be used for all the affected
functions, and adds a test for those functions in
libnldbl_nonshared.a.

(We could of course choose to obsolete libnldbl_nonshared.a and
require that people building with -mlong-double-64 either include the
relevant headers and have a compiler supporting asm redirection, or
have some other means of achieving that redirection at compile time if
not including those headers.  But while we have libnldbl_nonshared.a,
it seems appropriate to fix such bugs in it.)

Tested for powerpc, and with build-many-glibcs.py.

	[BZ #23735]
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NO_MATH_REDIRECT):
	Define.
	* sysdeps/ieee754/ldbl-opt/test-nldbl-redirect.c: New file.
	* sysdeps/ieee754/ldbl-opt/Makefile [$(subdir) = math] (tests):
	Add test-nldbl-redirect.
	[$(subdir) = math] (CFLAGS-test-nldbl-redirect.c): New variable.
	[$(subdir) = math] ($(objpfx)test-nldbl-redirect): Depend on
	$(objpfx)libnldbl_nonshared.a.
2018-10-04 12:16:05 +00:00
Joseph Myers 632a6cbe44 Add narrowing divide functions.
This patch adds the narrowing divide functions from TS 18661-1 to
glibc's libm: fdiv, fdivl, ddivl, f32divf64, f32divf32x, f32xdivf64
for all configurations; f32divf64x, f32divf128, f64divf64x,
f64divf128, f32xdivf64x, f32xdivf128, f64xdivf128 for configurations
with _Float64x and _Float128; __nldbl_ddivl for ldbl-opt.

The changes are mostly essentially the same as for the other narrowing
functions, so the description of those generally applies to this patch
as well.

Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft
float) and powerpc, and with build-many-glibcs.py.

	* math/Makefile (libm-narrow-fns): Add div.
	(libm-test-funcs-narrow): Likewise.
	* math/Versions (GLIBC_2.28): Add narrowing divide functions.
	* math/bits/mathcalls-narrow.h (div): Use __MATHCALL_NARROW.
	* math/gen-auto-libm-tests.c (test_functions): Add div.
	* math/math-narrow.h (CHECK_NARROW_DIV): New macro.
	(NARROW_DIV_ROUND_TO_ODD): Likewise.
	(NARROW_DIV_TRIVIAL): Likewise.
	* sysdeps/ieee754/float128/float128_private.h (__fdivl): New
	macro.
	(__ddivl): Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fdiv and
	ddiv.
	(CFLAGS-nldbl-ddiv.c): New variable.
	(CFLAGS-nldbl-fdiv.c): Likewise.
	* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
	__nldbl_ddivl.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_ddivl): New
	prototype.
	* manual/arith.texi (Misc FP Arithmetic): Document fdiv, fdivl,
	ddivl, fMdivfN, fMdivfNx, fMxdivfN and fMxdivfNx.
	* math/auto-libm-test-in: Add tests of div.
	* math/auto-libm-test-out-narrow-div: New generated file.
	* math/libm-test-narrow-div.inc: New file.
	* sysdeps/i386/fpu/s_f32xdivf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_f32xdivf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fdiv.c: Likewise.
	* sysdeps/ieee754/float128/s_f32divf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64divf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64xdivf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_ddivl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_f64xdivf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fdivl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_ddivl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fdivl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_ddivl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fdivl.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-ddiv.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-fdiv.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_ddivl.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fdiv.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fdivl.c: Likewise.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2018-05-17 00:40:52 +00:00
Joseph Myers 69a01461ee Add narrowing multiply functions.
This patch adds the narrowing multiply functions from TS 18661-1 to
glibc's libm: fmul, fmull, dmull, f32mulf64, f32mulf32x, f32xmulf64
for all configurations; f32mulf64x, f32mulf128, f64mulf64x,
f64mulf128, f32xmulf64x, f32xmulf128, f64xmulf128 for configurations
with _Float64x and _Float128; __nldbl_dmull for ldbl-opt.

The changes are mostly essentially the same as for the narrowing add
functions, so the description of those generally applies to this patch
as well.  f32xmulf64 for i386 cannot use precision control as used for
add and subtract, because that would result in double rounding for
subnormal results, so that uses round-to-odd with long double
intermediate result instead.  The soft-fp support involves adding a
new FP_TRUNC_COOKED since soft-fp multiplication uses cooked inputs
and outputs.

Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft
float) and powerpc, and with build-many-glibcs.py.

	* math/Makefile (libm-narrow-fns): Add mul.
	(libm-test-funcs-narrow): Likewise.
	* math/Versions (GLIBC_2.28): Add narrowing multiply functions.
	* math/bits/mathcalls-narrow.h (mul): Use __MATHCALL_NARROW.
	* math/gen-auto-libm-tests.c (test_functions): Add mul.
	* math/math-narrow.h (CHECK_NARROW_MUL): New macro.
	(NARROW_MUL_ROUND_TO_ODD): Likewise.
	(NARROW_MUL_TRIVIAL): Likewise.
	* soft-fp/op-common.h (FP_TRUNC_COOKED): Likewise.
	* sysdeps/ieee754/float128/float128_private.h (__fmull): New
	macro.
	(__dmull): Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fmul and
	dmul.
	(CFLAGS-nldbl-dmul.c): New variable.
	(CFLAGS-nldbl-fmul.c): Likewise.
	* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
	__nldbl_dmull.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_dmull): New
	prototype.
	* manual/arith.texi (Misc FP Arithmetic): Document fmul, fmull,
	dmull, fMmulfN, fMmulfNx, fMxmulfN and fMxmulfNx.
	* math/auto-libm-test-in: Add tests of mul.
	* math/auto-libm-test-out-narrow-mul: New generated file.
	* math/libm-test-narrow-mul.inc: New file.
	* sysdeps/i386/fpu/s_f32xmulf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_f32xmulf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fmul.c: Likewise.
	* sysdeps/ieee754/float128/s_f32mulf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64mulf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64xmulf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_dmull.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_f64xmulf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fmull.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_dmull.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fmull.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_dmull.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fmull.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-dmul.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-fmul.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_dmull.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fmul.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fmull.c: Likewise.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2018-05-16 00:05:28 +00:00
Joseph Myers 8d3f9e85cf Add narrowing subtract functions.
This patch adds the narrowing subtract functions from TS 18661-1 to
glibc's libm: fsub, fsubl, dsubl, f32subf64, f32subf32x, f32xsubf64
for all configurations; f32subf64x, f32subf128, f64subf64x,
f64subf128, f32xsubf64x, f32xsubf128, f64xsubf128 for configurations
with _Float64x and _Float128; __nldbl_dsubl for ldbl-opt.

The changes are essentially the same as for the narrowing add
functions, so the description of those generally applies to this patch
as well.

Tested for x86_64, x86, mips64 (all three ABIs, both hard and soft
float) and powerpc, and with build-many-glibcs.py.

	* math/Makefile (libm-narrow-fns): Add sub.
	(libm-test-funcs-narrow): Likewise.
	* math/Versions (GLIBC_2.28): Add narrowing subtract functions.
	* math/bits/mathcalls-narrow.h (sub): Use __MATHCALL_NARROW.
	* math/gen-auto-libm-tests.c (test_functions): Add sub.
	* math/math-narrow.h (CHECK_NARROW_SUB): New macro.
	(NARROW_SUB_ROUND_TO_ODD): Likewise.
	(NARROW_SUB_TRIVIAL): Likewise.
	* sysdeps/ieee754/float128/float128_private.h (__fsubl): New
	macro.
	(__dsubl): Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fsub and
	dsub.
	(CFLAGS-nldbl-dsub.c): New variable.
	(CFLAGS-nldbl-fsub.c): Likewise.
	* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
	__nldbl_dsubl.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_dsubl): New
	prototype.
	* manual/arith.texi (Misc FP Arithmetic): Document fsub, fsubl,
	dsubl, fMsubfN, fMsubfNx, fMxsubfN and fMxsubfNx.
	* math/auto-libm-test-in: Add tests of sub.
	* math/auto-libm-test-out-narrow-sub: New generated file.
	* math/libm-test-narrow-sub.inc: New file.
	* sysdeps/i386/fpu/s_f32xsubf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_f32xsubf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fsub.c: Likewise.
	* sysdeps/ieee754/float128/s_f32subf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64subf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64xsubf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_dsubl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_f64xsubf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fsubl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_dsubl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fsubl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_dsubl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fsubl.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-dsub.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-fsub.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_dsubl.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fsub.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fsubl.c: Likewise.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2018-03-20 00:34:52 +00:00
Joseph Myers d8742dd82f Add narrowing add functions.
This patch adds the narrowing add functions from TS 18661-1 to glibc's
libm: fadd, faddl, daddl, f32addf64, f32addf32x, f32xaddf64 for all
configurations; f32addf64x, f32addf128, f64addf64x, f64addf128,
f32xaddf64x, f32xaddf128, f64xaddf128 for configurations with
_Float64x and _Float128; __nldbl_daddl for ldbl-opt.  As discussed for
the build infrastructure patch, tgmath.h support is deliberately
deferred, and FP_FAST_* macros are not applicable without optimized
function implementations.

Function implementations are added for all relevant pairs of formats
(including certain cases of a format and itself where more than one
type has that format).  The main implementations use round-to-odd, or
a trivial computation in the case where both formats are the same or
where the wider format is IBM long double (in which case we don't
attempt to be correctly rounding).  The sysdeps/ieee754/soft-fp
implementations use soft-fp, and are used automatically for
configurations without exceptions and rounding modes by virtue of
existing Implies files.  As previously discussed, optimized versions
for particular architectures are possible, but not included.

i386 gets a special version of f32xaddf64 to avoid problems with
double rounding (similar to the existing fdim version), since this
function must round just once without an intermediate rounding to long
double.  (No such special version is needed for any other function,
because the nontrivial functions use round-to-odd, which does the
intermediate computation with the rounding mode set to round-to-zero,
and double rounding is OK except in round-to-nearest mode, so is OK
for that intermediate round-to-zero computation.)  mul and div will
need slightly different special versions for i386 (using round-to-odd
on long double instead of precision control) because of the
possibility of inexact intermediate results in the subnormal range for
double.

To reduce duplication among the different function implementations,
math-narrow.h gets macros CHECK_NARROW_ADD, NARROW_ADD_ROUND_TO_ODD
and NARROW_ADD_TRIVIAL.

In the trivial cases and for any architecture-specific optimized
implementations, the overhead of the errno setting might be
significant, but I think that's best handled through compiler built-in
functions rather than providing separate no-errno versions in glibc
(and likewise there are no __*_finite entry points for these function
provided, __*_finite effectively being no-errno versions at present in
most cases).

Tested for x86_64 and x86, with both GCC 6 and GCC 7.  Tested for
mips64 (all three ABIs, both hard and soft float) and powerpc with GCC
7.  Tested with build-many-glibcs.py with both GCC 6 and GCC 7.

	* math/Makefile (libm-narrow-fns): Add add.
	(libm-test-funcs-narrow): Likewise.
	* math/Versions (GLIBC_2.28): Add narrowing add functions.
	* math/bits/mathcalls-narrow.h (add): Use __MATHCALL_NARROW .
	* math/gen-auto-libm-tests.c (test_functions): Add add.
	* math/math-narrow.h (CHECK_NARROW_ADD): New macro.
	(NARROW_ADD_ROUND_TO_ODD): Likewise.
	(NARROW_ADD_TRIVIAL): Likewise.
	* sysdeps/ieee754/float128/float128_private.h (__faddl): New
	macro.
	(__daddl): Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fadd and
	dadd.
	(CFLAGS-nldbl-dadd.c): New variable.
	(CFLAGS-nldbl-fadd.c): Likewise.
	* sysdeps/ieee754/ldbl-opt/Versions (GLIBC_2.28): Add
	__nldbl_daddl.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl_daddl): New
	prototype.
	* manual/arith.texi (Misc FP Arithmetic): Document fadd, faddl,
	daddl, fMaddfN, fMaddfNx, fMxaddfN and fMxaddfNx.
	* math/auto-libm-test-in: Add tests of add.
	* math/auto-libm-test-out-narrow-add: New generated file.
	* math/libm-test-narrow-add.inc: New file.
	* sysdeps/i386/fpu/s_f32xaddf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_f32xaddf64.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fadd.c: Likewise.
	* sysdeps/ieee754/float128/s_f32addf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64addf128.c: Likewise.
	* sysdeps/ieee754/float128/s_f64xaddf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_daddl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_f64xaddf128.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_faddl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_daddl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_faddl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_daddl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_faddl.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-dadd.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-fadd.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_daddl.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_fadd.c: Likewise.
	* sysdeps/ieee754/soft-fp/s_faddl.c: Likewise.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/mach/hurd/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2018-02-10 02:08:43 +00:00
Zack Weinberg 63fb8f9aa9 Post-cleanup 2: minimize _G_config.h.
Nearly everything in _G_config.h is either junk or more appropriately
defined elsewhere:

 * _G_fpos_t, _G_fpos64_t, and _G_BUFSIZ are already completely unused.
 * All remaining uses of _G_va_list have been changed to __gnuc_va_list.
 * The definition of _G_HAVE_ST_BLKSIZE/_IO_HAVE_ST_BLKSIZE has
   been inlined into its sole use.
 * The complete definition of _G_iconv_t has been moved to libio.h and
   renamed _IO_iconv_t (all actual users used that name).
 * _G_IO_IO_FILE_VERSION is vestigial; some code cares whether
   _IO_stdin_used exists, but nothing looks at its value.  I've
   preserved the value as a hardwired constant in csu/init.c.
   This means csu/init.c no longer needs to include anything.
 * Many of the headers included by _G_config.h were already being
   included directly by either either libio.h or stdio.h; the
   remaining ones were moved to libio.h.
 * _G_HAVE_MREMAP is still relevant, because mremap genuinely is a
   Linux extension; it's not in POSIX and as far as I can tell it's
   not available on the Hurd either.  I also preserved _G_HAVE_MMAP,
   since it's conceivable someone would want to port glibc to a
   MMU-less, mmap-less environment in the future.  Both are now always
   defined to 1/0 as is the current convention, instead of the older
   1/undef convention.  These are the only symbols still defined in
   _G_config.h.
 * The actual inclusion of _G_config.h moves from libio.h to libioP.h,
   as this is where a potential override of _G_HAVE_MMAP happens.
 * The #ifdef logic in libioP.h controlling _IO_JUMPS_OFFSET has been
   simplified.

After this patch, the only surviving _G_ symbols are the struct tag
names _G_fpos_t and _G_fpos64_t, which are preserved for the sake of
C++ mangled names in applications, and _G_HAVE_MMAP and _G_HAVE_MREMAP,
which do not seem worth renaming.

Installed stripped libraries are unchanged by this patch.

	* bits/_G_config.h: Move back to sysdeps/generic/_G_config.h.
	Delete all contents except for definitions of _G_HAVE_MMAP and
	_G_HAVE_MREMAP.  Add commentary explaining those two symbols.
	* sysdeps/unix/sysv/linux/bits/_G_config.h: Move back to
	sysdeps/unix/sysv/linux/_G_config.h.  Make same content
	change as above.

	* libio/libio.h: Don't include bits/_G_config.h here.
	Include stddef.h with __need_wchar_t defined.  Include
	bits/types/__mbstate_t.h, bits/types/wint_t.h, and gconv.h.
	Define _IO_iconv_t here, directly.
	Don't define _IO_HAVE_ST_BLKSIZE.
	* libio/libioP.h: Include _G_config.h here.  Move include of
	shlib-compat.h up with rest of includes.  Simplify conditionals
	controlling definition of _IO_JUMPS_OFFSET.

	* csu/init.c: Remove always-true #if around entire file.
	Don't include stdio.h.  Set _IO_stdin_used to hardwired
	constant 0x20001, and update commentary.
	* include/stdio.h, sysdeps/ieee754/ldbl-opt/nldbl-compat.h:
	Replace all uses of _G_va_list with __gnuc_va_list.
	* libio/filedoalloc.c: Use #if defined _STATBUF_ST_BLKSIZE
	instead of #if _IO_HAVE_ST_BLKSIZE.
	* libio/fileops.c: Test _G_HAVE_MREMAP with #if, not #ifdef.
	* libio/iofdopen.c, libio/iofopen.c: Test _G_HAVE_MMAP with #if,
	not #ifdef.
2018-02-07 10:10:32 -05:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Joseph Myers 423c2b9d08 Add fromfp functions.
TS 18661-1 defines fromfp functions (fromfp, fromfpx, ufromfp,
ufromfpx, and float and long double variants) to convert from
floating-point to an integer type with any signedness and any given
width up to that of intmax_t, in any of the five IEEE rounding modes
(the usual four for binary floating point, plus rounding to nearest
with ties rounding away from zero), with control of whether in-range
non-integer values should result in the "inexact" exception being
raised.  This patch implements these functions for glibc.

These implementations are (apart from raising exceptions) pure integer
implementations; it's entirely possible optimized versions could be
devised for some architectures.  A common math/fromfp.h header
provides various common helper code that can readily be shared between
the implementations for different types.  For each type, the bulk of
the implementation is also shared between the four functions, with
wrappers that define UNSIGNED and INEXACT macros appropriately before
including the main implementation.

As the functions return intmax_t and uintmax_t without math.h being
allowed to expose those typedef names, they are declared using
__intmax_t and __uintmax_t as obtained from <bits/types.h>.

The FP_INT_* rounding direction macros are defined as ascending
integers in the order the names are listed in the TS; I see no
significant value in allowing architectures to vary the values of
them.

The libm-test machinery is duly adapted to handle unsigned int
arguments, and intmax_t and uintmax_t results.  Because each test
input is generally tested for four functions, five rounding modes and
several different widths, the libm-test.inc additions are very large.
Thus, the diffs in the body of this message exclude the libm-test.inc
changes, with the full patch being attached gzipped.  The bulk of the
new tests were generated (expanded from a test input plus rounding
results and information about where it lies in the relevant interval
between integers, to libm-test tests for all relevant combinations of
function, rounding direction and width) by a script that's included in
the patch as math/gen-fromfp-tests.py (input data
math/gen-fromfp-tests-inputs); as an ad hoc script that's not really
expected to be rerun, it's not very polished, but it's at least
plausibly useful for adding any further tests for these functions in
future.  I may split the libm-test tests up by function in future (so
both libm-test.inc and auto-libm-test-out are split into separate
files, and the tests for each function are also built and run
separately), but not for 2.25.

For no obvious reason, adding tgmath tests for the new functions
resulted in -Wuninitialized errors from test-tgmath.c about the
variable i being used uninitialized.  Those errors were correct - the
variable is read by the frexp version in test-tgmath.c (where real
frexp would write through that pointer instead of reading it) - but I
don't know why this patch would result in the pre-existing issue being
newly detected.  The patch initializes the variable to avoid those
errors.

With these changes, glibc 2.25 should have all the library features
from TS 18661-1 other than the functions that round result to narrower
type (and constant rounding directions, but I'm considering those
mainly a compiler feature not a library one).

Tested for x86_64, x86, mips64 and powerpc.

	* math/bits/mathcalls.h [__GLIBC_USE (IEC_60559_BFP_EXT)]
	(fromfp): New declaration.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfpx): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfp): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfpx): Likewise.
	* math/tgmath.h (__TGMATH_TERNARY_FIRST_REAL_RET_ONLY): New macro.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfp): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfp): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (fromfpx): Likewise.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (ufromfpx): Likewise.
	* math/math.h: Include <bits/types.h>.
	[__GLIBC_USE (IEC_60559_BFP_EXT)] (FP_INT_UPWARD): New enum
	constant and macro.
	(FP_INT_DOWNWARD): Likewise.
	(FP_INT_TOWARDZERO): Likewise.
	(FP_INT_TONEARESTFROMZERO): Likewise.
	(FP_INT_TONEAREST): Likewise.
	* math/Versions (fromfp): New libm symbol at version GLIBC_2.25.
	(fromfpf): Likewise.
	(fromfpl): Likewise.
	(ufromfp): Likewise.
	(ufromfpf): Likewise.
	(ufromfpl): Likewise.
	(fromfpx): Likewise.
	(fromfpxf): Likewise.
	(fromfpxl): Likewise.
	(ufromfpx): Likewise.
	(ufromfpxf): Likewise.
	(ufromfpxl): Likewise.
	* math/Makefile (libm-calls): Add s_fromfpF, s_ufromfpF,
	s_fromfpxF and s_ufromfpxF.
	* math/gen-fromfp-tests.py: New file.
	* math/gen-fromfp-tests-inputs: Likewise.
	* math/libm-test.inc: Include <stdint.h>
	(check_intmax_t): New function.
	(check_uintmax_t): Likewise.
	(struct test_fiu_M_data): New type.
	(struct test_fiu_U_data): Likewise.
	(RUN_TEST_fiu_M): New macro.
	(RUN_TEST_LOOP_fiu_M): Likewise.
	(RUN_TEST_fiu_U): Likewise.
	(RUN_TEST_LOOP_fiu_U): Likewise.
	(fromfp_test_data): New array.
	(fromfp_test): New function.
	(fromfpx_test_data): New array.
	(fromfpx_test): New function.
	(ufromfp_test_data): New array.
	(ufromfp_test): New function.
	(ufromfpx_test_data): New array.
	(ufromfpx_test): New function.
	(main): Call fromfp_test, fromfpx_test, ufromfp_test and
	ufromfpx_test.
	* math/gen-libm-test.pl (parse_args): Handle u, M and U descriptor
	characters.
	* math/test-tgmath-ret.c: Include <stdint.h>.
	(rm): New variable.
	(width): Likewise.
	(CHECK_RET_CONST_TYPE): Take extra arguments and pass them to
	called function.
	(CHECK_RET_CONST_FLOAT): Take extra arguments and pass them to
	CHECK_RET_CONST_TYPE.
	(CHECK_RET_CONST_DOUBLE): Likewise.
	(CHECK_RET_CONST_LDOUBLE): Likewise.
	(CHECK_RET_CONST): Take extra arguments and pass them to calls
	macros.
	(fromfp): New CHECK_RET_CONST call.
	(ufromfp): Likewise.
	(fromfpx): Likewise.
	(ufromfpx): Likewise.
	(do_test): Call check_return_fromfp, check_return_ufromfp,
	check_return_fromfpx and check_return_ufromfpx.
	* math/test-tgmath.c: Include <stdint.h>
	(NCALLS): Increase to 138.
	(F(compile_test)): Initialize i.  Call fromfp functions.
	(F(fromfp)): New function.
	(F(fromfpx)): Likewise.
	(F(ufromfp)): Likewise.
	(F(ufromfpx)): Likewise.
	* manual/arith.texi (Rounding Functions): Document FP_INT_UPWARD,
	FP_INT_DOWNWARD, FP_INT_TOWARDZERO, FP_INT_TONEARESTFROMZERO,
	FP_INT_TONEAREST, fromfp, fromfpf, fromfpl, ufromfp, ufromfpf,
	ufromfpl, fromfpx, fromfpxf, fromfpxl, ufromfpx, ufromfpxf and
	ufromfpxl.
	* manual/libm-err-tab.pl (@all_functions): Add fromfp, fromfpx,
	ufromfp and ufromfpx.
	* math/fromfp.h: New file.
	* sysdeps/ieee754/dbl-64/s_fromfp.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fromfp_main.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_fromfpx.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_ufromfp.c: Likewise.
	* sysdeps/ieee754/dbl-64/s_ufromfpx.c: Likewise.
	* sysdeps/ieee754/flt-32/s_fromfpf.c: Likewise.
	* sysdeps/ieee754/flt-32/s_fromfpf_main.c: Likewise.
	* sysdeps/ieee754/flt-32/s_fromfpxf.c: Likewise.
	* sysdeps/ieee754/flt-32/s_ufromfpf.c: Likewise.
	* sysdeps/ieee754/flt-32/s_ufromfpxf.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fromfpl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fromfpl_main.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_fromfpxl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_ufromfpl.c: Likewise.
	* sysdeps/ieee754/ldbl-128/s_ufromfpxl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fromfpl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fromfpl_main.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_fromfpxl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_ufromfpl.c: Likewise.
	* sysdeps/ieee754/ldbl-128ibm/s_ufromfpxl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fromfpl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fromfpl_main.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_fromfpxl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_ufromfpl.c: Likewise.
	* sysdeps/ieee754/ldbl-96/s_ufromfpxl.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add fromfp,
	ufromfp, fromfpx and ufromfpx.
	(CFLAGS-nldbl-fromfp.c): New variable.
	(CFLAGS-nldbl-fromfpx.c): Likewise.
	(CFLAGS-nldbl-ufromfp.c): Likewise.
	(CFLAGS-nldbl-ufromfpx.c): Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h: Include <stdint.h>.
	* sysdeps/ieee754/ldbl-opt/nldbl-fromfp.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fromfpx.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-ufromfp.c: Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-ufromfpx.c: Likewise.
	* sysdeps/nacl/libm.abilist: Update.
	* sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist:
	Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2016-12-31 00:40:59 +00:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper dff3751503 * include/stdio.h (__asprintf_chk, __dprintf_chk,
__obstack_printf_chk): New prototypes.
	(__vasprintf_chk, __vdprintf_chk,
	__obstack_vprintf_chk): Likewise.
	Add libc_hidden_proto.
	* libio/obprintf.c
	(_IO_obstack_jumps): No longer static, add attribute_hidden.
	* libio/bits/stdio-ldbl.h (__asprintf_chk, __dprintf_chk,
	__obstack_printf_chk, __vasprintf_chk, __vdprintf_chk,
	__obstack_vprintf_chk): Add __LDBL_REDIR_DECL.
	* libio/bits/stdio2.h (__asprintf_chk, __dprintf_chk,
	__obstack_printf_chk, __vasprintf_chk, __vdprintf_chk,
	__obstack_vprintf_chk): New prototypes.
	(asprintf, __asprintf, dprintf, obstack_printf, vasprintf, vdprintf,
	obstack_vprintf): New inlines.
	* debug/dprintf_chk.c: New file.
	* debug/vdprintf_chk.c: New file.
	* debug/asprintf_chk.c: New file.
	* debug/vasprintf_chk.c: New file.
	* debug/obprintf_chk.c: New file.
	* debug/tst-chk1.c (do_test): Add asprintf and obstack_printf tests.
	* debug/Versions (__asprintf_chk, __dprintf_chk, __obstack_printf_chk,
	__vasprintf_chk, __vdprintf_chk, __obstack_vprintf_chk): Export
	@@GLIBC_2.8.
	* debug/Makefile: Build asprintf_chk, vasprintf_chk, dprintf_chk,
	vdprintf_chk and obprintf_chk, set CFLAGS for them.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c (__nldbl___vasprintf_chk,
	__nldbl___vdprintf_chk, __nldbl___obstack_vprintf_chk): Add
	libc_hidden_proto.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl___vasprintf_chk,
	__nldbl___vdprintf_chk, __nldbl___obstack_vprintf_chk): New prototypes.
	* sysdeps/ieee754/ldbl-opt/Versions (__nldbl___asprintf_chk,
	__nldbl___vasprintf_chk, __nldbl___dprintf_chk, __nldbl___vdprintf_chk,
	__nldbl___obstack_printf_chk, __nldbl___obstack_vprintf_chk): Export
	@@GLIBC_2.8.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add asprintf_chk,
	vasprintf_chk, dprintf_chk, vdprintf_chk, obstack_printf_chk and
	obstack_vprintf_chk.
	* sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c: New file.
2008-03-05 07:05:13 +00:00
Ulrich Drepper 874aa52349 * include/stdio.h (__isoc99_fscanf, __isoc99_scanf,
__isoc99_sscanf, __isoc99_vscanf): New prototypes.
	(__isoc99_vsscanf, __isoc99_vfscanf): New prototypes, add
	libc_hidden_proto.
	* include/wchar.h (__isoc99_fwscanf, __isoc99_wscanf,
	__isoc99_swscanf, __isoc99_vwscanf): New prototypes.
	(__isoc99_vswscanf, __isoc99_vfwscanf): New prototypes,
	add libc_hidden_proto.
	* libio/stdio.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/wchar.h (fwscanf, wscanf, swscanf, vfwscanf, vwscanf,
	vswscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* libio/bits/stdio-ldbl.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __nldbl___isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/bits/wchar-ldbl.h (fwscanf, wscanf, swscanf, vfwscanf,
	vwscanf, vswscanf): Redirect to __nldbl___isoc99_* if strict
	ISO C99 or POSIX conformance requested.
	* stdio-common/Versions (libc): Export __isoc99_scanf@@GLIBC_2.7,
	__isoc99_vscanf@@GLIBC_2.7, __isoc99_fscanf@@GLIBC_2.7,
	__isoc99_vfscanf@@GLIBC_2.7, __isoc99_sscanf@@GLIBC_2.7
	and __isoc99_vsscanf@@GLIBC_2.7.
	* stdio-common/Makefile (routines): Add isoc99_scanf, isoc99_vscanf,
	isoc99_fscanf, isoc99_vfscanf, isoc99_sscanf and isoc99_vsscanf.
	(tests): Add scanf14.
	(CFLAGS-vfprintf.c, CFLAGS-fprintf.c, CFLAGS-printf.c,
	CFLAGS-vfwprintf.c, CFLAGS-vfscanf.c, CFLAGS-vfwscanf.c,
	CFLAGS-fscanf.c, CFLAGS-scanf.c, CFLAGS-isoc99_vfscanf.c,
	CFLAGS-isoc99_vscanf.c, CFLAGS-isoc99_fscanf.c,
	CFLAGS-isoc99_scanf.c): Add $(exceptions).
	(CFLAGS-scanf15.c): Add various -I paths to prevent the compiler
	from using internal headers.
	* wcsmbs/Versions (libc): Export __isoc99_wscanf@@GLIBC_2.7,
	__isoc99_vwscanf@@GLIBC_2.7, __isoc99_fwscanf@@GLIBC_2.7,
	__isoc99_vfwscanf@@GLIBC_2.7, __isoc99_swscanf@@GLIBC_2.7
	and __isoc99_vswscanf@@GLIBC_2.7.
	* wcsmbs/Makefile (routines): Add isoc99_wscanf, isoc99_vwscanf,
	isoc99_fwscanf, isoc99_vfwscanf, isoc99_swscanf and isoc99_vswscanf.
	(CFLAGS-isoc99_wscanf.c, CFLAGS-isoc99_fwscanf.c,
	CFLAGS-isoc99_vwscanf.c, CFLAGS-isoc99_vfwscanf.c): Add $(exceptions).
	(CPPFLAGS): Add -D_IO_MTSAFE_IO if needed.
	* stdio-common/isoc99_scanf.c: New file.
	* stdio-common/isoc99_vsscanf.c: New file.
	* stdio-common/isoc99_vscanf.c: New file.
	* stdio-common/isoc99_vfscanf.c: New file.
	* stdio-common/isoc99_fscanf.c: New file.
	* stdio-common/isoc99_sscanf.c: New file.
	* wcsmbs/isoc99_fwscanf.c: New file.
	* wcsmbs/isoc99_vswscanf.c: New file.
	* wcsmbs/isoc99_swscanf.c: New file.
	* wcsmbs/isoc99_wscanf.c: New file.
	* wcsmbs/isoc99_vwscanf.c: New file.
	* wcsmbs/isoc99_vfwscanf.c: New file.
	* libio/libio.h (_IO_FLAGS2_SCANF_STD): Define.
	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Also
	clear _IO_FLAGS2_SCANF_STD bit from _flags2.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Don't
	handle %as, %aS and %a[ if _IO_FLAGS2_SCANF_STD is set in _flags2.
	* stdio-common/scanf14.c: New test.
	* stdio-common/scanf15.c: New test.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
	isoc99_scanf, isoc99_fscanf, isoc99_sscanf,
	isoc99_vscanf, isoc99_vfscanf, isoc99_vsscanf,
	isoc99_wscanf, isoc99_fwscanf, isoc99_swscanf,
	isoc99_vwscanf, isoc99_vfwscanf and isoc99_vswscanf.
	* sysdeps/ieee754/ldbl-opt/Versions (libc): Export
	__nldbl___isoc99_scanf@@GLIBC_2.7,
	__nldbl___isoc99_fscanf@@GLIBC_2.7,
	__nldbl___isoc99_sscanf@@GLIBC_2.7,
	__nldbl___isoc99_vscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfscanf@@GLIBC_2.7,
	__nldbl___isoc99_vsscanf@@GLIBC_2.7,
	__nldbl___isoc99_wscanf@@GLIBC_2.7,
	__nldbl___isoc99_fwscanf@@GLIBC_2.7,
	__nldbl___isoc99_swscanf@@GLIBC_2.7,
	__nldbl___isoc99_vwscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfwscanf@@GLIBC_2.7
	and __nldbl___isoc99_vswscanf@@GLIBC_2.7.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__isoc99_scanf,
	__isoc99_fscanf, __isoc99_sscanf, __isoc99_vscanf,
	__isoc99_vfscanf, __isoc99_vsscanf, __isoc99_wscanf,
	__isoc99_fwscanf, __isoc99_swscanf, __isoc99_vwscanf,
	__isoc99_vfwscanf, __isoc99_vswscanf): Add NLDBL_DECL.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
	(__nldbl___isoc99_scanf, __nldbl___isoc99_fscanf,
	__nldbl___isoc99_sscanf, __nldbl___isoc99_vscanf,
	__nldbl___isoc99_vfscanf, __nldbl___isoc99_vsscanf,
	__nldbl___isoc99_wscanf, __nldbl___isoc99_fwscanf,
	__nldbl___isoc99_swscanf, __nldbl___isoc99_vwscanf,
	__nldbl___isoc99_vfwscanf, __nldbl___isoc99_vswscanf): New
	functions.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c: New file.

	* stdio-common/Makefile (tests): Add scanf13.
	(scanf13-ENV): New.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Handle
	m modifier followed by l.
	(STRING_ARG): Add width argument.
	(_IO_vfscanf_internal) <case L_('c')>: Handle %mc.
	<case L_('C')>: Handle %mlc and %mC.
	<case L_('s'), case L_('S'), case L_('[')>: Adjust STRING_ARG
	arguments.
	* stdio-common/scanf13.c: New test.

	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Clear
	the _IO_FLAGS2_FORTIFY bit from _flags2 rather than _flags.

	type and __THROW marker of splice, vmsplice, and tee.
2007-09-18 19:04:01 +00:00
Roland McGrath 926320aba6 * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_DECL): Don't try
attribute_hidden here.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c (vsyslog): Restore
	attribute_hidden here.
	* sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c (__asprintf): Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c (fprintf): Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c (qecvt): Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c (qfcvt): Likewise.
	* sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c (qgcvt): Likewise.

	* sysdeps/ieee754/ldbl-opt/configure.in: Use AC_TRY_COMPILE and
	verify __LONG_DOUBLE_128__ predefine.
	* sysdeps/ieee754/ldbl-opt/configure: Regenerated.
2006-01-14 22:08:18 +00:00
Roland McGrath 8c22dca38f (__nldbl___vstrfmon, __nldbl___vsyslog_chk): Restore missing decls. 2006-01-14 21:15:05 +00:00
Roland McGrath 54e98f69e0 * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_HIDDEN): Removed.
(NLDBL_DECL): Rewritten.
	Remove __THROW from NLDBL_DECL uses.
	Use NLDBL_DECL for __vstrfmon, __vstrfmon_l.

	* sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: Restore attribute_hidden.

2006-01-14  Jakub Jelinek  <jakub@redhat.com>

	* misc/sys/cdefs.h (__LDBL_REDIR1_DECL): Define.
	(__LDBL_REDIR_DECL): Stringize __nldbl and name.
	* stdlib/bits/monetary-ldbl.h: Remove pastos from wchar-ldbl.h.
	(strfmon, strfmon_l): Add __LDBL_REDIR_DECL.
	* stdlib/bits/stdlib-ldbl.h (strtold, strtold_l, __strtold_internal,
	qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): Use __LDBL_REDIR1_DECL
	instead of __LDBL_REDIR_DECL.
	* wcsmbs/bits/wchar-ldbl.h: Remove stale #if.
	(__LDBL_REDIR_WCHAR): Remove.
	(fwprintf, wprintf, swprintf, vfwprintf, vwprintf, vswprintf,
	fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf): Use
	__LDBL_REDIR_DECL instead of __LDBL_REDIR_WCHAR.
	(wcstold, wcstold_l, __wcstold_internal): Add __LDBL_REDIR1_DECL.
	* wcsmbs/wchar.h: Include bits/wchar-ldbl.h after bits/wchar2.h
	instead of before it.
	(wcstold inline): Move #ifndef __LDBL_COMPAT before
	extern keyword.
	* libio/bits/stdio-ldbl.h (__snprintf_chk, __vsnprintf_chk): Add
	__LDBL_REDIR_DECL.
	* misc/bits/syslog-ldbl.h (vsyslog): Protect with #ifdef __USE_BSD.
	(__syslog_chk, __vsyslog_chk): Add __LDBL_REDIR_DECL.

2006-01-14  Roland McGrath  <roland@redhat.com>
2006-01-14 20:33:13 +00:00
Roland McGrath 5c9c640889 * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NLDBL_DECL): Fix typo.
(NLDBL_HIDDEN): New macro.
	(NLDBL_DECL): Use it in place of attribute_hidden.
2006-01-14 13:03:48 +00:00
Roland McGrath c6251f036c * math/math.h [__NO_LONG_DOUBLE_MATH] (__nldbl_nexttowardf): New
prototype.
	(nexttowardf): Redirect to __nldbl_nexttowardf.
	(nexttoward): Redirect to nextafter.
	(__MATHDECL_2, __MATHDECL_1): Redirect *l functions to
	non-*l versions if __LONG_DOUBLE_MATH_OPTIONAL and
	__NO_LONG_DOUBLE_MATH.
	* math/complex.h (__MATHDECL_1): Likewise.
	* math/bits/mathcalls.h (nexttoward): Don't prototype if
	__LDBL_COMPAT.
	* misc/sys/cdefs.h: Include <bits/wordsize.h>.
	(__LDBL_COMPAT, __LDBL_REDIR1, __LDBL_REDIR, __LDBL_REDIR1_NTH,
	__LDBL_REDIR_NTH, __LDBL_REDIR_DECL): New macros.

	* libio/bits/stdio-ldbl.h: New file.
	* libio/Makefile (headers): Add it.
	* libio/stdio.h [__LDBL_COMPAT]: #include it.
	* libio/bits/libio-ldbl.h: New file.
	* libio/Makefile (headers): Add it.
	* libio/libio.h [__LDBL_COMPAT]: #include it.
	* libio/libioP.h: Include <math_ldbl_opt.h>.
	* include/wchar.h (__fwprintf, __vfwprintf): Fix commented out
	attribute.
	(__vfwprintf_chk): New prototype.  Add libc_hidden_proto.
	* wcsmbs/bits/wchar-ldbl.h: New file.
	* wcsmbs/Makefile (headers): Add it.
	* wcsmbs/wchar.h [__LDBL_COMPAT]: #include it.
	* wcsmbs/bits/wchar2.h (__vswprintf_alias): Removed.
	(vswprintf): Define as a macro rather than inline function.
	* stdio-common/bits/printf-ldbl.h: New file.
	* stdio-common/Makefile (headers): Add it.
	* stdio-common/printf.h [__LDBL_COMPAT]: #include it.
	* libio/fwprintf.c: Include libioP.h.
	(fwprintf): Use ldbl_weak_alias instead of weak_alias.
	* libio/fwscanf.c: Include libioP.h.
	(fwscanf): Rename to __fwscanf and add ldbl_strong_alias.
	* libio/iovdprintf.c (vdprintf): Use ldbl_weak_alias instead of
	weak_alias.
	* libio/iovsprintf.c (_IO_vsprintf): Rename to __IO_vsprintf,
	add ldbl_strong_alias and use INTDEF2 instead of INTDEF.
	(vsprintf): Use ldbl_weak_alias instead of weak_alias.
	* libio/iovsscanf.c (__vsscanf, vsscanf): Use ldbl_weak_alias
	instead of weak_alias.
	* libio/iovswscanf.c (vswscanf): Rename to __vswscanf,
	add ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.
	* libio/obprintf.c (obstack_printf, obstack_vprintf): Use
	ldbl_weak_alias instead of weak_alias.
	* libio/swprintf.c: Include libioP.h.
	(swprintf): Rename to __swprintf and add ldbl_strong_alias.
	* libio/swscanf.c: Include libioP.h.
	(swscanf): Rename to __swscanf and add ldbl_strong_alias.
	* libio/vasprintf.c (vasprintf): Use ldbl_weak_alias instead of
	weak_alias.
	* libio/vscanf.c (vscanf): Use ldbl_weak_alias instead of
	weak_alias.
	* libio/vsnprintf.c (__vsnprintf, vsnprintf): Use ldbl_weak_alias
	instead of weak_alias.
	* libio/vswprintf.c (__vswprintf): Remove alias.
	(vswprintf): Use ldbl_weak_alias instead of weak_alias.
	* libio/vwprintf.c: Include libioP.h.
	(vwprintf): Rename to __vwprintf and add ldbl_strong_alias.
	* libio/vwscanf.c (vwscanf): Rename to __vwscanf and add
	ldbl_strong_alias.
	* libio/wprintf.c: Include libioP.h.
	(wprintf): Rename to __wprintf and add ldbl_strong_alias.
	* libio/wscanf.c: Include libioP.h.
	(wscanf): Rename to __wscanf and add ldbl_strong_alias.
	* stdio-common/asprintf.c (__asprintf): Rename to ___asprintf, add
	ldbl_strong_alias and use INTDEF2 instead of INTDEF.
	(asprintf): Use ldbl_weak_alias instead of weak_alias.
	* stdio-common/dprintf.c (dprintf): Rename to __dprintf, add
	ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.
	* stdio-common/fprintf.c: Include libioP.h.
	(fprintf): Rename to __fprintf, add ldbl_strong_alias and
	use ldbl_hidden_def instead of libc_hidden_def.
	(_IO_fprintf): Use ldbl_weak_alias instead of weak_alias.
	* stdio-common/fscanf.c: Include libioP.h.
	(fscanf): Rename to __fscanf and add ldbl_strong_alias.
	* stdio-common/printf.c: Include libioP.h.
	(printf): Rename to __printf and add ldbl_strong_alias.
	(_IO_printf): Use ldbl_strong_alias instead of strong_alias.
	* stdio-common/printf_fp.c (__printf_fp): Rename to __printf_fp, add
	ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.
	* stdio-common/printf_size.c (printf_size): Rename to __printf_size
	and add ldbl_strong_alias.
	* stdio-common/scanf.c (scanf): Rename to __scanf and add
	ldbl_strong_alias.
	* stdio-common/snprintf.c (snprintf): Use ldbl_weak_alias instead of
	weak_alias.
	* stdio-common/sprintf.c (sprintf): Rename to __sprintf, add
	ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.
	(_IO_sprintf): Use ldbl_strong_alias instead of strong_alias.
	* stdio-common/sscanf.c: Include libioP.h instead of iolibio.h.
	(sscanf): Rename to __sscanf and add ldbl_strong_alias.
	* stdio-common/vfprintf.c (vfprintf): Define to
	_IO_vfprintf_internal.  Use ldbl_strong_alias instead.  Use
	ldbl_hidden_def instead of libc_hidden_def.
	(_IO_vfprintf_internal): Clear is_long_double if __ldbl_is_dbl,
	handle the argument as double if it is non-zero.
	(vfwprintf): Use ldbl_weak_alias instead of weak_alias.
	(_IO_vfprintf): Add ldbl_strong_alias.
	* stdio-common/vfscanf.c (_IO_vfscanf): Rename to
	_IO_vfscanf_internal, don't use strtold if __ldbl_is_dbl, add
	ldbl_strong_alias.
	(vfwscanf): Use ldbl_weak_alias instead of weak_alias.
	(__vfscanf): Rename to ___vfscanf, add ldbl_strong_alias and
	use ldbl_hidden_def instead of libc_hidden_def.
	(vfscanf): Use ldbl_weak_alias instead of weak_alias.
	* stdio-common/vprintf.c: Include libioP.h.
	(vprintf): Rename to __vprintf and add ldbl_strong_alias.
	* debug/fprintf_chk.c (__fprintf_chk): Rename to ___fprintf_chk
	and add ldbl_strong_alias.
	* debug/printf_chk.c (__printf_chk): Rename to ___printf_chk
	and add ldbl_strong_alias.
	* debug/snprintf_chk.c: Include libioP.h.
	(__snprintf_chk): Rename to ___snprintf_chk and add ldbl_strong_alias.
	* debug/sprintf_chk.c: Include libioP.h.
	(__sprintf_chk): Rename to ___sprintf_chk and add ldbl_strong_alias.
	* debug/vfprintf_chk.c (__vfprintf_chk): Rename to ___vfprintf_chk,
	add ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.
	* debug/vfwprintf_chk.c (__vfwprintf_chk): Add libc_hidden_def.
	* debug/vprintf_chk.c (__vprintf_chk): Rename to ___vprintf_chk
	and add ldbl_strong_alias.
	* debug/vsnprintf_chk.c (__vsnprintf_chk): Rename to ___vsnprintf_chk,
	add ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.
	* debug/vsprintf_chk.c (__vsprintf_chk): Rename to ___vsprintf_chk,
	add ldbl_strong_alias and use ldbl_hidden_def instead of
	libc_hidden_def.

	* stdlib/stdlib.h (strtold): Don't define inline if [!__LDBL_COMPAT].
	* wcsmbs/wchar.h (wcstold): Likewise.
	* stdlib/strtod_l.c: Include math_ldbl_opt.h.
	(____STRTOF_INTERNAL): Define.
	(INTERNAL (__STRTOF)): Rename to ____STRTOF_INTERNAL.
	(__STRTOF): Call ____STRTOF_INTERNAL instead.
	[LONG_DOUBLE_COMPAT] (strtold_l, wcstold_l, __strtold_l, __wcstold_l):
	Add compatibility symbols.
	* stdlib/strtod.c: Include math_ldbl_opt.h.
	[LONG_DOUBLE_COMPAT] (strtold, wcstold, __strtold_internal,
	__wcstold_internal): Add compatibility symbols.
	* stdlib/strtold.c: Include bits/wordsize.h, wchar.h.
	(NEW, NEW1): Define.
	(__new_strtold, __new_wcstold): New prototypes.
	(____new_strtold_internal, ____new_wcstold_internal): Likewise.
	Add libc_hidden_proto.
	(STRTOF): Define to NEW (*told).
	[__LONG_DOUBLE_MATH_OPTIONAL] (wcstold, strtold): Add
	long_double_symbol.
	[__LONG_DOUBLE_MATH_OPTIONAL] (__wcstold_internal,
	__strtold_internal): Likewise. Add libc_hidden_ver.

	* stdlib/bits/stdlib-ldbl.h: New file.
	* stdlib/Makefile (headers): Add it.
	* stdlib/stdlib.h [__LDBL_COMPAT]: #include it.
	* include/stdlib.h (ecvt_r, fcvt_r, qecvt_r, qfcvt_r): Remove
	libc_hidden_proto.
	(__ecvt, __fcvt, __gcvt, __ecvt_r, __fcvt_r, __qecvt, __qfcvt,
	__qgcvt, __qecvt_r, __qfcvt_r): New prototypes.
	* misc/efgcvt_r.c: Include shlib-compat.h.
	(LONG_DOUBLE_CVT): Define.
	(__APPEND, __APPEND2): Define.
	(*fcvt_r): Use __APPEND instead of APPEND.  Remove libc_hidden_def.
	(*ecvt_r): Likewise.
	(cvt_symbol): Define.  Use it on fcvt_r and ecvt_r.
	* misc/efgcvt.c: Include shlib-compat.h.
	(LONG_DOUBLE_CVT): Define.
	(__APPEND, __APPEND2): Define.
	(fcvt): Use __APPEND instead of APPEND.  Remove libc_hidden_def.
	(ecvt, gcvt): Likewise.
	(cvt_symbol): Define.  Use it on fcvt, ecvt and gcvt.

	* stdlib/bits/monetary-ldbl.h: New file.
	* stdlib/Makefile (headers): Add it.
	* stdlib/monetary.h [__LDBL_COMPAT]: #include it.
	* stdlib/strfmon.c: Include math_ldbl_opt.h.
	(strfmon): Rename to __strfmon and add ldbl_strong_alias.
	* stdlib/strfmon_l.c: Remove all traces of [!USE_IN_LIBIO].
	(__vstrfmon_l): Don't set is_long_double if __ldbl_is_dbl.
	(__strfmon_l): Rename to ___strfmon_l and add ldbl_strong_alias.
	(strfmon_l): Use ldbl_weak_alias instead of weak_alias.

	* misc/bits/syslog-ldbl.h: New file.
	* misc/Makefile (headers): Add it.
	* misc/sys/syslog.h [__LDBL_COMPAT]: #include it.
	* misc/syslog.c: Include math_ldbl_opt.h.
	(syslog): Rename to __syslog and add ldbl_strong_alias,
	use ldbl_hidden_def instead of libc_hidden_def.
	(vsyslog): Rename to __vsyslog and add ldbl_strong_alias,
	use ldbl_hidden_def instead of libc_hidden_def.

	* sysdeps/generic/math_ldbl_opt.h: New file.
	* math/w_j1l.c (j1l, y1l): Rename to __ prefixed variants.
	Add weak_alias.
	* math/w_j0l.c (j0l, y0l): Likewise.
	* math/w_jnl.c (jnl, ynl): Likewise.
	* sysdeps/ieee754/ldbl-96/s_nexttoward.c
	(__nexttowardl): Remove strong_alias.
	(nexttowardl): Remove weak_alias.
	* sysdeps/ieee754/ldbl-96/s_erfl.c
	(__erfl, __erfcl): Remove strong_alias.
	(erfl, erfcl): Remove weak_alias.

	* sysdeps/ieee754/ldbl-64-128/s_asinhl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_atanl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_cbrtl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_ceill.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_copysignl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_cosl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_erfl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_expm1l.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_fabsl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_finitel.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_floorl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_fpclassifyl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_frexpl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_ilogbl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_isinfl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_isnanl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_llrintl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_llroundl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_log1pl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_logbl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_lrintl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_lroundl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_modfl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_nextafterl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_nexttoward.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_nexttowardf.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_remquol.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_rintl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_roundl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_scalblnl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_scalbnl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_signbitl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_sincosl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_sinl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_tanhl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_tanl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/s_truncl.c: New file.
	* sysdeps/ieee754/ldbl-64-128/strtold_l.c: New file.
	* sysdeps/ieee754/ldbl-64-128/w_expl.c: New file.
	* sysdeps/ieee754/ldbl-opt/configure.in: New file.
	* sysdeps/ieee754/ldbl-opt/configure: New file.
	* sysdeps/ieee754/ldbl-opt/Makefile: New file.
	* sysdeps/ieee754/ldbl-opt/Versions: New file.
	* sysdeps/ieee754/ldbl-opt/cabs.c: New file.
	* sysdeps/ieee754/ldbl-opt/cabsl.c: New file.
	* sysdeps/ieee754/ldbl-opt/carg.c: New file.
	* sysdeps/ieee754/ldbl-opt/cargl.c: New file.
	* sysdeps/ieee754/ldbl-opt/cimag.c: New file.
	* sysdeps/ieee754/ldbl-opt/cimagl.c: New file.
	* sysdeps/ieee754/ldbl-opt/conj.c: New file.
	* sysdeps/ieee754/ldbl-opt/conjl.c: New file.
	* sysdeps/ieee754/ldbl-opt/creal.c: New file.
	* sysdeps/ieee754/ldbl-opt/creall.c: New file.
	* sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c: New file.
	* sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-acos.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-acosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-asin.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-asinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-atan.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-atan2.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-atanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cabs.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cacos.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-carg.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-casin.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-casinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-catan.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-catanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ccos.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ceil.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cexp.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cimag.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-clog.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-clog10.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-conj.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-copysign.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cos.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cpow.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-cproj.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-creal.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-csin.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-csinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ctan.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-drem.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-erf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-erfc.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-exp.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-exp10.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-exp2.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-expm1.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fabs.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fdim.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-finite.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-floor.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fma.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fmax.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fmin.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fmod.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-frexp.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-gamma.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-hypot.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isinf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isnan.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-j0.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-j1.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-jn.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-llrint.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-llround.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-log.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-log10.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-log1p.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-log2.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-logb.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-lrint.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-lround.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-modf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-nan.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-pow.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-pow10.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-printf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-remainder.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-remquo.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-rint.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-round.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-scalb.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-scanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-signbit.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-significand.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sin.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sincos.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-strtold.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-syslog.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-tan.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-tanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-trunc.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-y0.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-y1.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-yn.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_asinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_atan.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cacos.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cacosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cacoshl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cacosl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_casin.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_casinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_casinhl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_casinl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_catan.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_catanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_catanhl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_catanl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cbrt.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ccos.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ccosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ccoshl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ccosl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ceil.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cexp.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cexpl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_clog.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_clog10.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_clog10l.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_clogl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_copysign.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cpow.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cpowl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cproj.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_cprojl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_csin.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_csinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_csinhl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_csinl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_csqrt.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_csqrtl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ctan.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ctanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ctanhl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ctanl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_erf.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_expm1.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fabs.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fdim.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fdiml.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_finite.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_floor.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fma.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fmal.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fmax.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fmaxl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fmin.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_fminl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_frexp.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ilogb.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_isinf.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_isnan.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ldexp.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_ldexpl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_llrint.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_llround.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_log1p.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_logb.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_lrint.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_lround.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_modf.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_nan.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_nanl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_nearbyint.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_nextafter.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_remquo.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_rint.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_round.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_scalbln.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_scalbn.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_significand.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_significandl.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_sin.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_sincos.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_tan.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_tanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/s_trunc.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_acos.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_acosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_acoshl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_acosl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_asin.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_asinl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_atan2.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_atan2l.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_atanh.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_atanhl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_cosh.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_coshl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_drem.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_dreml.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_exp.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_exp10.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_exp10l.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_fmod.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_fmodl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_hypot.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_hypotl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_j0.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_j0l.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_j1.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_j1l.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_jn.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_jnl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_lgamma.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_lgamma_r.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_lgammal.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_lgammal_r.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_log.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_log10.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_log10l.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_log2.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_log2l.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_logl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_pow.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_powl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_remainder.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_remainderl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_scalb.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_scalbl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_sinh.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_sinhl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_sqrt.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_sqrtl.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_tgamma.c: New file.
	* sysdeps/ieee754/ldbl-opt/w_tgammal.c: New file.

	* sysdeps/unix/sysv/linux/sparc/bits/wordsize.h: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/Implies: New file.
	* sysdeps/sparc/sparc32/Implies: Move ldbl-128 first and flt-32
	after dbl-64.
	* sysdeps/unix/sysv/linux/sparc/sparc32/Versions (NLDBL_VERSION):
	%define this to to GLIBC_2.4.
	* sysdeps/sparc/sparc32/fpu/e_sqrtl.c: New file.
	* sysdeps/sparc/sparc32/fpu/s_fabs.c: New file.
	* sysdeps/sparc/sparc32/fpu/s_fabsf.S: New file.
	* sysdeps/sparc/sparc32/fpu/s_fabsl.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/q_qtoui.c: Removed.
	* sysdeps/sparc/sparc32/soft-fp/q_qtoux.c: Removed.
	* sysdeps/sparc/sparc32/soft-fp/q_qtox.c: Removed.
	* sysdeps/sparc/sparc32/soft-fp/q_uitoq.c: Removed.
	* sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c: Removed.
	* sysdeps/sparc/sparc32/soft-fp/q_xtoq.c: Removed.
	* sysdeps/sparc/sparc32/soft-fp/q_lltoq.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/q_qtoll.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/q_qtou.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/q_qtoull.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/q_utoq.c: New file.
	* sysdeps/sparc/sparc32/soft-fp/Versions: New file.
	* sysdeps/sparc/fpu/bits/mathinline.h (__unordered_cmp,
	__unordered_v9cmp): Define differently depending on
	-m32 -mlong-double-{64,128}.
	(__signbitl, sqrtl, __ieee754_sqrtl): New inlines.
	* sysdeps/sparc/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Remove.
	* sysdeps/sparc/sparc32/soft-fp/Makefile (sparc32-quad-routines):
	Set.
	(sysdep-routines): Add sparc32-quad-routines.
	* sysdeps/sparc/sparc32/soft-fp/sfp-machine.h: Include stdlib.h.
	(FP_HANDLE_EXCEPTIONS): Call ___Q_simulate_exceptions as a normal
	function.
	* sysdeps/sparc/sparc32/soft-fp/q_sqrt.c (__ieee754_sqrtl): New
	alias to _Q_sqrt.
	* sysdeps/sparc/sparc32/soft-fp/q_div.c (_Q_div): Fix a typo.
	* sysdeps/sparc/sparc64/soft-fp/sfp-machine.h: Include stdlib.h.
	* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.

	* libio/libio.h (_IO_vfscanf, _IO_vfprintf): Remove __THROW.
	(_IO_vfwscanf, _IO_vfwprintf): Likewise.
	* libio/libioP.h (_IO_vdprintf): Likewise.
2006-01-14 12:10:44 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00