summaryrefslogtreecommitdiff
path: root/REORG.TODO/sysdeps/ieee754/ldbl-opt
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
committerZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
commit5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch)
tree4470480d904b65cf14ca524f96f79eca818c3eaf /REORG.TODO/sysdeps/ieee754/ldbl-opt
parent199fc19d3aaaf57944ef036e15904febe877fc93 (diff)
downloadglibc-zack/build-layout-experiment.tar.gz
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'REORG.TODO/sysdeps/ieee754/ldbl-opt')
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/Makefile167
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/Versions100
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/bits/long-double.h24
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/configure39
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/configure.ac19
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h38
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h38
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c3
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h46
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acos.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acosh.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asin.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asinh.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c17
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan2.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atanh.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cabs.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacos.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-canonicalize.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-carg.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casin.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casinh.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catan.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catanh.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccos.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ceil.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cexp.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cimag.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog10.c11
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.c1085
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.h104
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-conj.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cos.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cosh.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cpow.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cproj.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-creal.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csin.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csinh.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctan.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erfc.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp10.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp2.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-expm1.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fabs.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fdim.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-finite.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-floor.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fma.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmax.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmaxmag.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmin.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fminmag.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmod.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c17
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-frexp.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfp.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfpx.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c16
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-gamma.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-getpayload.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-hypot.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isinf.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isnan.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j0.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j1.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-jn.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llogb.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llrint.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llround.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log10.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log1p.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log2.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-logb.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lrint.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lround.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-modf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nan.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextdown.c27
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c14
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c12
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextup.c27
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c13
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c13
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf.c17
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c11
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c11
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remainder.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remquo.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-rint.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-round.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-roundeven.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalb.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayload.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayloadsig.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-signbit.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-significand.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sin.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sincos.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sinh.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c16
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c16
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c17
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c17
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c14
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c16
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c20
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c16
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog.c11
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c12
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tan.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tanh.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalordermag.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-trunc.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfp.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfpx.c26
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c14
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c10
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y0.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y1.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-yn.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_asinh.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_atan.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_cbrt.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ceil.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_clog10l.c31
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_copysign.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_erf.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_expm1.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fabs.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_finite.c18
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_floor.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fma.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fmal.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_frexp.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isinf.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isnan.c8
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexp.c30
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexpl.c31
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llrint.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llround.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_log1p.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_logb.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lrint.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lround.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_modf.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nearbyint.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nextafter.c12
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c81
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_remquo.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_rint.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_round.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbln.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbn.c9
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significand.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significandl.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sin.c15
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sincos.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tan.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tanh.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/s_trunc.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acos_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asin_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jn_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c6
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c7
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c11
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_logl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_pow_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_powl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c7
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c7
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c5
-rw-r--r--REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c5
297 files changed, 4569 insertions, 0 deletions
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/Makefile b/REORG.TODO/sysdeps/ieee754/ldbl-opt/Makefile
new file mode 100644
index 0000000000..81429d0ddd
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/Makefile
@@ -0,0 +1,167 @@
+# The`long double' type 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
+ifeq (,$(filter -mlong-double-128,$(sysdep-CFLAGS)))
+sysdep-CFLAGS += -mlong-double-128
+endif
+
+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 asprintf_chk vasprintf_chk dprintf_chk \
+ vdprintf_chk obstack_printf_chk obstack_vprintf_chk \
+ syslog syslog_chk vsyslog vsyslog_chk \
+ strfmon strfmon_l \
+ strfroml \
+ 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 \
+ 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 \
+ isoc99_scanf isoc99_fscanf isoc99_sscanf \
+ isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
+ isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
+ isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf \
+ nextup nextdown totalorder totalordermag getpayload \
+ canonicalize setpayload setpayloadsig llogb fmaxmag fminmag \
+ roundeven fromfp ufromfp fromfpx ufromfpx
+libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
+libnldbl-inhibit-o = $(object-suffixes)
+libnldbl-static-only-routines = $(libnldbl-routines)
+extra-objs += $(addsuffix .oS, $(libnldbl-routines))
+
+CFLAGS-nldbl-acos.c = -fno-builtin-acosl
+CFLAGS-nldbl-acosh.c = -fno-builtin-acoshl
+CFLAGS-nldbl-asin.c = -fno-builtin-asinl
+CFLAGS-nldbl-asinh.c = -fno-builtin-asinhl
+CFLAGS-nldbl-atan.c = -fno-builtin-atanl
+CFLAGS-nldbl-atan2.c = -fno-builtin-atan2l
+CFLAGS-nldbl-atanh.c = -fno-builtin-atanhl
+CFLAGS-nldbl-cabs.c = -fno-builtin-cabsl
+CFLAGS-nldbl-cacos.c = -fno-builtin-cacosl
+CFLAGS-nldbl-cacosh.c = -fno-builtin-cacoshl
+CFLAGS-nldbl-canonicalize.c = -fno-builtin-canonicalizel
+CFLAGS-nldbl-carg.c = -fno-builtin-cargl
+CFLAGS-nldbl-casin.c = -fno-builtin-casinl
+CFLAGS-nldbl-casinh.c = -fno-builtin-casinhl
+CFLAGS-nldbl-catan.c = -fno-builtin-catanl
+CFLAGS-nldbl-catanh.c = -fno-builtin-catanhl
+CFLAGS-nldbl-cbrt.c = -fno-builtin-cbrtl
+CFLAGS-nldbl-ccos.c = -fno-builtin-ccosl
+CFLAGS-nldbl-ccosh.c = -fno-builtin-ccoshl
+CFLAGS-nldbl-ceil.c = -fno-builtin-ceill
+CFLAGS-nldbl-cexp.c = -fno-builtin-cexpl
+CFLAGS-nldbl-cimag.c = -fno-builtin-cimagl
+CFLAGS-nldbl-clog.c = -fno-builtin-clogl
+CFLAGS-nldbl-clog10.c = -fno-builtin-clog10l
+CFLAGS-nldbl-conj.c = -fno-builtin-conjl
+CFLAGS-nldbl-copysign.c = -fno-builtin-copysignl
+CFLAGS-nldbl-cos.c = -fno-builtin-cosl
+CFLAGS-nldbl-cosh.c = -fno-builtin-coshl
+CFLAGS-nldbl-cpow.c = -fno-builtin-cpowl
+CFLAGS-nldbl-cproj.c = -fno-builtin-cprojl
+CFLAGS-nldbl-creal.c = -fno-builtin-creall
+CFLAGS-nldbl-csin.c = -fno-builtin-csinl
+CFLAGS-nldbl-csinh.c = -fno-builtin-csinhl
+CFLAGS-nldbl-csqrt.c = -fno-builtin-csqrtl
+CFLAGS-nldbl-ctan.c = -fno-builtin-ctanl
+CFLAGS-nldbl-ctanh.c = -fno-builtin-ctanhl
+CFLAGS-nldbl-erf.c = -fno-builtin-erfl
+CFLAGS-nldbl-erfc.c = -fno-builtin-erfcl
+CFLAGS-nldbl-exp.c = -fno-builtin-expl
+CFLAGS-nldbl-exp10.c = -fno-builtin-exp10l
+CFLAGS-nldbl-exp2.c = -fno-builtin-exp2l
+CFLAGS-nldbl-expm1.c = -fno-builtin-expm1l
+CFLAGS-nldbl-fabs.c = -fno-builtin-fabsl
+CFLAGS-nldbl-fdim.c = -fno-builtin-fdiml
+CFLAGS-nldbl-finite.c = -fno-builtin-finitel
+CFLAGS-nldbl-floor.c = -fno-builtin-floorl
+CFLAGS-nldbl-fma.c = -fno-builtin-fmal
+CFLAGS-nldbl-fmax.c = -fno-builtin-fmaxl
+CFLAGS-nldbl-fmaxmag.c = -fno-builtin-fmaxmagl
+CFLAGS-nldbl-fmin.c = -fno-builtin-fminl
+CFLAGS-nldbl-fminmag.c = -fno-builtin-fminmagl
+CFLAGS-nldbl-fmod.c = -fno-builtin-fmodl
+CFLAGS-nldbl-frexp.c = -fno-builtin-frexpl
+CFLAGS-nldbl-fromfp.c = -fno-builtin-fromfpl
+CFLAGS-nldbl-fromfpx.c = -fno-builtin-fromfpxl
+CFLAGS-nldbl-gamma.c = -fno-builtin-gammal
+CFLAGS-nldbl-getpayload.c = -fno-builtin-getpayloadl
+CFLAGS-nldbl-hypot.c = -fno-builtin-hypotl
+CFLAGS-nldbl-ilogb.c = -fno-builtin-ilogbl
+CFLAGS-nldbl-isinf.c = -fno-builtin-isinfl
+CFLAGS-nldbl-isnan.c = -fno-builtin-isnanl
+CFLAGS-nldbl-j0.c = -fno-builtin-j0l
+CFLAGS-nldbl-j1.c = -fno-builtin-j1l
+CFLAGS-nldbl-jn.c = -fno-builtin-jnl
+CFLAGS-nldbl-ldexp.c = -fno-builtin-ldexpl
+CFLAGS-nldbl-lgamma.c = -fno-builtin-lgammal
+CFLAGS-nldbl-lgamma_r.c = -fno-builtin-lgammal_r
+CFLAGS-nldbl-llogb.c = -fno-builtin-llogbl
+CFLAGS-nldbl-llrint.c = -fno-builtin-llrintl
+CFLAGS-nldbl-llround.c = -fno-builtin-llroundl
+CFLAGS-nldbl-log.c = -fno-builtin-logl
+CFLAGS-nldbl-log10.c = -fno-builtin-log10l
+CFLAGS-nldbl-log1p.c = -fno-builtin-log1pl
+CFLAGS-nldbl-log2.c = -fno-builtin-log2l
+CFLAGS-nldbl-logb.c = -fno-builtin-logbl
+CFLAGS-nldbl-lrint.c = -fno-builtin-lrintl
+CFLAGS-nldbl-lround.c = -fno-builtin-lroundl
+CFLAGS-nldbl-modf.c = -fno-builtin-modfl
+CFLAGS-nldbl-nan.c = -fno-builtin-nanl
+CFLAGS-nldbl-nearbyint.c = -fno-builtin-nearbyintl
+CFLAGS-nldbl-nextafter.c = -fno-builtin-nextafterl
+CFLAGS-nldbl-nextdown.c = -fno-builtin-nextdownl
+CFLAGS-nldbl-nexttoward.c = -fno-builtin-nexttoward -fno-builtin-nexttowardl
+CFLAGS-nldbl-nexttowardf.c = -fno-builtin-nexttowardf
+CFLAGS-nldbl-nextup.c = -fno-builtin-nextupl
+CFLAGS-nldbl-pow.c = -fno-builtin-powl
+CFLAGS-nldbl-pow10.c = -fno-builtin-pow10l
+CFLAGS-nldbl-remainder.c = -fno-builtin-remainderl -fno-builtin-dreml
+CFLAGS-nldbl-remquo.c = -fno-builtin-remquol
+CFLAGS-nldbl-rint.c = -fno-builtin-rintl
+CFLAGS-nldbl-round.c = -fno-builtin-roundl
+CFLAGS-nldbl-roundeven.c = -fno-builtin-roundevenl
+CFLAGS-nldbl-scalb.c = -fno-builtin-scalbl
+CFLAGS-nldbl-scalbln.c = -fno-builtin-scalblnl
+CFLAGS-nldbl-scalbn.c = -fno-builtin-scalbnl
+CFLAGS-nldbl-setpayload.c = -fno-builtin-setpayloadl
+CFLAGS-nldbl-setpayloadsig.c = -fno-builtin-setpayloadsigl
+CFLAGS-nldbl-significand.c = -fno-builtin-significandl
+CFLAGS-nldbl-sin.c = -fno-builtin-sinl
+CFLAGS-nldbl-sincos.c = -fno-builtin-sincosl
+CFLAGS-nldbl-sinh.c = -fno-builtin-sinhl
+CFLAGS-nldbl-sqrt.c = -fno-builtin-sqrtl
+CFLAGS-nldbl-tan.c = -fno-builtin-tanl
+CFLAGS-nldbl-tanh.c = -fno-builtin-tanhl
+CFLAGS-nldbl-tgamma.c = -fno-builtin-tgammal
+CFLAGS-nldbl-totalorder.c = -fno-builtin-totalorderl
+CFLAGS-nldbl-totalordermag.c = -fno-builtin-totalordermagl
+CFLAGS-nldbl-trunc.c = -fno-builtin-truncl
+CFLAGS-nldbl-ufromfp.c = -fno-builtin-ufromfpl
+CFLAGS-nldbl-ufromfpx.c = -fno-builtin-ufromfpxl
+CFLAGS-nldbl-y0.c = -fno-builtin-y0l
+CFLAGS-nldbl-y1.c = -fno-builtin-y1l
+CFLAGS-nldbl-yn.c = -fno-builtin-ynl
+
+endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/Versions b/REORG.TODO/sysdeps/ieee754/ldbl-opt/Versions
new file mode 100644
index 0000000000..d3f0beaef2
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/Versions
@@ -0,0 +1,100 @@
+%include <nldbl-abi.h>
+%ifndef NLDBL_VERSION
+% error "nldbl-abi.h must define NLDBL_VERSION"
+%endif
+
+libc {
+ NLDBL_VERSION {
+ # 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-64
+ __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;
+ }
+ GLIBC_2.7 {
+ __nldbl___isoc99_scanf; __nldbl___isoc99_fscanf;
+ __nldbl___isoc99_sscanf; __nldbl___isoc99_vscanf;
+ __nldbl___isoc99_vfscanf; __nldbl___isoc99_vsscanf;
+ __nldbl___isoc99_wscanf; __nldbl___isoc99_fwscanf;
+ __nldbl___isoc99_swscanf; __nldbl___isoc99_vwscanf;
+ __nldbl___isoc99_vfwscanf; __nldbl___isoc99_vswscanf;
+ }
+ GLIBC_2.8 {
+ __nldbl___asprintf_chk; __nldbl___vasprintf_chk;
+ __nldbl___dprintf_chk; __nldbl___vdprintf_chk;
+ __nldbl___obstack_printf_chk; __nldbl___obstack_vprintf_chk;
+ }
+}
+libm {
+ NLDBL_VERSION {
+ # 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;
+ }
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/bits/long-double.h b/REORG.TODO/sysdeps/ieee754/ldbl-opt/bits/long-double.h
new file mode 100644
index 0000000000..67db5b9d0c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/bits/long-double.h
@@ -0,0 +1,24 @@
+/* Properties of long double type. ldbl-opt version.
+ Copyright (C) 2016-2017 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 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+# define __LONG_DOUBLE_MATH_OPTIONAL 1
+# ifndef __LONG_DOUBLE_128__
+# define __NO_LONG_DOUBLE_MATH 1
+# endif
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/configure b/REORG.TODO/sysdeps/ieee754/ldbl-opt/configure
new file mode 100644
index 0000000000..ad9d77b88c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/configure
@@ -0,0 +1,39 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/ieee754/ldbl-opt/.
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC $CFLAGS supports -mlong-double-128" >&5
+$as_echo_n "checking whether $CC $CFLAGS supports -mlong-double-128... " >&6; }
+if ${libc_cv_mlong_double_128+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -mlong-double-128"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __LONG_DOUBLE_128__
+# error "compiler did not predefine __LONG_DOUBLE_128__ as expected"
+#endif
+long double foobar (long double x) { return x; }
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_cv_mlong_double_128=yes
+else
+ libc_cv_mlong_double_128=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mlong_double_128" >&5
+$as_echo "$libc_cv_mlong_double_128" >&6; }
+if test "$libc_cv_mlong_double_128" = no; then
+ as_fn_error $? "this configuration requires -mlong-double-128 support" "$LINENO" 5
+fi
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/configure.ac b/REORG.TODO/sysdeps/ieee754/ldbl-opt/configure.ac
new file mode 100644
index 0000000000..a77fadd1c4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/configure.ac
@@ -0,0 +1,19 @@
+sinclude(./aclocal.m4)dnl Autoconf lossage
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/ieee754/ldbl-opt/.
+
+AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128,
+ libc_cv_mlong_double_128, [dnl
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -mlong-double-128"
+AC_TRY_COMPILE(, [
+#ifndef __LONG_DOUBLE_128__
+# error "compiler did not predefine __LONG_DOUBLE_128__ as expected"
+#endif
+long double foobar (long double x) { return x; }],
+ libc_cv_mlong_double_128=yes,
+ libc_cv_mlong_double_128=no)
+CFLAGS="$save_CFLAGS"])
+if test "$libc_cv_mlong_double_128" = no; then
+ AC_MSG_ERROR([this configuration requires -mlong-double-128 support])
+fi
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h
new file mode 100644
index 0000000000..67b5268dc4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-double.h
@@ -0,0 +1,38 @@
+/* Overrides for ldbl-opt versioning for double types.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_TYPE_MACROS_DOUBLE
+
+#include <math_ldbl_opt.h>
+#include <first-versions.h>
+
+/* Define compat symbols for long double on platforms
+ where it was not always a distinct type. */
+#if !defined M_LIBM_NEED_COMPAT
+# define M_LIBM_NEED_COMPAT(f) \
+ LONG_DOUBLE_COMPAT (libm, FIRST_VERSION_libm_ ## f ## l)
+#endif
+
+#if !defined declare_mgen_libm_compat
+# define declare_mgen_libm_compat(from, to) \
+ compat_symbol (libm, from, to ## l, \
+ FIRST_VERSION_libm_ ## to ## l);
+#endif
+
+#include_next <math-type-macros-double.h>
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h
new file mode 100644
index 0000000000..20873ae6b5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math-type-macros-ldouble.h
@@ -0,0 +1,38 @@
+/* Overrides for ldbl-opt versioning for long double types.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_TYPE_MACROS_LDOUBLE
+
+#include <math_ldbl_opt.h>
+#include <ldbl-compat-choose.h>
+
+#define maybe_long_double_symbol(lib, from, to) \
+ LONG_DOUBLE_COMPAT_CHOOSE_ ## lib ## _ ## to (long_double_symbol (lib, \
+ from, \
+ to), \
+ weak_alias (from, to))
+
+/* Use properly versioned symbols for long double on platforms where
+ it was not always a distinct type. */
+#if !defined declare_mgen_alias
+# define declare_mgen_alias(from, to) \
+ maybe_long_double_symbol (libm, from ## l, to ## l);
+#endif
+
+#include_next <math-type-macros-ldouble.h>
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c
new file mode 100644
index 0000000000..49c5c1249b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.c
@@ -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;
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
new file mode 100644
index 0000000000..af861c11ea
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
@@ -0,0 +1,46 @@
+/* -mlong-double-64 compatibility mode macros. */
+
+#include <nldbl-abi.h>
+#ifndef LONG_DOUBLE_COMPAT_VERSION
+# error "nldbl-abi.h must define LONG_DOUBLE_COMPAT_VERSION"
+#endif
+
+#include <shlib-compat.h>
+#define LONG_DOUBLE_COMPAT(lib, introduced) \
+ SHLIB_COMPAT(lib, introduced, LONG_DOUBLE_COMPAT_VERSION)
+#define long_double_symbol(lib, local, symbol) \
+ long_double_symbol_1 (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
+#ifdef SHARED
+# 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)
+#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) weak_alias (name, aliasname)
+# ifndef __ASSEMBLER__
+/* Note that weak_alias cannot be used - it is defined to nothing
+ in most of the C files. */
+# define long_double_symbol_1(lib, local, symbol, version) \
+ _weak_alias (local, symbol)
+# else
+# define long_double_symbol_1(lib, local, symbol, version) \
+ weak_alias (local, symbol)
+# endif
+#endif
+
+#ifndef __ASSEMBLER__
+# include <math.h>
+# include <math_private.h>
+
+/* 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)
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acos.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acos.c
new file mode 100644
index 0000000000..813a17e9d6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acos.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+acosl (double x)
+{
+ return acos (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acosh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acosh.c
new file mode 100644
index 0000000000..75508e30d7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-acosh.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+acoshl (double x)
+{
+ return acosh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asin.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asin.c
new file mode 100644
index 0000000000..5bbe6cd992
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asin.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+asinl (double x)
+{
+ return asin (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asinh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asinh.c
new file mode 100644
index 0000000000..512f68519b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asinh.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+asinhl (double x)
+{
+ return asinh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c
new file mode 100644
index 0000000000..4be216d610
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf.c
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+attribute_hidden
+int
+__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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c
new file mode 100644
index 0000000000..b520181db7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+attribute_hidden
+int
+__asprintf_chk (char **string_ptr, int flag, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___vasprintf_chk (string_ptr, flag, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan.c
new file mode 100644
index 0000000000..2849e48d03
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+atanl (double x)
+{
+ return atan (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan2.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan2.c
new file mode 100644
index 0000000000..d4e5a91702
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atan2.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+atan2l (double x, double y)
+{
+ return atan2 (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atanh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atanh.c
new file mode 100644
index 0000000000..82b54ca6d4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-atanh.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+atanhl (double x)
+{
+ return atanh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cabs.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cabs.c
new file mode 100644
index 0000000000..837822d2d6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cabs.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+cabsl (double _Complex x)
+{
+ return cabs (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacos.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacos.c
new file mode 100644
index 0000000000..d935b511b4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacos.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cacosl (double _Complex x)
+{
+ return cacos (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c
new file mode 100644
index 0000000000..67f994b849
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cacosh.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cacoshl (double _Complex x)
+{
+ return cacosh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-canonicalize.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-canonicalize.c
new file mode 100644
index 0000000000..9d46163208
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-canonicalize.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for canonicalize.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+canonicalizel (double *cx, double *x)
+{
+ return canonicalize (cx, x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-carg.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-carg.c
new file mode 100644
index 0000000000..bfff141c11
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-carg.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+cargl (double _Complex x)
+{
+ return carg (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casin.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casin.c
new file mode 100644
index 0000000000..310aa0ac21
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casin.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+casinl (double _Complex x)
+{
+ return casin (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casinh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casinh.c
new file mode 100644
index 0000000000..71b466ea22
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-casinh.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+casinhl (double _Complex x)
+{
+ return casinh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catan.c
new file mode 100644
index 0000000000..ea5f528ee5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catan.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+catanl (double _Complex x)
+{
+ return catan (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catanh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catanh.c
new file mode 100644
index 0000000000..e6f58aa048
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-catanh.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+catanhl (double _Complex x)
+{
+ return catanh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c
new file mode 100644
index 0000000000..1c353a6e6b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cbrt.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+cbrtl (double x)
+{
+ return cbrt (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccos.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccos.c
new file mode 100644
index 0000000000..0e1c2e70f3
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccos.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ccosl (double _Complex x)
+{
+ return ccos (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c
new file mode 100644
index 0000000000..da2bf580af
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ccosh.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ccoshl (double _Complex x)
+{
+ return ccosh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ceil.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ceil.c
new file mode 100644
index 0000000000..a8fc3d548a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ceil.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+ceill (double x)
+{
+ return ceil (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cexp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cexp.c
new file mode 100644
index 0000000000..f1837afc28
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cexp.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cexpl (double _Complex x)
+{
+ return cexp (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cimag.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cimag.c
new file mode 100644
index 0000000000..fffbdd58ec
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cimag.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+cimagl (double _Complex x)
+{
+ return cimag (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog.c
new file mode 100644
index 0000000000..ecbae7ba91
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+clogl (double _Complex x)
+{
+ return clog (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog10.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog10.c
new file mode 100644
index 0000000000..193f40104a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-clog10.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
new file mode 100644
index 0000000000..84c4aeeed9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
@@ -0,0 +1,1085 @@
+/* *printf* family compatibility routines for IEEE double as long double
+ Copyright (C) 2006-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#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 <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___vasprintf_chk)
+libc_hidden_proto (__nldbl___vdprintf_chk)
+libc_hidden_proto (__nldbl___obstack_vprintf_chk)
+libc_hidden_proto (__nldbl___vstrfmon)
+libc_hidden_proto (__nldbl___vstrfmon_l)
+libc_hidden_proto (__nldbl___isoc99_vsscanf)
+libc_hidden_proto (__nldbl___isoc99_vfscanf)
+libc_hidden_proto (__nldbl___isoc99_vswscanf)
+libc_hidden_proto (__nldbl___isoc99_vfwscanf)
+
+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 = _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 = _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 = _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 = _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;
+}
+
+int
+attribute_compat_text_section
+__nldbl___vasprintf_chk (char **ptr, int flag, const char *fmt, va_list arg)
+{
+ int res;
+ __no_long_double = 1;
+ res = __vasprintf_chk (ptr, flag, fmt, arg);
+ __no_long_double = 0;
+ return res;
+}
+libc_hidden_def (__nldbl___vasprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___asprintf_chk (char **ptr, int flag, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___vasprintf_chk (ptr, flag, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___vdprintf_chk (int d, int flag, const char *fmt, va_list arg)
+{
+ int res;
+ set_no_long_double ();
+ res = __vdprintf_chk (d, flag, fmt, arg);
+ clear_no_long_double ();
+ return res;
+}
+libc_hidden_def (__nldbl___vdprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___dprintf_chk (int d, int flag, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___vdprintf_chk (d, flag, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___obstack_vprintf_chk (struct obstack *obstack, int flag,
+ const char *fmt, va_list arg)
+{
+ int res;
+ __no_long_double = 1;
+ res = __obstack_vprintf_chk (obstack, flag, fmt, arg);
+ __no_long_double = 0;
+ return res;
+}
+libc_hidden_def (__nldbl___obstack_vprintf_chk)
+
+int
+attribute_compat_text_section
+__nldbl___obstack_printf_chk (struct obstack *obstack, int flag,
+ const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___obstack_vprintf_chk (obstack, 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);
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_vfscanf (FILE *s, const char *fmt, va_list ap)
+{
+ int res;
+ set_no_long_double ();
+ res = __isoc99_vfscanf (s, fmt, ap);
+ clear_no_long_double ();
+ return res;
+}
+libc_hidden_def (__nldbl___isoc99_vfscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_sscanf (const char *s, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vsscanf (s, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_vsscanf (const char *string, const char *fmt, va_list ap)
+{
+ int res;
+ __no_long_double = 1;
+ res = __isoc99_vsscanf (string, fmt, ap);
+ __no_long_double = 0;
+ return res;
+}
+libc_hidden_def (__nldbl___isoc99_vsscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_vscanf (const char *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vfscanf (stdin, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_fscanf (FILE *stream, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfscanf (stream, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_scanf (const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfscanf (stdin, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+ int res;
+ set_no_long_double ();
+ res = __isoc99_vfwscanf (s, fmt, ap);
+ clear_no_long_double ();
+ return res;
+}
+libc_hidden_def (__nldbl___isoc99_vfwscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vswscanf (s, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_vswscanf (const wchar_t *string, const wchar_t *fmt,
+ va_list ap)
+{
+ int res;
+ __no_long_double = 1;
+ res = __isoc99_vswscanf (string, fmt, ap);
+ __no_long_double = 0;
+ return res;
+}
+libc_hidden_def (__nldbl___isoc99_vswscanf)
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_vwscanf (const wchar_t *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vfwscanf (stdin, fmt, ap);
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_fwscanf (FILE *stream, const wchar_t *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfwscanf (stream, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+int
+attribute_compat_text_section
+__nldbl___isoc99_wscanf (const wchar_t *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfwscanf (stdin, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
+
+#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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
new file mode 100644
index 0000000000..72ec0db390
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
@@ -0,0 +1,104 @@
+/* Prototypes for compatibility double == long double entry points.
+ Copyright (C) 2006-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#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 <stdint.h>
+#include <stdio.h>
+#include <printf.h>
+#include <wchar.h>
+#include <math.h>
+#include <monetary.h>
+#include <sys/syslog.h>
+
+
+/* Declare the __nldbl_NAME function the wrappers call that's in libc.so. */
+#define NLDBL_DECL(name) extern __typeof (name) __nldbl_##name
+
+NLDBL_DECL (_IO_vfscanf);
+NLDBL_DECL (vfscanf);
+NLDBL_DECL (vfwscanf);
+NLDBL_DECL (obstack_vprintf);
+NLDBL_DECL (vasprintf);
+NLDBL_DECL (dprintf);
+NLDBL_DECL (vdprintf);
+NLDBL_DECL (fprintf);
+NLDBL_DECL (vfprintf);
+NLDBL_DECL (vfwprintf);
+NLDBL_DECL (vsnprintf);
+NLDBL_DECL (vsprintf);
+NLDBL_DECL (vsscanf);
+NLDBL_DECL (vswprintf);
+NLDBL_DECL (vswscanf);
+NLDBL_DECL (__asprintf);
+NLDBL_DECL (asprintf);
+NLDBL_DECL (__printf_fp);
+NLDBL_DECL (printf_size);
+NLDBL_DECL (syslog);
+NLDBL_DECL (vsyslog);
+NLDBL_DECL (qecvt);
+NLDBL_DECL (qfcvt);
+NLDBL_DECL (qgcvt);
+NLDBL_DECL (__vstrfmon_l);
+NLDBL_DECL (__isoc99_scanf);
+NLDBL_DECL (__isoc99_fscanf);
+NLDBL_DECL (__isoc99_sscanf);
+NLDBL_DECL (__isoc99_vscanf);
+NLDBL_DECL (__isoc99_vfscanf);
+NLDBL_DECL (__isoc99_vsscanf);
+NLDBL_DECL (__isoc99_wscanf);
+NLDBL_DECL (__isoc99_fwscanf);
+NLDBL_DECL (__isoc99_swscanf);
+NLDBL_DECL (__isoc99_vwscanf);
+NLDBL_DECL (__isoc99_vfwscanf);
+NLDBL_DECL (__isoc99_vswscanf);
+
+/* This one does not exist in the normal interface, only
+ __nldbl___vstrfmon really exists. */
+extern ssize_t __nldbl___vstrfmon (char *, size_t, const char *, va_list)
+ __THROW;
+
+/* These don't use __typeof because they were not declared by the headers,
+ since we don't compile with _FORTIFY_SOURCE. */
+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 int __nldbl___vasprintf_chk (char **, int, const char *, _G_va_list)
+ __THROW;
+extern int __nldbl___vdprintf_chk (int, int, const char *, _G_va_list);
+extern int __nldbl___obstack_vprintf_chk (struct obstack *, int, const char *,
+ _G_va_list) __THROW;
+extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
+
+
+#endif /* __NLDBL_COMPAT_H */
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-conj.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-conj.c
new file mode 100644
index 0000000000..8927ea9968
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-conj.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+conjl (double _Complex x)
+{
+ return conj (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c
new file mode 100644
index 0000000000..045f00dda8
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-copysign.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+copysignl (double x, double y)
+{
+ return __copysign (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cos.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cos.c
new file mode 100644
index 0000000000..08738af048
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cos.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+cosl (double x)
+{
+ return cos (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cosh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cosh.c
new file mode 100644
index 0000000000..0ab834ffd9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cosh.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+coshl (double x)
+{
+ return cosh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cpow.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cpow.c
new file mode 100644
index 0000000000..709e7d73b1
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cpow.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cproj.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cproj.c
new file mode 100644
index 0000000000..6f88b88bf2
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-cproj.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+cprojl (double _Complex x)
+{
+ return cproj (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-creal.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-creal.c
new file mode 100644
index 0000000000..b02ce6e5e4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-creal.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double
+attribute_hidden
+creall (double _Complex x)
+{
+ return creal (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csin.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csin.c
new file mode 100644
index 0000000000..b2e2c9c8ef
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csin.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+csinl (double _Complex x)
+{
+ return csin (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csinh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csinh.c
new file mode 100644
index 0000000000..2bcba920e3
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csinh.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+csinhl (double _Complex x)
+{
+ return csinh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c
new file mode 100644
index 0000000000..ae00a29885
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-csqrt.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+csqrtl (double _Complex x)
+{
+ return csqrt (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctan.c
new file mode 100644
index 0000000000..422c5cce94
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctan.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ctanl (double _Complex x)
+{
+ return ctan (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c
new file mode 100644
index 0000000000..f3842ed26f
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ctanh.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+#include <complex.h>
+
+double _Complex
+attribute_hidden
+ctanhl (double _Complex x)
+{
+ return ctanh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c
new file mode 100644
index 0000000000..6e26db2a24
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+attribute_hidden
+int
+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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c
new file mode 100644
index 0000000000..b3e2359128
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+attribute_hidden
+int
+__dprintf_chk (int d, int flag, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___vdprintf_chk (d, flag, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erf.c
new file mode 100644
index 0000000000..0032c1febc
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+erfl (double x)
+{
+ return erf (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erfc.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erfc.c
new file mode 100644
index 0000000000..21d09680aa
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-erfc.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+erfcl (double x)
+{
+ return erfc (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp.c
new file mode 100644
index 0000000000..ad2c89b6d5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+expl (double x)
+{
+ return exp (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp10.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp10.c
new file mode 100644
index 0000000000..2d0ead686b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp10.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+exp10l (double x)
+{
+ return exp10 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp2.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp2.c
new file mode 100644
index 0000000000..d5fce3970d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-exp2.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+exp2l (double x)
+{
+ return exp2 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-expm1.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-expm1.c
new file mode 100644
index 0000000000..be5c6e51c4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-expm1.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+expm1l (double x)
+{
+ return expm1 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fabs.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fabs.c
new file mode 100644
index 0000000000..10729a6ec0
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fabs.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fabsl (double x)
+{
+ return fabs (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fdim.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fdim.c
new file mode 100644
index 0000000000..72896b63ed
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fdim.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fdiml (double x, double y)
+{
+ return fdim (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-finite.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-finite.c
new file mode 100644
index 0000000000..fc51508f16
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-finite.c
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__finitel (double x)
+{
+ return isfinite (x);
+}
+extern __typeof (__finitel) finitel attribute_hidden;
+weak_alias (__finitel, finitel)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-floor.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-floor.c
new file mode 100644
index 0000000000..c7e9f834b6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-floor.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+floorl (double x)
+{
+ return floor (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fma.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fma.c
new file mode 100644
index 0000000000..9474483673
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fma.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmal (double x, double y, double z)
+{
+ return fma (x, y, z);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmax.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmax.c
new file mode 100644
index 0000000000..f5a84776ed
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmax.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmaxl (double x, double y)
+{
+ return fmax (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmaxmag.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmaxmag.c
new file mode 100644
index 0000000000..28aab5791a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmaxmag.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for fmaxmag.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmaxmagl (double x, double y)
+{
+ return fmaxmag (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmin.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmin.c
new file mode 100644
index 0000000000..a353cf9484
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmin.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fminl (double x, double y)
+{
+ return fmin (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fminmag.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fminmag.c
new file mode 100644
index 0000000000..f1743acd4d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fminmag.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for fminmag.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fminmagl (double x, double y)
+{
+ return fminmag (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmod.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmod.c
new file mode 100644
index 0000000000..aa692b9f36
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fmod.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+fmodl (double x, double y)
+{
+ return fmod (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c
new file mode 100644
index 0000000000..9df4c4bc34
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf.c
@@ -0,0 +1,17 @@
+#include "nldbl-compat.h"
+
+attribute_hidden
+int
+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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c
new file mode 100644
index 0000000000..43a7618183
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fprintf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-frexp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-frexp.c
new file mode 100644
index 0000000000..0ec97e10e3
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-frexp.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+frexpl (double x, int *exponent)
+{
+ return frexp (x, exponent);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfp.c
new file mode 100644
index 0000000000..6ef95f4ab4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfp.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for fromfp.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+intmax_t
+attribute_hidden
+fromfpl (double x, int round, unsigned int width)
+{
+ return fromfp (x, round, width);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfpx.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfpx.c
new file mode 100644
index 0000000000..193d9b6ce1
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fromfpx.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for fromfpx.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+intmax_t
+attribute_hidden
+fromfpxl (double x, int round, unsigned int width)
+{
+ return fromfpx (x, round, width);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c
new file mode 100644
index 0000000000..1b768e306f
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fscanf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c
new file mode 100644
index 0000000000..18362af013
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c
new file mode 100644
index 0000000000..09731cf29d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwprintf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c
new file mode 100644
index 0000000000..27fc1a7271
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-fwscanf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-gamma.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-gamma.c
new file mode 100644
index 0000000000..10dc640b92
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-gamma.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+gammal (double x)
+{
+ return gamma (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-getpayload.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-getpayload.c
new file mode 100644
index 0000000000..f15f9231ec
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-getpayload.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for getpayload.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+getpayloadl (const double *x)
+{
+ return getpayload (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-hypot.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-hypot.c
new file mode 100644
index 0000000000..2105f3eba8
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-hypot.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+hypotl (double x, double y)
+{
+ return hypot (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c
new file mode 100644
index 0000000000..e840b2a447
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ilogb.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+ilogbl (double x)
+{
+ return ilogb (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
new file mode 100644
index 0000000000..05581c0354
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-iovfscanf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isinf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isinf.c
new file mode 100644
index 0000000000..577ab2db28
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isinf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isnan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isnan.c
new file mode 100644
index 0000000000..2d87bf85fb
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isnan.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c
new file mode 100644
index 0000000000..1d736668a4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_fscanf (FILE *stream, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfscanf (stream, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c
new file mode 100644
index 0000000000..dbea1512cf
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_fwscanf (FILE *stream, const wchar_t *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfwscanf (stream, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c
new file mode 100644
index 0000000000..ec2ec53291
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_scanf (const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfscanf (stdin, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c
new file mode 100644
index 0000000000..52e1bd5d2a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_sscanf (const char *s, const char *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vsscanf (s, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c
new file mode 100644
index 0000000000..927d024923
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vswscanf (s, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c
new file mode 100644
index 0000000000..55556c375c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_vfscanf (FILE *s, const char *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vfscanf (s, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c
new file mode 100644
index 0000000000..4fd54cb176
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vfwscanf (s, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c
new file mode 100644
index 0000000000..6284c9339b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_vscanf (const char *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vfscanf (stdin, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c
new file mode 100644
index 0000000000..0c19032b15
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_vsscanf (const char *string, const char *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vsscanf (string, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c
new file mode 100644
index 0000000000..5f34221b62
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vswscanf (string, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c
new file mode 100644
index 0000000000..a8a76ff54b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_vwscanf (const wchar_t *fmt, va_list ap)
+{
+ return __nldbl___isoc99_vfwscanf (stdin, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c
new file mode 100644
index 0000000000..fc2f6f8598
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c
@@ -0,0 +1,15 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__isoc99_wscanf (const wchar_t *fmt, ...)
+{
+ va_list arg;
+ int done;
+
+ va_start (arg, fmt);
+ done = __nldbl___isoc99_vfwscanf (stdin, fmt, arg);
+ va_end (arg);
+
+ return done;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j0.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j0.c
new file mode 100644
index 0000000000..9d59f0a015
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j0.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+j0l (double x)
+{
+ return j0 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j1.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j1.c
new file mode 100644
index 0000000000..dba7366861
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-j1.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+j1l (double x)
+{
+ return j1 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-jn.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-jn.c
new file mode 100644
index 0000000000..3f19bbb1a8
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-jn.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+jnl (int n, double x)
+{
+ return jn (n, x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c
new file mode 100644
index 0000000000..360f8f0f6b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ldexp.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+ldexpl (double x, int exponent)
+{
+ return ldexp (x, exponent);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c
new file mode 100644
index 0000000000..0055212628
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+lgammal (double x)
+{
+ return lgamma (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c
new file mode 100644
index 0000000000..e1ab9a1d0a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lgamma_r.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+lgammal_r (double x, int *signgamp)
+{
+ return lgamma_r (x, signgamp);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llogb.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llogb.c
new file mode 100644
index 0000000000..76042b2f48
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llogb.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for llogb.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+long int
+attribute_hidden
+llogbl (double x)
+{
+ return llogb (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llrint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llrint.c
new file mode 100644
index 0000000000..6dfce89d0d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llrint.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long long int
+attribute_hidden
+llrintl (double x)
+{
+ return llrint (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llround.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llround.c
new file mode 100644
index 0000000000..0157a079f4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-llround.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long long int
+attribute_hidden
+llroundl (double x)
+{
+ return llround (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log.c
new file mode 100644
index 0000000000..a5a1ae7cd7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+logl (double x)
+{
+ return log (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log10.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log10.c
new file mode 100644
index 0000000000..1477866dc6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log10.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+log10l (double x)
+{
+ return log10 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log1p.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log1p.c
new file mode 100644
index 0000000000..455b25a9f4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log1p.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+log1pl (double x)
+{
+ return log1p (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log2.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log2.c
new file mode 100644
index 0000000000..8c1ae344e5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-log2.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+log2l (double x)
+{
+ return log2 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-logb.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-logb.c
new file mode 100644
index 0000000000..d9ce8de075
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-logb.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+logbl (double x)
+{
+ return logb (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lrint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lrint.c
new file mode 100644
index 0000000000..0acd3d4ae6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lrint.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long int
+attribute_hidden
+lrintl (double x)
+{
+ return lrint (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lround.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lround.c
new file mode 100644
index 0000000000..aadb111f88
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-lround.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+long int
+attribute_hidden
+lroundl (double x)
+{
+ return lround (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-modf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-modf.c
new file mode 100644
index 0000000000..bcbe6bb435
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-modf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+modfl (double x, double *iptr)
+{
+ return modf (x, iptr);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nan.c
new file mode 100644
index 0000000000..8db157a0ea
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nan.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+nanl (const char *tag)
+{
+ return nan (tag);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c
new file mode 100644
index 0000000000..fd4a24684d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nearbyint.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+nearbyintl (double x)
+{
+ return nearbyint (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c
new file mode 100644
index 0000000000..b0bae43f49
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextafter.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+nextafterl (double x, double y)
+{
+ return nextafter (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextdown.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextdown.c
new file mode 100644
index 0000000000..b20c788401
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextdown.c
@@ -0,0 +1,27 @@
+/* Compatibility routine for IEEE double as long double for nextdown.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+/* Return the greatest floating-point number less than X. */
+double
+attribute_hidden
+nextdownl (double x)
+{
+ return nextdown (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c
new file mode 100644
index 0000000000..acbd01a0cf
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttoward.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c
new file mode 100644
index 0000000000..350b08d39e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nexttowardf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextup.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextup.c
new file mode 100644
index 0000000000..71dc8d4816
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-nextup.c
@@ -0,0 +1,27 @@
+/* Compatibility routine for IEEE double as long double for nextup.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+/* Return the least floating-point number greater than X. */
+double
+attribute_hidden
+nextupl (double x)
+{
+ return nextup (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c
new file mode 100644
index 0000000000..4abff2dc0d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c
new file mode 100644
index 0000000000..8e7d8eb4ad
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c
@@ -0,0 +1,13 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__obstack_printf_chk (struct obstack *obstack, int flag, const char *fmt, ...)
+{
+ int result;
+ va_list ap;
+ va_start (ap, fmt);
+ result = __nldbl___obstack_vprintf_chk (obstack, flag, fmt, ap);
+ va_end (ap);
+ return result;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c
new file mode 100644
index 0000000000..228a50726b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c
new file mode 100644
index 0000000000..a06f6bf9b4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c
@@ -0,0 +1,9 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__obstack_vprintf_chk (struct obstack *obstack, int flag, const char *fmt,
+ va_list ap)
+{
+ return __nldbl___obstack_vprintf_chk (obstack, flag, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow.c
new file mode 100644
index 0000000000..a5cc446555
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+powl (double x, double y)
+{
+ return pow (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c
new file mode 100644
index 0000000000..20ebf8d1bb
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-pow10.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+pow10l (double x)
+{
+ return pow10 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf.c
new file mode 100644
index 0000000000..e4b0fbae0c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c
new file mode 100644
index 0000000000..926db412f9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c
new file mode 100644
index 0000000000..057dfe0b8a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_fp.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c
new file mode 100644
index 0000000000..d8b1fc9995
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-printf_size.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c
new file mode 100644
index 0000000000..9f0b0a66a9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt.c
@@ -0,0 +1,10 @@
+#define qecvt qecvt_XXX
+#include "nldbl-compat.h"
+#undef qecvt
+
+attribute_hidden
+char *
+qecvt (double val, int ndigit, int *__restrict decpt, int *__restrict sign)
+{
+ return ecvt (val, ndigit, decpt, sign);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c
new file mode 100644
index 0000000000..06f99146cc
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qecvt_r.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c
new file mode 100644
index 0000000000..37fa7f0467
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt.c
@@ -0,0 +1,10 @@
+#define qfcvt qfcvt_XXX
+#include "nldbl-compat.h"
+#undef qfcvt
+
+attribute_hidden
+char *
+qfcvt (double val, int ndigit, int *__restrict decpt, int *__restrict sign)
+{
+ return fcvt (val, ndigit, decpt, sign);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c
new file mode 100644
index 0000000000..03224fefa9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qfcvt_r.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c
new file mode 100644
index 0000000000..b935d0962e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-qgcvt.c
@@ -0,0 +1,10 @@
+#define qgcvt qgcvt_XXX
+#include "nldbl-compat.h"
+#undef qgcvt
+
+attribute_hidden
+char *
+qgcvt (double val, int ndigit, char *buf)
+{
+ return gcvt (val, ndigit, buf);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remainder.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remainder.c
new file mode 100644
index 0000000000..581dc78a4d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remainder.c
@@ -0,0 +1,10 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+remainderl (double x, double y)
+{
+ return remainder (x, y);
+}
+extern __typeof (remainderl) dreml attribute_hidden;
+weak_alias (remainderl, dreml)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remquo.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remquo.c
new file mode 100644
index 0000000000..592dadae8d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-remquo.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+remquol (double x, double y, int *quo)
+{
+ return remquo (x, y, quo);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-rint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-rint.c
new file mode 100644
index 0000000000..00f942f1a7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-rint.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+rintl (double x)
+{
+ return rint (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-round.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-round.c
new file mode 100644
index 0000000000..be9bd5112e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-round.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+roundl (double x)
+{
+ return round (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-roundeven.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-roundeven.c
new file mode 100644
index 0000000000..1a46fa50d2
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-roundeven.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for roundeven.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+roundevenl (double x)
+{
+ return roundeven (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalb.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalb.c
new file mode 100644
index 0000000000..00d3e2e714
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalb.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+scalbl (double x, double n)
+{
+ return scalb (x, n);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c
new file mode 100644
index 0000000000..b5bd501250
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbln.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+scalblnl (double x, long int n)
+{
+ return scalbln (x, n);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c
new file mode 100644
index 0000000000..b1914ebf49
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scalbn.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+scalbnl (double x, int n)
+{
+ return scalbn (x, n);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scanf.c
new file mode 100644
index 0000000000..bbab371cbe
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-scanf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayload.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayload.c
new file mode 100644
index 0000000000..df902cad99
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayload.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for setpayload.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+setpayloadl (double *x, double payload)
+{
+ return setpayload (x, payload);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayloadsig.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayloadsig.c
new file mode 100644
index 0000000000..1ca497502c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-setpayloadsig.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for setpayloadsig.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+setpayloadsigl (double *x, double payload)
+{
+ return setpayloadsig (x, payload);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-signbit.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-signbit.c
new file mode 100644
index 0000000000..2e98c07396
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-signbit.c
@@ -0,0 +1,10 @@
+#define __signbitl __signbitl_XXX
+#include "nldbl-compat.h"
+#undef __signbitl
+
+int
+attribute_hidden
+__signbitl (double x)
+{
+ return signbit (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-significand.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-significand.c
new file mode 100644
index 0000000000..624381dde7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-significand.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+significandl (double x)
+{
+ return significand (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sin.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sin.c
new file mode 100644
index 0000000000..0e76e05e6b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sin.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+sinl (double x)
+{
+ return sin (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sincos.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sincos.c
new file mode 100644
index 0000000000..9f2ab2b9fc
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sincos.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+void
+attribute_hidden
+sincosl (double x, double *sinx, double *cosx)
+{
+ sincos (x, sinx, cosx);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sinh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sinh.c
new file mode 100644
index 0000000000..99ea62e8dc
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sinh.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+sinhl (double x)
+{
+ return sinh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c
new file mode 100644
index 0000000000..ef6fb96a2c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c
new file mode 100644
index 0000000000..944d3de9db
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-snprintf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c
new file mode 100644
index 0000000000..5d37a7e7f0
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c
new file mode 100644
index 0000000000..349b7c5c22
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sprintf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c
new file mode 100644
index 0000000000..4ae65665de
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sqrt.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+sqrtl (double x)
+{
+ return sqrt (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c
new file mode 100644
index 0000000000..a771d49996
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-sscanf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c
new file mode 100644
index 0000000000..38f4071278
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
new file mode 100644
index 0000000000..0db0e8c42f
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c
new file mode 100644
index 0000000000..d6df69e418
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strfroml.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+strfroml (char *dest, size_t size, const char *format, long double f)
+{
+ return strfromd (dest, size, format, f);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold.c
new file mode 100644
index 0000000000..99b907947b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
new file mode 100644
index 0000000000..33ff1ca5b5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c
new file mode 100644
index 0000000000..0bafabc6e4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-strtoldint.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c
new file mode 100644
index 0000000000..7f4f7b04d3
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c
new file mode 100644
index 0000000000..0373f6ebc2
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swprintf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c
new file mode 100644
index 0000000000..dd058f47ab
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-swscanf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog.c
new file mode 100644
index 0000000000..8687e9f540
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c
new file mode 100644
index 0000000000..31ea6a8b9d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-syslog_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tan.c
new file mode 100644
index 0000000000..1a27b6fbdd
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tan.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+tanl (double x)
+{
+ return tan (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tanh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tanh.c
new file mode 100644
index 0000000000..fc2fd32eb8
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tanh.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+tanhl (double x)
+{
+ return tanh (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c
new file mode 100644
index 0000000000..bbf613abe1
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-tgamma.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+tgammal (double x)
+{
+ return tgamma (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c
new file mode 100644
index 0000000000..c528d53555
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalorder.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for totalorder.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+totalorderl (double x, double y)
+{
+ return totalorder (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalordermag.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalordermag.c
new file mode 100644
index 0000000000..4bc78588ea
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-totalordermag.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for totalordermag.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+totalordermagl (double x, double y)
+{
+ return totalordermag (x, y);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-trunc.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-trunc.c
new file mode 100644
index 0000000000..d0131e80a3
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-trunc.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+truncl (double x)
+{
+ return trunc (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfp.c
new file mode 100644
index 0000000000..127225734c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfp.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for ufromfp.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+uintmax_t
+attribute_hidden
+ufromfpl (double x, int round, unsigned int width)
+{
+ return ufromfp (x, round, width);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfpx.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfpx.c
new file mode 100644
index 0000000000..3294f00609
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-ufromfpx.c
@@ -0,0 +1,26 @@
+/* Compatibility routine for IEEE double as long double for ufromfpx.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include "nldbl-compat.h"
+
+uintmax_t
+attribute_hidden
+ufromfpxl (double x, int round, unsigned int width)
+{
+ return ufromfpx (x, round, width);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c
new file mode 100644
index 0000000000..52fa18ccee
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c
new file mode 100644
index 0000000000..4f5391a9d7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vasprintf_chk (char **result_ptr, int flag, const char *fmt, va_list ap)
+{
+ return __nldbl___vasprintf_chk (result_ptr, flag, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c
new file mode 100644
index 0000000000..1acbd40625
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c
new file mode 100644
index 0000000000..ca1ce01878
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+__vdprintf_chk (int d, int flag, const char *fmt, va_list arg)
+{
+ return __nldbl___vdprintf_chk (d, flag, fmt, arg);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c
new file mode 100644
index 0000000000..6ca8437b28
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c
new file mode 100644
index 0000000000..0f6820af63
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c
new file mode 100644
index 0000000000..f23465ee95
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfscanf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c
new file mode 100644
index 0000000000..c3fe76a971
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c
new file mode 100644
index 0000000000..b3b69f0571
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c
new file mode 100644
index 0000000000..be9febc9a0
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vfwscanf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c
new file mode 100644
index 0000000000..ed0d27d9a0
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+int
+attribute_hidden
+vprintf (const char *fmt, va_list ap)
+{
+ return __nldbl_vfprintf (stdout, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c
new file mode 100644
index 0000000000..63b3e8f965
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c
new file mode 100644
index 0000000000..e75907b905
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vscanf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c
new file mode 100644
index 0000000000..5a9bcbcaee
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c
new file mode 100644
index 0000000000..19380291a3
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsnprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c
new file mode 100644
index 0000000000..04406d0f6e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c
new file mode 100644
index 0000000000..9df143fcef
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c
new file mode 100644
index 0000000000..f5594c122c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsscanf.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c
new file mode 100644
index 0000000000..ff3415a072
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c
new file mode 100644
index 0000000000..0cd1f96bfe
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c
new file mode 100644
index 0000000000..bd4bb5131b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vswscanf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c
new file mode 100644
index 0000000000..eed1010eea
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+attribute_hidden
+void
+vsyslog (int pri, const char *fmt, va_list ap)
+{
+ __nldbl_vsyslog (pri, fmt, ap);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c
new file mode 100644
index 0000000000..2221474f97
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vsyslog_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c
new file mode 100644
index 0000000000..f46bdb3137
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c
new file mode 100644
index 0000000000..f7e7185977
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwprintf_chk.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c
new file mode 100644
index 0000000000..d39578ca4e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-vwscanf.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c
new file mode 100644
index 0000000000..dbaffaa486
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
new file mode 100644
index 0000000000..e32d13a94b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
@@ -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)
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c
new file mode 100644
index 0000000000..b638a399ad
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wcstoldint.c
@@ -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);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c
new file mode 100644
index 0000000000..2aa1a7475a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c
new file mode 100644
index 0000000000..39191e123b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wprintf_chk.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c
new file mode 100644
index 0000000000..4ee3fdc15f
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-wscanf.c
@@ -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;
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y0.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y0.c
new file mode 100644
index 0000000000..e35621f60f
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y0.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+y0l (double x)
+{
+ return y0 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y1.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y1.c
new file mode 100644
index 0000000000..c47abcd3c5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-y1.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+y1l (double x)
+{
+ return y1 (x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-yn.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-yn.c
new file mode 100644
index 0000000000..7623d4513b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/nldbl-yn.c
@@ -0,0 +1,8 @@
+#include "nldbl-compat.h"
+
+double
+attribute_hidden
+ynl (int n, double x)
+{
+ return yn (n, x);
+}
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_asinh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_asinh.c
new file mode 100644
index 0000000000..e9bcfaea62
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_asinh.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_atan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_atan.c
new file mode 100644
index 0000000000..5fbd5e62d6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_atan.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_cbrt.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_cbrt.c
new file mode 100644
index 0000000000..cdc635771e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_cbrt.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ceil.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ceil.c
new file mode 100644
index 0000000000..6e4b70795d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ceil.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_clog10l.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_clog10l.c
new file mode 100644
index 0000000000..15dc3ed891
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_clog10l.c
@@ -0,0 +1,31 @@
+/* clog10l alias overrides for platforms where long double
+ was previously not unique.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#define M_DECL_FUNC(x) __clog10l_internal
+#include <math-type-macros-ldouble.h>
+
+#undef declare_mgen_alias
+#define declare_mgen_alias(from, to)
+
+#include <s_clog10_template.c>
+
+/* __clog10l is also a public symbol. */
+strong_alias (__clog10l_internal, __clog10l__internal)
+long_double_symbol (libm, __clog10l_internal, __clog10l);
+long_double_symbol (libm, __clog10l__internal, clog10l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_copysign.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_copysign.c
new file mode 100644
index 0000000000..f4303f5768
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_copysign.c
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_copysign.c>
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_erf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_erf.c
new file mode 100644
index 0000000000..76f1baa5ca
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_erf.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_expm1.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_expm1.c
new file mode 100644
index 0000000000..ef9b5956db
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_expm1.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fabs.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fabs.c
new file mode 100644
index 0000000000..e7c92187e9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fabs.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_finite.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_finite.c
new file mode 100644
index 0000000000..7d3ab0068d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_finite.c
@@ -0,0 +1,18 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_finite.c>
+weak_alias (__finite, ___finite)
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_floor.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_floor.c
new file mode 100644
index 0000000000..7797944e9e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_floor.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fma.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fma.c
new file mode 100644
index 0000000000..1723c5c306
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fma.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_fma.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __fma, fmal, GLIBC_2_1);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fmal.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fmal.c
new file mode 100644
index 0000000000..bd12dabcbe
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_fmal.c
@@ -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);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_frexp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_frexp.c
new file mode 100644
index 0000000000..0e3a5e0830
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_frexp.c
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_frexp.c>
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isinf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isinf.c
new file mode 100644
index 0000000000..1f760a0320
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isinf.c
@@ -0,0 +1,8 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_isinf.c>
+#if !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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isnan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isnan.c
new file mode 100644
index 0000000000..33f57f1955
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_isnan.c
@@ -0,0 +1,8 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_isnan.c>
+#if !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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexp.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexp.c
new file mode 100644
index 0000000000..809080a149
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexp.c
@@ -0,0 +1,30 @@
+/* ldexp alias overrides for platforms where long double
+ was previously not unique.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#define M_LIBM_NEED_COMPAT(f) 0
+#include <math-type-macros-double.h>
+#include <s_ldexp_template.c>
+
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexpl.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
new file mode 100644
index 0000000000..85f34fa2c4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
@@ -0,0 +1,31 @@
+/* ldexpl alias overrides for platforms where long double
+ was previously not unique.
+ Copyright (C) 2016-2017 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#define declare_mgen_alias(f,t)
+#include <math-type-macros-ldouble.h>
+#include <s_ldexp_template.c>
+
+strong_alias (__ldexpl, __ldexpl_2)
+#if IS_IN (libm)
+long_double_symbol (libm, __ldexpl, ldexpl);
+long_double_symbol (libm, __ldexpl_2, scalbnl);
+#else
+long_double_symbol (libc, __ldexpl, ldexpl);
+long_double_symbol (libc, __ldexpl_2, scalbnl);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llrint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llrint.c
new file mode 100644
index 0000000000..e6311972e1
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llrint.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llround.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llround.c
new file mode 100644
index 0000000000..36c7e6edac
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_llround.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_log1p.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_log1p.c
new file mode 100644
index 0000000000..495fa32e35
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_log1p.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_logb.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_logb.c
new file mode 100644
index 0000000000..4d7a6db275
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_logb.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lrint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lrint.c
new file mode 100644
index 0000000000..b7af812846
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lrint.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lround.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lround.c
new file mode 100644
index 0000000000..f3a27fa9c9
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_lround.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_modf.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_modf.c
new file mode 100644
index 0000000000..93acb43ae6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_modf.c
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_modf.c>
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nearbyint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nearbyint.c
new file mode 100644
index 0000000000..a8b7973acd
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nearbyint.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nextafter.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nextafter.c
new file mode 100644
index 0000000000..78e2c0ff37
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nextafter.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c
new file mode 100644
index 0000000000..07e9375b78
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c
@@ -0,0 +1,81 @@
+/* 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 <errno.h>
+#include <math.h>
+#include <math_private.h>
+#include <math_ldbl_opt.h>
+#include <float.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 u;
+ SET_FLOAT_WORD(x,(u_int32_t)(hy&0x80000000)|1);/* return +-minsub*/
+ u = math_opt_barrier (x);
+ u = u * u;
+ math_force_eval (u); /* raise underflow flag */
+ return x;
+ }
+ if(hx>=0) { /* x > 0 */
+ if(x > y) /* x -= ulp */
+ hx -= 1;
+ else /* x < y, x += ulp */
+ hx += 1;
+ } else { /* x < 0 */
+ if(x < y) /* x -= ulp */
+ hx -= 1;
+ else /* x > y, x += ulp */
+ hx += 1;
+ }
+ hy = hx&0x7f800000;
+ if(hy>=0x7f800000) {
+ float u = x+x; /* overflow */
+ math_force_eval (u);
+ __set_errno (ERANGE);
+ }
+ if(hy<0x00800000) {
+ float u = x*x; /* underflow */
+ math_force_eval (u); /* raise underflow flag */
+ __set_errno (ERANGE);
+ }
+ 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_remquo.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_remquo.c
new file mode 100644
index 0000000000..9f3d7ba368
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_remquo.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_rint.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_rint.c
new file mode 100644
index 0000000000..d9b156ea27
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_rint.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_round.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_round.c
new file mode 100644
index 0000000000..edff2f017b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_round.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbln.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbln.c
new file mode 100644
index 0000000000..391142b769
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbln.c
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_scalbln.c>
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbn.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbn.c
new file mode 100644
index 0000000000..1ad81b199e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_scalbn.c
@@ -0,0 +1,9 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/s_scalbn.c>
+#if 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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significand.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significand.c
new file mode 100644
index 0000000000..5287c09066
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significand.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significandl.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significandl.c
new file mode 100644
index 0000000000..9339b4780d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_significandl.c
@@ -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);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sin.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sin.c
new file mode 100644
index 0000000000..6932ccc080
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sin.c
@@ -0,0 +1,15 @@
+/* dbl-64/s_sin.c uses NAN and sincos identifiers internally. */
+#define sincos sincos_disable
+/* These definitions needed for proper unfolding of __MATHDECL_VEC. */
+#define __DECL_SIMD_sincos_disable
+#define __DECL_SIMD_sincos_disablef
+#define __DECL_SIMD_sincos_disablel
+#define __DECL_SIMD_sincos_disablef128
+#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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sincos.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sincos.c
new file mode 100644
index 0000000000..6d2a48f25b
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_sincos.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tan.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tan.c
new file mode 100644
index 0000000000..6b0fec0063
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tan.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tanh.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tanh.c
new file mode 100644
index 0000000000..e763bbde77
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_tanh.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_trunc.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_trunc.c
new file mode 100644
index 0000000000..9d90a2bd73
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/s_trunc.c
@@ -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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acos_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acos_compat.c
new file mode 100644
index 0000000000..1e6d1b37ec
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acos_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_acos_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __acos, acosl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c
new file mode 100644
index 0000000000..40da339a7a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_acosh_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __acosh, acoshl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c
new file mode 100644
index 0000000000..df4338d9fa
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_acoshl_compat.c>
+long_double_symbol (libm, __acoshl, acoshl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c
new file mode 100644
index 0000000000..5efc99024c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_acosl_compat.c>
+long_double_symbol (libm, __acosl, acosl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asin_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asin_compat.c
new file mode 100644
index 0000000000..1c52cc22ad
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asin_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_asin_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __asin, asinl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c
new file mode 100644
index 0000000000..087fab25bb
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_asinl_compat.c>
+long_double_symbol (libm, __asinl, asinl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c
new file mode 100644
index 0000000000..d3f7964d7c
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_atan2_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __atan2, atan2l, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c
new file mode 100644
index 0000000000..6b12209625
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_atan2l_compat.c>
+long_double_symbol (libm, __atan2l, atan2l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c
new file mode 100644
index 0000000000..e15ef1f93d
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_atanh_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __atanh, atanhl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c
new file mode 100644
index 0000000000..49bae1ee8f
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_atanhl_compat.c>
+long_double_symbol (libm, __atanhl, atanhl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c
new file mode 100644
index 0000000000..af29735e10
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_cosh_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __cosh, coshl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c
new file mode 100644
index 0000000000..a8808778ba
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_coshl_compat.c>
+long_double_symbol (libm, __coshl, coshl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c
new file mode 100644
index 0000000000..142a70bcd6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_exp10_compat.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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c
new file mode 100644
index 0000000000..8f2ccd3441
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_exp10l_compat.c>
+long_double_symbol (libm, __exp10l, exp10l);
+long_double_symbol (libm, __pow10l, pow10l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp_compat.c
new file mode 100644
index 0000000000..686c9c26d0
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_exp_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <sysdeps/ieee754/dbl-64/w_exp_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __exp, expl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c
new file mode 100644
index 0000000000..9280d39d70
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_fmod_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __fmod, fmodl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c
new file mode 100644
index 0000000000..88fe0ac4d2
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_fmodl_compat.c>
+long_double_symbol (libm, __fmodl, fmodl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c
new file mode 100644
index 0000000000..b3979ff0f4
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_hypot_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __hypot, hypotl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c
new file mode 100644
index 0000000000..68e3997489
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_hypotl_compat.c>
+long_double_symbol (libm, __hypotl, hypotl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0_compat.c
new file mode 100644
index 0000000000..45b4d14764
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_j0_compat.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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c
new file mode 100644
index 0000000000..9050657e03
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_j0l_compat.c>
+long_double_symbol (libm, __j0l, j0l);
+long_double_symbol (libm, __y0l, y0l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1_compat.c
new file mode 100644
index 0000000000..1071c8fd6a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_j1_compat.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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c
new file mode 100644
index 0000000000..4ed9e2dd12
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_j1l_compat.c>
+long_double_symbol (libm, __j1l, j1l);
+long_double_symbol (libm, __y1l, y1l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jn_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jn_compat.c
new file mode 100644
index 0000000000..be29a36041
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jn_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#include <math/w_jn_compat.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
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c
new file mode 100644
index 0000000000..d22ee54997
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c
@@ -0,0 +1,6 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_jnl_compat.c>
+long_double_symbol (libm, __jnl, jnl);
+long_double_symbol (libm, __ynl, ynl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c
new file mode 100644
index 0000000000..f268e65a88
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compat.c
@@ -0,0 +1,7 @@
+#include <math_ldbl_opt.h>
+#include <math/w_lgamma_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+strong_alias (__lgamma_compat, __lgammal_dbl_compat)
+compat_symbol (libm, __lgammal_dbl_compat, lgammal, GLIBC_2_0);
+compat_symbol (libm, __gamma, gammal, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c
new file mode 100644
index 0000000000..f60b3d7bcf
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_compatl.c
@@ -0,0 +1,11 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#define USE_AS_COMPAT 1
+#include <math/lgamma-compat.h>
+#undef LGAMMA_OLD_VER
+#define LGAMMA_OLD_VER LONG_DOUBLE_COMPAT_VERSION
+#include <math/w_lgamma_compatl.c>
+#if GAMMA_ALIAS
+long_double_symbol (libm, __gammal, gammal);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c
new file mode 100644
index 0000000000..673954cd1a
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_lgamma_r_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __lgamma_r, lgammal_r, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c
new file mode 100644
index 0000000000..6fdf2bba87
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_lgammal_r_compat.c>
+long_double_symbol (libm, __lgammal_r, lgammal_r);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10_compat.c
new file mode 100644
index 0000000000..5ec6a2b2b6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_log10_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __log10, log10l, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c
new file mode 100644
index 0000000000..17de3e7856
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_log10l_compat.c>
+long_double_symbol (libm, __log10l, log10l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2_compat.c
new file mode 100644
index 0000000000..dffd2c183e
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_log2_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __log2, log2l, GLIBC_2_1);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c
new file mode 100644
index 0000000000..3c5e734573
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_log2l_compat.c>
+long_double_symbol (libm, __log2l, log2l);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log_compat.c
new file mode 100644
index 0000000000..d2a2bcadde
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_log_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_log_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __log, logl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_logl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_logl_compat.c
new file mode 100644
index 0000000000..2b55842139
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_logl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_logl_compat.c>
+long_double_symbol (libm, __logl, logl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_pow_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_pow_compat.c
new file mode 100644
index 0000000000..c2a7942019
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_pow_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_pow_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __pow, powl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_powl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_powl_compat.c
new file mode 100644
index 0000000000..1897cf1c63
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_powl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_powl_compat.c>
+long_double_symbol (libm, __powl, powl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c
new file mode 100644
index 0000000000..c823dcb8e7
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c
@@ -0,0 +1,7 @@
+#include <math_ldbl_opt.h>
+#include <math/w_remainder_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __remainder, remainderl, GLIBC_2_0);
+strong_alias (__remainder, __drem)
+compat_symbol (libm, __drem, dreml, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c
new file mode 100644
index 0000000000..b2ce5c9563
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c
@@ -0,0 +1,7 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_remainderl_compat.c>
+long_double_symbol (libm, __remainderl, remainderl);
+strong_alias (__remainderl, __dreml)
+long_double_symbol (libm, __dreml, dreml);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c
new file mode 100644
index 0000000000..f6d53a5ba5
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalb_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_scalb_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __scalb, scalbl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c
new file mode 100644
index 0000000000..c8feb654a2
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_scalbl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_scalbl_compat.c>
+long_double_symbol (libm, __scalbl, scalbl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c
new file mode 100644
index 0000000000..b47182c017
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_sinh_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __sinh, sinhl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c
new file mode 100644
index 0000000000..305ed82357
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_sinhl_compat.c>
+long_double_symbol (libm, __sinhl, sinhl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c
new file mode 100644
index 0000000000..355d1c20db
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_sqrt_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c
new file mode 100644
index 0000000000..1e4526f2c6
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_sqrtl_compat.c>
+long_double_symbol (libm, __sqrtl, sqrtl);
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c
new file mode 100644
index 0000000000..082ce8aaff
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#include <math/w_tgamma_compat.c>
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __tgamma, tgammal, GLIBC_2_1);
+#endif
diff --git a/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c
new file mode 100644
index 0000000000..aaf5403522
--- /dev/null
+++ b/REORG.TODO/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c
@@ -0,0 +1,5 @@
+#include <math_ldbl_opt.h>
+#undef weak_alias
+#define weak_alias(n,a)
+#include <math/w_tgammal_compat.c>
+long_double_symbol (libm, __tgammal, tgammal);