public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Updated double -> long double glibc transition patch
@ 2006-01-13 21:56 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2006-01-13 21:56 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath, Dwayne Grant McConnell,
	Richard Henderson
  Cc: Glibc hackers

[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

Hi!

Attached is a new version of the double -> long double transition patch
(generic part and sparc32 stuff).  See e.g.
http://sources.redhat.com/ml/libc-alpha/2004-07/msg00026.html
http://sources.redhat.com/ml/libc-hacker/2004-03/msg00129.html
for earlier versions.
This version is far less invasive for the libio and stdio-common files.

Tested with the attached testcase (I wanted to test all interfaces there,
but got tired and so haven't finished all of them, but most.  If someone
volunteers to finish it, I'd appreciate it a lot, otherwise I'll play
with it next week.  The magic constants in there are some libm-test.inc
test values where applicable, or some made up ones, but the purpose of
the test is very different, it only wants to see if the desirable double
resp. long double implementation of the function is used) 8 times,
5 times without -D_FORTIFY_SOURCE=2, 5 times with it.
Always once compile/link/run against old glibc with -mlong-double-64,
once compile/link against old glibc with -mlong-double-64 and run
against new glibc, once compile/link/run against new glibc with
-mlong-double-64, once compile/link/run against new glibc with
-mlong-double-128 and once compile against old glibc, link against
new glibc with -lnldbl_nonshared in front of -lm and -lc and run
against new glibc.
The only 2 reported failures were exp2l with -mlong-double-128,
which fails because exp2l has for IEEE quad just a stub function
setting ENOSYS rather than real implementation (I'd say it would be
better to use a quick implementation using expl before we get a proper
sysdeps/ieee754/ldbl-128/e_exp2l.c, but that is not part of this patch).

	Jakub

[-- Attachment #2: libc-dbl2ldbl.patch --]
[-- Type: text/plain, Size: 358776 bytes --]

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

	* 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): Define.

	* libio/stdio.h (fprintf, printf, vfprintf, vprintf, vsprintf,
	vdprintf, dprintf, fscanf, scanf, vfscanf, vscanf): Add __LDBL_REDIR.
	(sprintf, snprintf, vsnprintf, vasprintf, __asprintf, asprintf,
	sscanf, vsscanf, obstack_printf, obstack_vprintf):
	Add __LDBL_REDIR_NTH.
	* libio/bits/stdio2.h (__sprintf_chk, __vsprintf_chk): Add
	__LDBL_REDIR_NTH.
	(__fprintf_chk, __printf_chk, __vfprintf_chk, __vprintf_chk): Add
	__LDBL_REDIR.
	* libio/libio.h (_IO_vfscanf, _IO_vfprintf, _IO_vfwscanf,
	_IO_vfwprintf): Add __LDBL_REDIR.
	* libio/libioP.h: Include math_ldbl_opt.h.
	(_IO_vdprintf): Remove __THROW.
	* include/wchar.h (__fwprintf, __vfwprintf): Fix commented out
	attribute.
	(__vfwprintf_chk): New prototype.  Add libc_hidden_proto.
	* wcsmbs/wchar.h (fwprintf, wprintf, vfwprintf, vwprintf, fwscanf,
	wscanf, vfwscanf, vwscanf): Add __LDBL_REDIR.
	(swprintf, vswprintf, swscanf, vswscanf): Add __LDBL_REDIR_NTH.
	* wcsmbs/bits/wchar2.h (__swprintf_chk, __vswprintf_chk): Add
	__LDBL_REDIR_NTH.
	(__vswprintf_alias): Removed.
	(vswprintf): Define as a macro rather than inline function.
	(__fwprintf_chk, __wprintf_chk, __vfwprintf_chk, __vwprintf_chk):
	Add __LDBL_REDIR.
	* stdio-common/printf.h (printf_size): Add __LDBL_REDIR_NTH.
	* 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, strtold_l, __strtold_internal): Add
	__LDBL_REDIR1_NTH.
	(strtold inline): Only define if __LDBL_COMPAT not defined.
	* wcsmbs/wchar.h (wcstold, wcstold_l, __wcstold_internal): Add
	__LDBL_REDIR1_NTH.
	(wcstold inline): Only define if __LDBL_COMPAT not defined.
	* 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/stdlib.h (qecvt, qfcvt, qgcvt, qecvt_r, qfcvt_r): Add
	__LDBL_REDIR1_NTH.
	* 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/monetary.h (strfmon, strfmon_l): Add __LDBL_REDIR_NTH.
	* 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/sys/syslog.h (syslog, vsyslog): Add __LDBL_REDIR.
	* misc/bits/syslog.h (__syslog_chk, __vsyslog_chk): Add
	__LDBL_REDIR.
	* 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.
	* sysdeps/generic/w_j1l.c (j1l, y1l): Rename to __
	prefixed variants.  Add weak_alias.
	* sysdeps/generic/w_j0l.c (j0l, y0l): Likewise.
	* sysdeps/generic/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/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/unix/sysv/linux/sparc/sparc32/configure.in: New file.
	* sysdeps/unix/sysv/linux/sparc/sparc32/configure: New file.
	* sysdeps/sparc/sparc32/Implies: Move ldbl-128 first and flt-32
	after dbl-64.
	* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile (long-double-fcts):
	Set to yes.
	(sysdep-CFLAGS): Add -mlong-double-128.
	* 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.

--- libc/math/bits/mathcalls.h.jj	2005-09-12 03:29:03.000000000 -0400
+++ libc/math/bits/mathcalls.h	2006-01-12 06:11:39.000000000 -0500
@@ -1,5 +1,5 @@
 /* Prototype declarations for math functions; helper file for <math.h>.
-   Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996-2002, 2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -281,7 +281,7 @@ __MATHCALL (rint,, (_Mdouble_ __x));
 
 /* Return X + epsilon if X < Y, X - epsilon if X > Y.  */
 __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-# ifdef __USE_ISOC99
+# if defined __USE_ISOC99 && !defined __LDBL_COMPAT
 __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
 # endif
 
--- libc/math/w_j1l.c.jj	2005-12-14 06:47:29.000000000 -0500
+++ libc/math/w_j1l.c	2006-01-12 06:11:39.000000000 -0500
@@ -26,9 +26,9 @@ static char rcsid[] = "$NetBSD: $";
 #include "math_private.h"
 
 #ifdef __STDC__
-	long double j1l(long double x)	/* wrapper j1l */
+	long double __j1l(long double x)	/* wrapper j1l */
 #else
-	long double j1l(x)			/* wrapper j1l */
+	long double __j1l(x)			/* wrapper j1l */
 	long double x;
 #endif
 {
@@ -44,11 +44,12 @@ static char rcsid[] = "$NetBSD: $";
 	    return z;
 #endif
 }
+weak_alias (__j1l, j1l)
 
 #ifdef __STDC__
-	long double y1l(long double x)	/* wrapper y1l */
+	long double __y1l(long double x)	/* wrapper y1l */
 #else
-	long double y1l(x)			/* wrapper y1l */
+	long double __y1l(x)			/* wrapper y1l */
 	long double x;
 #endif
 {
@@ -72,3 +73,4 @@ static char rcsid[] = "$NetBSD: $";
 	    return z;
 #endif
 }
+weak_alias (__y1l, y1l)
--- libc/math/complex.h.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/math/complex.h	2006-01-12 12:21:11.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -84,7 +84,14 @@ __BEGIN_DECLS
 
 /* And the long double versions.  It is non-critical to define them
    here unconditionally since `long double' is required in ISO C99.  */
-#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
+#if (__STDC__ - 0 || __GNUC__ - 0) \
+    && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
+# ifdef __LDBL_COMPAT
+#  undef __MATHDECL_1
+#  define __MATHDECL_1(type, function, args) \
+  extern type __REDIRECT(__MATH_PRECNAME(function), args, function) __THROW
+# endif
+
 # ifndef _Mlong_double_
 #  define _Mlong_double_	long double
 # endif
--- libc/math/math.h.jj	2004-12-21 08:33:28.000000000 -0500
+++ libc/math/math.h	2006-01-13 12:26:43.000000000 -0500
@@ -1,5 +1,6 @@
 /* Declarations for math functions.
-   Copyright (C) 1991-1993,1995-1999,2001,2002,2004 Free Software Foundation, Inc.
+   Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -96,9 +97,32 @@ __BEGIN_DECLS
 # undef _Mdouble_END_NAMESPACE
 # undef	__MATH_PRECNAME
 
-# if (__STDC__ - 0 || __GNUC__ - 0) && !defined __NO_LONG_DOUBLE_MATH
+# if (__STDC__ - 0 || __GNUC__ - 0) \
+     && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
+#  ifdef __LDBL_COMPAT
+
+#   ifdef __USE_ISOC99 
+extern float __nldbl_nexttowardf (float __x, long double __y)
+				  __attribute__ ((__const__)) __THROW;
+#    ifdef __REDIRECT_NTH
+extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y),
+			     __nldbl_nexttowardf)
+     __attribute__ ((__const__));
+extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y),
+			      nextafter) __attribute__ ((__const__));
+#    endif
+#   endif
+
 /* Include the file of declarations again, this time using `long double'
    instead of `double' and appending l to each function name.  */
+
+#   undef __MATHDECL_1
+#   define __MATHDECL_2(type, function,suffix, args, alias) \
+  extern type __REDIRECT(__MATH_PRECNAME(function,suffix), \
+			 args, alias) __THROW
+#   define __MATHDECL_1(type, function,suffix, args) \
+  __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))
+#  endif
 
 #  ifndef _Mlong_double_
 #   define _Mlong_double_	long double
--- libc/math/w_j0l.c.jj	2005-12-14 06:46:37.000000000 -0500
+++ libc/math/w_j0l.c	2006-01-12 06:11:39.000000000 -0500
@@ -26,9 +26,9 @@ static char rcsid[] = "$NetBSD: $";
 #include "math_private.h"
 
 #ifdef __STDC__
-	long double j0l(long double x)		/* wrapper j0l */
+	long double __j0l(long double x)		/* wrapper j0l */
 #else
-	long double j0l(x)				/* wrapper j0 */
+	long double __j0l(x)				/* wrapper j0 */
 	long double x;
 #endif
 {
@@ -43,11 +43,12 @@ static char rcsid[] = "$NetBSD: $";
 	    return z;
 #endif
 }
+weak_alias (__j0l, j0l)
 
 #ifdef __STDC__
-	long double y0l(long double x)		/* wrapper y0l */
+	long double __y0l(long double x)		/* wrapper y0l */
 #else
-	long double y0l(x)				/* wrapper y0 */
+	long double __y0l(x)				/* wrapper y0 */
 	long double x;
 #endif
 {
@@ -71,3 +72,5 @@ static char rcsid[] = "$NetBSD: $";
 	    return z;
 #endif
 }
+
+weak_alias (__y0l, y0l)
--- libc/math/w_jnl.c.jj	2005-12-14 06:48:22.000000000 -0500
+++ libc/math/w_jnl.c	2006-01-12 06:11:39.000000000 -0500
@@ -48,9 +48,9 @@ static char rcsid[] = "$NetBSD: $";
 #include "math_private.h"
 
 #ifdef __STDC__
-	long double jnl(int n, long double x)	/* wrapper jnl */
+	long double __jnl(int n, long double x)	/* wrapper jnl */
 #else
-	long double jnl(n,x)			/* wrapper jnl */
+	long double __jnl(n,x)			/* wrapper jnl */
 	long double x; int n;
 #endif
 {
@@ -66,11 +66,12 @@ static char rcsid[] = "$NetBSD: $";
 	    return z;
 #endif
 }
+weak_alias (__jnl, jnl)
 
 #ifdef __STDC__
-	long double ynl(int n, long double x)	/* wrapper ynl */
+	long double __ynl(int n, long double x)	/* wrapper ynl */
 #else
-	long double ynl(n,x)			/* wrapper ynl */
+	long double __ynl(n,x)			/* wrapper ynl */
 	long double x; int n;
 #endif
 {
@@ -94,3 +95,4 @@ static char rcsid[] = "$NetBSD: $";
 	    return z;
 #endif
 }
+weak_alias (__ynl, ynl)
--- libc/stdlib/strtod_l.c.jj	2005-12-27 05:56:50.000000000 -0500
+++ libc/stdlib/strtod_l.c	2006-01-12 12:21:43.000000000 -0500
@@ -1,5 +1,5 @@
 /* Convert string representing a number to float value, using given locale.
-   Copyright (C) 1997,98,2002,2004,2005 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,2002,2004,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -28,6 +28,7 @@ extern unsigned long long int ____strtou
    `strtof.c', `wcstod.c', `wcstold.c', and `wcstof.c' to produce the
    `long double' and `float' versions of the reader.  */
 #ifndef FLOAT
+# include <math_ldbl_opt.h>
 # define FLOAT		double
 # define FLT		DBL
 # ifdef USE_WIDE_CHAR
@@ -406,6 +407,9 @@ __mpn_lshift_1 (mp_limb_t *ptr, mp_size_
 
 #define INTERNAL(x) INTERNAL1(x)
 #define INTERNAL1(x) __##x##_internal
+#ifndef ____STRTOF_INTERNAL
+# define ____STRTOF_INTERNAL INTERNAL (__STRTOF)
+#endif
 
 /* This file defines a function to check for correct grouping.  */
 #include "grouping.h"
@@ -417,7 +421,7 @@ __mpn_lshift_1 (mp_limb_t *ptr, mp_size_
    return 0.0.  If the number is too big to be represented, set `errno' to
    ERANGE and return HUGE_VAL with the appropriate sign.  */
 FLOAT
-INTERNAL (__STRTOF) (nptr, endptr, group, loc)
+____STRTOF_INTERNAL (nptr, endptr, group, loc)
      const STRING_TYPE *nptr;
      STRING_TYPE **endptr;
      int group;
@@ -1557,7 +1561,7 @@ INTERNAL (__STRTOF) (nptr, endptr, group
   /* NOTREACHED */
 }
 #if defined _LIBC && !defined USE_WIDE_CHAR
-libc_hidden_def (INTERNAL (__STRTOF))
+libc_hidden_def (____STRTOF_INTERNAL)
 #endif
 \f
 /* External user entry point.  */
@@ -1571,6 +1575,23 @@ __STRTOF (nptr, endptr, loc)
      STRING_TYPE **endptr;
      __locale_t loc;
 {
-  return INTERNAL (__STRTOF) (nptr, endptr, 0, loc);
+  return ____STRTOF_INTERNAL (nptr, endptr, 0, loc);
 }
 weak_alias (__STRTOF, STRTOF)
+
+#ifdef LONG_DOUBLE_COMPAT
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
+#  ifdef USE_WIDE_CHAR
+compat_symbol (libc, __wcstod_l, __wcstold_l, GLIBC_2_1);
+#  else
+compat_symbol (libc, __strtod_l, __strtold_l, GLIBC_2_1);
+#  endif
+# endif
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
+#  ifdef USE_WIDE_CHAR
+compat_symbol (libc, wcstod_l, wcstold_l, GLIBC_2_3);
+#  else
+compat_symbol (libc, strtod_l, strtold_l, GLIBC_2_3);
+#  endif
+# endif
+#endif
--- libc/stdlib/strtod.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdlib/strtod.c	2006-01-12 12:21:51.000000000 -0500
@@ -1,6 +1,6 @@
 /* Read decimal floating point numbers.
    This file is part of the GNU C Library.
-   Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
 
 
 #ifndef FLOAT
+# include <math_ldbl_opt.h>
 # define FLOAT double
 # ifdef USE_WIDE_CHAR
 #  define STRTOF wcstod
@@ -68,3 +69,15 @@ STRTOF (nptr, endptr)
 {
   return INTERNAL(STRTOF_L) (nptr, endptr, 0, _NL_CURRENT_LOCALE);
 }
+
+#ifdef LONG_DOUBLE_COMPAT
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+#  ifdef USE_WIDE_CHAR
+compat_symbol (libc, wcstod, wcstold, GLIBC_2_0);
+compat_symbol (libc, __wcstod_internal, __wcstold_internal, GLIBC_2_0);
+#  else
+compat_symbol (libc, strtod, strtold, GLIBC_2_0);
+compat_symbol (libc, __strtod_internal, __strtold_internal, GLIBC_2_0);
+#  endif
+# endif
+#endif
--- libc/stdlib/stdlib.h.jj	2005-09-22 06:42:54.000000000 -0400
+++ libc/stdlib/stdlib.h	2006-01-12 06:11:39.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -173,9 +173,10 @@ __BEGIN_NAMESPACE_C99
 extern float strtof (__const char *__restrict __nptr,
 		     char **__restrict __endptr) __THROW __nonnull ((1)) __wur;
 
-extern long double strtold (__const char *__restrict __nptr,
-			    char **__restrict __endptr)
-     __THROW __nonnull ((1)) __wur;
+extern long double __LDBL_REDIR1_NTH (strtold,
+				      (__const char *__restrict __nptr,
+				       char **__restrict __endptr), strtod)
+     __nonnull ((1)) __wur;
 __END_NAMESPACE_C99
 #endif
 
@@ -266,10 +267,11 @@ extern float strtof_l (__const char *__r
 		       char **__restrict __endptr, __locale_t __loc)
      __THROW __nonnull ((1, 3)) __wur;
 
-extern long double strtold_l (__const char *__restrict __nptr,
-			      char **__restrict __endptr,
-			      __locale_t __loc)
-     __THROW __nonnull ((1, 3)) __wur;
+extern long double __LDBL_REDIR1_NTH (strtold_l,
+				      (__const char *__restrict __nptr,
+				       char **__restrict __endptr,
+				       __locale_t __loc), strtod_l)
+     __nonnull ((1, 3)) __wur;
 #endif /* GNU */
 
 
@@ -282,10 +284,11 @@ extern double __strtod_internal (__const
 extern float __strtof_internal (__const char *__restrict __nptr,
 				char **__restrict __endptr, int __group)
      __THROW __nonnull ((1)) __wur;
-extern long double __strtold_internal (__const char *__restrict __nptr,
+extern long double __LDBL_REDIR1_NTH (__strtold_internal,
+				      (__const char *__restrict __nptr,
 				       char **__restrict __endptr,
-				       int __group)
-     __THROW __nonnull ((1)) __wur;
+				       int __group), __strtod_internal)
+     __nonnull ((1)) __wur;
 #ifndef __strtol_internal_defined
 extern long int __strtol_internal (__const char *__restrict __nptr,
 				   char **__restrict __endptr,
@@ -350,11 +353,13 @@ __NTH (strtof (__const char *__restrict 
 {
   return __strtof_internal (__nptr, __endptr, 0);
 }
+#  ifndef __LDBL_COMPAT
 extern __inline long double
 __NTH (strtold (__const char *__restrict __nptr, char **__restrict __endptr))
 {
   return __strtold_internal (__nptr, __endptr, 0);
 }
+#  endif
 __END_NAMESPACE_C99
 # endif
 
@@ -835,14 +840,20 @@ extern char *gcvt (double __value, int _
 
 # ifdef __USE_MISC
 /* Long double versions of above functions.  */
-extern char *qecvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qfcvt (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign)
-     __THROW __nonnull ((3, 4)) __wur;
-extern char *qgcvt (long double __value, int __ndigit, char *__buf)
-     __THROW __nonnull ((3)) __wur;
+extern char *__LDBL_REDIR1_NTH (qecvt,
+				(long double __value, int __ndigit,
+				 int *__restrict __decpt,
+				 int *__restrict __sign), ecvt)
+     __nonnull ((3, 4)) __wur;
+extern char *__LDBL_REDIR1_NTH (qfcvt,
+				(long double __value, int __ndigit,
+				 int *__restrict __decpt,
+				 int *__restrict __sign), fcvt)
+     __nonnull ((3, 4)) __wur;
+extern char *__LDBL_REDIR1_NTH (qgcvt,
+				(long double __value, int __ndigit,
+				 char *__buf), gcvt)
+     __nonnull ((3)) __wur;
 
 
 /* Reentrant version of the functions above which provide their own
@@ -854,14 +865,16 @@ extern int fcvt_r (double __value, int _
 		   int *__restrict __sign, char *__restrict __buf,
 		   size_t __len) __THROW __nonnull ((3, 4, 5));
 
-extern int qecvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
-extern int qfcvt_r (long double __value, int __ndigit,
-		    int *__restrict __decpt, int *__restrict __sign,
-		    char *__restrict __buf, size_t __len)
-     __THROW __nonnull ((3, 4, 5));
+extern int __LDBL_REDIR1_NTH (qecvt_r,
+			      (long double __value, int __ndigit,
+			       int *__restrict __decpt, int *__restrict __sign,
+			       char *__restrict __buf, size_t __len), ecvt_r)
+     __nonnull ((3, 4, 5));
+extern int __LDBL_REDIR1_NTH (qfcvt_r,
+			      (long double __value, int __ndigit,
+			       int *__restrict __decpt, int *__restrict __sign,
+			       char *__restrict __buf, size_t __len), fcvt_r)
+     __nonnull ((3, 4, 5));
 # endif	/* misc */
 #endif	/* use MISC || use X/Open Unix */
 
--- libc/stdlib/strfmon.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdlib/strfmon.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,5 +1,6 @@
 /* Formatting a monetary value according to the current locale.
-   Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>
    and Jochen Hein <Jochen.Hein@informatik.TU-Clausthal.de>, 1996.
@@ -22,10 +23,10 @@
 #include <monetary.h>
 #include <stdarg.h>
 #include <locale/localeinfo.h>
-
+#include <math_ldbl_opt.h>
 
 ssize_t
-strfmon (char *s, size_t maxsize, const char *format, ...)
+__strfmon (char *s, size_t maxsize, const char *format, ...)
 {
   va_list ap;
 
@@ -37,3 +38,4 @@ strfmon (char *s, size_t maxsize, const 
 
   return res;
 }
+ldbl_strong_alias (__strfmon, strfmon)
--- libc/stdlib/strfmon_l.c.jj	2004-08-14 12:18:39.000000000 -0400
+++ libc/stdlib/strfmon_l.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,5 +1,5 @@
 /* Formatting a monetary value according to the given locale.
-   Copyright (C) 1996, 1997, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2002, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -23,10 +23,8 @@
 #include <langinfo.h>
 #include <locale.h>
 #include <monetary.h>
-#ifdef USE_IN_LIBIO
-# include "../libio/libioP.h"
-# include "../libio/strfile.h"
-#endif
+#include "../libio/libioP.h"
+#include "../libio/strfile.h"
 #include <printf.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -91,13 +89,9 @@ __vstrfmon_l (char *s, size_t maxsize, _
 	      va_list ap)
 {
   struct locale_data *current = loc->__locales[LC_MONETARY];
-#ifdef USE_IN_LIBIO
   _IO_strfile f;
-# ifdef _IO_MTSAFE_IO
+#ifdef _IO_MTSAFE_IO
   _IO_lock_t lock;
-# endif
-#else
-  FILE f;
 #endif
   struct printf_info info;
   char *dest;			/* Pointer so copy the output.  */
@@ -278,7 +272,8 @@ __vstrfmon_l (char *s, size_t maxsize, _
       if (*fmt == 'L')
 	{
 	  ++fmt;
-	  is_long_double = 1;
+	  if (!__ldbl_is_dbl)
+	    is_long_double = 1;
 	}
 
       /* Handle format specifier.  */
@@ -515,30 +510,13 @@ __vstrfmon_l (char *s, size_t maxsize, _
 	  out_string (sign_string);
 
       /* Print the number.  */
-#ifdef USE_IN_LIBIO
-# ifdef _IO_MTSAFE_IO
+#ifdef _IO_MTSAFE_IO
       f._sbf._f._lock = &lock;
-# endif
+#endif
       INTUSE(_IO_init) ((_IO_FILE *) &f, 0);
       _IO_JUMPS ((struct _IO_FILE_plus *) &f) = &_IO_str_jumps;
       INTUSE(_IO_str_init_static) ((_IO_strfile *) &f, dest,
 				   (s + maxsize) - dest, dest);
-#else
-      memset ((void *) &f, 0, sizeof (f));
-      f.__magic = _IOMAGIC;
-      f.__mode.__write = 1;
-      /* The buffer size is one less than MAXLEN
-	 so we have space for the null terminator.  */
-      f.__bufp = f.__buffer = (char *) dest;
-      f.__bufsize = (s + maxsize) - dest;
-      f.__put_limit = f.__buffer + f.__bufsize;
-      f.__get_limit = f.__buffer;
-      /* After the buffer is full (MAXLEN characters have been written),
-	 any more characters written will go to the bit bucket.  */
-      f.__room_funcs = __default_room_functions;
-      f.__io_funcs.__write = NULL;
-      f.__seen = 1;
-#endif
       /* We clear the last available byte so we can find out whether
 	 the numeric representation is too long.  */
       s[maxsize - 1] = '\0';
@@ -633,7 +611,7 @@ __vstrfmon_l (char *s, size_t maxsize, _
 }
 
 ssize_t
-__strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
+___strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
 {
   va_list ap;
 
@@ -645,4 +623,5 @@ __strfmon_l (char *s, size_t maxsize, __
 
   return res;
 }
-weak_alias (__strfmon_l, strfmon_l)
+ldbl_strong_alias (___strfmon_l, __strfmon_l)
+ldbl_weak_alias (___strfmon_l, strfmon_l)
--- libc/stdlib/strtold.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdlib/strtold.c	2006-01-12 12:21:58.000000000 -0500
@@ -1,6 +1,6 @@
 /* Read decimal floating point numbers.
    This file is part of the GNU C Library.
-   Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1995-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,15 +21,43 @@
 /* The actual implementation for all floating point sizes is in strtod.c.
    These macros tell it to produce the `float' version, `strtof'.  */
 
+#include <bits/wordsize.h>
+
+#ifdef __LONG_DOUBLE_MATH_OPTIONAL
+# include <wchar.h>
+# define NEW(x) NEW1(x)
+# define NEW1(x) __new_##x
+long double ____new_strtold_internal (const char *, char **, int);
+long double __new_strtold (const char *, char **);
+long double ____new_wcstold_internal (const wchar_t *, wchar_t **, int);
+long double __new_wcstold (const wchar_t *, wchar_t **);
+libc_hidden_proto (____new_strtold_internal)
+libc_hidden_proto (____new_wcstold_internal)
+#else
+# define NEW(x) x
+#endif
+
 #define	FLOAT		long double
 #define	FLT		LDBL
 #ifdef USE_WIDE_CHAR
-# define STRTOF		wcstold
+# define STRTOF		NEW (wcstold)
 # define STRTOF_L	__wcstold_l
 #else
-# define STRTOF		strtold
+# define STRTOF		NEW (strtold)
 # define STRTOF_L	__strtold_l
 #endif
 
-
 #include "strtod.c"
+
+#ifdef __LONG_DOUBLE_MATH_OPTIONAL
+# include <math_ldbl_opt.h>
+# ifdef USE_WIDE_CHAR
+long_double_symbol (libc, __new_wcstold, wcstold);
+long_double_symbol (libc, ____new_wcstold_internal, __wcstold_internal);
+libc_hidden_ver (____new_wcstold_internal, __wcstold_internal)
+# else
+long_double_symbol (libc, __new_strtold, strtold);
+long_double_symbol (libc, ____new_strtold_internal, __strtold_internal);
+libc_hidden_ver (____new_strtold_internal, __strtold_internal)
+# endif
+#endif
--- libc/stdlib/monetary.h.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdlib/monetary.h	2006-01-12 06:11:39.000000000 -0500
@@ -1,5 +1,6 @@
 /* Header file for monetary value formatting functions.
-   Copyright (C) 1996,97,98,99,2000,02 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -32,22 +33,23 @@ typedef __ssize_t ssize_t;
 # define __ssize_t_defined
 #endif
 
-
 __BEGIN_DECLS
 
 /* Formatting a monetary value according to the current locale.  */
-extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
-			__const char *__restrict __format, ...)
-     __THROW __attribute_format_strfmon__ (3, 4);
+extern ssize_t __LDBL_REDIR_NTH (strfmon,
+				 (char *__restrict __s, size_t __maxsize,
+				  __const char *__restrict __format, ...))
+     __attribute_format_strfmon__ (3, 4);
 
 #ifdef __USE_GNU
 # include <xlocale.h>
 
 /* Formatting a monetary value according to the current locale.  */
-extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
-			  __locale_t loc,
-			  __const char *__restrict __format, ...)
-     __THROW __attribute_format_strfmon__ (4, 5);
+extern ssize_t __LDBL_REDIR_NTH (strfmon_l,
+				 (char *__restrict __s, size_t __maxsize,
+				  __locale_t loc,
+				  __const char *__restrict __format, ...))
+     __attribute_format_strfmon__ (4, 5);
 #endif
 
 __END_DECLS
--- libc/sysdeps/unix/sysv/linux/sparc/sparc32/Implies.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/Implies	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,2 @@
+ieee754/ldbl-64-128
+ieee754/ldbl-opt
--- libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile.jj	2005-07-04 04:17:15.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile	2006-01-12 06:11:39.000000000 -0500
@@ -1,3 +1,9 @@
+# The Sparc `long double' is a distinct type we support if
+# -mlong-double-128 option is used (or when it becomes a default
+# when -mlong-double-64 is not used).
+long-double-fcts = yes
+sysdep-CFLAGS += -mlong-double-128
+
 asm-CPPFLAGS = -D__ASSEMBLY__
 ASFLAGS-.os += -fPIC
 LD += -melf32_sparc
--- libc/sysdeps/unix/sysv/linux/sparc/sparc32/configure.in.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/configure.in	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,11 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/sparc/sparc32.
+
+# Check whether compiler supports -mlong-double-128
+if ${CC-cc} $CFLAGS -mlong-double-128 -S -xc /dev/null -o /dev/null 2>&1
+then
+  :
+else
+  AC_ERROR(sparc32 glibc requires gcc which supports -mlong-double-128 option)
+fi
--- libc/sysdeps/unix/sysv/linux/sparc/sparc32/configure.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/configure	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+ # Local configure fragment for sysdeps/sparc/sparc32.
+
+# Check whether compiler supports -mlong-double-128
+if ${CC-cc} $CFLAGS -mlong-double-128 -S -xc /dev/null -o /dev/null 2>&1
+then
+  :
+else
+  { echo "configure: error: sparc32 glibc requires gcc which supports -mlong-double-128 option" 1>&2; exit 1; }
+fi
--- libc/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,20 @@
+/* Determine the wordsize from the preprocessor defines.  */
+
+#if defined __arch64__ || defined __sparcv9
+# define __WORDSIZE	64
+#else
+# define __WORDSIZE	32
+#endif
+
+#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL
+
+# if __WORDSIZE == 32
+/* Signal that in 32bit ABI we didn't used to have a `long double'.
+   The changes all the `long double' function variants to be redirects
+   to the double functions.  */
+#  define __LONG_DOUBLE_MATH_OPTIONAL   1
+#  ifndef __LONG_DOUBLE_128__
+#   define __NO_LONG_DOUBLE_MATH        1
+#  endif
+# endif
+#endif
--- libc/sysdeps/sparc/sparc32/fpu/s_fabsl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/fpu/s_fabsl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+long double __fabsl (long double x)
+{
+  return __builtin_fabsl (x);
+}
+weak_alias (__fabsl, fabsl)
--- libc/sysdeps/sparc/sparc32/fpu/s_fabs.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/fpu/s_fabs.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+double __fabs (double x)
+{
+  return __builtin_fabs (x);
+}
+weak_alias (__fabs, fabs)
--- libc/sysdeps/sparc/sparc32/fpu/s_fabsf.S.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/fpu/s_fabsf.S	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,29 @@
+/* Float absolute value, sparc32 version.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+
+ENTRY (__fabsf)
+	st	%o0, [%sp+64]
+	ld	[%sp+64], %f0
+	retl
+	 fabss	%f0, %f0
+END (__fabsf)
+weak_alias (__fabsf, fabsf)
--- libc/sysdeps/sparc/sparc32/fpu/e_sqrtl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/fpu/e_sqrtl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1 @@
+/* __ieee754_sqrtl is defined in q_sqrt.c.  */
--- libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps.jj	2006-01-13 07:13:20.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/fpu/libm-test-ulps	2006-01-13 07:27:43.000000000 -0500
@@ -4,32 +4,49 @@
 Test "atan2 (-0.75, -1.0) == -2.49809154479650885165983415456218025":
 float: 3
 ifloat: 3
+ildouble: 1
+ldouble: 1
 Test "atan2 (0.75, -1.0) == 2.49809154479650885165983415456218025":
 float: 3
 ifloat: 3
+ildouble: 1
+ldouble: 1
 Test "atan2 (1.390625, 0.9296875) == 0.981498387184244311516296577615519772":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "atan2 (-0.00756827042671106339, -.001792735857538728036) == -1.80338464113663849327153994379639112":
 float: 6
 ifloat: 6
+ildouble: 1
+ldouble: 1
 
 # atanh
 Test "atanh (0.75) == 0.972955074527656652552676371721589865":
 float: 1
 ifloat: 1
 
+# cacos
+Test "Imaginary part of: cacos (0.75 + 1.25 i) == 1.11752014915610270578240049553777969 - 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
+
 # cacosh
 Test "Real part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
 double: 1
 float: 7
 idouble: 1
 ifloat: 7
+ildouble: 5
+ldouble: 5
 Test "Imaginary part of: cacosh (-2 - 3 i) == -1.9833870299165354323470769028940395 + 2.1414491111159960199416055713254211 i":
 double: 1
 float: 3
 idouble: 1
 ifloat: 3
+ildouble: 1
+ldouble: 1
 
 # casin
 Test "Real part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
@@ -37,6 +54,9 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+Test "Imaginary part of: casin (0.75 + 1.25 i) == 0.453276177638793913448921196101971749 + 1.13239363160530819522266333696834467 i":
+ildouble: 1
+ldouble: 1
 
 # casinh
 Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
@@ -44,19 +64,27 @@ double: 5
 float: 1
 idouble: 5
 ifloat: 1
+ildouble: 4
+ldouble: 4
 Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
 double: 3
 float: 6
 idouble: 3
 ifloat: 6
+ildouble: 2
+ldouble: 2
 Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # catan
 Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
@@ -70,6 +98,9 @@ ifloat: 1
 Test "Real part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
 float: 4
 ifloat: 4
+Test "Imaginary part of: catan (0.75 + 1.25 i) == 1.10714871779409050301706546017853704 + 0.549306144334054845697622618461262852 i":
+ildouble: 1
+ldouble: 1
 
 # catanh
 Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
@@ -81,11 +112,18 @@ ifloat: 4
 Test "Real part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: catanh (0.75 + 1.25 i) == 0.261492138795671927078652057366532140 + 0.996825126463918666098902241310446708 i":
 float: 6
 ifloat: 6
+ildouble: 1
+ldouble: 1
 
 # cbrt
+Test "cbrt (-0.001) == -0.1":
+ildouble: 1
+ldouble: 1
 Test "cbrt (-27.0) == -3.0":
 double: 1
 idouble: 1
@@ -97,9 +135,14 @@ double: 1
 idouble: 1
 
 # ccos
+Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
 double: 1
 float: 1
@@ -113,9 +156,13 @@ ifloat: 1
 Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
 double: 1
 float: 1
@@ -126,12 +173,20 @@ float: 1
 ifloat: 1
 
 # cexp
+Test "Real part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: cexp (0.75 + 1.25 i) == 0.667537446429131586942201977015932112 + 2.00900045494094876258347228145863909 i":
+ildouble: 1
+ldouble: 1
 
 # clog
 Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
@@ -140,57 +195,98 @@ ifloat: 3
 Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # clog10
 Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
 double: 1
 float: 5
 idouble: 1
 ifloat: 5
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+Test "Imaginary part of: clog10 (-inf + inf i) == inf + 3/4 pi*log10(e) i":
+double: 1
+idouble: 1
 Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 
 # cos
@@ -199,16 +295,22 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "cos (M_PI_6l * 4.0) == -0.5":
 double: 2
 float: 1
 idouble: 2
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "cos (pi/2) == 0":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # cpow
 Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
@@ -222,16 +324,31 @@ double: 1
 float: 4
 idouble: 1
 ifloat: 4
+ildouble: 4
+ldouble: 4
+Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
 double: 2
 float: 3
 idouble: 2
 ifloat: 3
+ildouble: 10
+ldouble: 10
+Test "Real part of: cpow (2 + 0 i, 10 + 0 i) == 1024.0 + 0.0 i":
+ildouble: 2
+ldouble: 2
 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
 double: 1
 float: 4
 idouble: 1
 ifloat: 4
+ildouble: 3
+ldouble: 3
 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
 float: 2
 ifloat: 2
@@ -240,8 +357,21 @@ double: 2
 float: 2
 idouble: 2
 ifloat: 2
+ildouble: 1
+ldouble: 1
+
+# csin
+Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
+ildouble: 1
+ldouble: 1
 
 # csinh
+Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
 double: 1
 idouble: 1
@@ -256,17 +386,31 @@ ifloat: 1
 Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
+ildouble: 1
+ldouble: 1
 
 # ctan
 Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: ctan (0.75 + 1.25 i) == 0.160807785916206426725166058173438663 + 0.975363285031235646193581759755216379 i":
 double: 1
 idouble: 1
+ildouble: 2
+ldouble: 2
 
 # ctanh
 Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -274,6 +418,11 @@ double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
 float: 1
 ifloat: 1
@@ -290,6 +439,9 @@ idouble: 1
 Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
 double: 1
 idouble: 1
+Test "erfc (27.0) == 0.523704892378925568501606768284954709e-318":
+ildouble: 1
+ldouble: 1
 Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
 double: 1
 idouble: 1
@@ -310,14 +462,25 @@ double: 6
 float: 2
 idouble: 6
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 # expm1
 Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
 double: 1
 idouble: 1
 Test "expm1 (1) == M_El - 1.0":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# gamma
+Test "gamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
 
 # hypot
 Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
@@ -359,9 +522,13 @@ double: 2
 float: 1
 idouble: 2
 ifloat: 1
+ildouble: 2
+ldouble: 2
 Test "j0 (2.0) == 0.223890779141235668051827454649948626":
 float: 2
 ifloat: 2
+ildouble: 2
+ldouble: 2
 Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1":
 double: 1
 float: 1
@@ -370,17 +537,32 @@ ifloat: 1
 Test "j0 (8.0) == 0.171650807137553906090869407851972001":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # j1
+Test "j1 (-1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "j1 (0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "j1 (1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
 Test "j1 (10.0) == 0.0434727461688614366697487680258592883":
 float: 2
 ifloat: 2
+ildouble: 2
+ldouble: 2
 Test "j1 (2.0) == 0.576724807756873387202448242269137087":
 double: 1
 idouble: 1
 Test "j1 (8.0) == 0.234636346853914624381276651590454612":
 double: 1
 idouble: 1
+ildouble: 4
+ldouble: 4
 
 # jn
 Test "jn (0, -4.0) == -3.9714980986384737228659076845169804197562E-1":
@@ -396,9 +578,13 @@ double: 2
 float: 1
 idouble: 2
 ifloat: 1
+ildouble: 2
+ldouble: 2
 Test "jn (0, 2.0) == 0.223890779141235668051827454649948626":
 float: 2
 ifloat: 2
+ildouble: 2
+ldouble: 2
 Test "jn (0, 4.0) == -3.9714980986384737228659076845169804197562E-1":
 double: 1
 float: 1
@@ -407,30 +593,57 @@ ifloat: 1
 Test "jn (0, 8.0) == 0.171650807137553906090869407851972001":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (1, -1.0) == -0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 0.75) == 0.349243602174862192523281016426251335":
+ildouble: 1
+ldouble: 1
+Test "jn (1, 1.0) == 0.440050585744933515959682203718914913":
+ildouble: 1
+ldouble: 1
 Test "jn (1, 10.0) == 0.0434727461688614366697487680258592883":
 float: 2
 ifloat: 2
+ildouble: 2
+ldouble: 2
 Test "jn (1, 2.0) == 0.576724807756873387202448242269137087":
 double: 1
 idouble: 1
 Test "jn (1, 8.0) == 0.234636346853914624381276651590454612":
 double: 1
 idouble: 1
+ildouble: 4
+ldouble: 4
+Test "jn (10, -1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
 Test "jn (10, 0.125) == 0.250543369809369890173993791865771547e-18":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "jn (10, 0.75) == 0.149621713117596814698712483621682835e-10":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "jn (10, 1.0) == 0.263061512368745320699785368779050294e-9":
+ildouble: 1
+ldouble: 1
 Test "jn (10, 10.0) == 0.207486106633358857697278723518753428":
 double: 4
 float: 3
 idouble: 4
 ifloat: 3
+ildouble: 2
+ldouble: 2
 Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
 float: 4
 ifloat: 4
@@ -449,6 +662,8 @@ double: 3
 float: 1
 idouble: 3
 ifloat: 1
+ildouble: 2
+ldouble: 2
 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
 double: 1
 float: 2
@@ -456,16 +671,23 @@ idouble: 1
 ifloat: 2
 
 # lgamma
+Test "lgamma (-0.5) == log(2*sqrt(pi))":
+ildouble: 1
+ldouble: 1
 Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 # log10
 Test "log10 (0.75) == -0.124938736608299953132449886193870744":
@@ -476,11 +698,21 @@ ifloat: 2
 Test "log10 (e) == log10(e)":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # log1p
 Test "log1p (-0.25) == -0.287682072451780927439219005993827432":
 float: 1
 ifloat: 1
+Test "log1p (M_El - 1.0) == 1":
+ildouble: 1
+ldouble: 1
+
+# log2
+Test "log2 (0.75) == -.415037499278843818546261056052183492":
+ildouble: 1
+ldouble: 1
 
 # sincos
 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
@@ -488,31 +720,58 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in sin_res":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "sincos (pi/6, &sin_res, &cos_res) puts 0.86602540378443864676372317075293616 in cos_res":
 float: 1
 ifloat: 1
 
+# sqrt
+Test "sqrt (2) == M_SQRT2l":
+ildouble: 1
+ldouble: 1
+
 # tan
 Test "tan (pi/4) == 1":
 double: 1
 idouble: 1
 
+# tanh
+Test "tanh (-0.75) == -0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (-1.0) == -0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+Test "tanh (0.75) == 0.635148952387287319214434357312496495":
+ildouble: 1
+ldouble: 1
+Test "tanh (1.0) == 0.7615941559557648881194582826047935904":
+ildouble: 1
+ldouble: 1
+
 # tgamma
 Test "tgamma (-0.5) == -2 sqrt (pi)":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "tgamma (0.5) == sqrt (pi)":
 float: 1
 ifloat: 1
@@ -521,6 +780,9 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+Test "tgamma (4) == 6":
+ildouble: 1
+ldouble: 1
 
 # y0
 Test "y0 (1.0) == 0.0882569642156769579829267660235151628":
@@ -536,19 +798,28 @@ ifloat: 1
 Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
 float: 1
 ifloat: 1
+ildouble: 3
+ldouble: 3
 Test "y0 (8.0) == 0.223521489387566220527323400498620359":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 3
+ldouble: 3
 
 # y1
 Test "y1 (0.125) == -5.19993611253477499595928744876579921":
 double: 1
 idouble: 1
+Test "y1 (0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
 Test "y1 (1.5) == -0.412308626973911295952829820633445323":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "y1 (10.0) == 0.249015424206953883923283474663222803":
 double: 3
 float: 1
@@ -559,11 +830,15 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "y1 (8.0) == -0.158060461731247494255555266187483550":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 # yn
 Test "yn (0, 1.0) == 0.0882569642156769579829267660235151628":
@@ -579,17 +854,26 @@ ifloat: 1
 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
 float: 1
 ifloat: 1
+ildouble: 3
+ldouble: 3
 Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 3
+ldouble: 3
 Test "yn (1, 0.125) == -5.19993611253477499595928744876579921":
 double: 1
 idouble: 1
+Test "yn (1, 0.75) == -1.03759455076928541973767132140642198":
+ildouble: 1
+ldouble: 1
 Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
 double: 3
 float: 1
@@ -600,30 +884,44 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "yn (1, 8.0) == -0.158060461731247494255555266187483550":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
 Test "yn (10, 0.125) == -127057845771019398.252538486899753195":
 double: 1
 idouble: 1
+ildouble: 2
+ldouble: 2
 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 5
+ldouble: 5
 Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 2
+ldouble: 2
 Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
 double: 2
 idouble: 2
+ildouble: 2
+ldouble: 2
 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
 double: 1
 idouble: 1
@@ -632,11 +930,15 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 2
+ldouble: 2
 Test "yn (3, 10.0) == -0.251362657183837329779204747654240998":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "yn (3, 2.0) == -1.12778377684042778608158395773179238":
 double: 1
 idouble: 1
@@ -645,22 +947,32 @@ idouble: 1
 Function: "atan2":
 float: 6
 ifloat: 6
+ildouble: 1
+ldouble: 1
 
 Function: "atanh":
 float: 1
 ifloat: 1
 
+Function: Imaginary part of "cacos":
+ildouble: 1
+ldouble: 1
+
 Function: Real part of "cacosh":
 double: 1
 float: 7
 idouble: 1
 ifloat: 7
+ildouble: 5
+ldouble: 5
 
 Function: Imaginary part of "cacosh":
 double: 1
 float: 3
 idouble: 1
 ifloat: 3
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "casin":
 double: 1
@@ -668,17 +980,25 @@ float: 1
 idouble: 1
 ifloat: 1
 
+Function: Imaginary part of "casin":
+ildouble: 1
+ldouble: 1
+
 Function: Real part of "casinh":
 double: 5
 float: 1
 idouble: 5
 ifloat: 1
+ildouble: 4
+ldouble: 4
 
 Function: Imaginary part of "casinh":
 double: 3
 float: 6
 idouble: 3
 ifloat: 6
+ildouble: 2
+ldouble: 2
 
 Function: Real part of "catan":
 float: 4
@@ -689,50 +1009,72 @@ double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "catanh":
 double: 4
 idouble: 4
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "catanh":
 float: 6
 ifloat: 6
+ildouble: 1
+ldouble: 1
 
 Function: "cbrt":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "ccos":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "ccos":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "ccosh":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "ccosh":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "cexp":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "cexp":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "clog":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "clog":
 float: 3
@@ -741,34 +1083,54 @@ ifloat: 3
 Function: Real part of "clog10":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "clog10":
 double: 1
 float: 5
 idouble: 1
 ifloat: 5
+ildouble: 1
+ldouble: 1
 
 Function: "cos":
 double: 2
 float: 1
 idouble: 2
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "cpow":
 double: 2
 float: 4
 idouble: 2
 ifloat: 4
+ildouble: 10
+ldouble: 10
 
 Function: Imaginary part of "cpow":
 double: 2
 float: 2
 idouble: 2
 ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "csin":
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csin":
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "csinh":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "csinh":
 double: 1
@@ -779,24 +1141,38 @@ ifloat: 1
 Function: Real part of "csqrt":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "csqrt":
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "ctan":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "ctan":
 double: 1
 idouble: 1
+ildouble: 2
+ldouble: 2
 
 Function: Real part of "ctanh":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 Function: Imaginary part of "ctanh":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: "erf":
 double: 1
@@ -805,18 +1181,28 @@ idouble: 1
 Function: "erfc":
 double: 1
 idouble: 1
+ildouble: 1
+ldouble: 1
 
 Function: "exp10":
 double: 6
 float: 2
 idouble: 6
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 Function: "expm1":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "gamma":
+ildouble: 1
+ldouble: 1
 
 Function: "hypot":
 float: 1
@@ -827,67 +1213,101 @@ double: 2
 float: 2
 idouble: 2
 ifloat: 2
+ildouble: 2
+ldouble: 2
 
 Function: "j1":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 4
+ldouble: 4
 
 Function: "jn":
 double: 4
 float: 4
 idouble: 4
 ifloat: 4
+ildouble: 4
+ldouble: 4
 
 Function: "lgamma":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 Function: "log10":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 Function: "log1p":
 float: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log2":
+ildouble: 1
+ldouble: 1
 
 Function: "sincos":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "sqrt":
+ildouble: 1
+ldouble: 1
 
 Function: "tan":
 double: 1
 idouble: 1
 
+Function: "tanh":
+ildouble: 1
+ldouble: 1
+
 Function: "tgamma":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: "y0":
 double: 2
 float: 1
 idouble: 2
 ifloat: 1
+ildouble: 3
+ldouble: 3
 
 Function: "y1":
 double: 3
 float: 2
 idouble: 3
 ifloat: 2
+ildouble: 1
+ldouble: 1
 
 Function: "yn":
 double: 3
 float: 2
 idouble: 3
 ifloat: 2
+ildouble: 5
+ldouble: 5
 
 # end of automatic generation
--- libc/sysdeps/sparc/sparc32/soft-fp/Makefile.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/Makefile	2006-01-12 06:11:39.000000000 -0500
@@ -1,6 +1,6 @@
 #  Software floating-point emulation.
 #  Makefile for SPARC v8 long double utility functions (_Q_*).
-#  Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+#  Copyright (C) 1999, 2000, 2006 Free Software Foundation, Inc.
 #  This file is part of the GNU C Library.
 #  Contributed by Jakub Jelinek (jj@ultra.linux.cz).
 #
@@ -20,13 +20,11 @@
 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 # 02111-1307 USA.
 
-#  Currently gcc does not support TFmode long double on sparc32
-#  so these routines are not used.
-#ifeq ($(subdir),soft-fp)
-#sparc32-quad-routines := q_add q_cmp q_cmpe q_div q_dtoq q_feq q_fge	\
-#	q_fgt q_fle q_flt q_fne q_itoq q_mul q_neg q_qtod q_qtoi	\
-#	q_qtos q_qtoui q_qtoux q_qtox q_sqrt q_stoq q_sub q_uitoq	\
-#	q_uxtoq q_xtoq q_util
-#sysdep_routines += $(sparc32-quad-routines)
-#
-#endif
+ifeq ($(subdir),soft-fp)
+sparc32-quad-routines := q_add q_cmp q_cmpe q_div q_dtoq q_feq q_fge	\
+	q_fgt q_fle q_flt q_fne q_itoq q_mul q_neg q_qtod q_qtoi	\
+	q_qtos q_qtou q_qtoull q_qtoll q_sqrt q_stoq q_sub q_utoq	\
+	q_ulltoq q_lltoq q_util
+sysdep_routines += $(sparc32-quad-routines)
+
+endif
--- libc/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/sfp-machine.h	2006-01-12 12:22:04.000000000 -0500
@@ -1,6 +1,6 @@
 /* Machine-dependent software floating-point definitions.
    Sparc userland (_Q_*) version.
-   Copyright (C) 1997,1998,1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,1999, 2002, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz) and
@@ -22,6 +22,7 @@
    02111-1307 USA.  */
 
 #include <fpu_control.h>
+#include <stdlib.h>
 
 #define _FP_W_TYPE_SIZE		32
 #define _FP_W_TYPE		unsigned long
@@ -208,14 +209,5 @@ do {								\
       	" : : "r" (___Q_numbers) : "f30");			\
     }								\
   else								\
-    {								\
-      __asm__ __volatile__("\
-        mov %0, %%o0\n\
-        mov %%o7, %%g1\n\
-        call ___Q_simulate_exceptions\n\
-         mov %%g1, %%o7\
-        " : : "r" (_fex) :					\
-        "g1", "g2", "g3", "g4", "g5", "o0", 			\
-        "o1", "o2", "o3", "o4", "o5", "cc");			\
-    }								\
+    ___Q_simulate_exceptions (_fex);			        \
 } while (0)
--- libc/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_lltoq.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,38 @@
+/* Software floating-point emulation.
+   Return (long double)a
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Richard Henderson (rth@cygnus.com) and
+		  Jakub Jelinek (jj@ultra.linux.cz).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+long double _Q_lltoq(const long long a)
+{
+  FP_DECL_EX;
+  FP_DECL_Q(C);
+  long double c;
+  long long b = a;
+
+  FP_FROM_INT_Q(C, b, 64, long long);
+  FP_PACK_Q(c, C);
+  FP_CLEAR_EXCEPTIONS;
+  FP_HANDLE_EXCEPTIONS;
+  return c;
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_utoq.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_utoq.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,38 @@
+/* Software floating-point emulation.
+   c = (long double)(a)
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Richard Henderson (rth@cygnus.com) and
+		  Jakub Jelinek (jj@ultra.linux.cz).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+long double _Q_utoq(const unsigned int a)
+{
+  FP_DECL_EX;
+  FP_DECL_Q(C);
+  long double c;
+  unsigned int b = a;
+
+  FP_FROM_INT_Q(C, b, 32, int);
+  FP_PACK_Q(c, C);
+  FP_CLEAR_EXCEPTIONS;
+  FP_HANDLE_EXCEPTIONS;
+  return c;
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_qtoui.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_qtoui.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,38 +0,0 @@
-/* Software floating-point emulation.
-   Return (unsigned int)a
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-		  Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#define FP_ROUNDMODE FP_RND_ZERO
-#include "soft-fp.h"
-#include "quad.h"
-
-unsigned int _Q_qtoui(const long double a)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(A);
-  unsigned int r;
-
-  FP_UNPACK_Q(A, a);
-  FP_TO_INT_Q(r, A, 32, -1);
-  FP_HANDLE_EXCEPTIONS;
-
-  return r;
-}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_qtou.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_qtou.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,38 @@
+/* Software floating-point emulation.
+   Return (unsigned int)a
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Richard Henderson (rth@cygnus.com) and
+		  Jakub Jelinek (jj@ultra.linux.cz).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "soft-fp.h"
+#include "quad.h"
+
+unsigned int _Q_qtou(const long double a)
+{
+  FP_DECL_EX;
+  FP_DECL_Q(A);
+  unsigned int r;
+
+  FP_UNPACK_Q(A, a);
+  FP_TO_INT_Q(r, A, 32, -1);
+  FP_HANDLE_EXCEPTIONS;
+
+  return r;
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_ulltoq.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,38 @@
+/* Software floating-point emulation.
+   Return (long double)(a)
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Richard Henderson (rth@cygnus.com) and
+		  Jakub Jelinek (jj@ultra.linux.cz).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include "soft-fp.h"
+#include "quad.h"
+
+long double _Q_ulltoq(const unsigned long long a)
+{
+  FP_DECL_EX;
+  FP_DECL_Q(C);
+  long double c;
+  unsigned long long b = a;
+
+  FP_FROM_INT_Q(C, b, 64, long long);
+  FP_PACK_Q(c, C);
+  FP_CLEAR_EXCEPTIONS;
+  FP_HANDLE_EXCEPTIONS;
+  return c;
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_uxtoq.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,38 +0,0 @@
-/* Software floating-point emulation.
-   Return (long double)(a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-		  Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include "soft-fp.h"
-#include "quad.h"
-
-long double _Q_uxtoq(const unsigned long long a)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(C);
-  long double c;
-  unsigned long long b = a;
-
-  FP_FROM_INT_Q(C, b, 64, long long);
-  FP_PACK_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
-  return c;
-}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_qtoull.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,38 @@
+/* Software floating-point emulation.
+   Return (unsigned long long)a
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Richard Henderson (rth@cygnus.com) and
+		  Jakub Jelinek (jj@ultra.linux.cz).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "soft-fp.h"
+#include "quad.h"
+
+unsigned long long _Q_qtoull(const long double a)
+{
+  FP_DECL_EX;
+  FP_DECL_Q(A);
+  unsigned long long r;
+
+  FP_UNPACK_Q(A, a);
+  FP_TO_INT_Q(r, A, 64, -1);
+  FP_HANDLE_EXCEPTIONS;
+
+  return r;
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_sqrt.c	2006-01-12 12:22:11.000000000 -0500
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return sqrtl(a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -36,3 +36,4 @@ long double _Q_sqrt(const long double a)
   FP_HANDLE_EXCEPTIONS;
   return c;
 }
+strong_alias (_Q_sqrt, __ieee754_sqrtl);
--- libc/sysdeps/sparc/sparc32/soft-fp/q_qtox.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_qtox.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,38 +0,0 @@
-/* Software floating-point emulation.
-   Return (long)a
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-		  Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#define FP_ROUNDMODE FP_RND_ZERO
-#include "soft-fp.h"
-#include "quad.h"
-
-long long _Q_qtox(const long double a)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(A);
-  long long r;
-
-  FP_UNPACK_Q(A, a);
-  FP_TO_INT_Q(r, A, 64, 1);
-  FP_HANDLE_EXCEPTIONS;
-
-  return r;
-}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_uitoq.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_uitoq.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,38 +0,0 @@
-/* Software floating-point emulation.
-   c = (long double)(a)
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-		  Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include "soft-fp.h"
-#include "quad.h"
-
-long double _Q_uitoq(const unsigned int a)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(C);
-  long double c;
-  unsigned int b = a;
-
-  FP_FROM_INT_Q(C, b, 32, int);
-  FP_PACK_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
-  return c;
-}
--- libc/sysdeps/sparc/sparc32/soft-fp/Versions.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/Versions	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+libc {
+  GLIBC_2.4 {
+    _Q_add; _Q_cmp; _Q_cmpe; _Q_div; _Q_dtoq; _Q_feq; _Q_fge; _Q_fgt;
+    _Q_fle; _Q_flt; _Q_fne; _Q_itoq; _Q_mul; _Q_neg; _Q_qtod; _Q_qtoi;
+    _Q_qtos; _Q_qtou; _Q_qtoull; _Q_qtoll; _Q_sqrt; _Q_stoq; _Q_sub;
+    _Q_utoq; _Q_ulltoq; _Q_lltoq;
+  }
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_xtoq.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_xtoq.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,38 +0,0 @@
-/* Software floating-point emulation.
-   Return (long double)a
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-		  Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include "soft-fp.h"
-#include "quad.h"
-
-long double _Q_xtoq(const long long a)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(C);
-  long double c;
-  long long b = a;
-
-  FP_FROM_INT_Q(C, b, 64, long long);
-  FP_PACK_Q(c, C);
-  FP_CLEAR_EXCEPTIONS;
-  FP_HANDLE_EXCEPTIONS;
-  return c;
-}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_qtoux.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_qtoux.c	2006-01-12 06:11:39.000000000 -0500
@@ -1,38 +0,0 @@
-/* Software floating-point emulation.
-   Return (unsigned long)a
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Richard Henderson (rth@cygnus.com) and
-		  Jakub Jelinek (jj@ultra.linux.cz).
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#define FP_ROUNDMODE FP_RND_ZERO
-#include "soft-fp.h"
-#include "quad.h"
-
-unsigned long long _Q_qtoux(const long double a)
-{
-  FP_DECL_EX;
-  FP_DECL_Q(A);
-  unsigned long long r;
-
-  FP_UNPACK_Q(A, a);
-  FP_TO_INT_Q(r, A, 64, -1);
-  FP_HANDLE_EXCEPTIONS;
-
-  return r;
-}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_qtoll.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,38 @@
+/* Software floating-point emulation.
+   Return (long long)a
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Richard Henderson (rth@cygnus.com) and
+		  Jakub Jelinek (jj@ultra.linux.cz).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#define FP_ROUNDMODE FP_RND_ZERO
+#include "soft-fp.h"
+#include "quad.h"
+
+long long _Q_qtoll(const long double a)
+{
+  FP_DECL_EX;
+  FP_DECL_Q(A);
+  long long r;
+
+  FP_UNPACK_Q(A, a);
+  FP_TO_INT_Q(r, A, 64, 1);
+  FP_HANDLE_EXCEPTIONS;
+
+  return r;
+}
--- libc/sysdeps/sparc/sparc32/soft-fp/q_div.c.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/soft-fp/q_div.c	2006-01-12 12:22:18.000000000 -0500
@@ -1,6 +1,6 @@
 /* Software floating-point emulation.
    Return a / b
-   Copyright (C) 1997,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com) and
 		  Jakub Jelinek (jj@ultra.linux.cz).
@@ -35,5 +35,5 @@ long double _Q_div(const long double a, 
   FP_DIV_Q(C, A, B);
   FP_PACK_Q(c, C);
   FP_HANDLE_EXCEPTIONS;
-  return long double;
+  return c;
 }
--- libc/sysdeps/sparc/sparc32/Implies.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/sparc32/Implies	2006-01-12 06:11:39.000000000 -0500
@@ -1,5 +1,6 @@
 wordsize-32
 # SPARC uses IEEE 754 floating point.
-ieee754/flt-32
+ieee754/ldbl-128
 ieee754/dbl-64
+ieee754/flt-32
 sparc/sparc32/soft-fp
--- libc/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h.jj	2004-08-04 08:42:27.000000000 -0400
+++ libc/sysdeps/sparc/sparc64/soft-fp/sfp-machine.h	2006-01-12 12:22:27.000000000 -0500
@@ -1,6 +1,6 @@
 /* Machine-dependent software floating-point definitions.
    Sparc64 userland (_Q_* and _Qp_*) version.
-   Copyright (C) 1997,1998,1999 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson (rth@cygnus.com),
 		  Jakub Jelinek (jj@ultra.linux.cz) and
@@ -23,6 +23,7 @@
    
 #include <fpu_control.h>
 #include <fenv.h>
+#include <stdlib.h>
 
 #define _FP_W_TYPE_SIZE		64
 #define _FP_W_TYPE		unsigned long
--- libc/sysdeps/sparc/fpu/bits/mathinline.h.jj	2004-10-15 17:08:35.000000000 -0400
+++ libc/sysdeps/sparc/fpu/bits/mathinline.h	2006-01-12 12:22:39.000000000 -0500
@@ -1,5 +1,6 @@
 /* Inline math functions for SPARC.
-   Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
@@ -36,23 +37,52 @@
 
 # if __WORDSIZE == 32
 
-#  define __unordered_cmp(x, y) \
+#  ifndef __NO_LONG_DOUBLE_MATH
+
+#   define __unordered_cmp(x, y) \
   (__extension__							      \
    ({ unsigned __r;							      \
-      if (sizeof(x) == 4 && sizeof(y) == 4)				      \
+      if (sizeof (x) == 4 && sizeof (y) == 4)				      \
 	{								      \
 	  float __x = (x); float __y = (y);				      \
-	  __asm__("fcmps %1,%2; st %%fsr, %0" : "=m" (__r) : "f" (__x),	      \
-		  "f" (__y) : "cc");					      \
+	  __asm__ ("fcmps %1,%2; st %%fsr, %0" : "=m" (__r) : "f" (__x),      \
+		   "f" (__y) : "cc");					      \
+	}								      \
+      else if (sizeof (x) <= 8 && sizeof (y) <= 8)			      \
+	{								      \
+	  double __x = (x); double __y = (y);				      \
+	  __asm__ ("fcmpd\t%1,%2\n\tst\t%%fsr,%0" : "=m" (__r) : "f" (__x),   \
+		   "f" (__y) : "cc");					      \
+	}								      \
+      else								      \
+	{								      \
+	  long double __x = (x); long double __y = (y);			      \
+	  extern int _Q_cmp (const long double a, const long double b);	      \
+	  __r = _Q_cmp (__x, __y) << 10;				      \
+	}								      \
+      __r; }))
+
+#  else
+
+#   define __unordered_cmp(x, y) \
+  (__extension__							      \
+   ({ unsigned __r;							      \
+      if (sizeof (x) == 4 && sizeof (y) == 4)				      \
+	{								      \
+	  float __x = (x); float __y = (y);				      \
+	  __asm__ ("fcmps %1,%2; st %%fsr, %0" : "=m" (__r) : "f" (__x),      \
+		   "f" (__y) : "cc");					      \
 	}								      \
       else								      \
 	{								      \
 	  double __x = (x); double __y = (y);				      \
-	  __asm__("fcmpd\t%1,%2\n\tst\t%%fsr,%0" : "=m" (__r) : "f" (__x),    \
-		  "f" (__y) : "cc");					      \
+	  __asm__ ("fcmpd\t%1,%2\n\tst\t%%fsr,%0" : "=m" (__r) : "f" (__x),   \
+		   "f" (__y) : "cc");					      \
 	}								      \
       __r; }))
 
+#  endif
+
 #  define isgreater(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (2 << 10))
 #  define isgreaterequal(x, y) ((__unordered_cmp (x, y) & (1 << 10)) == 0)
 #  define isless(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (1 << 10))
@@ -65,22 +95,22 @@
 #  define __unordered_v9cmp(x, y, op, qop) \
   (__extension__							      \
    ({ unsigned __r;						      	      \
-      if (sizeof(x) == 4 && sizeof(y) == 4)				      \
+      if (sizeof (x) == 4 && sizeof (y) == 4)				      \
 	{								      \
 	  float __x = (x); float __y = (y);				      \
-	  __asm__("fcmps\t%%fcc3,%1,%2\n\tmov" op "\t%%fcc3,1,%0"	      \
-		  : "=r" (__r) : "f" (__x), "f" (__y), "0" (0) : "cc");	      \
+	  __asm__ ("fcmps\t%%fcc3,%1,%2\n\tmov" op "\t%%fcc3,1,%0"	      \
+		   : "=r" (__r) : "f" (__x), "f" (__y), "0" (0) : "cc");      \
 	}								      \
-      else if (sizeof(x) <= 8 && sizeof(y) <= 8)			      \
+      else if (sizeof (x) <= 8 && sizeof (y) <= 8)			      \
 	{								      \
 	  double __x = (x); double __y = (y);				      \
-	  __asm__("fcmpd\t%%fcc3,%1,%2\n\tmov" op "\t%%fcc3,1,%0"	      \
-		  : "=r" (__r) : "f" (__x), "f" (__y), "0" (0) : "cc");	      \
+	  __asm__ ("fcmpd\t%%fcc3,%1,%2\n\tmov" op "\t%%fcc3,1,%0"	      \
+		   : "=r" (__r) : "f" (__x), "f" (__y), "0" (0) : "cc");      \
 	}								      \
       else								      \
 	{								      \
 	  long double __x = (x); long double __y = (y);			      \
-	  extern int _Qp_cmp(const long double *a, const long double *b);     \
+	  extern int _Qp_cmp (const long double *a, const long double *b);    \
 	  __r = qop;						      	      \
 	}								      \
       __r; }))
@@ -127,11 +157,20 @@ __NTH (__signbit (double __x))
   return __u.__i[0] < 0;
 }
 
+#    ifndef __NO_LONG_DOUBLE_MATH
+__MATH_INLINE int
+__NTH (__signbitl (long double __x))
+{
+  __extension__ union { long double __l; int __i[4]; } __u = { __l: __x };
+  return __u.__i[0] < 0;
+}
+#    else
 __MATH_INLINE int
 __NTH (__signbitl (long double __x))
 {
   return __signbit ((double)__x);
 }
+#    endif
 
 #   else /* sparc64 */
 
@@ -180,6 +219,13 @@ __NTH (sqrtl (long double __x))
   _Qp_sqrt (&__r, &__x);
   return __r;
 }
+#   elif !defined __NO_LONG_DOUBLE_MATH
+__MATH_INLINE long double
+sqrtl (long double __x) __THROW
+{
+  extern long double _Q_sqrt (__const__ long double);
+  return _Q_sqrt (__x);
+}
 #   endif /* sparc64 */
 
 #  endif /* !__NO_MATH_INLINES && !GCC 3.2+ */
@@ -211,6 +257,13 @@ __ieee754_sqrtl (long double __x)
   _Qp_sqrt(&__r, &__x);
   return __r;
 }
+#   elif !defined __NO_LONG_DOUBLE_MATH
+__MATH_INLINE long double
+__ieee754_sqrtl (long double __x)
+{
+  extern long double _Q_sqrt (__const__ long double);
+  return _Q_sqrt (__x);
+}
 #   endif /* sparc64 */
 #  endif /* __LIBC_INTERNAL_MATH_INLINES */
 # endif /* gcc 2.8+ */
--- libc/sysdeps/sparc/fpu/bits/mathdef.h.jj	2004-08-04 08:42:26.000000000 -0400
+++ libc/sysdeps/sparc/fpu/bits/mathdef.h	2006-01-12 12:22:49.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -55,14 +56,3 @@ typedef double double_t;
 # define FP_ILOGBNAN     (2147483647)
 
 #endif	/* ISO C99 */
-
-#ifndef __NO_LONG_DOUBLE_MATH
-
-# if __WORDSIZE == 32
-/* Signal that in 32bit ABI we do not really have a `long double'.
-   The disables the declaration of all the `long double' function
-   variants.  */
-#  define __NO_LONG_DOUBLE_MATH	1
-# endif
-
-#endif
--- libc/sysdeps/generic/math_ldbl_opt.h.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/generic/math_ldbl_opt.h	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#define LONG_DOUBLE_COMPAT(lib, introduced) 0
+#define long_double_symbol(lib, local, symbol)
+#define ldbl_hidden_def(local, name) libc_hidden_def (name)
+#define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
+#define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
+#define __ldbl_is_dbl 0
--- libc/sysdeps/ieee754/ldbl-96/s_nexttoward.c.jj	2004-08-04 08:42:25.000000000 -0400
+++ libc/sysdeps/ieee754/ldbl-96/s_nexttoward.c	2006-01-12 06:11:39.000000000 -0500
@@ -99,7 +99,3 @@ static char rcsid[] = "$NetBSD: $";
 	return x;
 }
 weak_alias (__nexttoward, nexttoward)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__nexttoward, __nexttowardl)
-weak_alias (__nexttoward, nexttowardl)
-#endif
--- libc/sysdeps/ieee754/ldbl-96/s_erfl.c.jj	2004-08-04 08:42:25.000000000 -0400
+++ libc/sysdeps/ieee754/ldbl-96/s_erfl.c	2006-01-12 06:11:39.000000000 -0500
@@ -341,10 +341,6 @@ __erfl (x)
 }
 
 weak_alias (__erfl, erfl)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__erf, __erfl)
-weak_alias (__erf, erfl)
-#endif
 #ifdef __STDC__
      long double
      __erfcl (long double x)
@@ -456,7 +452,3 @@ weak_alias (__erf, erfl)
 }
 
 weak_alias (__erfcl, erfcl)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__erfc, __erfcl)
-weak_alias (__erfc, erfcl)
-#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-tanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-tanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+tanhl (double x)
+{
+  return tanh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_tgamma.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_tgamma.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_tgamma.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __tgamma, tgammal, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfwprintf_chk (stream, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_lround.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_lround.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_lround.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_cpow.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cpow.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_cpow.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cpow, cpowl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-atan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-atan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+atanl (double x)
+{
+  return atan (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+obstack_vprintf (struct obstack *obstack, const char *fmt, va_list ap)
+{
+  return __nldbl_obstack_vprintf (obstack, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,14 @@
+#define nexttoward nexttoward_XXX
+#define nexttowardl nexttowardl_XXX
+#include "nldbl-compat.h"
+#undef nexttoward
+#undef nexttowardl
+
+double
+attribute_hidden
+nexttoward (double x, double y)
+{
+  return nextafter (x, y);
+}
+extern __typeof (nexttoward) nexttowardl attribute_hidden;
+strong_alias (nexttoward, nexttowardl)
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-logb.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-logb.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+logbl (double x)
+{
+  return logb (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,12 @@
+#define nexttowardf nexttowardf_XXX
+#include "nldbl-compat.h"
+#undef nexttowardf
+
+extern float __nldbl_nexttowardf (float x, double y);
+
+float
+attribute_hidden
+nexttowardf (float x, double y)
+{
+  return __nldbl_nexttowardf (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_cexpl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cexpl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_cexpl.c>
+long_double_symbol (libm, __cexpl, cexpl);
--- libc/sysdeps/ieee754/ldbl-opt/w_j1.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_j1.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_j1.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, j1, j1l, GLIBC_2_0);
+compat_symbol (libm, y1, y1l, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_casinh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_casinh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_casinh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __casinh, casinhl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_finite.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_finite.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,18 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_finite.c>
+weak_alias (__finite, ___finite)
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __finite, __finitel, GLIBC_2_1);
+# endif
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, ___finite, finitel, GLIBC_2_0);
+# endif
+#else
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libm, __finite, __finitel, GLIBC_2_0);
+# endif
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, ___finite, finitel, GLIBC_2_0);
+# endif
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fmin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fmin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fminl (double x, double y)
+{
+  return fmin (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vprintf (const char *fmt, va_list ap)
+{
+  return __nldbl_vfprintf (stdout, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_trunc.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_trunc.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_trunc.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_remainder.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_remainder.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_remainder.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __remainder, remainderl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_scalbn.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_scalbn.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_scalbn.c>
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __scalbn, scalbnl, GLIBC_2_0);
+# endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __scalbn, scalbnl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-drem.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-drem.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+dreml (double x, double y)
+{
+  return drem (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+fprintf (FILE *stream, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfprintf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+extern __typeof (fprintf) _IO_fprintf attribute_hidden;
+weak_alias (fprintf, _IO_fprintf)
--- libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,3 @@
+/* Set temporarily to non-zero if long double should be considered
+   the same as double.  */
+__thread int __no_long_double attribute_tls_model_ie attribute_hidden;
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ctan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ctan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ctanl (double _Complex x)
+{
+  return ctan (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_lgamma.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_lgamma.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_lgamma.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __lgamma, lgammal, GLIBC_2_0);
+compat_symbol (libm, __gamma, gammal, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fmax.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fmax.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmaxl (double x, double y)
+{
+  return fmax (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/conj.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/conj.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/conj.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __conj, conjl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+lgammal (double x)
+{
+  return lgamma (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+fwscanf (FILE *stream, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwscanf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/carg.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/carg.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/carg.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __carg, cargl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_ccosh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ccosh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_ccosh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __ccosh, ccoshl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_casinhl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_casinhl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_casinhl.c>
+long_double_symbol (libm, __casinhl, casinhl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,13 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+obstack_printf (struct obstack *obstack, const char *fmt, ...)
+{
+  int result;
+  va_list ap;
+  va_start (ap, fmt);
+  result = __nldbl_obstack_vprintf (obstack, fmt, ap);
+  va_end (ap);
+  return result;
+}
--- libc/sysdeps/ieee754/ldbl-opt/cabsl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/cabsl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/cabsl.c>
+long_double_symbol (libm, __cabsl, cabsl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-remquo.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-remquo.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+remquol (double x, double y, int *quo)
+{
+  return remquo (x, y, quo);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_hypotl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_hypotl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_hypotl.c>
+long_double_symbol (libm, __hypotl, hypotl);
--- libc/sysdeps/ieee754/ldbl-opt/s_clog10.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_clog10.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,7 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_clog10.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __clog10, __clog10l, GLIBC_2_1);
+compat_symbol (libm, clog10, clog10l, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-exp10.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-exp10.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+exp10l (double x)
+{
+  return exp10 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-asin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-asin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+asinl (double x)
+{
+  return asin (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+sinl (double x)
+{
+  return sin (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_cexp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cexp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_cexp.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cexp, cexpl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_exp10l.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_exp10l.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_exp10l.c>
+long_double_symbol (libm, __exp10l, exp10l);
+long_double_symbol (libm, __pow10l, pow10l);
--- libc/sysdeps/ieee754/ldbl-opt/Makefile.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/Makefile	2006-01-13 03:37:31.000000000 -0500
@@ -0,0 +1,35 @@
+ifeq ($(subdir),math)
+libm-routines += s_nexttowardfd
+routines += math_ldbl_opt nldbl-compat
+
+extra-libs += libnldbl
+libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
+		 obstack_printf obstack_vprintf printf scanf snprintf \
+		 sprintf sscanf swprintf swscanf vasprintf vdprintf vfprintf \
+		 vfscanf vfwprintf vfwscanf vprintf vscanf vsnprintf \
+		 vsprintf vsscanf vswprintf vswscanf vwprintf vwscanf \
+		 wprintf wscanf printf_fp printf_size \
+		 fprintf_chk fwprintf_chk printf_chk snprintf_chk sprintf_chk \
+		 swprintf_chk vfprintf_chk vfwprintf_chk vprintf_chk \
+		 vsnprintf_chk vsprintf_chk vswprintf_chk vwprintf_chk \
+		 wprintf_chk \
+		 syslog syslog_chk vsyslog vsyslog_chk \
+		 strfmon strfmon_l \
+		 strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \
+		 qecvt qfcvt qgcvt qecvt_r qfcvt_r \
+		 isinf isnan finite signbit scalb log2 lgamma_r ceil \
+		 significand acos asin atan atan2 cos sin tan cosh sinh \
+		 tanh acosh asinh atanh exp log log10 exp10 pow10 expm1 \
+		 log1p logb exp2 sqrt cbrt fabs floor j0 j1 y0 y1 erf erfc \
+		 lgamma tgamma gamma rint nearbyint round trunc \
+		 copysign fdim fmax fmin nextafter pow hypot fmod drem \
+		 remainder ldexp scalbn frexp modf scalbln fma nan sincos \
+		 jn yn ilogb remquo lrint lround llrint llround nexttowardf \
+		 nexttoward conj cacos cacosh casin catan catanh ccos ccosh \
+		 casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \
+		 cabs carg cimag creal clog10
+libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
+libnldbl-inhibit-o = .os .ob .og .op .o
+libnldbl-static-only-routines = $(libnldbl-routines)
+
+endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-modf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-modf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+modfl (double x, double *iptr)
+{
+  return modf (x, iptr);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+nearbyintl (double x)
+{
+  return nearbyint (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_lrint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_lrint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_lrint.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_asinh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_asinh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_asinh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __asinh, asinhl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+csqrtl (double _Complex x)
+{
+  return csqrt (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_fmin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fmin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/s_fmin.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cabs.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cabs.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+cabsl (double _Complex x)
+{
+  return cabs (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_ccos.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ccos.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_ccos.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __ccos, ccosl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_ldexpl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ldexpl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_ldexpl.c>
+#ifdef IS_IN_libm
+long_double_symbol (libm, __ldexpl, ldexpl);
+#else
+long_double_symbol (libc, __ldexpl, ldexpl);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_atanhl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_atanhl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_atanhl.c>
+long_double_symbol (libm, __atanhl, atanhl);
--- libc/sysdeps/ieee754/ldbl-opt/s_catanl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_catanl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_catanl.c>
+long_double_symbol (libm, __catanl, catanl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-lrint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-lrint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long int
+attribute_hidden
+lrintl (double x)
+{
+  return lrint (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_floor.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_floor.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_floor.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __floor, floorl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+_IO_vfscanf (FILE *s, const char *fmt, _IO_va_list ap, int *errp)
+{
+  return __nldbl__IO_vfscanf (s, fmt, ap, errp);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-rint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-rint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+rintl (double x)
+{
+  return rint (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vfprintf (FILE *s, const char *fmt, va_list ap)
+{
+  return __nldbl_vfprintf (s, fmt, ap);
+}
+extern __typeof (vfprintf) _IO_vfprintf attribute_hidden;
+strong_alias (vfprintf, _IO_vfprintf)
--- libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h	2006-01-12 06:21:54.000000000 -0500
@@ -0,0 +1,36 @@
+#include <math.h>
+#include <math/math_private.h>
+#include <shlib-compat.h>
+#define LONG_DOUBLE_COMPAT(lib, introduced) \
+    SHLIB_COMPAT(lib, introduced, GLIBC_2_4)
+#define long_double_symbol(lib, local, symbol) \
+  long_double_symbol_1 (lib, local, symbol, GLIBC_2_4)
+#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
+# define ldbl_hidden_def(local, name) libc_hidden_ver (local, name)
+# define ldbl_strong_alias(name, aliasname) \
+  strong_alias (name, __GL_##name##_##aliasname) \
+  long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
+# define ldbl_weak_alias(name, aliasname) \
+  weak_alias (name, __GL_##name##_##aliasname) \
+  long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
+# define long_double_symbol_1(lib, local, symbol, version) \
+  versioned_symbol (lib, local, symbol, version)
+#elif defined HAVE_WEAK_SYMBOLS
+# define ldbl_hidden_def(local, name) libc_hidden_def (name)
+# define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
+# define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
+/* Note that weak_alias cannot be used - it is defined to nothing
+   in most of the files.  */
+# define long_double_symbol_1(lib, local, symbol, version) \
+  _weak_alias (local, symbol)
+#else
+# define ldbl_hidden_def(local, name) libc_hidden_def (name)
+# define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
+# define ldbl_weak_alias(name, aliasname) strong_alias (name, aliasname)
+# define long_double_symbol_1(lib, local, symbol, version) \
+  strong_alias (local, symbol)
+#endif
+/* Set temporarily to non-zero if long double should be considered
+   the same as double.  */
+extern __thread int __no_long_double attribute_tls_model_ie attribute_hidden;
+#define __ldbl_is_dbl __builtin_expect (__no_long_double, 0)
--- libc/sysdeps/ieee754/ldbl-opt/s_sin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_sin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+/* dbl-64/s_sin.c uses NAN and sincos identifiers internally.  */
+#define sincos sincos_disable
+#include <math_ldbl_opt.h>
+#undef NAN
+#undef sincos
+#include <sysdeps/ieee754/dbl-64/s_sin.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __sin, sinl, GLIBC_2_0);
+compat_symbol (libm, __cos, cosl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-lround.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-lround.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long int
+attribute_hidden
+lroundl (double x)
+{
+  return lround (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-casin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-casin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+casinl (double _Complex x)
+{
+  return casin (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-atanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-atanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+atanhl (double x)
+{
+  return atanh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_clog10l.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_clog10l.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#define __clog10l __clog10l_internal
+#include <math/s_clog10l.c>
+#undef __clog10l
+strong_alias (__clog10l_internal, __clog10l__internal)
+long_double_symbol (libm, __clog10l_internal, __clog10l);
+long_double_symbol (libm, __clog10l__internal, clog10l);
--- libc/sysdeps/ieee754/ldbl-opt/w_drem.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_drem.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_drem.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __drem, dreml, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-casinh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-casinh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+casinhl (double _Complex x)
+{
+  return casinh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-printf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-printf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+printf (const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfprintf (stdout, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+extern __typeof (printf) _IO_printf attribute_hidden;
+strong_alias (printf, _IO_printf)
--- libc/sysdeps/ieee754/ldbl-opt/w_j0.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_j0.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_j0.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, j0, j0l, GLIBC_2_0);
+compat_symbol (libm, y0, y0l, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_tanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_tanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_tanh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __tanh, tanhl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_atan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_atan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_atan.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, atan, atanl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_lgamma_r.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_lgamma_r.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_lgamma_r.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __lgamma_r, lgammal_r, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_csqrtl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_csqrtl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_csqrtl.c>
+long_double_symbol (libm, __csqrtl, csqrtl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-conj.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-conj.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+conjl (double _Complex x)
+{
+  return conj (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+fscanf (FILE *stream, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl__IO_vfscanf (stream, fmt, arg, NULL);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_significand.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_significand.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/s_significand.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __significand, significandl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,16 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
+		const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vswprintf_chk (s, n, flag, slen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+pow10l (double x)
+{
+  return pow10 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+swscanf (const wchar_t *s, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vswscanf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-y0.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-y0.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+y0l (double x)
+{
+  return y0 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_ctanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ctanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_ctanh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __ctanh, ctanhl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/cimagl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/cimagl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/cimagl.c>
+long_double_symbol (libm, __cimagl, cimagl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ctanhl (double _Complex x)
+{
+  return ctanh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_rint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_rint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_rint.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __rint, rintl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_log10l.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_log10l.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_log10l.c>
+long_double_symbol (libm, __log10l, log10l);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cos.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cos.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+cosl (double x)
+{
+  return cos (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-erfc.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-erfc.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+erfcl (double x)
+{
+  return erfc (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_fminl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fminl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_fminl.c>
+long_double_symbol (libm, __fminl, fminl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vprintf_chk (int flag, const char *fmt, va_list ap)
+{
+  return __nldbl___vfprintf_chk (stdout, flag, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_clog.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_clog.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_clog.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __clog, clogl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+vwscanf (const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vfwscanf (stdin, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_frexp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_frexp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_frexp.c>
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __frexp, frexpl, GLIBC_2_0);
+# endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __frexp, frexpl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_tan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_tan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_tan.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, tan, tanl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_csin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_csin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_csin.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __csin, csinl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_ctan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ctan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_ctan.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __ctan, ctanl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-trunc.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-trunc.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+truncl (double x)
+{
+  return trunc (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_sinh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_sinh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_sinh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __sinh, sinhl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-clog.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-clog.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+clogl (double _Complex x)
+{
+  return clog (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-llrint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-llrint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long long int
+attribute_hidden
+llrintl (double x)
+{
+  return llrint (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_acosl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_acosl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_acosl.c>
+long_double_symbol (libm, __acosl, acosl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-exp2.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-exp2.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+exp2l (double x)
+{
+  return exp2 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_j1l.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_j1l.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_j1l.c>
+long_double_symbol (libm, __j1l, j1l);
+long_double_symbol (libm, __y1l, y1l);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-finite.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-finite.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__finitel (double x)
+{
+  return __finite (x);
+}
+extern __typeof (__finitel) finitel attribute_hidden;
+weak_alias (__finitel, finitel)
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__fprintf_chk (FILE *stream, int flag, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfprintf_chk (stream, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#define qfcvt qfcvt_XXX
+#include "nldbl-compat.h"
+#undef qfcvt
+
+char *
+attribute_hidden
+qfcvt (double val, int ndigit, int *__restrict decpt, int *__restrict sign)
+{
+  return fcvt (val, ndigit, decpt, sign);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-tan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-tan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+tanl (double x)
+{
+  return tan (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cpow.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cpow.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cpowl (double _Complex x, double _Complex y)
+{
+  return cpow (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+ldexpl (double x, int exponent)
+{
+  return ldexp (x, exponent);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__printf_chk (int flag, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfprintf_chk (stdout, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/cabs.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/cabs.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/cabs.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cabs, cabsl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_log10.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_log10.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_log10.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __log10, log10l, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_isinf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_isinf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_isinf.c>
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0);
+compat_symbol (libc, isinf, isinfl, GLIBC_2_0);
+# endif
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/conjl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/conjl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/conjl.c>
+long_double_symbol (libm, __conjl, conjl);
--- libc/sysdeps/ieee754/ldbl-opt/s_cbrt.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cbrt.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_cbrt.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __cbrt, cbrtl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-creal.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-creal.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+creall (double _Complex x)
+{
+  return creal (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_jn.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_jn.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_jn.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, jn, jnl, GLIBC_2_0);
+compat_symbol (libm, yn, ynl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vswprintf (s, n, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,20 @@
+#define strtold_l strtold_l_XXX
+#define __strtold_l __strtold_l_XXX
+#define __strtod_l __strtod_l_XXX
+#include "nldbl-compat.h"
+#undef strtold_l
+#undef __strtold_l
+#undef __strtod_l
+
+extern double
+__strtod_l (__const char *__restrict __nptr, char **__restrict __endptr,
+	    __locale_t __loc);
+
+double
+attribute_hidden
+__strtold_l (const char *nptr, char **endptr, __locale_t loc)
+{
+  return __strtod_l (nptr, endptr, loc);
+}
+extern __typeof (__strtold_l) strtold_l attribute_hidden;
+weak_alias (__strtold_l, strtold_l)
--- libc/sysdeps/ieee754/ldbl-opt/w_sqrt.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_sqrt.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_sqrt.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-yn.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-yn.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+ynl (int n, double x)
+{
+  return yn (n, x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_catanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_catanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_catanh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __catanh, catanhl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-y1.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-y1.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+y1l (double x)
+{
+  return y1 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_exp10.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_exp10.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_exp10.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __exp10, exp10l, GLIBC_2_1);
+compat_symbol (libm, __pow10, pow10l, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_fdim.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fdim.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/s_fdim.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fdim, fdiml, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/creall.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/creall.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/creall.c>
+long_double_symbol (libm, __creall, creall);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,16 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+fwprintf (FILE *stream, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwprintf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__printf_fp (FILE *fp, const struct printf_info *info,
+	     const void *const *args)
+{
+  return __nldbl___printf_fp (fp, info, args);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cproj.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cproj.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cprojl (double _Complex x)
+{
+  return cproj (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_fmax.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fmax.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/s_fmax.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_casin.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_casin.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_casin.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __casin, casinl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+wprintf (const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwprintf (stdout, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cosh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cosh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+coshl (double x)
+{
+  return cosh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_expm1.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_expm1.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_expm1.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __expm1, expm1l, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fdim.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fdim.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fdiml (double x, double y)
+{
+  return fdim (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_dreml.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_dreml.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_dreml.c>
+long_double_symbol (libm, __dreml, dreml);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vsprintf_chk (char *string, int flag, size_t slen, const char *fmt,
+		va_list ap)
+{
+  return __nldbl___vsprintf_chk (string, flag, slen, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ccoshl (double _Complex x)
+{
+  return ccosh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_scalbln.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_scalbln.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_scalbln.c>
+#ifdef IS_IN_libm
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __scalbln, scalblnl, GLIBC_2_1);
+#endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
+compat_symbol (libc, __scalbln, scalblnl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ceil.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ceil.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+ceill (double x)
+{
+  return ceil (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_fmod.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_fmod.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_fmod.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __fmod, fmodl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_fabs.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fabs.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_fabs.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_catanhl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_catanhl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_catanhl.c>
+long_double_symbol (libm, __catanhl, catanhl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+sprintf (char *s, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vsprintf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+extern __typeof (sprintf) _IO_sprintf attribute_hidden;
+strong_alias (sprintf, _IO_sprintf)
--- libc/sysdeps/ieee754/ldbl-opt/w_sqrtl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_sqrtl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_sqrtl.c>
+long_double_symbol (libm, __sqrtl, sqrtl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-log.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-log.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+logl (double x)
+{
+  return log (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-isnan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-isnan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isnanl (double x)
+{
+  return __isnan (x);
+}
+extern __typeof (__isnanl) isnanl attribute_hidden;
+weak_alias (__isnanl, isnanl)
--- libc/sysdeps/ieee754/ldbl-opt/w_scalbl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_scalbl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_scalbl.c>
+long_double_symbol (libm, __scalbl, scalbl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sincos.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sincos.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+void
+attribute_hidden
+sincosl (double x, double *sinx, double *cosx)
+{
+  sincos (x, sinx, cosx);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,16 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__snprintf_chk (char *s, size_t maxlen, int flag, size_t slen,
+		const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vsnprintf_chk (s, maxlen, flag, slen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_ccosl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ccosl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_ccosl.c>
+long_double_symbol (libm, __ccosl, ccosl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+scalbnl (double x, int n)
+{
+  return scalbn (x, n);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,11 @@
+#define qfcvt_r qfcvt_r_XXX
+#include "nldbl-compat.h"
+#undef qfcvt_r
+
+int
+attribute_hidden
+qfcvt_r (double val, int ndigit, int *__restrict decpt, int *__restrict sign,
+	 char *__restrict buf, size_t len)
+{
+  return fcvt_r (val, ndigit, decpt, sign, buf, len);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_ccoshl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ccoshl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_ccoshl.c>
+long_double_symbol (libm, __ccoshl, ccoshl);
--- libc/sysdeps/ieee754/ldbl-opt/s_ldexp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ldexp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <math/s_ldexp.c>
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __ldexp, ldexpl, GLIBC_2_0);
+# endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __ldexp, ldexpl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_clogl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_clogl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_clogl.c>
+long_double_symbol (libm, __clogl, clogl);
--- libc/sysdeps/ieee754/ldbl-opt/s_catan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_catan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_catan.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __catan, catanl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-asinh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-asinh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+asinhl (double x)
+{
+  return asinh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_csqrt.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_csqrt.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_csqrt.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __csqrt, csqrtl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,16 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+snprintf (char *s, size_t maxlen, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vsnprintf (s, maxlen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-frexp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-frexp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+frexpl (double x, int *exponent)
+{
+  return frexp (x, exponent);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-round.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-round.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+roundl (double x)
+{
+  return round (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-j1.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-j1.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+j1l (double x)
+{
+  return j1 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vsscanf (const char *string, const char *fmt, va_list ap)
+{
+  return __nldbl_vsscanf (string, fmt, ap);
+}
+extern __typeof (__vsscanf) vsscanf attribute_hidden;
+weak_alias (__vsscanf, vsscanf)
--- libc/sysdeps/ieee754/ldbl-opt/w_coshl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_coshl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_coshl.c>
+long_double_symbol (libm, __coshl, coshl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vsnprintf (char *string, size_t maxlen, const char *fmt, va_list ap)
+{
+  return __nldbl_vsnprintf (string, maxlen, fmt, ap);
+}
+extern __typeof (vsnprintf) __vsnprintf attribute_hidden;
+weak_alias (vsnprintf, __vsnprintf)
--- libc/sysdeps/ieee754/ldbl-opt/s_cacosl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cacosl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_cacosl.c>
+long_double_symbol (libm, __cacosl, cacosl);
--- libc/sysdeps/ieee754/ldbl-opt/s_fdiml.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fdiml.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_fdiml.c>
+long_double_symbol (libm, __fdiml, fdiml);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-floor.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-floor.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+floorl (double x)
+{
+  return floor (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_cosh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_cosh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_cosh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __cosh, coshl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-isinf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-isinf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isinfl (double x)
+{
+  return __isinf (x);
+}
+extern __typeof (__isinfl) isinfl attribute_hidden;
+weak_alias (__isinfl, isinfl)
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-carg.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-carg.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+cargl (double _Complex x)
+{
+  return carg (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_nextafter.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_nextafter.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,12 @@
+#include <math_ldbl_opt.h>
+#include <math/s_nextafter.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __nextafter, nextafterl, GLIBC_2_0);
+#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+strong_alias (__nextafter, __nexttowardd)
+strong_alias (__nextafter, __nexttowardld)
+#undef nexttoward
+compat_symbol (libm, __nexttowardd, nexttoward, GLIBC_2_1);
+compat_symbol (libm, __nexttowardld, nexttowardl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,10 @@
+#define wcstold wcstold_XXX
+#include "nldbl-compat.h"
+#undef wcstold
+
+double
+attribute_hidden
+wcstold (const wchar_t *nptr, wchar_t **endptr)
+{
+  return wcstod (nptr, endptr);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_cpowl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cpowl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_cpowl.c>
+long_double_symbol (libm, __cpowl, cpowl);
--- libc/sysdeps/ieee754/ldbl-opt/s_ctanhl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ctanhl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_ctanhl.c>
+long_double_symbol (libm, __ctanhl, ctanhl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+vasprintf (char **result_ptr, const char *fmt, va_list ap)
+{
+  return __nldbl_vasprintf (result_ptr, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,11 @@
+#define qecvt_r qecvt_r_XXX
+#include "nldbl-compat.h"
+#undef qecvt_r
+
+int
+attribute_hidden
+qecvt_r (double val, int ndigit, int *__restrict decpt, int *__restrict sign,
+	 char *__restrict buf, size_t len)
+{
+  return ecvt_r (val, ndigit, decpt, sign, buf, len);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_log1p.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_log1p.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_log1p.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __log1p, log1pl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+scalblnl (double x, long int n)
+{
+  return scalbln (x, n);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__wprintf_chk (int flag, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfwprintf_chk (stdout, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_fmodl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_fmodl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_fmodl.c>
+long_double_symbol (libm, __fmodl, fmodl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cimag.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cimag.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+cimagl (double _Complex x)
+{
+  return cimag (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-exp.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-exp.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+expl (double x)
+{
+  return exp (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_erf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_erf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_erf.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __erf, erfl, GLIBC_2_0);
+compat_symbol (libm, __erfc, erfcl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-hypot.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-hypot.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+hypotl (double x, double y)
+{
+  return hypot (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_copysign.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_copysign.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_copysign.c>
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
+# endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___vfwprintf_chk (s, flag, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-expm1.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-expm1.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+expm1l (double x)
+{
+  return expm1 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_acoshl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_acoshl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_acoshl.c>
+long_double_symbol (libm, __acoshl, acoshl);
--- libc/sysdeps/ieee754/ldbl-opt/s_casinl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_casinl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_casinl.c>
+long_double_symbol (libm, __casinl, casinl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vfwscanf (s, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_log2l.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_log2l.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_log2l.c>
+long_double_symbol (libm, __log2l, log2l);
--- libc/sysdeps/ieee754/ldbl-opt/w_atan2.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_atan2.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_atan2.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __atan2, atan2l, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_round.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_round.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_round.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __round, roundl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-clog10.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-clog10.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,11 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+clog10l (double _Complex x)
+{
+  return clog10 (x);
+}
+extern __typeof (clog10l) __clog10l attribute_hidden;
+weak_alias (clog10l, __clog10l)
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-log2.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-log2.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+log2l (double x)
+{
+  return log2 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_asinl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_asinl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_asinl.c>
+long_double_symbol (libm, __asinl, asinl);
--- libc/sysdeps/ieee754/ldbl-opt/w_atanh.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_atanh.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_atanh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __atanh, atanhl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/creal.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/creal.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/creal.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __creal, creall, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_nearbyint.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_nearbyint.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_nearbyint.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_fma.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fma.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/s_fma.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fma, fmal, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+wscanf (const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwscanf (stdin, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_powl.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_powl.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_powl.c>
+long_double_symbol (libm, __powl, powl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ccos.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ccos.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ccosl (double _Complex x)
+{
+  return ccos (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-catan.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-catan.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+catanl (double _Complex x)
+{
+  return catan (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c.jj	2006-01-12 06:11:39.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c	2006-01-12 06:11:39.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vwprintf (const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vfwprintf (stdout, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fmod.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fmod.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmodl (double x, double y)
+{
+  return fmod (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_significandl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_significandl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_significandl.c>
+long_double_symbol (libm, __significandl, significandl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sinh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sinh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+sinhl (double x)
+{
+  return sinh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,14 @@
+#define wcstold_l wcstold_l_XXX
+#define __wcstold_l __wcstold_l_XXX
+#include "nldbl-compat.h"
+#undef wcstold_l
+#undef __wcstold_l
+
+double
+attribute_hidden
+__wcstold_l (const wchar_t *nptr, wchar_t **endptr, __locale_t loc)
+{
+  return __wcstod_l (nptr, endptr, loc);
+}
+extern __typeof (__wcstold_l) wcstold_l attribute_hidden;
+weak_alias (__wcstold_l, wcstold_l)
--- libc/sysdeps/ieee754/ldbl-opt/s_ilogb.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ilogb.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_ilogb.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __ilogb, ilogbl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-log10.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-log10.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+log10l (double x)
+{
+  return log10 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_acosh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_acosh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_acosh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __acosh, acoshl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fabs.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fabs.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fabsl (double x)
+{
+  return fabs (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-csin.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-csin.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+csinl (double _Complex x)
+{
+  return csin (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-jn.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-jn.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+jnl (int n, double x)
+{
+  return jn (n, x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vswprintf (string, maxlen, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+_IO_vsprintf (char *string, const char *fmt, va_list ap)
+{
+  return __nldbl_vsprintf (string, fmt, ap);
+}
+extern __typeof (_IO_vsprintf) vsprintf attribute_hidden;
+weak_alias (_IO_vsprintf, vsprintf)
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-j0.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-j0.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+j0l (double x)
+{
+  return j0 (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-catanh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-catanh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+catanhl (double _Complex x)
+{
+  return catanh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-acos.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-acos.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+acosl (double x)
+{
+  return acos (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#define __wcstold_internal __wcstold_internal_XXX
+#include "nldbl-compat.h"
+#undef __wcstold_internal
+
+double
+attribute_hidden
+__wcstold_internal (const wchar_t *nptr, wchar_t **endptr, int group)
+{
+  return __wcstod_internal (nptr, endptr, group);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+ilogbl (double x)
+{
+  return ilogb (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vdprintf (int d, const char *fmt, va_list arg)
+{
+  return __nldbl_vdprintf (d, fmt, arg);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_tgammal.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_tgammal.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_tgammal.c>
+long_double_symbol (libm, __tgammal, tgammal);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-acosh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-acosh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+acoshl (double x)
+{
+  return acosh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_cacosh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cacosh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_cacosh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cacosh, cacoshl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+sscanf (const char *s, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vsscanf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+extern __typeof (sscanf) _IO_sscanf attribute_hidden;
+strong_alias (sscanf, _IO_sscanf)
--- libc/sysdeps/ieee754/ldbl-opt/w_sinhl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_sinhl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_sinhl.c>
+long_double_symbol (libm, __sinhl, sinhl);
--- libc/sysdeps/ieee754/ldbl-opt/w_j0l.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_j0l.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_j0l.c>
+long_double_symbol (libm, __j0l, j0l);
+long_double_symbol (libm, __y0l, y0l);
--- libc/sysdeps/ieee754/ldbl-opt/s_remquo.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_remquo.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_remquo.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __remquo, remquol, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-signbit.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-signbit.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#define __signbitl __signbitl_XXX
+#include "nldbl-compat.h"
+#undef __signbitl
+
+int
+attribute_hidden
+__signbitl (double x)
+{
+  return __signbit (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_cacos.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cacos.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_cacos.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cacos, cacosl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_lgammal_r.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_lgammal_r.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_lgammal_r.c>
+long_double_symbol (libm, __lgammal_r, lgammal_r);
--- libc/sysdeps/ieee754/ldbl-opt/w_exp.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_exp.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/w_exp.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __exp, expl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+tgammal (double x)
+{
+  return tgamma (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__asprintf (char **string_ptr, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vasprintf (string_ptr, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+extern __typeof (__asprintf) asprintf attribute_hidden;
+weak_alias (__asprintf, asprintf)
--- libc/sysdeps/ieee754/ldbl-opt/Versions.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/Versions	2006-01-13 06:21:00.000000000 -0500
@@ -0,0 +1,82 @@
+libc {
+  GLIBC_2.4 {
+    # IEEE quad long double functions (older symver is for
+    # IEEE double long double).
+    ldexpl; copysignl; finitel; frexpl; isinfl; isnanl; modfl;
+    __isinfl; __isnanl; __finitel; __signbitl;
+    scalbnl;
+    qecvt; qfcvt; qgcvt; qecvt_r; qfcvt_r;
+
+    strtold; __strtold_internal; wcstold; __wcstold_internal;
+    __strtold_l; strtold_l; __wcstold_l; wcstold_l;
+
+    strfmon; __strfmon_l; strfmon_l;
+    __nldbl_strfmon; __nldbl___strfmon_l; __nldbl_strfmon_l;
+    __nldbl___vstrfmon; __nldbl___vstrfmon_l;
+
+    syslog; vsyslog;
+    __nldbl_syslog; __nldbl_vsyslog;
+    __nldbl___syslog_chk; __nldbl___vsyslog_chk;
+
+    # *printf* family, using IEEE quad long double
+    __asprintf; asprintf; dprintf; fprintf; fwprintf; _IO_fprintf;
+    _IO_printf; _IO_sprintf; _IO_vfprintf; _IO_vsprintf; obstack_printf;
+    obstack_vprintf; printf; __printf_fp; printf_size; snprintf; sprintf;
+    swprintf; vasprintf; vdprintf; vfprintf; vfwprintf; vprintf; vsnprintf;
+    __vsnprintf; vsprintf; vswprintf; vwprintf; wprintf;
+
+    # *printf* family, using IEEE double as long double
+    # The standard functions are __REDIRECTed to these if -mlong-double-128
+    __nldbl___asprintf; __nldbl_asprintf; __nldbl_dprintf; __nldbl_fprintf;
+    __nldbl_fwprintf; __nldbl__IO_fprintf; __nldbl__IO_printf;
+    __nldbl__IO_sprintf; __nldbl__IO_vfprintf; __nldbl__IO_vsprintf;
+    __nldbl_obstack_printf; __nldbl_obstack_vprintf; __nldbl_printf;
+    __nldbl___printf_fp; __nldbl_printf_size; __nldbl_snprintf;
+    __nldbl_sprintf; __nldbl_swprintf; __nldbl_vasprintf; __nldbl_vdprintf;
+    __nldbl_vfprintf; __nldbl_vfwprintf; __nldbl_vprintf; __nldbl_vsnprintf;
+    __nldbl___vsnprintf; __nldbl_vsprintf; __nldbl_vswprintf;
+    __nldbl_vwprintf; __nldbl_wprintf;
+
+    # *scanf family, using IEEE quad long double
+    _IO_sscanf; _IO_vfscanf; __vfscanf; __vsscanf; fscanf; fwscanf; scanf;
+    sscanf; swscanf; vfscanf; vfwscanf; vscanf; vsscanf; vswscanf; vwscanf;
+    wscanf;
+
+    # *scanf family, using IEEE double as long double
+    __nldbl__IO_sscanf; __nldbl__IO_vfscanf; __nldbl___vfscanf;
+    __nldbl___vsscanf; __nldbl_fscanf; __nldbl_fwscanf; __nldbl_scanf;
+    __nldbl_sscanf; __nldbl_swscanf; __nldbl_vfscanf; __nldbl_vfwscanf;
+    __nldbl_vscanf; __nldbl_vsscanf; __nldbl_vswscanf; __nldbl_vwscanf;
+    __nldbl_wscanf;
+
+    # checking versions, using IEEE quad long double
+    __sprintf_chk; __vsprintf_chk; __snprintf_chk; __vsnprintf_chk;
+    __printf_chk; __fprintf_chk; __vprintf_chk; __vfprintf_chk;
+
+    # checking versions, using IEEE double as long double
+    __nldbl___sprintf_chk; __nldbl___vsprintf_chk; __nldbl___snprintf_chk;
+    __nldbl___vsnprintf_chk; __nldbl___printf_chk; __nldbl___fprintf_chk;
+    __nldbl___vprintf_chk; __nldbl___vfprintf_chk;
+    __nldbl___swprintf_chk; __nldbl___vswprintf_chk; __nldbl___fwprintf_chk;
+    __nldbl___wprintf_chk; __nldbl___vfwprintf_chk; __nldbl___vwprintf_chk;
+  }
+}
+libm {
+  GLIBC_2.4 {
+    # IEEE quad long double functions (older symver is for
+    # IEEE double as long double).
+    cabsl; cargl; cimagl; conjl; creall; cacosl; cacoshl; casinl;
+    catanl; catanhl; ccosl; ccoshl; casinhl; cexpl; clogl; __clog10l;
+    clog10l; cpowl; cprojl; csinl; csinhl; csqrtl; ctanl; ctanhl;
+    fdiml; fmal; fmaxl; fminl; ldexpl; nanl; nextafterl; nexttowardl;
+    significandl; acosl; acoshl; asinl; atan2l; atanhl; coshl; dreml;
+    exp10l; pow10l; exp2l; fmodl; hypotl; j0l; y0l; j1l; y1l; jnl; ynl;
+    lgammal; gammal; lgammal_r; logl; log10l; log2l; powl; remainderl;
+    scalbl; sinhl; sqrtl; tgammal; asinhl; atanl; cbrtl; ceill; copysignl;
+    erfl; erfcl; expm1l; fabsl; finitel; floorl; frexpl; ilogbl;
+    llrintl; llroundl; log1pl; logbl; lrintl; lroundl; modfl;
+    nearbyintl; remquol; rintl; roundl; scalblnl; scalbnl; sinl; cosl;
+    sincosl; tanl; tanhl; truncl; expl; __finitel; __signbitl;
+    __fpclassifyl; nexttowardf; nexttoward; __nldbl_nexttowardf;
+  }
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h	2006-01-13 12:35:38.000000000 -0500
@@ -0,0 +1,67 @@
+/* Prototypes for compatibility double == long double entry points.
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef __NLDBL_COMPAT_H
+#define __NLDBL_COMPAT_H	1
+
+/* Avoid long double prototypes.  */
+#define __NO_LONG_DOUBLE_MATH	1
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <printf.h>
+#include <wchar.h>
+#include <math.h>
+#include <monetary.h>
+
+extern __typeof (_IO_vfscanf) __nldbl__IO_vfscanf;
+extern __typeof (vfscanf) __nldbl_vfscanf;
+extern __typeof (vfwscanf) __nldbl_vfwscanf;
+extern __typeof (obstack_vprintf) __nldbl_obstack_vprintf __THROW;
+extern __typeof (vasprintf) __nldbl_vasprintf __THROW;
+extern __typeof (vdprintf) __nldbl_vdprintf;
+extern __typeof (vfprintf) __nldbl_vfprintf;
+extern __typeof (vfwprintf) __nldbl_vfwprintf;
+extern __typeof (vsnprintf) __nldbl_vsnprintf __THROW;
+extern __typeof (vsprintf) __nldbl_vsprintf __THROW;
+extern __typeof (vsscanf) __nldbl_vsscanf __THROW;
+extern __typeof (vswprintf) __nldbl_vswprintf __THROW;
+extern __typeof (vswscanf) __nldbl_vswscanf __THROW;
+extern __typeof (__printf_fp) __nldbl___printf_fp;
+extern __typeof (printf_size) __nldbl_printf_size __THROW;
+extern int __nldbl___vfprintf_chk (FILE *__restrict, int,
+				   const char *__restrict, _G_va_list);
+extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
+				    const wchar_t *__restrict, __gnuc_va_list);
+extern int __nldbl___vsprintf_chk (char *__restrict, int, size_t,
+				   const char *__restrict, _G_va_list) __THROW;
+extern int __nldbl___vsnprintf_chk (char *__restrict, size_t, int, size_t,
+				    const char *__restrict, _G_va_list)
+     __THROW;
+extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
+				    const wchar_t *__restrict, __gnuc_va_list)
+     __THROW;
+extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
+extern ssize_t __nldbl___vstrfmon (char *, size_t, const char *, va_list)
+     __THROW;
+extern ssize_t  __nldbl___vstrfmon_l (char *, size_t, __locale_t,
+				      const char *, va_list) __THROW;
+
+#endif /* __NLDBL_COMPAT_H */
--- libc/sysdeps/ieee754/ldbl-opt/w_hypot.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_hypot.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_hypot.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __hypot, hypotl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-nan.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-nan.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+nanl (const char *tag)
+{
+  return nan (tag);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vfwprintf (s, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap)
+{
+  return __nldbl___vfprintf_chk (s, flag, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_ceil.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ceil.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_ceil.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __ceil, ceill, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_nanl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_nanl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_nanl.c>
+long_double_symbol (libm, __nanl, nanl);
--- libc/sysdeps/ieee754/ldbl-opt/s_cproj.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cproj.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_cproj.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cproj, cprojl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_fmal.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fmal.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_fmal.c>
+long_double_symbol (libm, __fmal, fmal);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-pow.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-pow.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+powl (double x, double y)
+{
+  return pow (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-remainder.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-remainder.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+remainderl (double x, double y)
+{
+  return remainder (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_nan.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_nan.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/s_nan.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nan, nanl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+dprintf (int d, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vdprintf (d, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#define qgcvt qgcvt_XXX
+#include "nldbl-compat.h"
+#undef qgcvt
+
+char *
+attribute_hidden
+qgcvt (double val, int ndigit, char *buf)
+{
+  return gcvt (val, ndigit, buf);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-strtold.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-strtold.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#define strtold strtold_XXX
+#include "nldbl-compat.h"
+#undef strtold
+
+double
+attribute_hidden
+strtold (const char *nptr, char **endptr)
+{
+  return strtod (nptr, endptr);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-scanf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-scanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+scanf (const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl__IO_vfscanf (stdin, fmt, arg, NULL);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+copysignl (double x, double y)
+{
+  return copysign (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_log2.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_log2.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_log2.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __log2, log2l, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-erf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-erf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+erfl (double x)
+{
+  return erf (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vwprintf_chk (int flag, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___vfwprintf_chk (stdout, flag, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_scalb.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_scalb.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_scalb.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __scalb, scalbl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_pow.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_pow.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_pow.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __pow, powl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_fmaxl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_fmaxl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_fmaxl.c>
+long_double_symbol (libm, __fmaxl, fmaxl);
--- libc/sysdeps/ieee754/ldbl-opt/cimag.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/cimag.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/cimag.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __cimag, cimagl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_jnl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_jnl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_jnl.c>
+long_double_symbol (libm, __jnl, jnl);
+long_double_symbol (libm, __ynl, ynl);
--- libc/sysdeps/ieee754/ldbl-opt/s_logb.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_logb.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_logb.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __logb, logbl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_cprojl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cprojl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_cprojl.c>
+long_double_symbol (libm, __cprojl, cprojl);
--- libc/sysdeps/ieee754/ldbl-opt/w_atan2l.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_atan2l.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_atan2l.c>
+long_double_symbol (libm, __atan2l, atan2l);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cacoshl (double _Complex x)
+{
+  return cacosh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_logl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_logl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_logl.c>
+long_double_symbol (libm, __logl, logl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vfscanf (FILE *s, const char *fmt, va_list ap)
+{
+  return __nldbl__IO_vfscanf (s, fmt, ap, NULL);
+}
+extern __typeof (__vfscanf) vfscanf attribute_hidden;
+weak_alias (__vfscanf, vfscanf)
--- libc/sysdeps/ieee754/ldbl-opt/w_asin.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_asin.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_asin.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __asin, asinl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vsnprintf_chk (char *string, size_t maxlen, int flag, size_t slen,
+		 const char *fmt, va_list ap)
+{
+  return __nldbl___vsnprintf_chk (string, maxlen, flag, slen, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_csinhl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_csinhl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_csinhl.c>
+long_double_symbol (libm, __csinhl, csinhl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-significand.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-significand.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+significandl (double x)
+{
+  return significand (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#define __strtold_internal __strtold_internal_XXX
+#include "nldbl-compat.h"
+#undef __strtold_internal
+
+double
+attribute_hidden
+__strtold_internal (const char *nptr, char **endptr, int group)
+{
+  return __strtod_internal (nptr, endptr, group);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-fma.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-fma.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmal (double x, double y, double z)
+{
+  return fma (x, y, z);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_cacoshl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_cacoshl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_cacoshl.c>
+long_double_symbol (libm, __cacoshl, cacoshl);
--- libc/sysdeps/ieee754/ldbl-opt/s_csinh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_csinh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#include <math/s_csinh.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __csinh, csinhl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_log.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_log.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_log.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __log, logl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+nextafterl (double x, double y)
+{
+  return nextafter (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/cargl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/cargl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/cargl.c>
+long_double_symbol (libm, __cargl, cargl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+sqrtl (double x)
+{
+  return sqrt (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cexp.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cexp.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cexpl (double _Complex x)
+{
+  return cexp (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_llround.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_llround.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_llround.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/w_lgammal.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_lgammal.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_lgammal.c>
+long_double_symbol (libm, __lgammal, lgammal);
+long_double_symbol (libm, __gammal, gammal);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
+		 const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___vswprintf_chk (string, maxlen, flag, slen, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+weak_function
+vscanf (const char *fmt, va_list ap)
+{
+  return __nldbl__IO_vfscanf (stdin, fmt, ap, NULL);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,10 @@
+#define qecvt qecvt_XXX
+#include "nldbl-compat.h"
+#undef qecvt
+
+char *
+attribute_hidden
+qecvt (double val, int ndigit, int *__restrict decpt, int *__restrict sign)
+{
+  return ecvt (val, ndigit, decpt, sign);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vswscanf (string, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/w_remainderl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_remainderl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_remainderl.c>
+long_double_symbol (libm, __remainderl, remainderl);
--- libc/sysdeps/ieee754/ldbl-opt/s_llrint.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_llrint.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_llrint.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-llround.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-llround.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long long int
+attribute_hidden
+llroundl (double x)
+{
+  return llround (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cacos.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cacos.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cacosl (double _Complex x)
+{
+  return cacos (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_isnan.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_isnan.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_isnan.c>
+#ifndef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0);
+compat_symbol (libc, isnan, isnanl, GLIBC_2_0);
+# endif
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-scalb.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-scalb.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+scalbl (double x, double n)
+{
+  return scalb (x, n);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_modf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_modf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_modf.c>
+#ifdef IS_IN_libm
+# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __modf, modfl, GLIBC_2_0);
+# endif
+#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __modf, modfl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c	2006-01-12 13:14:01.000000000 -0500
@@ -0,0 +1,852 @@
+/* *printf* family compatibility routines for IEEE double as long double
+   Copyright (C) 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <libioP.h>
+#include <wchar.h>
+#include <printf.h>
+#include <monetary.h>
+#include <locale/localeinfo.h>
+#include <sys/syslog.h>
+#include <bits/libc-lock.h>
+
+#include "nldbl-compat.h"
+
+libc_hidden_proto (__nldbl_vfprintf)
+libc_hidden_proto (__nldbl_vsscanf)
+libc_hidden_proto (__nldbl_vsprintf)
+libc_hidden_proto (__nldbl_vfscanf)
+libc_hidden_proto (__nldbl_vfwscanf)
+libc_hidden_proto (__nldbl_vdprintf)
+libc_hidden_proto (__nldbl_vswscanf)
+libc_hidden_proto (__nldbl_vfwprintf)
+libc_hidden_proto (__nldbl_vswprintf)
+libc_hidden_proto (__nldbl_vsnprintf)
+libc_hidden_proto (__nldbl_vasprintf)
+libc_hidden_proto (__nldbl_obstack_vprintf)
+libc_hidden_proto (__nldbl___vfwprintf_chk)
+libc_hidden_proto (__nldbl___vsnprintf_chk)
+libc_hidden_proto (__nldbl___vfprintf_chk)
+libc_hidden_proto (__nldbl___vsyslog_chk)
+libc_hidden_proto (__nldbl___vsprintf_chk)
+libc_hidden_proto (__nldbl___vswprintf_chk)
+libc_hidden_proto (__nldbl___vstrfmon)
+libc_hidden_proto (__nldbl___vstrfmon_l)
+
+static void
+__nldbl_cleanup (void *arg)
+{
+  __no_long_double = 0;
+}
+
+#define set_no_long_double() \
+  __libc_cleanup_push (__nldbl_cleanup, NULL); __no_long_double = 1
+#define clear_no_long_double() \
+  __no_long_double = 0; __libc_cleanup_pop (0)
+
+/* Compatibility with IEEE double as long double.
+   IEEE quad long double is used by default for most programs, so
+   we don't need to split this into one file per function for the
+   sake of statically linked programs.  */
+
+int
+attribute_compat_text_section
+__nldbl___asprintf (char **string_ptr, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vasprintf (string_ptr, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+weak_alias (__nldbl___asprintf, __nldbl_asprintf)
+
+int
+attribute_compat_text_section
+__nldbl_dprintf (int d, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vdprintf (d, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_fprintf (FILE *stream, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfprintf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
+
+int
+attribute_compat_text_section weak_function
+__nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwprintf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_printf (const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfprintf (stdout, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+strong_alias (__nldbl_printf, __nldbl__IO_printf)
+
+int
+attribute_compat_text_section
+__nldbl_sprintf (char *s, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vsprintf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+strong_alias (__nldbl_sprintf, __nldbl__IO_sprintf)
+
+int
+attribute_compat_text_section
+__nldbl_vfprintf (FILE *s, const char *fmt, va_list ap)
+{
+  int done;
+  set_no_long_double ();
+  done = INTUSE(_IO_vfprintf) (s, fmt, ap);
+  clear_no_long_double ();
+  return done;
+}
+libc_hidden_def (__nldbl_vfprintf)
+strong_alias (__nldbl_vfprintf, __nldbl__IO_vfprintf)
+
+int
+attribute_compat_text_section
+__nldbl__IO_vsprintf (char *string, const char *fmt, va_list ap)
+{
+  int done;
+  __no_long_double = 1;
+  done = INTUSE(_IO_vsprintf) (string, fmt, ap);
+  __no_long_double = 0;
+  return done;
+}
+weak_alias (__nldbl__IO_vsprintf, __nldbl_vsprintf)
+libc_hidden_def (__nldbl_vsprintf)
+
+int
+attribute_compat_text_section
+__nldbl_obstack_vprintf (struct obstack *obstack, const char *fmt,
+			 va_list ap)
+{
+  int done;
+  __no_long_double = 1;
+  done = _IO_obstack_vprintf (obstack, fmt, ap);
+  __no_long_double = 0;
+  return done;
+}
+libc_hidden_def (__nldbl_obstack_vprintf)
+
+int
+attribute_compat_text_section
+__nldbl_obstack_printf (struct obstack *obstack, const char *fmt, ...)
+{
+  int result;
+  va_list ap;
+  va_start (ap, fmt);
+  result = __nldbl_obstack_vprintf (obstack, fmt, ap);
+  va_end (ap);
+  return result;
+}
+
+int
+attribute_compat_text_section weak_function
+__nldbl_snprintf (char *s, size_t maxlen, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vsnprintf (s, maxlen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vswprintf (s, n, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section weak_function
+__nldbl_vasprintf (char **result_ptr, const char *fmt, va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = _IO_vasprintf (result_ptr, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl_vasprintf)
+
+int
+attribute_compat_text_section
+__nldbl_vdprintf (int d, const char *fmt, va_list arg)
+{
+  int res;
+  set_no_long_double ();
+  res = _IO_vdprintf (d, fmt, arg);
+  clear_no_long_double ();
+  return res;
+}
+libc_hidden_def (__nldbl_vdprintf)
+
+int
+attribute_compat_text_section weak_function
+__nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+  int res;
+  set_no_long_double ();
+  res = _IO_vfwprintf (s, fmt, ap);
+  clear_no_long_double ();
+  return res;
+}
+libc_hidden_def (__nldbl_vfwprintf)
+
+int
+attribute_compat_text_section
+__nldbl_vprintf (const char *fmt, va_list ap)
+{
+  return __nldbl_vfprintf (stdout, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl_vsnprintf (char *string, size_t maxlen, const char *fmt,
+		   va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = _IO_vsnprintf (string, maxlen, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl_vsnprintf)
+weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
+
+int
+attribute_compat_text_section weak_function
+__nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
+		   va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = _IO_vswprintf (string, maxlen, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl_vswprintf)
+
+int
+attribute_compat_text_section
+__nldbl_vwprintf (const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vfwprintf (stdout, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl_wprintf (const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwprintf (stdout, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl__IO_vfscanf (FILE *s, const char *fmt, _IO_va_list ap,
+		    int *errp)
+{
+  int res;
+  set_no_long_double ();
+  res = INTUSE(_IO_vfscanf) (s, fmt, ap, errp);
+  clear_no_long_double ();
+  return res;
+}
+
+int
+attribute_compat_text_section
+__nldbl___vfscanf (FILE *s, const char *fmt, va_list ap)
+{
+  int res;
+  set_no_long_double ();
+  res = INTUSE(_IO_vfscanf) (s, fmt, ap, NULL);
+  clear_no_long_double ();
+  return res;
+}
+weak_alias (__nldbl___vfscanf, __nldbl_vfscanf)
+libc_hidden_def (__nldbl_vfscanf)
+
+int
+attribute_compat_text_section
+__nldbl_sscanf (const char *s, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vsscanf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+strong_alias (__nldbl_sscanf, __nldbl__IO_sscanf)
+
+int
+attribute_compat_text_section
+__nldbl___vsscanf (const char *string, const char *fmt, va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = _IO_vsscanf (string, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+weak_alias (__nldbl___vsscanf, __nldbl_vsscanf)
+libc_hidden_def (__nldbl_vsscanf)
+
+int
+attribute_compat_text_section weak_function
+__nldbl_vscanf (const char *fmt, va_list ap)
+{
+  return __nldbl_vfscanf (stdin, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl_fscanf (FILE *stream, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfscanf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_scanf (const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfscanf (stdin, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+  int res;
+  set_no_long_double ();
+  res = _IO_vfwscanf (s, fmt, ap, NULL);
+  clear_no_long_double ();
+  return res;
+}
+libc_hidden_def (__nldbl_vfwscanf)
+
+int
+attribute_compat_text_section
+__nldbl_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vswscanf (s, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = vswscanf (string, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl_vswscanf)
+
+int
+attribute_compat_text_section weak_function
+__nldbl_vwscanf (const wchar_t *fmt, va_list ap)
+{
+  return __nldbl_vfwscanf (stdin, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl_fwscanf (FILE *stream, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwscanf (stream, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl_wscanf (const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl_vfwscanf (stdin, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___fprintf_chk (FILE *stream, int flag, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfprintf_chk (stream, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfwprintf_chk (stream, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___printf_chk (int flag, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfprintf_chk (stdout, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___snprintf_chk (char *s, size_t maxlen, int flag, size_t slen,
+			const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vsnprintf_chk (s, maxlen, flag, slen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___sprintf_chk (char *s, int flag, size_t slen, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vsprintf_chk (s, flag, slen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
+			const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vswprintf_chk (s, n, flag, slen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap)
+{
+  int res;
+  set_no_long_double ();
+  res = __vfprintf_chk (s, flag, fmt, ap);
+  clear_no_long_double ();
+  return res;
+}
+libc_hidden_def (__nldbl___vfprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
+{
+  int res;
+  set_no_long_double ();
+  res = __vfwprintf_chk (s, flag, fmt, ap);
+  clear_no_long_double ();
+  return res;
+}
+libc_hidden_def (__nldbl___vfwprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___vprintf_chk (int flag, const char *fmt, va_list ap)
+{
+  return __nldbl___vfprintf_chk (stdout, flag, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl___vsnprintf_chk (char *string, size_t maxlen, int flag, size_t slen,
+			 const char *fmt, va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = __vsnprintf_chk (string, maxlen, flag, slen, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl___vsnprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___vsprintf_chk (char *string, int flag, size_t slen, const char *fmt,
+			va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = __vsprintf_chk (string, flag, slen, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl___vsprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
+			 const wchar_t *fmt, va_list ap)
+{
+  int res;
+  __no_long_double = 1;
+  res = __vswprintf_chk (string, maxlen, flag, slen, fmt, ap);
+  __no_long_double = 0;
+  return res;
+}
+libc_hidden_def (__nldbl___vswprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___vwprintf_chk (int flag, const wchar_t *fmt, va_list ap)
+{
+  return __nldbl___vfwprintf_chk (stdout, flag, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl___wprintf_chk (int flag, const wchar_t *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vfwprintf_chk (stdout, flag, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
+
+extern __typeof (printf_size) __printf_size;
+
+int
+attribute_compat_text_section
+__nldbl_printf_size (FILE *fp, const struct printf_info *info,
+		     const void *const *args)
+{
+  struct printf_info info_no_ldbl = *info;
+
+  info_no_ldbl.is_long_double = 0;
+  return __printf_size (fp, &info_no_ldbl, args);
+}
+
+extern __typeof (__printf_fp) ___printf_fp;
+
+int
+attribute_compat_text_section
+__nldbl___printf_fp (FILE *fp, const struct printf_info *info,
+		     const void *const *args)
+{
+  struct printf_info info_no_ldbl = *info;
+
+  info_no_ldbl.is_long_double = 0;
+  return ___printf_fp (fp, &info_no_ldbl, args);
+}
+
+ssize_t
+attribute_compat_text_section
+__nldbl_strfmon (char *s, size_t maxsize, const char *format, ...)
+{
+  va_list ap;
+  ssize_t res;
+
+  va_start (ap, format);
+  res = __nldbl___vstrfmon (s, maxsize, format, ap);
+  va_end (ap);
+  return res;
+}
+
+ssize_t
+attribute_compat_text_section
+__nldbl___strfmon_l (char *s, size_t maxsize, __locale_t loc,
+		     const char *format, ...)
+{
+  va_list ap;
+  ssize_t res;
+
+  va_start (ap, format);
+  res = __nldbl___vstrfmon_l (s, maxsize, loc, format, ap);
+  va_end (ap);
+  return res;
+}
+weak_alias (__nldbl___strfmon_l, __nldbl_strfmon_l)
+
+ssize_t
+attribute_compat_text_section
+__nldbl___vstrfmon (char *s, size_t maxsize, const char *format, va_list ap)
+{
+  ssize_t res;
+  __no_long_double = 1;
+  res = __vstrfmon_l (s, maxsize, _NL_CURRENT_LOCALE, format, ap);
+  __no_long_double = 0;
+  va_end (ap);
+  return res;
+}
+libc_hidden_def (__nldbl___vstrfmon)
+
+ssize_t
+attribute_compat_text_section
+__nldbl___vstrfmon_l (char *s, size_t maxsize, __locale_t loc,
+		      const char *format, va_list ap)
+{
+  ssize_t res;
+  __no_long_double = 1;
+  res = __vstrfmon_l (s, maxsize, loc, format, ap);
+  __no_long_double = 0;
+  va_end (ap);
+  return res;
+}
+libc_hidden_def (__nldbl___vstrfmon_l)
+
+void
+attribute_compat_text_section
+__nldbl_syslog (int pri, const char *fmt, ...)
+{
+  va_list ap;
+  va_start (ap, fmt);
+  __nldbl___vsyslog_chk (pri, -1, fmt, ap);
+  va_end (ap);
+}
+
+void
+attribute_compat_text_section
+__nldbl___syslog_chk (int pri, int flag, const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start (ap, fmt);
+  __nldbl___vsyslog_chk (pri, flag, fmt, ap);
+  va_end(ap);
+}
+
+void
+attribute_compat_text_section
+__nldbl___vsyslog_chk (int pri, int flag, const char *fmt, va_list ap)
+{
+  set_no_long_double ();
+  __vsyslog_chk (pri, flag, fmt, ap);
+  clear_no_long_double ();
+}
+libc_hidden_def (__nldbl___vsyslog_chk)
+
+void
+attribute_compat_text_section
+__nldbl_vsyslog (int pri, const char *fmt, va_list ap)
+{
+  __nldbl___vsyslog_chk (pri, -1, fmt, ap);
+}
+
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);
+compat_symbol (libc, __nldbl__IO_sprintf, _IO_sprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl__IO_vfprintf, _IO_vfprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl__IO_vsprintf, _IO_vsprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_dprintf, dprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_fprintf, fprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_printf, printf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_sprintf, sprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vfprintf, vfprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vprintf, vprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl__IO_fprintf, _IO_fprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl___vsnprintf, __vsnprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_asprintf, asprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_obstack_printf, obstack_printf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_obstack_vprintf, obstack_vprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_snprintf, snprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vasprintf, vasprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vdprintf, vdprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vsnprintf, vsnprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vsprintf, vsprintf, GLIBC_2_0);
+compat_symbol (libc, __nldbl__IO_sscanf, _IO_sscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl__IO_vfscanf, _IO_vfscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl___vfscanf, __vfscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl___vsscanf, __vsscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_fscanf, fscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_scanf, scanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_sscanf, sscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vfscanf, vfscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vscanf, vscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vsscanf, vsscanf, GLIBC_2_0);
+compat_symbol (libc, __nldbl___printf_fp, __printf_fp, GLIBC_2_0);
+compat_symbol (libc, __nldbl_strfmon, strfmon, GLIBC_2_0);
+compat_symbol (libc, __nldbl_syslog, syslog, GLIBC_2_0);
+compat_symbol (libc, __nldbl_vsyslog, vsyslog, GLIBC_2_0);
+#endif
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_1)
+compat_symbol (libc, __nldbl___asprintf, __asprintf, GLIBC_2_1);
+compat_symbol (libc, __nldbl_printf_size, printf_size, GLIBC_2_1);
+compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
+#endif
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
+compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_fwprintf, fwprintf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_vfwprintf, vfwprintf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_vswprintf, vswprintf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_fwscanf, fwscanf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_swscanf, swscanf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_vfwscanf, vfwscanf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2);
+compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2);
+#endif
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
+compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3);
+#endif
+#if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3_4)
+compat_symbol (libc, __nldbl___sprintf_chk, __sprintf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___vsprintf_chk, __vsprintf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___snprintf_chk, __snprintf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___vsnprintf_chk, __vsnprintf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___printf_chk, __printf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___fprintf_chk, __fprintf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___vprintf_chk, __vprintf_chk, GLIBC_2_3_4);
+compat_symbol (libc, __nldbl___vfprintf_chk, __vfprintf_chk, GLIBC_2_3_4);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/s_sincos.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_sincos.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_sincos.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __sincos, sincosl, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+lgammal_r (double x, int *signgamp)
+{
+  return lgamma_r (x, signgamp);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-csinh.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-csinh.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+csinhl (double _Complex x)
+{
+  return csinh (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-gamma.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-gamma.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+gammal (double x)
+{
+  return gamma (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+cbrtl (double x)
+{
+  return cbrt (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__sprintf_chk (char *s, int flag, size_t slen, const char *fmt, ...)
+{
+  va_list arg;
+  int done;
+
+  va_start (arg, fmt);
+  done = __nldbl___vsprintf_chk (s, flag, slen, fmt, arg);
+  va_end (arg);
+
+  return done;
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_csinl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_csinl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_csinl.c>
+long_double_symbol (libm, __csinl, csinl);
--- libc/sysdeps/ieee754/ldbl-opt/w_acos.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/w_acos.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_acos.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __acos, acosl, GLIBC_2_0);
+#endif
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+printf_size (FILE *__restrict fp, const struct printf_info *info,
+	     const void *const *__restrict args)
+{
+  return __nldbl_printf_size (fp, info, args);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-atan2.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-atan2.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+atan2l (double x, double y)
+{
+  return atan2 (x, y);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-log1p.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-log1p.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+log1pl (double x)
+{
+  return log1p (x);
+}
--- libc/sysdeps/ieee754/ldbl-opt/s_ctanl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/s_ctanl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <complex.h>
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/s_ctanl.c>
+long_double_symbol (libm, __ctanl, ctanl);
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-syslog.c.jj	2006-01-12 12:55:33.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-syslog.c	2006-01-12 12:56:52.000000000 -0500
@@ -0,0 +1,11 @@
+#include "nldbl-compat.h"
+
+void
+attribute_hidden
+syslog (int pri, const char *fmt, ...)
+{
+  va_list ap;
+  va_start (ap, fmt);
+  __nldbl_vsyslog (pri, fmt, ap);
+  va_end (ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c.jj	2006-01-12 12:55:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c	2006-01-12 12:55:56.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+void
+attribute_hidden
+vsyslog (int pri, const char *fmt, va_list ap)
+{
+  __nldbl_vsyslog (pri, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c.jj	2006-01-12 12:55:56.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c	2006-01-13 06:27:11.000000000 -0500
@@ -0,0 +1,12 @@
+#include "nldbl-compat.h"
+
+void
+attribute_hidden
+__syslog_chk (int pri, int flag, const char *fmt, ...)
+{
+  va_list ap;
+
+  va_start (ap, fmt);
+  __nldbl___vsyslog_chk (pri, flag, fmt, ap);
+  va_end(ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c.jj	2006-01-12 12:56:17.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c	2006-01-12 12:56:36.000000000 -0500
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+void
+attribute_hidden
+__vsyslog_chk (int pri, int flag, const char *fmt, va_list ap)
+{
+  __nldbl___vsyslog_chk (pri, flag, fmt, ap);
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c.jj	2006-01-12 13:15:53.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c	2006-01-12 13:15:47.000000000 -0500
@@ -0,0 +1,14 @@
+#include "nldbl-compat.h"
+
+ssize_t
+attribute_hidden
+strfmon (char *s, size_t maxsize, const char *format, ...)
+{
+  va_list ap;
+  ssize_t res;
+
+  va_start (ap, format);
+  res = __nldbl___vstrfmon (s, maxsize, format, ap);
+  va_end (ap);
+  return res;
+}
--- libc/sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c.jj	2006-01-12 13:16:05.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c	2006-01-12 13:16:19.000000000 -0500
@@ -0,0 +1,16 @@
+#include "nldbl-compat.h"
+
+ssize_t
+attribute_hidden
+__strfmon_l (char *s, size_t maxsize, __locale_t loc, const char *format, ...)
+{
+  va_list ap;
+  ssize_t res;
+
+  va_start (ap, format);
+  res = __nldbl___vstrfmon_l (s, maxsize, loc, format, ap);
+  va_end (ap);
+  return res;
+}
+extern __typeof (__strfmon_l) strfmon_l attribute_hidden;
+weak_alias (__strfmon_l, strfmon_l)
--- libc/sysdeps/ieee754/ldbl-64-128/s_log1pl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_log1pl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_log1pl.c>
+long_double_symbol (libm, __log1pl, log1pl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_ceill.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_ceill.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_ceill.c>
+long_double_symbol (libm, __ceill, ceill);
--- libc/sysdeps/ieee754/ldbl-64-128/s_floorl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_floorl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_floorl.c>
+long_double_symbol (libm, __floorl, floorl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_logbl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_logbl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_logbl.c>
+long_double_symbol (libm, __logbl, logbl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_tanhl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_tanhl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_tanhl.c>
+long_double_symbol (libm, __tanhl, tanhl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_nexttoward.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_nexttoward.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_nexttoward.c>
+long_double_symbol (libm, __nexttoward, nexttoward);
--- libc/sysdeps/ieee754/ldbl-64-128/s_lroundl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_lroundl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_lroundl.c>
+long_double_symbol (libm, __lroundl, lroundl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_erfl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_erfl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_erfl.c>
+long_double_symbol (libm, __erfl, erfl);
+long_double_symbol (libm, __erfcl, erfcl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_cosl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_cosl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_cosl.c>
+long_double_symbol (libm, __cosl, cosl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_truncl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_truncl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_truncl.c>
+long_double_symbol (libm, __truncl, truncl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_finitel.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_finitel.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,17 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#undef hidden_def
+#define hidden_def(x)
+#define __finitel(arg) ___finitel(arg)
+#include <sysdeps/ieee754/ldbl-128/s_finitel.c>
+#undef __finitel
+hidden_ver (___finitel, __finitel)
+_weak_alias (___finitel, ____finitel)
+#ifdef IS_IN_libm
+long_double_symbol (libm, ____finitel, finitel);
+long_double_symbol (libm, ___finitel, __finitel);
+#else
+long_double_symbol (libc, ____finitel, finitel);
+long_double_symbol (libc, ___finitel, __finitel);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_nextafterl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_nextafterl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_nextafterl.c>
+long_double_symbol (libm, __nextafterl, nextafterl);
+long_double_symbol (libm, __nexttowardl, nexttowardl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_atanl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_atanl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_atanl.c>
+long_double_symbol (libm, __atanl, atanl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_signbitl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_signbitl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,11 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#define __signbitl(arg) ___signbitl(arg)
+#include <sysdeps/ieee754/ldbl-128/s_signbitl.c>
+#undef __signbitl
+#ifdef IS_IN_libm
+long_double_symbol (libm, ___signbitl, __signbitl);
+#else
+long_double_symbol (libc, ___signbitl, __signbitl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_fabsl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_fabsl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_fabsl.c>
+long_double_symbol (libm, __fabsl, fabsl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_roundl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_roundl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_roundl.c>
+long_double_symbol (libm, __roundl, roundl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_sincosl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_sincosl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_sincosl.c>
+long_double_symbol (libm, __sincosl, sincosl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_llrintl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_llrintl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_llrintl.c>
+long_double_symbol (libm, __llrintl, llrintl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_frexpl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_frexpl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_frexpl.c>
+#ifdef IS_IN_libm
+long_double_symbol (libm, __frexpl, frexpl);
+#else
+long_double_symbol (libc, __frexpl, frexpl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_modfl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_modfl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_modfl.c>
+#ifdef IS_IN_libm
+long_double_symbol (libm, __modfl, modfl);
+#else
+long_double_symbol (libc, __modfl, modfl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_tanl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_tanl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_tanl.c>
+long_double_symbol (libm, __tanl, tanl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_scalbnl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_scalbnl.c>
+#ifdef IS_IN_libm
+long_double_symbol (libm, __scalbnl, scalbnl);
+#else
+long_double_symbol (libc, __scalbnl, scalbnl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_rintl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_rintl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_rintl.c>
+long_double_symbol (libm, __rintl, rintl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_lrintl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_lrintl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_lrintl.c>
+long_double_symbol (libm, __lrintl, lrintl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_copysignl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_copysignl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_copysignl.c>
+#ifdef IS_IN_libm
+long_double_symbol (libm, __copysignl, copysignl);
+#else
+long_double_symbol (libc, __copysignl, copysignl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_llroundl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_llroundl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_llroundl.c>
+long_double_symbol (libm, __llroundl, llroundl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_expm1l.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_expm1l.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_expm1l.c>
+long_double_symbol (libm, __expm1l, expm1l);
--- libc/sysdeps/ieee754/ldbl-64-128/s_scalblnl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_scalblnl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_scalblnl.c>
+#ifdef IS_IN_libm
+long_double_symbol (libm, __scalblnl, scalblnl);
+#else
+long_double_symbol (libc, __scalblnl, scalblnl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/w_expl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/w_expl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/w_expl.c>
+long_double_symbol (libm, __expl, expl);
--- libc/sysdeps/ieee754/ldbl-64-128/strtold_l.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/strtold_l.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,63 @@
+/* Copyright (C) 1999, 2006 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <math.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <xlocale.h>
+
+/* The actual implementation for all floating point sizes is in strtod.c.
+   These macros tell it to produce the `long double' version, `strtold'.  */
+
+#define FLOAT		long double
+#define FLT		LDBL
+#ifdef USE_WIDE_CHAR
+extern long double ____new_wcstold_l (const wchar_t *, wchar_t **, __locale_t);
+# define STRTOF		__new_wcstold_l
+# define __STRTOF	____new_wcstold_l
+# define ____STRTOF_INTERNAL ____wcstold_l_internal
+#else
+extern long double ____new_strtold_l (const char *, char **, __locale_t);
+# define STRTOF		__new_strtold_l
+# define __STRTOF	____new_strtold_l
+# define ____STRTOF_INTERNAL ____strtold_l_internal
+#endif
+#define MPN2FLOAT	__mpn_construct_long_double
+#define FLOAT_HUGE_VAL	HUGE_VALL
+#define SET_MANTISSA(flt, mant) \
+  do { union ieee854_long_double u;					      \
+       u.d = (flt);							      \
+       u.ieee.mantissa0 = 0x8000;					      \
+       u.ieee.mantissa1 = 0;						      \
+       u.ieee.mantissa2 = ((mant) >> 32);	      			      \
+       u.ieee.mantissa3 = (mant) & 0xffffffff;				      \
+       (flt) = u.d;							      \
+  } while (0)
+
+#include <strtod_l.c>
+
+#ifdef __LONG_DOUBLE_MATH_OPTIONAL
+# include <math_ldbl_opt.h>
+# ifdef USE_WIDE_CHAR
+long_double_symbol (libc, __new_wcstold_l, wcstold_l);
+long_double_symbol (libc, ____new_wcstold_l, __wcstold_l);
+# else
+long_double_symbol (libc, __new_strtold_l, strtold_l);
+long_double_symbol (libc, ____new_strtold_l, __strtold_l);
+# endif
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_isinfl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_isinfl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,16 @@
+#include <math_ldbl_opt.h>
+#ifndef IS_IN_libm
+# undef weak_alias
+# define weak_alias(n,a)
+# undef hidden_def
+# define hidden_def(x)
+# define __isinfl(arg) ___isinfl(arg)
+#endif
+#include <sysdeps/ieee754/ldbl-128/s_isinfl.c>
+#ifndef IS_IN_libm
+# undef __isinfl
+hidden_ver (___isinfl, __isinfl)
+_weak_alias (___isinfl, ____isinfl)
+long_double_symbol (libc, ____isinfl, isinfl);
+long_double_symbol (libc, ___isinfl, __isinfl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_nearbyintl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_nearbyintl.c>
+long_double_symbol (libm, __nearbyintl, nearbyintl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_asinhl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_asinhl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_asinhl.c>
+long_double_symbol (libm, __asinhl, asinhl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_remquol.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_remquol.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_remquol.c>
+long_double_symbol (libm, __remquol, remquol);
--- libc/sysdeps/ieee754/ldbl-64-128/s_nexttowardf.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_nexttowardf.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_nexttowardf.c>
+long_double_symbol (libm, __nexttowardf, nexttowardf);
--- libc/sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_nexttowardfd.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,77 @@
+/* Single precision version of nexttoward.c.
+   Conversion to IEEE single float by Jakub Jelinek, jj@ultra.linux.cz. */
+/*
+ * ====================================================
+ * 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.
+ * ====================================================
+ */
+
+/* IEEE functions
+ *	__nexttowardfd(x,y)
+ *	return the next machine floating-point number of x in the
+ *	direction toward y.
+ * This is for machines which use different binary type for double and
+ * long double conditionally, y is long double equal to double.
+ *   Special cases:
+ */
+
+#include <math_ldbl_opt.h>
+
+float __nldbl_nexttowardf(float x, double y);
+
+float __nldbl_nexttowardf(float x, double y)
+{
+	int32_t hx,hy,ix,iy;
+	u_int32_t ly;
+
+	GET_FLOAT_WORD(hx,x);
+	EXTRACT_WORDS(hy,ly,y);
+	ix = hx&0x7fffffff;		/* |x| */
+	iy = hy&0x7fffffff;		/* |y| */
+
+	if((ix>0x7f800000) ||				   /* x is nan */
+	   ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))    /* y is nan */
+	   return x+y;
+	if((double) x==y) return y;		/* x=y, return y */
+	if(ix==0) {				/* x == 0 */
+	    float x2;
+	    SET_FLOAT_WORD(x,(u_int32_t)(hy&0x80000000)|1);/* return +-minsub*/
+	    x2 = x*x;
+	    if(x2==x) return x2; else return x; /* raise underflow flag */
+	}
+	if(hx>=0) {				/* x > 0 */
+	    if(hy<0||(ix>>23)>(iy>>20)-0x380
+	       || ((ix>>23)==(iy>>20)-0x380
+		   && (ix&0x7fffff)>(((hy<<3)|(ly>>29))&0x7fffff)))	/* x > y, x -= ulp */
+		hx -= 1;
+	    else				/* x < y, x += ulp */
+		hx += 1;
+	} else {				/* x < 0 */
+	    if(hy>=0||(ix>>23)>(iy>>20)-0x380
+	       || ((ix>>23)==(iy>>20)-0x380
+		   && (ix&0x7fffff)>(((hy<<3)|(ly>>29))&0x7fffff)))	/* x < y, x -= ulp */
+		hx -= 1;
+	    else				/* x > y, x += ulp */
+		hx += 1;
+	}
+	hy = hx&0x7f800000;
+	if(hy>=0x7f800000) return x+x;	/* overflow  */
+	if(hy<0x00800000) {		/* underflow */
+	    float x2 = x*x;
+	    if(x2!=x) {		/* raise underflow flag */
+		SET_FLOAT_WORD(x2,hx);
+		return x2;
+	    }
+	}
+	SET_FLOAT_WORD(x,hx);
+	return x;
+}
+
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nldbl_nexttowardf, nexttowardf, GLIBC_2_1);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_sinl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_sinl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_sinl.c>
+long_double_symbol (libm, __sinl, sinl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_cbrtl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_cbrtl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_cbrtl.c>
+long_double_symbol (libm, __cbrtl, cbrtl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_ilogbl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <sysdeps/ieee754/ldbl-128/s_ilogbl.c>
+long_double_symbol (libm, __ilogbl, ilogbl);
--- libc/sysdeps/ieee754/ldbl-64-128/s_isnanl.c.jj	2006-01-12 06:11:40.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_isnanl.c	2006-01-12 06:11:40.000000000 -0500
@@ -0,0 +1,16 @@
+#include <math_ldbl_opt.h>
+#ifndef IS_IN_libm
+# undef weak_alias
+# define weak_alias(n,a)
+# undef hidden_def
+# define hidden_def(x)
+# define __isnanl(arg) ___isnanl(arg)
+#endif
+#include <sysdeps/ieee754/ldbl-128/s_isnanl.c>
+#ifndef IS_IN_libm
+# undef __isnanl
+hidden_ver (___isnanl, __isnanl)
+_weak_alias (___isnanl, ____isnanl)
+long_double_symbol (libc, ____isnanl, isnanl);
+long_double_symbol (libc, ___isnanl, __isnanl);
+#endif
--- libc/sysdeps/ieee754/ldbl-64-128/s_fpclassifyl.c.jj	2006-01-13 05:51:23.000000000 -0500
+++ libc/sysdeps/ieee754/ldbl-64-128/s_fpclassifyl.c	2006-01-13 05:55:58.000000000 -0500
@@ -0,0 +1,10 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#define __fpclassifyl ___fpclassifyl
+#undef libm_hidden_def
+#define libm_hidden_def(a)
+#include <sysdeps/ieee754/ldbl-128/s_fpclassifyl.c>
+#undef __fpclassifyl
+long_double_symbol (libm, ___fpclassifyl, __fpclassifyl);
+libm_hidden_ver (___fpclassifyl, __fpclassifyl)
--- libc/wcsmbs/bits/wchar2.h.jj	2006-01-11 08:37:42.000000000 -0500
+++ libc/wcsmbs/bits/wchar2.h	2006-01-12 06:11:40.000000000 -0500
@@ -193,10 +193,11 @@ __NTH (wcsncat (wchar_t *__dest, __const
 }
 
 
-extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
-			   int __flag, size_t __s_len,
-			   __const wchar_t *__restrict __format, ...)
-     __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
+extern int __LDBL_REDIR_NTH (__swprintf_chk,
+			     (wchar_t *__restrict __s, size_t __n,
+			      int __flag, size_t __s_len,
+			      __const wchar_t *__restrict __format, ...))
+     /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
 
 /* XXX We might want to have support in gcc for swprintf.  */
 #define swprintf(s, n, ...) \
@@ -205,40 +206,34 @@ extern int __swprintf_chk (wchar_t *__re
    : swprintf (s, n, __VA_ARGS__))
 
 
-extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
-			    int __flag, size_t __s_len,
-			    __const wchar_t *__restrict __format,
-			    __gnuc_va_list __arg)
-     __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
-extern int __REDIRECT_NTH (__vswprintf_alias,
-			   (wchar_t *__restrict __s, size_t __n,
-			    __const wchar_t *__restrict __format,
-			    __gnuc_va_list __arg), vswprintf)
-     /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
-
-
-extern __always_inline int
-__NTH (vswprintf (wchar_t *__s, size_t __n, __const wchar_t *__format,
-		  __gnuc_va_list __arg))
-{
-  if (__bos (__s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1)
-    return __vswprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, __bos (__s),
-			    __format, __arg);
-  return __vswprintf_alias (__s, __n, __format, __arg);
-}
+extern int __LDBL_REDIR_NTH (__vswprintf_chk,
+			     (wchar_t *__restrict __s, size_t __n,
+			      int __flag, size_t __s_len,
+			      __const wchar_t *__restrict __format,
+			      __gnuc_va_list __arg))
+     /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
+
+#define vswprintf(s, n, fmt, ap) \
+  (__bos (s) != (size_t) -1 || __USE_FORTIFY_LEVEL > 1			      \
+   ? __vswprintf_chk (s, n, __USE_FORTIFY_LEVEL - 1, __bos (s), fmt, ap)      \
+   : vswprintf (s, n, fmt, ap))
 
 
 #if __USE_FORTIFY_LEVEL > 1
 
-extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
-			   __const wchar_t *__restrict __format, ...);
-extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format,
-			  ...);
-extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag,
-			    __const wchar_t *__restrict __format,
-			    __gnuc_va_list __ap);
-extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format,
-			   __gnuc_va_list __ap);
+extern int __LDBL_REDIR (__fwprintf_chk,
+			 (__FILE *__restrict __stream, int __flag,
+			  __const wchar_t *__restrict __format, ...));
+extern int __LDBL_REDIR (__wprintf_chk,
+			 (int __flag, __const wchar_t *__restrict __format,
+			  ...));
+extern int __LDBL_REDIR (__vfwprintf_chk,
+			 (__FILE *__restrict __stream, int __flag,
+			  __const wchar_t *__restrict __format,
+			  __gnuc_va_list __ap));
+extern int __LDBL_REDIR (__vwprintf_chk,
+			 (int __flag, __const wchar_t *__restrict __format,
+			  __gnuc_va_list __ap));
 
 # define wprintf(...) \
   __wprintf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
--- libc/wcsmbs/wchar.h.jj	2005-07-20 04:32:57.000000000 -0400
+++ libc/wcsmbs/wchar.h	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -395,8 +395,9 @@ extern double wcstod (__const wchar_t *_
 /* Likewise for `float' and `long double' sizes of floating-point numbers.  */
 extern float wcstof (__const wchar_t *__restrict __nptr,
 		     wchar_t **__restrict __endptr) __THROW;
-extern long double wcstold (__const wchar_t *__restrict __nptr,
-			    wchar_t **__restrict __endptr) __THROW;
+extern long double __LDBL_REDIR1_NTH (wcstold,
+				      (__const wchar_t *__restrict __nptr,
+				       wchar_t **__restrict __endptr), wcstod);
 #endif /* C99 */
 
 
@@ -489,9 +490,10 @@ extern float wcstof_l (__const wchar_t *
 		       wchar_t **__restrict __endptr, __locale_t __loc)
      __THROW;
 
-extern long double wcstold_l (__const wchar_t *__restrict __nptr,
-			      wchar_t **__restrict __endptr,
-			      __locale_t __loc) __THROW;
+extern long double __LDBL_REDIR1_NTH (wcstold_l,
+				      (__const wchar_t *__restrict __nptr,
+				       wchar_t **__restrict __endptr,
+				       __locale_t __loc), wcstod_l);
 #endif /* GNU */
 
 
@@ -503,9 +505,10 @@ extern double __wcstod_internal (__const
 extern float __wcstof_internal (__const wchar_t *__restrict __nptr,
 				wchar_t **__restrict __endptr, int __group)
      __THROW;
-extern long double __wcstold_internal (__const wchar_t *__restrict __nptr,
+extern long double __LDBL_REDIR1_NTH (__wcstold_internal,
+				      (__const wchar_t *__restrict __nptr,
 				       wchar_t **__restrict __endptr,
-				       int __group) __THROW;
+				       int __group), __wcstod_internal);
 
 #ifndef __wcstol_internal_defined
 extern long int __wcstol_internal (__const wchar_t *__restrict __nptr,
@@ -561,10 +564,12 @@ extern __inline float
 __NTH (wcstof (__const wchar_t *__restrict __nptr,
 	       wchar_t **__restrict __endptr))
 { return __wcstof_internal (__nptr, __endptr, 0); }
+#  ifndef __LDBL_COMPAT
 extern __inline long double
 __NTH (wcstold (__const wchar_t *__restrict __nptr,
 		wchar_t **__restrict __endptr))
 { return __wcstold_internal (__nptr, __endptr, 0); }
+#  endif
 
 
 __extension__
@@ -600,65 +605,69 @@ __BEGIN_NAMESPACE_C99
 /* Select orientation for stream.  */
 extern int fwide (__FILE *__fp, int __mode) __THROW;
 
-
 /* Write formatted output to STREAM.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int fwprintf (__FILE *__restrict __stream,
-		     __const wchar_t *__restrict __format, ...)
+extern int __LDBL_REDIR (fwprintf,
+			 (__FILE *__restrict __stream,
+			  __const wchar_t *__restrict __format, ...))
      /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
 /* Write formatted output to stdout.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int wprintf (__const wchar_t *__restrict __format, ...)
+extern int __LDBL_REDIR (wprintf,
+			 (__const wchar_t *__restrict __format, ...))
      /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
 /* Write formatted output of at most N characters to S.  */
-extern int swprintf (wchar_t *__restrict __s, size_t __n,
-		     __const wchar_t *__restrict __format, ...)
-     __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
+extern int __LDBL_REDIR_NTH (swprintf,
+			     (wchar_t *__restrict __s, size_t __n,
+			      __const wchar_t *__restrict __format, ...))
+     /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
 
 /* Write formatted output to S from argument list ARG.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vfwprintf (__FILE *__restrict __s,
-		      __const wchar_t *__restrict __format,
-		      __gnuc_va_list __arg)
+extern int __LDBL_REDIR (vfwprintf, (__FILE *__restrict __s,
+				     __const wchar_t *__restrict __format,
+				     __gnuc_va_list __arg))
      /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
 /* Write formatted output to stdout from argument list ARG.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vwprintf (__const wchar_t *__restrict __format,
-		     __gnuc_va_list __arg)
+extern int __LDBL_REDIR (vwprintf, (__const wchar_t *__restrict __format,
+				    __gnuc_va_list __arg))
      /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
 /* Write formatted output of at most N character to S from argument
    list ARG.  */
-extern int vswprintf (wchar_t *__restrict __s, size_t __n,
-		      __const wchar_t *__restrict __format,
-		      __gnuc_va_list __arg)
-     __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
-
+extern int __LDBL_REDIR_NTH (vswprintf, (wchar_t *__restrict __s, size_t __n,
+					 __const wchar_t *__restrict __format,
+					 __gnuc_va_list __arg))
+     /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
 
 /* Read formatted input from STREAM.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int fwscanf (__FILE *__restrict __stream,
-		    __const wchar_t *__restrict __format, ...)
+extern int __LDBL_REDIR (fwscanf,
+			 (__FILE *__restrict __stream,
+			  __const wchar_t *__restrict __format, ...))
      /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
 /* Read formatted input from stdin.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int wscanf (__const wchar_t *__restrict __format, ...)
+extern int __LDBL_REDIR (wscanf,
+			 (__const wchar_t *__restrict __format, ...))
      /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
 /* Read formatted input from S.  */
-extern int swscanf (__const wchar_t *__restrict __s,
-		    __const wchar_t *__restrict __format, ...)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+extern int __LDBL_REDIR_NTH (swscanf,
+			     (__const wchar_t *__restrict __s,
+			      __const wchar_t *__restrict __format, ...))
+     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
 
 __END_NAMESPACE_C99
 #endif /* Use ISO C99 and Unix98. */
@@ -670,22 +679,22 @@ __BEGIN_NAMESPACE_C99
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vfwscanf (__FILE *__restrict __s,
-		     __const wchar_t *__restrict __format,
-		     __gnuc_va_list __arg)
+extern int __LDBL_REDIR (vfwscanf, (__FILE *__restrict __s,
+				    __const wchar_t *__restrict __format,
+				    __gnuc_va_list __arg))
      /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
 /* Read formatted input from stdin into argument list ARG.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vwscanf (__const wchar_t *__restrict __format,
-		    __gnuc_va_list __arg)
+extern int __LDBL_REDIR (vwscanf, (__const wchar_t *__restrict __format,
+				   __gnuc_va_list __arg))
      /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
 /* Read formatted input from S into argument list ARG.  */
-extern int vswscanf (__const wchar_t *__restrict __s,
-		     __const wchar_t *__restrict __format,
-		     __gnuc_va_list __arg)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+extern int __LDBL_REDIR_NTH (vswscanf, (__const wchar_t *__restrict __s,
+					__const wchar_t *__restrict __format,
+					__gnuc_va_list __arg))
+     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
 
 __END_NAMESPACE_C99
 #endif /* Use ISO C99. */
--- libc/debug/vsprintf_chk.c.jj	2004-11-19 07:38:10.000000000 -0500
+++ libc/debug/vsprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994, 1997, 1999-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1999-2003, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -61,8 +62,8 @@ static const struct _IO_jump_t _IO_str_c
 
 
 int
-__vsprintf_chk (char *s, int flags, size_t slen, const char *format,
-		va_list args)
+___vsprintf_chk (char *s, int flags, size_t slen, const char *format,
+		 va_list args)
 {
   _IO_strfile f;
   int ret;
@@ -88,4 +89,5 @@ __vsprintf_chk (char *s, int flags, size
   *f._sbf._f._IO_write_ptr = '\0';
   return ret;
 }
-libc_hidden_def (__vsprintf_chk)
+ldbl_hidden_def (___vsprintf_chk, __vsprintf_chk)
+ldbl_strong_alias (___vsprintf_chk, __vsprintf_chk)
--- libc/debug/vprintf_chk.c.jj	2004-11-19 07:38:10.000000000 -0500
+++ libc/debug/vprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -24,7 +24,7 @@
 
 /* Write formatted output to stdout from the format string FORMAT.  */
 int
-__vprintf_chk (int flag, const char *format, va_list ap)
+___vprintf_chk (int flag, const char *format, va_list ap)
 {
   int done;
 
@@ -40,3 +40,4 @@ __vprintf_chk (int flag, const char *for
 
   return done;
 }
+ldbl_strong_alias (___vprintf_chk, __vprintf_chk)
--- libc/debug/snprintf_chk.c.jj	2004-11-15 04:31:18.000000000 -0500
+++ libc/debug/snprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1995, 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1997, 1998, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -24,8 +26,8 @@
    string FORMAT, writing no more than MAXLEN characters.  */
 /* VARARGS5 */
 int
-__snprintf_chk (char *s, size_t maxlen, int flags, size_t slen,
-		const char *format, ...)
+___snprintf_chk (char *s, size_t maxlen, int flags, size_t slen,
+		 const char *format, ...)
 {
   va_list arg;
   int done;
@@ -36,3 +38,4 @@ __snprintf_chk (char *s, size_t maxlen, 
 
   return done;
 }
+ldbl_strong_alias (___snprintf_chk, __snprintf_chk)
--- libc/debug/printf_chk.c.jj	2004-11-19 07:38:10.000000000 -0500
+++ libc/debug/printf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -24,7 +24,7 @@
 
 /* Write formatted output to stdout from the format string FORMAT.  */
 int
-__printf_chk (int flag, const char *format, ...)
+___printf_chk (int flag, const char *format, ...)
 {
   va_list ap;
   int done;
@@ -43,3 +43,4 @@ __printf_chk (int flag, const char *form
 
   return done;
 }
+ldbl_strong_alias (___printf_chk, __printf_chk)
--- libc/debug/vfprintf_chk.c.jj	2005-08-17 12:02:55.000000000 -0400
+++ libc/debug/vfprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2005
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2005, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -24,7 +24,7 @@
 
 /* Write formatted output to FP from the format string FORMAT.  */
 int
-__vfprintf_chk (FILE *fp, int flag, const char *format, va_list ap)
+___vfprintf_chk (FILE *fp, int flag, const char *format, va_list ap)
 {
   int done;
 
@@ -40,4 +40,5 @@ __vfprintf_chk (FILE *fp, int flag, cons
 
   return done;
 }
-libc_hidden_def (__vfprintf_chk)
+ldbl_hidden_def (___vfprintf_chk, __vfprintf_chk)
+ldbl_strong_alias (___vfprintf_chk, __vfprintf_chk)
--- libc/debug/sprintf_chk.c.jj	2004-11-15 04:31:18.000000000 -0500
+++ libc/debug/sprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1995,1997,1998,2002,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 
 /* Write formatted output into S, according to the format string FORMAT.  */
 /* VARARGS4 */
 int
-__sprintf_chk (char *s, int flags, size_t slen, const char *format, ...)
+___sprintf_chk (char *s, int flags, size_t slen, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -33,3 +35,4 @@ __sprintf_chk (char *s, int flags, size_
 
   return done;
 }
+ldbl_strong_alias (___sprintf_chk, __sprintf_chk)
--- libc/debug/fprintf_chk.c.jj	2004-11-19 07:38:09.000000000 -0500
+++ libc/debug/fprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -24,7 +24,7 @@
 
 /* Write formatted output to FP from the format string FORMAT.  */
 int
-__fprintf_chk (FILE *fp, int flag, const char *format, ...)
+___fprintf_chk (FILE *fp, int flag, const char *format, ...)
 {
   va_list ap;
   int done;
@@ -43,3 +43,4 @@ __fprintf_chk (FILE *fp, int flag, const
 
   return done;
 }
+ldbl_strong_alias (___fprintf_chk, __fprintf_chk)
--- libc/debug/vsnprintf_chk.c.jj	2004-11-19 07:38:10.000000000 -0500
+++ libc/debug/vsnprintf_chk.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1995, 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1997, 1998, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,8 +28,8 @@ extern const struct _IO_jump_t _IO_strn_
    string FORMAT, writing no more than MAXLEN characters.  */
 /* VARARGS5 */
 int
-__vsnprintf_chk (char *s, size_t maxlen, int flags, size_t slen,
-		 const char *format, va_list args)
+___vsnprintf_chk (char *s, size_t maxlen, int flags, size_t slen,
+		  const char *format, va_list args)
 {
   /* XXX Maybe for less strict version do not fail immediately.
      Though, maxlen is supposed to be the size of buffer pointed
@@ -67,4 +68,5 @@ __vsnprintf_chk (char *s, size_t maxlen,
     *sf.f._sbf._f._IO_write_ptr = '\0';
   return ret;
 }
-libc_hidden_def (__vsnprintf_chk)
+ldbl_hidden_def (___vsnprintf_chk, __vsnprintf_chk)
+ldbl_strong_alias (___vsnprintf_chk, __vsnprintf_chk)
--- libc/debug/vfwprintf_chk.c.jj	2005-07-15 06:23:28.000000000 -0400
+++ libc/debug/vfwprintf_chk.c	2006-01-12 12:22:57.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2005
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2005, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -40,3 +40,4 @@ __vfwprintf_chk (FILE *fp, int flag, con
 
   return done;
 }
+libc_hidden_def (__vfwprintf_chk)
--- libc/libio/bits/stdio2.h.jj	2005-04-13 15:28:25.000000000 -0400
+++ libc/libio/bits/stdio2.h	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,5 @@
 /* Checking macros for stdio functions.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,13 @@
 # error "Never include <bits/stdio2.h> directly; use <stdio.h> instead."
 #endif
 
-extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-			  __const char *__restrict __format, ...) __THROW;
-extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
-			   __const char *__restrict __format,
-			   _G_va_list __ap) __THROW;
+extern int __LDBL_REDIR_NTH (__sprintf_chk,
+			     (char *__restrict __s, int __flag, size_t __slen,
+			      __const char *__restrict __format, ...));
+extern int __LDBL_REDIR_NTH (__vsprintf_chk,
+			     (char *__restrict __s, int __flag, size_t __slen,
+			      __const char *__restrict __format,
+			      _G_va_list __ap));
 
 #define sprintf(str, ...) \
   __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), \
@@ -35,12 +37,14 @@ extern int __vsprintf_chk (char *__restr
 
 #if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
 
-extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
-			   size_t __slen, __const char *__restrict __format,
-			   ...) __THROW;
-extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
-			    size_t __slen, __const char *__restrict __format,
-			    _G_va_list __ap) __THROW;
+extern int __LDBL_REDIR_NTH (__snprintf_chk,
+			     (char *__restrict __s, size_t __n, int __flag,
+			      size_t __slen,
+			      __const char *__restrict __format, ...));
+extern int __LDBL_REDIR_NTH (__vsnprintf_chk,
+			     (char *__restrict __s, size_t __n, int __flag,
+			      size_t __slen, __const char *__restrict __format,
+			      _G_va_list __ap));
 
 # define snprintf(str, len, ...) \
   __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
@@ -53,13 +57,17 @@ extern int __vsnprintf_chk (char *__rest
 
 #if __USE_FORTIFY_LEVEL > 1
 
-extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
-			  __const char *__restrict __format, ...);
-extern int __printf_chk (int __flag, __const char *__restrict __format, ...);
-extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
-			   __const char *__restrict __format, _G_va_list __ap);
-extern int __vprintf_chk (int __flag, __const char *__restrict __format,
-			  _G_va_list __ap);
+extern int __LDBL_REDIR (__fprintf_chk,
+			 (FILE *__restrict __stream, int __flag,
+			  __const char *__restrict __format, ...));
+extern int __LDBL_REDIR (__printf_chk,
+			 (int __flag, __const char *__restrict __format, ...));
+extern int __LDBL_REDIR (__vfprintf_chk,
+			 (FILE *__restrict __stream, int __flag,
+			  __const char *__restrict __format, _G_va_list __ap));
+extern int __LDBL_REDIR (__vprintf_chk,
+			 (int __flag, __const char *__restrict __format,
+			  _G_va_list __ap));
 
 # define printf(...) \
   __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
--- libc/libio/stdio.h.jj	2006-01-10 07:29:05.000000000 -0500
+++ libc/libio/stdio.h	2006-01-12 06:11:40.000000000 -0500
@@ -323,58 +323,70 @@ __BEGIN_NAMESPACE_STD
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int fprintf (FILE *__restrict __stream,
-		    __const char *__restrict __format, ...);
+extern int __LDBL_REDIR (fprintf, (FILE *__restrict __stream,
+				   __const char *__restrict __format, ...));
 /* Write formatted output to stdout.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int printf (__const char *__restrict __format, ...);
+extern int __LDBL_REDIR (printf, (__const char *__restrict __format, ...));
 /* Write formatted output to S.  */
-extern int sprintf (char *__restrict __s,
-		    __const char *__restrict __format, ...) __THROW;
+extern int __LDBL_REDIR_NTH (sprintf,
+			     (char *__restrict __s,
+			      __const char *__restrict __format, ...));
 
 /* Write formatted output to S from argument list ARG.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
-		     _G_va_list __arg);
+extern int __LDBL_REDIR (vfprintf, (FILE *__restrict __s,
+				    __const char *__restrict __format,
+				    _G_va_list __arg));
 /* Write formatted output to stdout from argument list ARG.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vprintf (__const char *__restrict __format, _G_va_list __arg);
+extern int __LDBL_REDIR (vprintf, (__const char *__restrict __format,
+				   _G_va_list __arg));
 /* Write formatted output to S from argument list ARG.  */
-extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
-		     _G_va_list __arg) __THROW;
+extern int __LDBL_REDIR_NTH (vsprintf,
+			     (char *__restrict __s,
+			      __const char *__restrict __format,
+			      _G_va_list __arg));
 __END_NAMESPACE_STD
 
 #if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
 __BEGIN_NAMESPACE_C99
 /* Maximum chars of output to write in MAXLEN.  */
-extern int snprintf (char *__restrict __s, size_t __maxlen,
-		     __const char *__restrict __format, ...)
-     __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
-
-extern int vsnprintf (char *__restrict __s, size_t __maxlen,
-		      __const char *__restrict __format, _G_va_list __arg)
-     __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
+extern int __LDBL_REDIR_NTH (snprintf,
+			     (char *__restrict __s, size_t __maxlen,
+			      __const char *__restrict __format, ...))
+     __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern int __LDBL_REDIR_NTH (vsnprintf,
+			     (char *__restrict __s, size_t __maxlen,
+			      __const char *__restrict __format,
+			      _G_va_list __arg))
+     __attribute__ ((__format__ (__printf__, 3, 0)));
 __END_NAMESPACE_C99
 #endif
 
 #ifdef __USE_GNU
 /* Write formatted output to a string dynamically allocated with `malloc'.
    Store the address of the string in *PTR.  */
-extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
-		      _G_va_list __arg)
-     __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
-extern int __asprintf (char **__restrict __ptr,
-		       __const char *__restrict __fmt, ...)
-     __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
-extern int asprintf (char **__restrict __ptr,
-		     __const char *__restrict __fmt, ...)
-     __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int __LDBL_REDIR_NTH (vasprintf,
+			     (char **__restrict __ptr,
+			      __const char *__restrict __f,
+			      _G_va_list __arg))
+     __attribute__ ((__format__ (__printf__, 2, 0)));
+extern int __LDBL_REDIR_NTH (__asprintf,
+			     (char **__restrict __ptr,
+			      __const char *__restrict __fmt, ...))
+     __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int __LDBL_REDIR_NTH (asprintf,
+			     (char **__restrict __ptr,
+			      __const char *__restrict __fmt, ...))
+     __attribute__ ((__format__ (__printf__, 2, 3)));
 
 /* Write formatted output to a file descriptor.
 
@@ -382,10 +394,11 @@ extern int asprintf (char **__restrict _
    cancellation point.  But due to similarity with an POSIX interface
    or due to the implementation they are cancellation points and
    therefore not marked with __THROW.  */
-extern int vdprintf (int __fd, __const char *__restrict __fmt,
-		     _G_va_list __arg)
+extern int __LDBL_REDIR (vdprintf, (int __fd, __const char *__restrict __fmt,
+				    _G_va_list __arg))
      __attribute__ ((__format__ (__printf__, 2, 0)));
-extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
+extern int __LDBL_REDIR (dprintf, (int __fd, __const char *__restrict __fmt,
+				   ...))
      __attribute__ ((__format__ (__printf__, 2, 3)));
 #endif
 
@@ -395,16 +408,16 @@ __BEGIN_NAMESPACE_STD
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int fscanf (FILE *__restrict __stream,
-		   __const char *__restrict __format, ...) __wur;
+extern int __LDBL_REDIR (fscanf, (FILE *__restrict __stream,
+			 __const char *__restrict __format, ...)) __wur;
 /* Read formatted input from stdin.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int scanf (__const char *__restrict __format, ...) __wur;
+extern int __LDBL_REDIR (scanf, (__const char *__restrict __format, ...)) __wur;
 /* Read formatted input from S.  */
-extern int sscanf (__const char *__restrict __s,
-		   __const char *__restrict __format, ...) __THROW;
+extern int __LDBL_REDIR_NTH (sscanf, (__const char *__restrict __s,
+				      __const char *__restrict __format, ...));
 __END_NAMESPACE_STD
 
 #ifdef	__USE_ISOC99
@@ -413,21 +426,24 @@ __BEGIN_NAMESPACE_C99
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
-		    _G_va_list __arg)
+extern int __LDBL_REDIR (vfscanf, (FILE *__restrict __s,
+				   __const char *__restrict __format,
+				   _G_va_list __arg))
      __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
 
 /* Read formatted input from stdin into argument list ARG.
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern int vscanf (__const char *__restrict __format, _G_va_list __arg)
+extern int __LDBL_REDIR (vscanf, (__const char *__restrict __format,
+				  _G_va_list __arg))
      __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
 
 /* Read formatted input from S into argument list ARG.  */
-extern int vsscanf (__const char *__restrict __s,
-		    __const char *__restrict __format, _G_va_list __arg)
-     __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
+extern int __LDBL_REDIR_NTH (vsscanf, (__const char *__restrict __s,
+				       __const char *__restrict __format,
+				       _G_va_list __arg))
+     __attribute__ ((__format__ (__scanf__, 2, 0)));
 __END_NAMESPACE_C99
 #endif /* Use ISO C9x.  */
 
@@ -796,13 +812,15 @@ extern char *cuserid (char *__s);
 struct obstack;			/* See <obstack.h>.  */
 
 /* Write formatted output to an obstack.  */
-extern int obstack_printf (struct obstack *__restrict __obstack,
-			   __const char *__restrict __format, ...)
-     __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
-extern int obstack_vprintf (struct obstack *__restrict __obstack,
-			    __const char *__restrict __format,
-			    _G_va_list __args)
-     __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
+extern int __LDBL_REDIR_NTH (obstack_printf,
+			     (struct obstack *__restrict __obstack,
+			      __const char *__restrict __format, ...))
+     __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int __LDBL_REDIR_NTH (obstack_vprintf,
+			     (struct obstack *__restrict __obstack,
+			      __const char *__restrict __format,
+			      _G_va_list __args))
+     __attribute__ ((__format__ (__printf__, 2, 0)));
 #endif /* Use GNU.  */
 
 
--- libc/libio/swscanf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/swscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1995,1996,1998,1999,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1998, 1999, 2003, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <wchar.h>
 
 /* Read formatted input from S, according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-swscanf (const wchar_t *s, const wchar_t *format, ...)
+__swscanf (const wchar_t *s, const wchar_t *format, ...)
 {
   va_list arg;
   int done;
@@ -33,3 +35,4 @@ swscanf (const wchar_t *s, const wchar_t
 
   return done;
 }
+ldbl_strong_alias (__swscanf, swscanf)
--- libc/libio/vwprintf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/vwprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1993,1995,1997,1999,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1997, 1999, 2001, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <wchar.h>
@@ -23,9 +25,8 @@
 /* Write formatted output to stdout according to the
    format string FORMAT, using the argument list in ARG.  */
 int
-vwprintf (format, arg)
-     const wchar_t *format;
-     __gnuc_va_list arg;
+__vwprintf (const wchar_t *format, __gnuc_va_list arg)
 {
   return __vfwprintf (stdout, format, arg);
 }
+ldbl_strong_alias (__vwprintf, vwprintf)
--- libc/libio/vsnprintf.c.jj	2004-10-18 04:20:46.000000000 -0400
+++ libc/libio/vsnprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,1997,1999-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1997,1999-2003, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -123,8 +123,5 @@ _IO_vsnprintf (string, maxlen, format, a
     *sf.f._sbf._f._IO_write_ptr = '\0';
   return ret;
 }
-
-#ifdef weak_alias
-weak_alias (_IO_vsnprintf, __vsnprintf)
-weak_alias (_IO_vsnprintf, vsnprintf)
-#endif
+ldbl_weak_alias (_IO_vsnprintf, __vsnprintf)
+ldbl_weak_alias (_IO_vsnprintf, vsnprintf)
--- libc/libio/fwprintf.c.jj	2004-08-04 08:42:20.000000000 -0400
+++ libc/libio/fwprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999, 2000, 2001, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <wchar.h>
@@ -35,4 +37,4 @@ __fwprintf (FILE *stream, const wchar_t 
 
   return done;
 }
-weak_alias (__fwprintf, fwprintf)
+ldbl_weak_alias (__fwprintf, fwprintf)
--- libc/libio/fwscanf.c.jj	2004-08-04 08:42:20.000000000 -0400
+++ libc/libio/fwscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 1999, 2000, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <wchar.h>
@@ -23,7 +24,7 @@
 /* Read formatted input from STREAM according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-fwscanf (FILE *stream, const wchar_t *format, ...)
+__fwscanf (FILE *stream, const wchar_t *format, ...)
 {
   va_list arg;
   int done;
@@ -34,3 +35,4 @@ fwscanf (FILE *stream, const wchar_t *fo
 
   return done;
 }
+ldbl_strong_alias (__fwscanf, fwscanf)
--- libc/libio/obprintf.c.jj	2005-12-28 05:01:06.000000000 -0500
+++ libc/libio/obprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,5 @@
 /* Print output of stream to given obstack.
-   Copyright (C) 1996,1997,1999,2000,2001,2002,2003,2004,2005
+   Copyright (C) 1996,1997,1999,2000,2001,2002,2003,2004,2005,2006
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -176,9 +176,7 @@ _IO_obstack_vprintf (struct obstack *obs
 
   return result;
 }
-#ifdef weak_alias
-weak_alias (_IO_obstack_vprintf, obstack_vprintf)
-#endif
+ldbl_weak_alias (_IO_obstack_vprintf, obstack_vprintf)
 
 
 int
@@ -191,6 +189,4 @@ _IO_obstack_printf (struct obstack *obst
   va_end (ap);
   return result;
 }
-#ifdef weak_alias
-weak_alias (_IO_obstack_printf, obstack_printf)
-#endif
+ldbl_weak_alias (_IO_obstack_printf, obstack_printf)
--- libc/libio/wscanf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/wscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 1999, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <wchar.h>
@@ -24,7 +26,7 @@
 /* Read formatted input from stdin according to the format string FORMAT.  */
 /* VARARGS1 */
 int
-wscanf (const wchar_t *format, ...)
+__wscanf (const wchar_t *format, ...)
 {
   va_list arg;
   int done;
@@ -35,3 +37,4 @@ wscanf (const wchar_t *format, ...)
 
   return done;
 }
+ldbl_strong_alias (__wscanf, wscanf)
--- libc/libio/vwscanf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/vwscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 1999, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,9 +29,8 @@
 #include <wchar.h>
 
 int
-vwscanf (format, args)
-     const wchar_t *format;
-     _IO_va_list args;
+__vwscanf (const wchar_t *format, _IO_va_list args)
 {
   return _IO_vfwscanf (_IO_stdin, format, args, NULL);
 }
+ldbl_strong_alias (__vwscanf, vwscanf)
--- libc/libio/iovsprintf.c.jj	2004-08-04 08:42:20.000000000 -0400
+++ libc/libio/iovsprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,10 +29,7 @@
 #include "strfile.h"
 
 int
-_IO_vsprintf (string, format, args)
-     char *string;
-     const char *format;
-     _IO_va_list args;
+__IO_vsprintf (char *string, const char *format, _IO_va_list args)
 {
   _IO_strfile sf;
   int ret;
@@ -47,8 +44,7 @@ _IO_vsprintf (string, format, args)
   _IO_putc_unlocked ('\0', (_IO_FILE *) &sf._sbf);
   return ret;
 }
-INTDEF(_IO_vsprintf)
+INTDEF2(__IO_vsprintf, _IO_vsprintf)
 
-#ifdef weak_alias
-weak_alias (_IO_vsprintf, vsprintf)
-#endif
+ldbl_strong_alias (__IO_vsprintf, _IO_vsprintf)
+ldbl_weak_alias (__IO_vsprintf, vsprintf)
--- libc/libio/vswprintf.c.jj	2005-07-20 04:32:43.000000000 -0400
+++ libc/libio/vswprintf.c	2006-01-12 12:12:29.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994,1997,1999-2002,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 1999-2002, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -126,8 +127,5 @@ _IO_vswprintf (string, maxlen, format, a
 
   return ret;
 }
-
-#ifdef weak_alias
 weak_alias (_IO_vswprintf, __vswprintf)
-weak_alias (_IO_vswprintf, vswprintf)
-#endif
+ldbl_weak_alias (_IO_vswprintf, vswprintf)
--- libc/libio/swprintf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/swprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003
+/* Copyright (C) 1991,1995,1997,1998,1999,2000,2003,2004,2006
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -17,13 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <wchar.h>
 
 /* Write formatted output into S, according to the format string FORMAT.  */
 /* VARARGS3 */
 int
-swprintf (wchar_t *s, size_t n, const wchar_t *format, ...)
+__swprintf (wchar_t *s, size_t n, const wchar_t *format, ...)
 {
   va_list arg;
   int done;
@@ -34,3 +35,4 @@ swprintf (wchar_t *s, size_t n, const wc
 
   return done;
 }
+ldbl_strong_alias (__swprintf, swprintf)
--- libc/libio/libio.h.jj	2006-01-11 08:37:38.000000000 -0500
+++ libc/libio/libio.h	2006-01-12 06:11:40.000000000 -0500
@@ -477,10 +477,13 @@ extern int _IO_ftrylockfile (_IO_FILE *)
 # define _IO_cleanup_region_end(_Doit) /**/
 #endif /* !_IO_MTSAFE_IO */
 
-extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
-			_IO_va_list, int *__restrict) __THROW;
-extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
-			 _IO_va_list) __THROW;
+extern int __LDBL_REDIR (_IO_vfscanf,
+			 (_IO_FILE * __restrict, const char * __restrict,
+			  _IO_va_list, int *__restrict));
+extern int __LDBL_REDIR (_IO_vfprintf,
+			 (_IO_FILE *__restrict, const char *__restrict,
+			  _IO_va_list));
+
 extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t) __THROW;
 extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t) __THROW;
 
@@ -526,10 +529,13 @@ weak_extern (_IO_stdin_used);
      __result; })
 # endif
 
-extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict,
-			 _IO_va_list, int *__restrict) __THROW;
-extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict,
-			  _IO_va_list) __THROW;
+extern int __LDBL_REDIR (_IO_vfwscanf,
+			 (_IO_FILE * __restrict, const wchar_t * __restrict,
+			  _IO_va_list, int *__restrict));
+extern int __LDBL_REDIR (_IO_vfwprintf,
+			 (_IO_FILE *__restrict, const wchar_t *__restrict,
+			  _IO_va_list));
+
 extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t) __THROW;
 extern void _IO_free_wbackup_area (_IO_FILE *) __THROW;
 #endif
--- libc/libio/vscanf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/vscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 2002, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,4 @@ _IO_vscanf (format, args)
 {
   return INTUSE(_IO_vfscanf) (_IO_stdin, format, args, NULL);
 }
-
-#ifdef weak_alias
-weak_alias (_IO_vscanf, vscanf)
-#endif
+ldbl_weak_alias (_IO_vscanf, vscanf)
--- libc/libio/libioP.h.jj	2005-12-19 02:43:41.000000000 -0500
+++ libc/libio/libioP.h	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1997-2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +36,8 @@
 /*# include <comthread.h>*/
 #endif
 
+#include <math_ldbl_opt.h>
+
 #include "iolibio.h"
 
 /* Control of exported symbols.  Used in glibc.  By default we don't
@@ -649,7 +652,7 @@ extern void _IO_wstr_finish (_IO_FILE *,
 
 extern int _IO_vasprintf (char **result_ptr, __const char *format,
 			  _IO_va_list args) __THROW;
-extern int _IO_vdprintf (int d, __const char *format, _IO_va_list arg) __THROW;
+extern int _IO_vdprintf (int d, __const char *format, _IO_va_list arg);
 extern int _IO_vsnprintf (char *string, _IO_size_t maxlen,
 			  __const char *format, _IO_va_list args) __THROW;
 
--- libc/libio/iovsscanf.c.jj	2004-08-04 08:42:20.000000000 -0400
+++ libc/libio/iovsscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1997-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2003, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -45,8 +45,5 @@ _IO_vsscanf (string, format, args)
   ret = INTUSE(_IO_vfscanf) ((_IO_FILE *) &sf._sbf, format, args, NULL);
   return ret;
 }
-
-#ifdef weak_alias
-weak_alias (_IO_vsscanf, __vsscanf)
-weak_alias (_IO_vsscanf, vsscanf)
-#endif
+ldbl_weak_alias (_IO_vsscanf, __vsscanf)
+ldbl_weak_alias (_IO_vsscanf, vsscanf)
--- libc/libio/iovdprintf.c.jj	2004-08-04 08:42:20.000000000 -0400
+++ libc/libio/iovdprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995,1997-2000,2001,2002,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997-2000, 2001, 2002, 2003, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +26,7 @@
    This exception applies to code released by its copyright holders
    in files containing the exception.  */
 
-#include "libioP.h"
+#include <libioP.h>
 #include <stdio_ext.h>
 
 int
@@ -63,7 +64,4 @@ _IO_vdprintf (d, format, arg)
 
   return done;
 }
-
-#ifdef weak_alias
-weak_alias (_IO_vdprintf, vdprintf)
-#endif
+ldbl_weak_alias (_IO_vdprintf, vdprintf)
--- libc/libio/wprintf.c.jj	2004-08-04 08:42:21.000000000 -0400
+++ libc/libio/wprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1995,1996,1997,1999,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 1999, 2001, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <wchar.h>
@@ -23,7 +25,7 @@
 /* Write formatted output to stdout from the format string FORMAT.  */
 /* VARARGS1 */
 int
-wprintf (const wchar_t *format, ...)
+__wprintf (const wchar_t *format, ...)
 {
   va_list arg;
   int done;
@@ -34,3 +36,4 @@ wprintf (const wchar_t *format, ...)
 
   return done;
 }
+ldbl_strong_alias (__wprintf, wprintf)
--- libc/libio/iovswscanf.c.jj	2004-08-04 08:42:20.000000000 -0400
+++ libc/libio/iovswscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993, 1997-2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997-2000, 2001, 2002, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -30,10 +31,7 @@
 #include <wchar.h>
 
 int
-vswscanf (string, format, args)
-     const wchar_t *string;
-     const wchar_t *format;
-     _IO_va_list args;
+__vswscanf (const wchar_t *string, const wchar_t *format, _IO_va_list args)
 {
   int ret;
   _IO_strfile sf;
@@ -47,4 +45,5 @@ vswscanf (string, format, args)
   ret = _IO_vfwscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
   return ret;
 }
-libc_hidden_def (vswscanf)
+ldbl_hidden_def (__vswscanf, vswscanf)
+ldbl_strong_alias (__vswscanf, vswscanf)
--- libc/libio/vasprintf.c.jj	2004-09-29 18:49:58.000000000 -0400
+++ libc/libio/vasprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1997,1999-2002,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1997,1999-2002,2004,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -87,7 +87,4 @@ _IO_vasprintf (result_ptr, format, args)
   (*result_ptr)[needed - 1] = '\0';
   return ret;
 }
-
-#ifdef weak_alias
-weak_alias (_IO_vasprintf, vasprintf)
-#endif
+ldbl_weak_alias (_IO_vasprintf, vasprintf)
--- libc/stdio-common/scanf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/scanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2002, 2004
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -26,7 +26,7 @@
 /* Read formatted input from stdin according to the format string FORMAT.  */
 /* VARARGS1 */
 int
-scanf (const char *format, ...)
+__scanf (const char *format, ...)
 {
   va_list arg;
   int done;
@@ -37,3 +37,4 @@ scanf (const char *format, ...)
 
   return done;
 }
+ldbl_strong_alias (__scanf, scanf)
--- libc/stdio-common/fscanf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/fscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 
 /* Read formatted input from STREAM according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-fscanf (FILE *stream, const char *format, ...)
+__fscanf (FILE *stream, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -33,3 +34,4 @@ fscanf (FILE *stream, const char *format
 
   return done;
 }
+ldbl_strong_alias (__fscanf, fscanf)
--- libc/stdio-common/printf_size.c.jj	2004-08-10 07:04:50.000000000 -0400
+++ libc/stdio-common/printf_size.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,5 @@
 /* Print size value using units for orders of magnitude.
-   Copyright (C) 1997-2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997-2002, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    Based on a proposal by Larry McVoy <lm@sgi.com>.
@@ -86,7 +86,8 @@ extern int __printf_fp (FILE *fp, const 
 
 \f
 int
-printf_size (FILE *fp, const struct printf_info *info, const void *const *args)
+__printf_size (FILE *fp, const struct printf_info *info,
+	       const void *const *args)
 {
   /* Units for the both formats.  */
 #define BINARY_UNITS	" kmgtpezy"
@@ -233,6 +234,7 @@ printf_size (FILE *fp, const struct prin
 
   return done;
 }
+ldbl_strong_alias (__printf_size, printf_size);
 \f
 /* This is the function used by `vfprintf' to determine number and
    type of the arguments.  */
--- libc/stdio-common/sscanf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/sscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1998, 2002, 2003, 2004
+/* Copyright (C) 1991, 1995, 1996, 1998, 2002, 2003, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -19,13 +19,13 @@
 
 #include <stdarg.h>
 #include <stdio.h>
-#include <libio/iolibio.h>
+#include <libioP.h>
 #define __vsscanf(s, f, a) _IO_vsscanf (s, f, a)
 
 /* Read formatted input from S, according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-sscanf (const char *s, const char *format, ...)
+__sscanf (const char *s, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -36,8 +36,8 @@ sscanf (const char *s, const char *forma
 
   return done;
 }
-libc_hidden_def (sscanf)
-
+ldbl_hidden_def (__sscanf, sscanf)
+ldbl_strong_alias (__sscanf, sscanf)
 #undef _IO_sscanf
 /* This is for libg++.  */
-strong_alias (sscanf, _IO_sscanf)
+ldbl_strong_alias (__sscanf, _IO_sscanf)
--- libc/stdio-common/vfscanf.c.jj	2005-09-12 03:29:17.000000000 -0400
+++ libc/stdio-common/vfscanf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -178,18 +179,12 @@
    Return the number of assignments made, or -1 for an input error.  */
 #ifdef COMPILE_WSCANF
 int
-_IO_vfwscanf (s, format, argptr, errp)
-     _IO_FILE *s;
-     const wchar_t *format;
-     _IO_va_list argptr;
-     int *errp;
+_IO_vfwscanf (_IO_FILE *s, const wchar_t *format, _IO_va_list argptr,
+	      int *errp)
 #else
 int
-_IO_vfscanf (s, format, argptr, errp)
-     _IO_FILE *s;
-     const char *format;
-     _IO_va_list argptr;
-     int *errp;
+_IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
+		      int *errp)
 #endif
 {
   va_list arg;
@@ -1891,13 +1886,13 @@ _IO_vfscanf (s, format, argptr, errp)
 	scan_float:
 	  /* Convert the number.  */
 	  ADDW (L_('\0'));
-	  if (flags & LONGDBL)
+	  if ((flags & LONGDBL) && !__ldbl_is_dbl)
 	    {
 	      long double d = __strtold_internal (wp, &tw, flags & GROUP);
 	      if (!(flags & SUPPRESS) && tw != wp)
 		*ARG (long double *) = negative ? -d : d;
 	    }
-	  else if (flags & LONG)
+	  else if (flags & (LONG | LONGDBL))
 	    {
 	      double d = __strtod_internal (wp, &tw, flags & GROUP);
 	      if (!(flags & SUPPRESS) && tw != wp)
@@ -2460,18 +2455,15 @@ __vfwscanf (FILE *s, const wchar_t *form
 {
   return _IO_vfwscanf (s, format, argptr, NULL);
 }
+ldbl_weak_alias (__vfwscanf, vfwscanf)
 #else
 int
-__vfscanf (FILE *s, const char *format, va_list argptr)
+___vfscanf (FILE *s, const char *format, va_list argptr)
 {
-  return INTUSE(_IO_vfscanf) (s, format, argptr, NULL);
+  return _IO_vfscanf_internal (s, format, argptr, NULL);
 }
-libc_hidden_def (__vfscanf)
-#endif
-
-#ifdef COMPILE_WSCANF
-weak_alias (__vfwscanf, vfwscanf)
-#else
-weak_alias (__vfscanf, vfscanf)
-INTDEF(_IO_vfscanf)
+ldbl_strong_alias (_IO_vfscanf_internal, _IO_vfscanf)
+ldbl_strong_alias (___vfscanf, __vfscanf)
+ldbl_hidden_def (___vfscanf, __vfscanf)
+ldbl_weak_alias (___vfscanf, vfscanf)
 #endif
--- libc/stdio-common/fprintf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/fprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,97,2002,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1997, 2002, 2004, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,12 +18,13 @@
 
 #include <stdarg.h>
 #include <stdio.h>
+#include <libioP.h>
 
 
 /* Write formatted output to STREAM from the format string FORMAT.  */
 /* VARARGS2 */
 int
-fprintf (FILE *stream, const char *format, ...)
+__fprintf (FILE *stream, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -34,9 +35,10 @@ fprintf (FILE *stream, const char *forma
 
   return done;
 }
-libc_hidden_def (fprintf)
+ldbl_hidden_def (__fprintf, fprintf)
+ldbl_strong_alias (__fprintf, fprintf)
 
 /* We define the function with the real name here.  But deep down in
    libio the original function _IO_fprintf is also needed.  So make
    an alias.  */
-weak_alias (fprintf, _IO_fprintf)
+ldbl_weak_alias (__fprintf, _IO_fprintf)
--- libc/stdio-common/printf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/printf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004
+/* Copyright (C) 1991, 1995, 1996, 1997, 2001, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -17,6 +17,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <libioP.h>
 #include <stdarg.h>
 #include <stdio.h>
 
@@ -25,7 +26,7 @@
 /* Write formatted output to stdout from the format string FORMAT.  */
 /* VARARGS1 */
 int
-printf (const char *format, ...)
+__printf (const char *format, ...)
 {
   va_list arg;
   int done;
@@ -38,5 +39,6 @@ printf (const char *format, ...)
 }
 
 #undef _IO_printf
+ldbl_strong_alias (__printf, printf);
 /* This is for libg++.  */
-strong_alias (printf, _IO_printf);
+ldbl_strong_alias (__printf, _IO_printf);
--- libc/stdio-common/asprintf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/asprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004
+/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -20,7 +20,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#include <libio/libioP.h>
+#include <libioP.h>
 #define vasprintf(s, f, a) _IO_vasprintf (s, f, a)
 #undef __asprintf
 
@@ -28,7 +28,7 @@
    allocated with malloc and stored in *STRING_PTR.  */
 /* VARARGS2 */
 int
-__asprintf (char **string_ptr, const char *format, ...)
+___asprintf (char **string_ptr, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -39,5 +39,7 @@ __asprintf (char **string_ptr, const cha
 
   return done;
 }
-INTDEF(__asprintf)
-weak_alias (__asprintf, asprintf)
+INTDEF2(___asprintf, __asprintf)
+
+ldbl_strong_alias (___asprintf, __asprintf)
+ldbl_weak_alias (___asprintf, asprintf)
--- libc/stdio-common/vfprintf.c.jj	2005-11-15 14:34:21.000000000 -0500
+++ libc/stdio-common/vfprintf.c	2006-01-12 12:10:42.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -64,7 +65,7 @@
 #define UNBUFFERED_P(S) ((S)->_IO_file_flags & _IO_UNBUFFERED)
 
 #ifndef COMPILE_WPRINTF
-# define vfprintf	_IO_vfprintf
+# define vfprintf	_IO_vfprintf_internal
 # define CHAR_T		char
 # define UCHAR_T	unsigned char
 # define INT_T		int
@@ -758,6 +759,9 @@ vfprintf (FILE *s, const CHAR_T *format,
 									      \
 	if (fspec == NULL)						      \
 	  {								      \
+	    if (__ldbl_is_dbl)						      \
+	      is_long_double = 0;					      \
+									      \
 	    struct printf_info info = { .prec = prec,			      \
 					.width = width,			      \
 					.spec = spec,			      \
@@ -785,6 +789,11 @@ vfprintf (FILE *s, const CHAR_T *format,
 	else								      \
 	  {								      \
 	    ptr = (const void *) &args_value[fspec->data_arg];		      \
+	    if (__ldbl_is_dbl)						      \
+	      {								      \
+		fspec->data_arg_type = PA_DOUBLE;			      \
+		fspec->info.is_long_double = 0;				      \
+	      }								      \
 									      \
 	    function_done = __printf_fp (s, &fspec->info, &ptr);	      \
 	  }								      \
@@ -808,6 +817,9 @@ vfprintf (FILE *s, const CHAR_T *format,
 									      \
 	if (fspec == NULL)						      \
 	  {								      \
+	    if (__ldbl_is_dbl)						      \
+	      is_long_double = 0;					      \
+									      \
 	    struct printf_info info = { .prec = prec,			      \
 					.width = width,			      \
 					.spec = spec,			      \
@@ -834,6 +846,8 @@ vfprintf (FILE *s, const CHAR_T *format,
 	else								      \
 	  {								      \
 	    ptr = (const void *) &args_value[fspec->data_arg];		      \
+	    if (__ldbl_is_dbl)						      \
+	      fspec->info.is_long_double = 0;				      \
 									      \
 	    function_done = __printf_fphex (s, &fspec->info, &ptr);	      \
 	  }								      \
@@ -1704,7 +1718,15 @@ do_positional:
 	T (PA_INT|PA_FLAG_LONG_LONG, pa_long_long_int, long long int);
 	T (PA_FLOAT, pa_double, double);	/* Promoted.  */
 	T (PA_DOUBLE, pa_double, double);
-	T (PA_DOUBLE|PA_FLAG_LONG_DOUBLE, pa_long_double, long double);
+	case PA_DOUBLE|PA_FLAG_LONG_DOUBLE:
+	  if (__ldbl_is_dbl)
+	    {
+	      args_value[cnt].pa_double = va_arg (ap_save, double);
+	      args_type[cnt] &= ~PA_FLAG_LONG_DOUBLE;
+	    }
+	  else
+	    args_value[cnt].pa_long_double = va_arg (ap_save, long double);
+	  break;
 	T (PA_STRING, pa_string, const char *);
 	T (PA_WSTRING, pa_wstring, const wchar_t *);
 	T (PA_POINTER, pa_pointer, void *);
@@ -2154,25 +2176,11 @@ buffered_vfprintf (register _IO_FILE *s,
 }
 
 #undef vfprintf
-#ifdef strong_alias
-/* This is for glibc.  */
-# ifdef COMPILE_WPRINTF
+#ifdef COMPILE_WPRINTF
 strong_alias (_IO_vfwprintf, __vfwprintf);
-weak_alias (_IO_vfwprintf, vfwprintf);
-# else
-strong_alias (_IO_vfprintf, vfprintf);
-libc_hidden_def (vfprintf)
-INTDEF(_IO_vfprintf)
-# endif
-#else
-# if defined __ELF__ || defined __GNU_LIBRARY__
-#  include <gnu-stabs.h>
-#  ifdef weak_alias
-#   ifdef COMPILE_WPRINTF
-weak_alias (_IO_vfwprintf, vfwprintf);
-#   else
-weak_alias (_IO_vfprintf, vfprintf);
-#   endif
-#  endif
-# endif
+ldbl_weak_alias (_IO_vfwprintf, vfwprintf);
+#else
+ldbl_strong_alias (_IO_vfprintf_internal, vfprintf);
+ldbl_hidden_def (_IO_vfprintf_internal, vfprintf)
+ldbl_strong_alias (_IO_vfprintf_internal, _IO_vfprintf);
 #endif
--- libc/stdio-common/sprintf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/sprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004
+/* Copyright (C) 1991, 1995, 1997, 1998, 2002, 2004, 2006
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -19,13 +19,13 @@
 
 #include <stdarg.h>
 #include <stdio.h>
-#include <libio/iolibio.h>
+#include <libioP.h>
 #define vsprintf(s, f, a) INTUSE(_IO_vsprintf) (s, f, a)
 
 /* Write formatted output into S, according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-sprintf (char *s, const char *format, ...)
+__sprintf (char *s, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -36,6 +36,6 @@ sprintf (char *s, const char *format, ..
 
   return done;
 }
-libc_hidden_def (sprintf)
-
-strong_alias(sprintf, _IO_sprintf)
+ldbl_hidden_def (__sprintf, sprintf)
+ldbl_strong_alias (__sprintf, sprintf)
+ldbl_strong_alias (__sprintf, _IO_sprintf)
--- libc/stdio-common/dprintf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/dprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,95,97,98,2002,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991,95,97,98,2002,2004,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,13 +19,13 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#include <libio/libioP.h>
+#include <libioP.h>
 #define vdprintf(d, f, a) _IO_vdprintf (d, f, a)
 
 /* Write formatted output to D, according to the format string FORMAT.  */
 /* VARARGS2 */
 int
-dprintf (int d, const char *format, ...)
+__dprintf (int d, const char *format, ...)
 {
   va_list arg;
   int done;
@@ -36,4 +36,5 @@ dprintf (int d, const char *format, ...)
 
   return done;
 }
-libc_hidden_def (dprintf)
+ldbl_hidden_def (__dprintf, dprintf)
+ldbl_strong_alias (__dprintf, dprintf)
--- libc/stdio-common/vprintf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/vprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1995, 1997, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,16 @@
 #include <stdarg.h>
 #undef	__OPTIMIZE__	/* Avoid inline `vprintf' function.  */
 #include <stdio.h>
+#include <libioP.h>
 
 #undef	vprintf
 
 /* Write formatted output to stdout according to the
    format string FORMAT, using the argument list in ARG.  */
 int
-vprintf (format, arg)
-     const char *format;
-     __gnuc_va_list arg;
+__vprintf (const char *format, __gnuc_va_list arg)
 {
   return vfprintf (stdout, format, arg);
 }
+
+ldbl_strong_alias (__vprintf, vprintf)
--- libc/stdio-common/snprintf.c.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/snprintf.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1995, 1997, 1998, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1997, 1998, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +19,7 @@
 
 #include <stdarg.h>
 #include <stdio.h>
-
-#include <libio/libioP.h>
+#include <libioP.h>
 #define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
 
 /* Write formatted output into S, according to the format
@@ -37,4 +37,4 @@ __snprintf (char *s, size_t maxlen, cons
 
   return done;
 }
-weak_alias (__snprintf, snprintf)
+ldbl_weak_alias (__snprintf, snprintf)
--- libc/stdio-common/printf_fp.c.jj	2005-09-12 03:29:16.000000000 -0400
+++ libc/stdio-common/printf_fp.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,6 @@
 /* Floating point output for `printf'.
-   Copyright (C) 1995-1999,2000,2001,2002,2003 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -138,9 +139,9 @@ static wchar_t *group_number (wchar_t *b
 
 
 int
-__printf_fp (FILE *fp,
-	     const struct printf_info *info,
-	     const void *const *args)
+___printf_fp (FILE *fp,
+	      const struct printf_info *info,
+	      const void *const *args)
 {
   /* The floating-point value to output.  */
   union
@@ -1153,7 +1154,8 @@ __printf_fp (FILE *fp,
   }
   return done;
 }
-libc_hidden_def (__printf_fp)
+ldbl_hidden_def (___printf_fp, __printf_fp)
+ldbl_strong_alias (___printf_fp, __printf_fp)
 \f
 /* Return the number of extra grouping characters that will be inserted
    into a number with INTDIG_MAX integer digits.  */
--- libc/stdio-common/printf.h.jj	2004-08-04 08:42:24.000000000 -0400
+++ libc/stdio-common/printf.h	2006-01-12 06:11:40.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991-1993,1995-1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1995-1999, 2000, 2001, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -130,16 +131,16 @@ enum
    of magnitude used for numbers ('k' for kilo, 'm' for mega etc).  If
    the format specifier is a uppercase character powers of 1000 are
    used.  Otherwise powers of 1024.  */
-extern int printf_size (FILE *__restrict __fp,
-			__const struct printf_info *__info,
-			__const void *__const *__restrict __args) __THROW;
+extern int __LDBL_REDIR_NTH (printf_size,
+			     (FILE *__restrict __fp,
+			      __const struct printf_info *__info,
+			      __const void *__const *__restrict __args));
 
 /* This is the appropriate argument information function for `printf_size'.  */
 extern int printf_size_info (__const struct printf_info *__restrict
 			     __info, size_t __n, int *__restrict __argtypes)
      __THROW;
 
-
 __END_DECLS
 
 #endif /* printf.h  */
--- libc/include/stdlib.h.jj	2006-01-10 07:29:05.000000000 -0500
+++ libc/include/stdlib.h	2006-01-12 06:11:40.000000000 -0500
@@ -25,10 +25,6 @@ libc_hidden_proto (abort)
 libc_hidden_proto (getenv)
 libc_hidden_proto (bsearch)
 libc_hidden_proto (qsort)
-libc_hidden_proto (ecvt_r)
-libc_hidden_proto (fcvt_r)
-libc_hidden_proto (qecvt_r)
-libc_hidden_proto (qfcvt_r)
 libc_hidden_proto (lrand48_r)
 libc_hidden_proto (wctomb)
 libc_hidden_proto (__secure_getenv)
@@ -186,6 +182,28 @@ __NTH (__strtoull_l (__const char * __re
   return ____strtoull_l_internal (__nptr, __endptr, __base, 0, __loc);
 }
 
+extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
+		     int *__restrict __sign);
+extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
+		     int *__restrict __sign);
+extern char *__gcvt (double __value, int __ndigit, char *__buf);
+extern int __ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
+		     int *__restrict __sign, char *__restrict __buf,
+		     size_t __len);
+extern int __fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
+		     int *__restrict __sign, char *__restrict __buf,
+		     size_t __len);
+extern char *__qecvt (long double __value, int __ndigit,
+		      int *__restrict __decpt, int *__restrict __sign);
+extern char *__qfcvt (long double __value, int __ndigit,
+		      int *__restrict __decpt, int *__restrict __sign);
+extern char *__qgcvt (long double __value, int __ndigit, char *__buf);
+extern int __qecvt_r (long double __value, int __ndigit,
+		      int *__restrict __decpt, int *__restrict __sign,
+		      char *__restrict __buf, size_t __len);
+extern int __qfcvt_r (long double __value, int __ndigit,
+		      int *__restrict __decpt, int *__restrict __sign,
+		      char *__restrict __buf, size_t __len);
 
 # ifndef NOT_IN_libc
 #  undef MB_CUR_MAX
--- libc/include/wchar.h.jj	2005-07-20 04:32:43.000000000 -0400
+++ libc/include/wchar.h	2006-01-12 12:05:45.000000000 -0500
@@ -107,18 +107,21 @@ extern int __vswprintf (wchar_t *__restr
      /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
 extern int __fwprintf (__FILE *__restrict __s,
 		       __const wchar_t *__restrict __format, ...)
-     /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
+     /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
 extern int __vfwprintf (__FILE *__restrict __s,
 			__const wchar_t *__restrict __format,
 			__gnuc_va_list __arg)
+     /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
+extern int __vfwprintf_chk (FILE *__restrict __s, int __flag,
+			    const wchar_t *__restrict __format,
+			    __gnuc_va_list __arg)
      /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
-
-
 extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
 			    int __flag, size_t __s_len,
 			    __const wchar_t *__restrict __format,
 			    __gnuc_va_list __arg)
      /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
+libc_hidden_proto (__vfwprintf_chk)
 libc_hidden_proto (__vswprintf_chk)
 
 /* Internal functions.  */
--- libc/misc/bits/syslog.h.jj	2005-07-30 01:56:45.000000000 -0400
+++ libc/misc/bits/syslog.h	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,5 @@
 /* Checking macros for syslog functions.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,8 @@
 #endif
 
 
-extern void __syslog_chk (int __pri, int __flag, __const char *__fmt, ...)
+extern void __LDBL_REDIR (__syslog_chk,
+			  (int __pri, int __flag, __const char *__fmt, ...))
      __attribute__ ((__format__ (__printf__, 3, 4)));
 
 #define syslog(pri, ...) \
@@ -30,8 +31,9 @@ extern void __syslog_chk (int __pri, int
 
 
 #ifdef __USE_BSD
-extern void __vsyslog_chk (int __pri, int __flag, __const char *__fmt,
-			   __gnuc_va_list __ap)
+extern void __LDBL_REDIR (__vsyslog_chk,
+			  (int __pri, int __flag, __const char *__fmt,
+			   __gnuc_va_list __ap))
      __attribute__ ((__format__ (__printf__, 3, 0)));
 
 # define vsyslog(pri, fmt, ap)						\
--- libc/misc/sys/cdefs.h.jj	2005-04-13 15:30:02.000000000 -0400
+++ libc/misc/sys/cdefs.h	2006-01-12 12:23:06.000000000 -0500
@@ -1,4 +1,5 @@
-/* Copyright (C) 1992-2001, 2002, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -309,4 +310,28 @@
 # endif
 #endif
 
+#include <bits/wordsize.h>
+
+#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+# define __LDBL_COMPAT 1
+# ifdef __REDIRECT
+#  define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
+#  define __LDBL_REDIR(name, proto) \
+  __LDBL_REDIR1 (name, proto, __nldbl_##name)
+#  define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
+#  define __LDBL_REDIR_NTH(name, proto) \
+  __LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
+# else
+#  define __LDBL_REDIR1(name, proto, alias) name proto
+#  define __LDBL_REDIR(name, proto) name proto
+#  define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
+#  define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+# endif
+#else
+# define __LDBL_REDIR1(name, proto, alias) name proto
+# define __LDBL_REDIR(name, proto) name proto
+# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
+# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
+#endif
+
 #endif	 /* sys/cdefs.h */
--- libc/misc/sys/syslog.h.jj	2005-08-08 03:14:54.000000000 -0400
+++ libc/misc/sys/syslog.h	2006-01-12 06:11:40.000000000 -0500
@@ -187,7 +187,7 @@ extern int setlogmask (int __mask) __THR
 
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
-extern void syslog (int __pri, __const char *__fmt, ...)
+extern void __LDBL_REDIR (syslog, (int __pri, __const char *__fmt, ...))
      __attribute__ ((__format__ (__printf__, 2, 3)));
 
 #ifdef __USE_BSD
@@ -197,7 +197,8 @@ extern void syslog (int __pri, __const c
    cancellation point.  But due to similarity with an POSIX interface
    or due to the implementation it is a cancellation point and
    therefore not marked with __THROW.  */
-extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
+extern void __LDBL_REDIR (vsyslog, (int __pri, __const char *__fmt,
+			  __gnuc_va_list __ap))
      __attribute__ ((__format__ (__printf__, 2, 0)));
 #endif
 
--- libc/misc/efgcvt_r.c.jj	2005-01-08 10:50:22.000000000 -0500
+++ libc/misc/efgcvt_r.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,6 @@
 /* Compatibility functions for floating point formatting, reentrant versions.
-   Copyright (C) 1995,96,97,98,99,2000,01,02,04 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +26,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <sys/param.h>
+#include <shlib-compat.h>
 
 #ifndef FLOAT_TYPE
 # define FLOAT_TYPE double
@@ -55,10 +57,14 @@
 #  error "FLOAT_MIN_10_NORM must be precomputed"
 #  define FLOAT_MIN_10_NORM	exp10 (DBL_MIN_10_EXP)
 # endif
+#else
+# define LONG_DOUBLE_CVT
 #endif
 
 #define APPEND(a, b) APPEND2 (a, b)
 #define APPEND2(a, b) a##b
+#define __APPEND(a, b) __APPEND2 (a, b)
+#define __APPEND2(a, b) __##a##b
 
 #define FLOOR APPEND(floor, FLOAT_NAME_EXT)
 #define FABS APPEND(fabs, FLOAT_NAME_EXT)
@@ -67,7 +73,7 @@
 
 
 int
-APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
+__APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
      FLOAT_TYPE value;
      int ndigit, *decpt, *sign;
      char *buf;
@@ -163,10 +169,9 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndi
 
   return 0;
 }
-libc_hidden_def (APPEND (FUNC_PREFIX, fcvt_r))
 
 int
-APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len)
+__APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len)
      FLOAT_TYPE value;
      int ndigit, *decpt, *sign;
      char *buf;
@@ -229,11 +234,33 @@ APPEND (FUNC_PREFIX, ecvt_r) (value, ndi
       *sign = isfinite (value) ? signbit (value) != 0 : 0;
     }
   else
-    if (APPEND (FUNC_PREFIX, fcvt_r) (value, MIN (ndigit, NDIGIT_MAX) - 1,
-				      decpt, sign, buf, len))
+    if (__APPEND (FUNC_PREFIX, fcvt_r) (value, MIN (ndigit, NDIGIT_MAX) - 1,
+					decpt, sign, buf, len))
       return -1;
 
   *decpt += exponent;
   return 0;
 }
-libc_hidden_def (APPEND (FUNC_PREFIX, ecvt_r))
+
+#if defined __LONG_DOUBLE_MATH_OPTIONAL && \
+    SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_4)
+# ifdef LONG_DOUBLE_CVT
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (FUNC_PREFIX, symbol), GLIBC_2_4)
+#  define cvt_symbol_1(lib, local, symbol, version) \
+    versioned_symbol (lib, local, symbol, version)
+# else
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (q, symbol), GLIBC_2_0); \
+  strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#  define cvt_symbol_1(lib, local, symbol, version) \
+  compat_symbol (lib, local, symbol, version)
+# endif
+#else
+# define cvt_symbol(symbol) \
+  strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#endif
+cvt_symbol(fcvt_r);
+cvt_symbol(ecvt_r);
--- libc/misc/efgcvt.c.jj	2004-08-04 08:42:22.000000000 -0400
+++ libc/misc/efgcvt.c	2006-01-12 06:11:40.000000000 -0500
@@ -1,5 +1,6 @@
 /* Compatibility functions for floating point formatting.
-   Copyright (C) 1995, 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1999, 2002, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +24,7 @@
 #include <sys/param.h>
 #include <float.h>
 #include <bits/libc-lock.h>
+#include <shlib-compat.h>
 
 #ifndef FLOAT_TYPE
 # define FLOAT_TYPE double
@@ -44,10 +46,14 @@
 #  error "NDIGIT_MAX must be precomputed"
 #  define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * DBL_MANT_DIG + 1.0)))
 # endif
+#else
+# define LONG_DOUBLE_CVT
 #endif
 
 #define APPEND(a, b) APPEND2 (a, b)
 #define APPEND2(a, b) a##b
+#define __APPEND(a, b) __APPEND2 (a, b)
+#define __APPEND2(a, b) __##a##b
 
 
 #define FCVT_BUFFER APPEND (FUNC_PREFIX, fcvt_buffer)
@@ -60,14 +66,14 @@ static char ECVT_BUFFER[MAXDIG];
 libc_freeres_ptr (static char *FCVT_BUFPTR);
 
 char *
-APPEND (FUNC_PREFIX, fcvt) (value, ndigit, decpt, sign)
+__APPEND (FUNC_PREFIX, fcvt) (value, ndigit, decpt, sign)
      FLOAT_TYPE value;
      int ndigit, *decpt, *sign;
 {
   if (FCVT_BUFPTR == NULL)
     {
-      if (APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign,
-					FCVT_BUFFER, MAXDIG) != -1)
+      if (__APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign,
+					  FCVT_BUFFER, MAXDIG) != -1)
 	return FCVT_BUFFER;
 
       FCVT_BUFPTR = (char *) malloc (FCVT_MAXDIG);
@@ -75,26 +81,26 @@ APPEND (FUNC_PREFIX, fcvt) (value, ndigi
 	return FCVT_BUFFER;
     }
 
-  (void) APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign,
-				       FCVT_BUFPTR, FCVT_MAXDIG);
+  (void) __APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign,
+					 FCVT_BUFPTR, FCVT_MAXDIG);
 
   return FCVT_BUFPTR;
 }
 
 
 char *
-APPEND (FUNC_PREFIX, ecvt) (value, ndigit, decpt, sign)
+__APPEND (FUNC_PREFIX, ecvt) (value, ndigit, decpt, sign)
      FLOAT_TYPE value;
      int ndigit, *decpt, *sign;
 {
-  (void) APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign,
-				       ECVT_BUFFER, MAXDIG);
+  (void) __APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign,
+					 ECVT_BUFFER, MAXDIG);
 
   return ECVT_BUFFER;
 }
 
 char *
-APPEND (FUNC_PREFIX, gcvt) (value, ndigit, buf)
+__APPEND (FUNC_PREFIX, gcvt) (value, ndigit, buf)
      FLOAT_TYPE value;
      int ndigit;
      char *buf;
@@ -102,3 +108,27 @@ APPEND (FUNC_PREFIX, gcvt) (value, ndigi
   sprintf (buf, "%.*" FLOAT_FMT_FLAG "g", MIN (ndigit, NDIGIT_MAX), value);
   return buf;
 }
+
+#if defined __LONG_DOUBLE_MATH_OPTIONAL && \
+    SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_4)
+# ifdef LONG_DOUBLE_CVT
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (FUNC_PREFIX, symbol), GLIBC_2_4)
+#  define cvt_symbol_1(lib, local, symbol, version) \
+    versioned_symbol (lib, local, symbol, version)
+# else
+#  define cvt_symbol(symbol) \
+  cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
+	      APPEND (q, symbol), GLIBC_2_0); \
+  strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#  define cvt_symbol_1(lib, local, symbol, version) \
+  compat_symbol (lib, local, symbol, version)
+# endif
+#else
+# define cvt_symbol(symbol) \
+  strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+#endif
+cvt_symbol(fcvt);
+cvt_symbol(ecvt);
+cvt_symbol(gcvt);
--- libc/misc/syslog.c.jj	2005-12-27 05:56:47.000000000 -0500
+++ libc/misc/syslog.c	2006-01-12 07:18:54.000000000 -0500
@@ -58,6 +58,8 @@ static char sccsid[] = "@(#)syslog.c	8.4
 #endif
 
 #include <libio/iolibio.h>
+#include <math_ldbl_opt.h>
+
 #define ftell(s) INTUSE(_IO_ftell) (s)
 
 static int	LogType = SOCK_DGRAM;	/* type of socket connection */
@@ -109,7 +111,7 @@ cancel_handler (void *ptr)
  *	print message on log file; output is intended for syslogd(8).
  */
 void
-syslog(int pri, const char *fmt, ...)
+__syslog(int pri, const char *fmt, ...)
 {
 	va_list ap;
 
@@ -117,7 +119,8 @@ syslog(int pri, const char *fmt, ...)
 	__vsyslog_chk(pri, -1, fmt, ap);
 	va_end(ap);
 }
-libc_hidden_def (syslog)
+ldbl_hidden_def (__syslog, syslog)
+ldbl_strong_alias (__syslog, syslog)
 
 void
 __syslog_chk(int pri, int flag, const char *fmt, ...)
@@ -318,14 +321,12 @@ __vsyslog_chk(int pri, int flag, const c
 libc_hidden_def (__vsyslog_chk)
 
 void
-vsyslog(pri, fmt, ap)
-	int pri;
-	register const char *fmt;
-	va_list ap;
+__vsyslog(int pri, const char *fmt, va_list ap)
 {
   __vsyslog_chk (pri, -1, fmt, ap);
 }
-libc_hidden_def (vsyslog)
+ldbl_hidden_def (__vsyslog, vsyslog)
+ldbl_strong_alias (__vsyslog, vsyslog)
 
 static struct sockaddr_un SyslogAddr;	/* AF_UNIX address of local logger */
 

[-- Attachment #3: ldbl-dbl-tst.c --]
[-- Type: text/plain, Size: 17953 bytes --]

#define _GNU_SOURCE 1
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
#include <monetary.h>
#include <printf.h>
#include <math.h>
#include <complex.h>
#include <syslog.h>
#include <string.h>
#include <obstack.h>
#include <unistd.h>
#include <locale.h>

#define obstack_chunk_alloc malloc
#define obstack_chunk_free free

#ifdef __NO_LONG_DOUBLE_MATH
/* Provide prototypes ourselves.  */
extern long double acoshl (long double);
extern long double acosl (long double);
extern long double asinhl (long double);
extern long double asinl (long double);
extern long double atan2l (long double, long double);
extern long double atanhl (long double);
extern long double atanl (long double);
extern long double cbrtl (long double);
extern long double ceill (long double);
extern long double copysignl (long double, long double);
extern long double coshl (long double);
extern long double cosl (long double);
extern long double dreml (long double, long double);
extern long double erfcl (long double);
extern long double erfl (long double);
extern long double exp10l (long double);
extern long double exp2l (long double);
extern long double expl (long double);
extern long double expm1l (long double);
extern long double fabsl (long double);
extern long double fdiml (long double, long double);
extern long double floorl (long double);
extern long double fmal (long double, long double, long double);
extern long double fmaxl (long double, long double);
extern long double fminl (long double, long double);
extern long double fmodl (long double, long double);
extern long double gammal (long double);
extern long double hypotl (long double, long double);
extern int ilogbl (long double);
extern long double j0l (long double);
extern long double j1l (long double);
extern long double jnl (int, long double);
extern long double ldexpl (long double, int);
#endif

long double l1, l2;
double d1, d2;

int failures;
#define CHECK(x) \
  do {								\
    if (!(x))							\
      {								\
	fprintf (stderr, "failure on line %d\n", __LINE__);	\
	++failures;						\
      }								\
  } while (0)

#define CHECK2(x, y) \
  do {								\
    l1 = x;							\
    /* Avoid using fabsl here, we want to test it too.  */	\
    CHECK ((l1 > y && (l1 - y) < 0.01L)				\
	   || (l1 <= y && (y - l1) < 0.01L));			\
  } while (0)

#define CHECK3(fn, x, y) \
  CHECK2 (fn##l (x##L), y##L);					\
  CHECK2 (fn (x), y)

#define CHECK4(fn, x, y, z) \
  CHECK2 (fn##l (x##L, y##L), z##L);				\
  CHECK2 (fn (x, y), z)

#define CHECK5(fn, x, y, z, w) \
  CHECK2 (fn##l (x##L, y##L, z##L), w##L);			\
  CHECK2 (fn (x, y, z), w)

void
test (va_list *ap, va_list *pap)
{
  int i;

  if (freopen ("/proc/self/fd/1", "w", stderr) == NULL)
    CHECK (0);

  CHECK (setlocale (LC_ALL, "en_US.ISO-8859-1") != NULL);
  locale_t loc = newlocale (LC_ALL_MASK, "en_US.ISO-8859-1", NULL);
  CHECK (loc != NULL);
  locale_t loc2 = newlocale (LC_ALL_MASK, "cs_CZ.UTF-8", NULL);
  CHECK (loc2 != NULL);

  char tmpp2[] = "/tmp/tst-ldbl-dbl-XXXXXX";
  int fd = mkstemp (tmpp2);
  if (fd < 0)
    CHECK (0);
  char tmpp[sizeof ("/proc/self/fd/%d") + 3 * sizeof (int)];
  snprintf (tmpp, sizeof (tmpp), "/proc/self/fd/%d", fd);
  unlink (tmpp2);
  if (freopen (tmpp, "w", stdout) == NULL)
    CHECK (0);

  /* asprintf, dprintf, fprintf, fwprintf, obstack_printf, obstack_vprintf,
     printf, printf_size, snprintf, sprintf, swprintf, vasprintf, vdprintf,
     vfprintf, vfwprintf, vprintf, vsnprintf, vsprintf, vswprintf, vwprintf,
     wprintf */
  /* _IO_fprintf, _IO_printf, _IO_sprintf, _IO_vfprintf, _IO_vsprintf,
     __asprintf, __vsnprintf, __fprintf_chk, __fwprintf_chk, __printf_chk,
     __snprintf_chk, __sprintf_chk, __swprintf_chk, __vfprintf_chk,
     __vfwprintf_chk, __vprintf_chk, __vsnprintf_chk, __vsprintf_chk,
     __vswprintf_chk, __vwprintf_chk, __wprintf_chk, __printf_fp */
  char *p;
  p = NULL;
  asprintf (&p, "%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (strcmp (p, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  free (p);
  p = NULL;
  vasprintf (&p, "%Lg %5.9Lf %g %5.9f\n", *ap++);
  CHECK (strcmp (p, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  free (p);
  fflush (stdout);
  dprintf (1, "%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  vdprintf (1, "%Lg %5.9Lf %g %5.9f\n", *ap++);
  fflush (stdout);
  fprintf (stdout, "%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  vfprintf (stdout, "%Lg %5.9Lf %g %5.9f\n", *ap++);
  printf ("%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  vprintf ("%Lg %5.9Lf %g %5.9f\n", *ap++);
  struct obstack o;
  obstack_init (&o);
  obstack_printf (&o, "%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  obstack_1grow (&o, 0);
  p = obstack_finish (&o);
  CHECK (strcmp (p, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  obstack_1grow (&o, 'z');
  obstack_finish (&o);
  obstack_vprintf (&o, "%Lg %5.9Lf %g %5.9f\n", *ap++);
  obstack_1grow (&o, 0);
  p = obstack_finish (&o);
  CHECK (strcmp (p, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  obstack_free (&o, NULL);
  char buf[80];
  memset (buf, 0, sizeof (buf));
  sprintf (buf, "%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (strcmp (buf, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  memset (buf, 0, sizeof (buf));
  vsprintf (buf, "%Lg %5.9Lf %g %5.9f\n", *ap++);
  CHECK (strcmp (buf, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  memset (buf, 0, sizeof (buf));
  snprintf (buf, 80, "%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (strcmp (buf, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  memset (buf, 0, sizeof (buf));
  vsnprintf (buf, 80, "%Lg %5.9Lf %g %5.9f\n", *ap++);
  CHECK (strcmp (buf, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  fflush (stdout);
  if (freopen (tmpp, "r", stdin) == NULL)
    CHECK (0);
  for (i = 0; i < 6; i++)
    {
      memset (buf, 0, sizeof (buf));
      CHECK (fgets (buf, sizeof (buf), stdin) == buf);
      CHECK (strcmp (buf, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
    }
  if (freopen (tmpp, "w", stdout) == NULL)
    CHECK (0);
  fwprintf (stdout, L"%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  vfwprintf (stdout, L"%Lg %5.9Lf %g %5.9f\n", *ap++);
  wprintf (L"%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  vwprintf (L"%Lg %5.9Lf %g %5.9f\n", *ap++);
  fflush (stdout);
  if (freopen (tmpp, "r", stdin) == NULL)
    CHECK (0);
  for (i = 0; i < 4; i++)
    {
      memset (buf, 0, sizeof (buf));
      CHECK (fgets (buf, sizeof (buf), stdin) == buf);
      CHECK (strcmp (buf, "3.25 7834.500000000 3.75 7835.500000000\n") == 0);
    }
  if (freopen (tmpp, "w", stdout) == NULL)
    CHECK (0);
  wchar_t wbuf[80];
  memset (wbuf, 0, sizeof (wbuf));
  swprintf (wbuf, 80, L"%Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (wcscmp (wbuf, L"3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  memset (wbuf, 0, sizeof (wbuf));
  vswprintf (wbuf, 80, L"%Lg %5.9Lf %g %5.9f\n", *ap++);
  CHECK (wcscmp (wbuf, L"3.25 7834.500000000 3.75 7835.500000000\n") == 0);
  register_printf_function ('B', printf_size, printf_size_info);
  register_printf_function ('b', printf_size, printf_size_info);
  memset (buf, 0, sizeof (buf));
  sprintf (buf, "%LB %LB %B %B\n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (strcmp (buf, "3.250  7.835K 3.750  7.835K\n") == 0);
  memset (buf, 0, sizeof (buf));
  vsprintf (buf, "%Lb %Lb %b %b\n", *ap++);
  CHECK (strcmp (buf, "3.250  7.651k 3.750  7.652k\n") == 0);

  /* fscanf, fwscanf, scanf, sscanf, swscanf, vfscanf, vfwscanf, vscanf,
     vsscanf, vswscanf, vwscanf, wscanf */
  /* _IO_sscanf, _IO_vfscanf, __vfscanf, __vsscanf */
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (sscanf ("8.125 16372.625 -9.5 32163.125", "%Lf %Lf %lf %lf\n", &l1, &l2, &d1, &d2) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (vsscanf ("8.125 16372.625 -9.5 32163.125", "%Lf %Lf %lf %lf\n", *pap++) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  for (i = 0; i < 4; i++)
    puts ("8.125 16372.625 -9.5 32163.125");
  fflush (stdout);
  if (freopen (tmpp, "r", stdin) == NULL)
    CHECK (0);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (fscanf (stdin, "%Lf %Lf %lf %lf\n", &l1, &l2, &d1, &d2) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (vfscanf (stdin, "%Lf %Lf %lf %lf\n", *pap++) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (scanf ("%Lf %Lf %lf %lf\n", &l1, &l2, &d1, &d2) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (vscanf ("%Lf %Lf %lf %lf\n", *pap++) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  if (freopen (tmpp, "r", stdin) == NULL)
    CHECK (0);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (swscanf (L"8.125 16372.625 -9.5 32163.125", L"%Lf %Lf %lf %lf\n", &l1, &l2, &d1, &d2) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (vswscanf (L"8.125 16372.625 -9.5 32163.125", L"%Lf %Lf %lf %lf\n", *pap++) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (fwscanf (stdin, L"%Lf %Lf %lf %lf\n", &l1, &l2, &d1, &d2) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (vfwscanf (stdin, L"%Lf %Lf %lf %lf\n", *pap++) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (wscanf (L"%Lf %Lf %lf %lf\n", &l1, &l2, &d1, &d2) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);
  l1 = 0; l2 = 0; d1 = 0; d2 = 0;
  CHECK (vwscanf (L"%Lf %Lf %lf %lf\n", *pap++) == 4);
  CHECK (l1 == 8.125L && l2 == 16372.625 && d1 == -9.5 && d2 == 32163.125);

  /* syslog, vsyslog */
  /* __syslog_chk, __vsyslog_chk */
  syslog (1, "long double test %Lg %5.9Lf %g %5.9f\n", 3.25L, 7834.5L, 3.75, 7835.5);
  vsyslog (1, "long double test %Lg %5.9Lf %g %5.9f\n", *ap++);

  /* qecvt, qecvt_r, qfcvt, qfcvt_r, qgcvt */
  int decpt, sign;
  decpt = -1300; sign = -1300;
  CHECK (strcmp (qecvt (3.25L, 8, &decpt, &sign), "32500000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (qecvt (-7834.5L, 9, &decpt, &sign), "783450000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (ecvt (3.75, 8, &decpt, &sign), "37500000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (ecvt (-7835.5, 9, &decpt, &sign), "783550000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (qfcvt (3.25L, 8, &decpt, &sign), "325000000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (qfcvt (-7834.5L, 9, &decpt, &sign), "7834500000000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (fcvt (3.75, 8, &decpt, &sign), "375000000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  CHECK (strcmp (fcvt (-7835.5, 9, &decpt, &sign), "7835500000000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (qecvt_r (3.25L, 8, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "32500000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (qecvt_r (-7834.5L, 9, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "783450000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (ecvt_r (3.75, 8, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "37500000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (ecvt_r (-7835.5, 9, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "783550000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (qfcvt_r (3.25L, 8, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "325000000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (qfcvt_r (-7834.5L, 9, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "7834500000000") == 0);
  CHECK (decpt == 4 && sign == 1);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (fcvt_r (3.75, 8, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "375000000") == 0);
  CHECK (decpt == 1 && sign == 0);
  decpt = -1300; sign = -1300;
  memset (buf, 0, sizeof (buf));
  CHECK (fcvt_r (-7835.5, 9, &decpt, &sign, buf, sizeof (buf)) == 0);
  CHECK (strcmp (buf, "7835500000000") == 0);
  CHECK (decpt == 4 && sign == 1);
  memset (buf, 0, sizeof (buf));
  CHECK (qgcvt (3.251L, 3, buf) == buf);
  CHECK (strcmp (buf, "3.25") == 0);
  memset (buf, 0, sizeof (buf));
  CHECK (qgcvt (7834.51L, 5, buf) == buf);
  CHECK (strcmp (buf, "7834.5") == 0);
  memset (buf, 0, sizeof (buf));
  CHECK (gcvt (3.751, 3, buf) == buf);
  CHECK (strcmp (buf, "3.75") == 0);
  memset (buf, 0, sizeof (buf));
  CHECK (gcvt (7835.51, 5, buf) == buf);
  CHECK (strcmp (buf, "7835.5") == 0);

  /* strfmon, strfmon_l */
  /* __strfmon_l */
  memset (buf, 0, sizeof (buf));
  strfmon (buf, sizeof (buf), "%Ln %Ln %n %n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (strcmp (buf, "$3.25 $7,834.50 $3.75 $7,835.50") == 0);
  memset (buf, 0, sizeof (buf));
  strfmon_l (buf, sizeof (buf), loc, "%Ln %Ln %n %n", 3.25L, 7834.5L, 3.75, 7835.5);
  CHECK (strcmp (buf, "$3.25 $7,834.50 $3.75 $7,835.50") == 0);

  /* strtold, strtold_l, wcstold, wcstold_l */
  /* __strtold_l, __wcstold_l, __strtold_internal, __wcstold_internal */
  char *q = "1324.75";
  CHECK (strtold (q, &p) == 1324.75L && p == q + 7);
  q = "12325,75";
  CHECK (strtold_l (q, &p, loc2) == 12325.75L && p == q + 8);
  wchar_t *r = L"1374.25", *s;
  CHECK (wcstold (r, &s) == 1374.25L && s == r + 7);
  r = L"18374,125";
  CHECK (wcstold_l (r, &s, loc2) == 18374.125L && s == r + 9);

  /* acoshl, acosl, asinhl, asinl, atan2l, atanhl, atanl, cabsl, cacoshl,
     cacosl, cargl, casinhl, casinl, catanhl, catanl, cbrtl, ccoshl, ccosl,
     ceill, cexpl, cimagl, clog10l, clogl, conjl, copysignl, coshl, cosl,
     cpowl, cprojl, creall, csinhl, csinl, csqrtl, ctanhl, ctanl, dreml,
     erfcl, erfl, exp10l, exp2l, expl, expm1l, fabsl, fdiml, finitel, floorl,
     fmal, fmaxl, fminl, fmodl, frexpl, gammal, hypotl, ilogbl, isinfl,
     isnanl, j0l, j1l, jnl, ldexpl, lgammal, lgammal_r, llrintl, llroundl,
     log10l, log1pl, log2l, logbl, logl, lrintl, lroundl, nexttoward,
     nexttowardf, modfl, nanl, nearbyintl, nextafterl, nexttowardl,
     pow10l, powl, remainderl, remquol, rintl, roundl, scalbl, scalblnl,
     scalbnl, significandl, sincosl, sinhl, sinl, sqrtl, tanhl, tanl,
     tgammal, truncl, y0l, y1l, ynl */
  /* __clog10l, __finitel, __isinfl, __isnanl, __signbitl */
  CHECK3 (acosh, 7.0, 2.6339);
  CHECK3 (acos, 0.75, 0.722734);
  CHECK3 (asinh, 0.75, 0.69314718);
  CHECK3 (asin, 0.75, 0.848062078);
  CHECK4 (atan2, 0.75, 1.0, 0.6435011);
  CHECK3 (atanh, 0.75, 0.97295507);
  CHECK3 (atan, 0.75, 0.6435011);
  CHECK3 (cbrt, 0.75, 0.908560296);
  CHECK3 (ceil, 0.25, 1.0);
  CHECK4 (copysign, 3.25, -5.125, -3.25);
  CHECK3 (cosh, 0.75, 1.29468328);
  CHECK3 (cos, 0.75, 0.731688868);
  CHECK4 (drem, 6.2, 2.31, -0.73);
  CHECK3 (erfc, 2.0, 0.00467773498);
  CHECK3 (erf, 2.0, 0.995322265);
  CHECK3 (exp10, 0.75, 5.6234132519);
#ifndef __NO_LONG_DOUBLE_MATH
  /* exp2l hasn't been exported from libm before glibc 2.4.  */
  CHECK3 (exp2, 0.75, 1.68179283);
#endif
  CHECK3 (exp, 0.75, 2.1170000166);
  CHECK3 (expm1, 0.75, 1.1170000166);
  CHECK3 (fabs, -17.25, 17.25);
  CHECK4 (fdim, 7.9, 2.3, 5.6);
  CHECK (finitel (2.5L) != 0);
  CHECK (finitel (HUGE_VALL) == 0);
  CHECK (finitel ((long double) NAN) == 0);
  CHECK (finite (2.5) != 0);
  CHECK (finite (HUGE_VAL) == 0);
  CHECK (finite ((double) NAN) == 0);
  CHECK3 (floor, 3.25, 3.0);
  CHECK5 (fma, 2.4, 4.8, 7.1, 18.62);
  CHECK4 (fmax, 17.8, 19.1, 19.1);
  CHECK4 (fmin, 17.8, 19.1, 17.8);
  CHECK4 (fmod, 6.2, 2.31, 1.58);
  /* frexpl */
  CHECK3 (gamma, 3, 0.6931471805599);
  CHECK4 (hypot, 0.7, -12.4, 12.4197423);
  CHECK (ilogbl (-2000.0L) == 10);
  CHECK (ilogb (-2000.0) == 10);
  CHECK (isinfl (HUGE_VALL) == 1);
  CHECK (isinfl (-HUGE_VALL) == -1);
  CHECK (isinfl (3.2L) == 0);
  CHECK (isinfl ((long double) NAN) == 0);
  CHECK (isinf (HUGE_VAL) == 1);
  CHECK (isinf (-HUGE_VAL) == -1);
  CHECK (isinf (3.2) == 0);
  CHECK (isinf ((double) NAN) == 0);
  CHECK (isnanl (HUGE_VALL) == 0);
  CHECK (isnanl (3.2L) == 0);
  CHECK (isnanl ((long double) NAN) != 0);
  CHECK (isnan (HUGE_VAL) == 0);
  CHECK (isnan (3.2) == 0);
  CHECK (isnan ((double) NAN) != 0);
  CHECK3 (j0, 0.75, 0.864242275);
  CHECK3 (j1, 0.75, 0.349243602);
  CHECK4 (jn, 3.0, 2.0, 0.12894324947);
  CHECK4 (ldexp, 0.8, 4, 12.8);
}

void
test2 (va_list *pap, ...)
{
  va_list ap, apl[50];
  int i;

  va_start (ap, pap);
  for (i = 0; i < 50; i++)
    va_copy (apl[i], ap);
  test (apl, pap);
  for (i = 0; i < 50; i++)
    va_end (apl[i]);
  va_end (ap);
}

void
test3 (int dummy, ...)
{
  va_list ap, apl[50];
  int i;

  va_start (ap, dummy);
  for (i = 0; i < 50; i++)
    va_copy (apl[i], ap);
  test2 (apl, 3.25L, 7834.5L, 3.75, 7835.5);
  for (i = 0; i < 50; i++)
    va_end (apl[i]);
  va_end (ap);
}

int
main (void)
{
  test3 (0, &l1, &l2, &d1, &d2);
  return failures != 0;
}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-13 21:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-13 21:56 [PATCH] Updated double -> long double glibc transition patch Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).