[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r23218 - in /trunk: ./ libc/ libc/benchtests/ libc/crypt/ libc/debug/ libc/dlfcn/ libc/elf/ libc/hesiod/ libc/iconvdata/ lib...



Author: joseph
Date: Tue Jun  4 15:48:26 2013
New Revision: 23218

Log:
Merge changes between r23097 and r23217 from /fsf/trunk.

Added:
    trunk/libc/benchtests/README
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/README
    trunk/libc/benchtests/acos-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/acos-inputs
    trunk/libc/benchtests/acosh-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/acosh-inputs
    trunk/libc/benchtests/asin-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/asin-inputs
    trunk/libc/benchtests/asinh-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/asinh-inputs
    trunk/libc/benchtests/atanh-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/atanh-inputs
    trunk/libc/benchtests/cosh-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/cosh-inputs
    trunk/libc/benchtests/log-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/log-inputs
    trunk/libc/benchtests/sinh-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/sinh-inputs
    trunk/libc/benchtests/tanh-inputs
      - copied unchanged from r23217, fsf/trunk/libc/benchtests/tanh-inputs
    trunk/libc/elf/tst-null-argv-lib.c
      - copied unchanged from r23217, fsf/trunk/libc/elf/tst-null-argv-lib.c
    trunk/libc/elf/tst-null-argv.c
      - copied unchanged from r23217, fsf/trunk/libc/elf/tst-null-argv.c
    trunk/libc/nss/test-digits-dots.c
      - copied unchanged from r23217, fsf/trunk/libc/nss/test-digits-dots.c
    trunk/libc/posix/tst-getaddrinfo4.c
      - copied unchanged from r23217, fsf/trunk/libc/posix/tst-getaddrinfo4.c
    trunk/libc/setjmp/tst-sigsetjmp.c
      - copied unchanged from r23217, fsf/trunk/libc/setjmp/tst-sigsetjmp.c
    trunk/libc/sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S
      - copied unchanged from r23217, fsf/trunk/libc/sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S
Removed:
    trunk/libc/ports/sysdeps/aarch64/machine-gmon.h
    trunk/libc/sysdeps/i386/fpu/Makefile
Modified:
    trunk/   (props changed)
    trunk/libc/ChangeLog
    trunk/libc/Makefile
    trunk/libc/Makerules
    trunk/libc/NEWS
    trunk/libc/benchtests/Makefile
    trunk/libc/crypt/Makefile
    trunk/libc/debug/Makefile
    trunk/libc/dlfcn/Makefile
    trunk/libc/elf/Makefile
    trunk/libc/elf/dl-conflict.c
    trunk/libc/elf/dl-deps.c
    trunk/libc/elf/dl-error.c
    trunk/libc/elf/dl-fini.c
    trunk/libc/elf/dl-hwcaps.c
    trunk/libc/elf/dl-init.c
    trunk/libc/elf/dl-load.c
    trunk/libc/elf/dl-lookup.c
    trunk/libc/elf/dl-open.c
    trunk/libc/elf/dl-reloc.c
    trunk/libc/elf/dl-version.c
    trunk/libc/elf/ldconfig.c
    trunk/libc/elf/rtld.c
    trunk/libc/hesiod/Makefile
    trunk/libc/iconvdata/extra-module.mk
    trunk/libc/intl/dcigettext.c
    trunk/libc/intl/loadmsgcat.c
    trunk/libc/libidn/ChangeLog
    trunk/libc/libidn/Makefile
    trunk/libc/libio/genops.c
    trunk/libc/locale/Makefile
    trunk/libc/locale/programs/locarchive.c
    trunk/libc/login/Makefile
    trunk/libc/malloc/Makefile
    trunk/libc/manual/arith.texi
    trunk/libc/manual/errno.texi
    trunk/libc/manual/platform.texi
    trunk/libc/math/Makefile
    trunk/libc/math/README.libm-test
    trunk/libc/math/complex.h
    trunk/libc/math/gen-libm-test.pl
    trunk/libc/math/libm-test.inc
    trunk/libc/math/tst-CMPLX.c
    trunk/libc/math/tst-CMPLX2.c
    trunk/libc/nis/Makefile
    trunk/libc/nis/yp_xdr.c
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/Makefile
    trunk/libc/nptl_db/ChangeLog
    trunk/libc/nptl_db/Makefile
    trunk/libc/nss/Makefile
    trunk/libc/nss/digits_dots.c
    trunk/libc/nss/getXXbyYY_r.c
    trunk/libc/ports/ChangeLog.aarch64
    trunk/libc/ports/ChangeLog.alpha
    trunk/libc/ports/ChangeLog.arm
    trunk/libc/ports/ChangeLog.hppa
    trunk/libc/ports/ChangeLog.ia64
    trunk/libc/ports/ChangeLog.m68k
    trunk/libc/ports/ChangeLog.microblaze
    trunk/libc/ports/ChangeLog.mips
    trunk/libc/ports/ChangeLog.powerpc
    trunk/libc/ports/ChangeLog.tile
    trunk/libc/ports/sysdeps/aarch64/dl-machine.h
    trunk/libc/ports/sysdeps/aarch64/libm-test-ulps
    trunk/libc/ports/sysdeps/aarch64/setjmp.S
    trunk/libc/ports/sysdeps/alpha/fpu/libm-test-ulps
    trunk/libc/ports/sysdeps/arm/Makefile
    trunk/libc/ports/sysdeps/arm/dl-machine.h
    trunk/libc/ports/sysdeps/arm/libm-test-ulps
    trunk/libc/ports/sysdeps/hppa/dl-machine.h
    trunk/libc/ports/sysdeps/hppa/fpu/libm-test-ulps
    trunk/libc/ports/sysdeps/ia64/fpu/libm-test-ulps
    trunk/libc/ports/sysdeps/m68k/coldfire/fpu/libm-test-ulps
    trunk/libc/ports/sysdeps/m68k/dl-machine.h
    trunk/libc/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
    trunk/libc/ports/sysdeps/microblaze/Makefile
    trunk/libc/ports/sysdeps/microblaze/dl-machine.h
    trunk/libc/ports/sysdeps/microblaze/libm-test-ulps
    trunk/libc/ports/sysdeps/mips/dl-lookup.c
    trunk/libc/ports/sysdeps/mips/dl-machine.h
    trunk/libc/ports/sysdeps/mips/mips32/libm-test-ulps
    trunk/libc/ports/sysdeps/mips/mips64/libm-test-ulps
    trunk/libc/ports/sysdeps/powerpc/nofpu/libm-test-ulps
    trunk/libc/ports/sysdeps/tile/crti.S
    trunk/libc/ports/sysdeps/tile/dl-machine.h
    trunk/libc/ports/sysdeps/tile/libm-test-ulps
    trunk/libc/ports/sysdeps/tile/start.S
    trunk/libc/ports/sysdeps/tile/tilegx/Makefile
    trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/siginfo.h
    trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
    trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/siginfo.h
    trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
    trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
    trunk/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
    trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/c++-types.data   (props changed)
    trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/nptl/localplt.data   (props changed)
    trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/c++-types.data   (props changed)
    trunk/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500/single/nptl/localplt.data   (props changed)
    trunk/libc/ports/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
    trunk/libc/posix/Makefile
    trunk/libc/resolv/Makefile
    trunk/libc/rt/Makefile
    trunk/libc/setjmp/Makefile
    trunk/libc/stdio-common/bug26.c
    trunk/libc/stdlib/Makefile
    trunk/libc/sysdeps/generic/ldsodefs.h
    trunk/libc/sysdeps/gnu/errlist.c
    trunk/libc/sysdeps/i386/dl-machine.h
    trunk/libc/sysdeps/i386/fpu/libm-test-ulps
    trunk/libc/sysdeps/ieee754/dbl-64/s_nearbyint.c
    trunk/libc/sysdeps/ieee754/flt-32/s_nearbyintf.c
    trunk/libc/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
    trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c
    trunk/libc/sysdeps/ieee754/ldbl-96/e_hypotl.c
    trunk/libc/sysdeps/ieee754/ldbl-96/s_nearbyintl.c
    trunk/libc/sysdeps/mach/hurd/dl-sysdep.c
    trunk/libc/sysdeps/mach/hurd/i386/init-first.c
    trunk/libc/sysdeps/posix/getaddrinfo.c
    trunk/libc/sysdeps/powerpc/fpu/Makefile
    trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
    trunk/libc/sysdeps/powerpc/powerpc32/dl-machine.c
    trunk/libc/sysdeps/powerpc/powerpc64/dl-machine.h
    trunk/libc/sysdeps/powerpc/sys/platform/ppc.h
    trunk/libc/sysdeps/s390/fpu/libm-test-ulps
    trunk/libc/sysdeps/s390/s390-32/dl-machine.h
    trunk/libc/sysdeps/s390/s390-64/dl-machine.h
    trunk/libc/sysdeps/sh/dl-machine.h
    trunk/libc/sysdeps/sh/sh4/fpu/libm-test-ulps
    trunk/libc/sysdeps/sparc/fpu/libm-test-ulps
    trunk/libc/sysdeps/sparc/sparc32/dl-machine.h
    trunk/libc/sysdeps/sparc/sparc64/dl-machine.h
    trunk/libc/sysdeps/unix/sysv/linux/bits/siginfo.h
    trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
    trunk/libc/sysdeps/unix/sysv/linux/x86/bits/siginfo.h
    trunk/libc/sysdeps/x86_64/dl-machine.h
    trunk/libc/sysdeps/x86_64/fpu/libm-test-ulps
    trunk/libc/sysdeps/x86_64/memset.S
    trunk/libc/sysdeps/x86_64/multiarch/Makefile
    trunk/libc/sysdeps/x86_64/multiarch/ifunc-impl-list.c
    trunk/libc/sysdeps/x86_64/multiarch/memcpy.S

Propchange: trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun  4 15:48:26 2013
@@ -1,1 +1,1 @@
-/fsf/trunk:15224-23097
+/fsf/trunk:15224-23217

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Tue Jun  4 15:48:26 2013
@@ -1,3 +1,902 @@
+2013-06-03  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	[BZ #15536]
+	* math/libm-test.inc (MAX_EXP): Remove
+	(MIN_EXP): Define.
+	(ulp): Use MIN_EXP - MANT_DIG.
+	(check_ulp): Verify subnormal ulps. Only allow a range of +/- 1 ulp.
+
+2013-05-31  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* po/be.po: Revert last change.
+	* po/zh_CN.po: Likewise.
+	* po/header.pot: Likewise.
+
+2013-05-31  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* Makefile ($(common-objpfx)linkobj/libc.so): Define
+	link-libc-deps to empty as target-specific variable.
+	* Makerules (link-libc-args): New variable.
+	(libc-for-link): Likewise.
+	(link-libc-deps): Likewise.
+	(lib%.so): Depend on $(link-libc-deps).  Link with
+	$(link-libc-args).
+	(build-module): Link with $(link-libc-args).
+	(build-module-asneeded): Likewise.
+	(build-module-helper-objlist): Filter out $(link-libc-deps) from
+	list of objects.
+	($(common-objpfx)libc.so): Define link-libc-deps to empty as
+	target-specific variable.
+	($(extra-modules-build:%=$(objpfx)%.so)): Depend on
+	$(link-libc-deps) instead of libc.so and libc_nonshared.a.
+	* crypt/Makefile ($(objpfx)libcrypt.so): Remove dependencies on
+	libc.
+	* debug/Makefile ($(objpfx)libSegFault.so): Remove dependencies on
+	libc and ld.so.
+	($(objpfx)libpcprofile.so): Likewise.
+	* dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Remove ld.so and
+	libc_nonshared.a.
+	($(objpfx)libdl.so): Remove dependencies on libc and ld.so.
+	* hesiod/Makefile ($(objpfx)libnss_hesiod.so): Likewise.
+	* iconvdata/extra-module.mk ($(objpfx)$(mod).so): Depend on
+	$(link-libc-deps).
+	($(objpfx)$(mod).so): Remove dependencies on libc and ld.so.
+	* locale/Makefile ($(objpfx)libBrokenLocale.so): Likewise.
+	* login/Makefile ($(objpfx)libutil.so): Likewise.
+	* malloc/Makefile ($(objpfx)libmemusage.so): Likewise.
+	* math/Makefile ($(objpfx)libm.so): Likewise.
+	* nis/Makefile ($(services:%=$(objpfx)libnss_%.so)
+	$(objpfx)libnsl.so): Define libc-for-link as target-specific
+	variable instead of depending directly on libc.
+	* nss/Makefile ($(services:%=$(objpfx)libnss_%.so)): Likewise.
+	($(objpfx)/libnss_test1.so): Change dependencies on libc to
+	$(link-libc-deps).
+	* resolv/Makefile ($(objpfx)libresolv.so): Remove dependencies on
+	libc.
+	[$(have-ssp) = yes] (LDLIBS-resolv.so): Remove variable.
+	($(objpfx)libnss_dns.so): Remove dependencies on libc.
+	($(objpfx)libanl.so): Likewise.
+	* rt/Makefile ($(objpfx)librt.so): Remove dependencies on libc and
+	ld.so.
+	* stdlib/Makefile ($(objpfx)tst-putenvmod.so): Depend on
+	$(link-libc-deps).
+	* sysdeps/i386/fpu/Makefile: Remove file.
+	* sysdeps/powerpc/fpu/Makefile [$(subdir) = math]
+	($(objpfx)libm.so): Remove dependency on ld.so.
+
+2013-05-30  Patsy Franklin  <pfrankli@xxxxxxxxxx>
+
+	[BZ # 15553]
+	* nis/yp_xdr.c (XDRMAXNAME): Define.
+	(XDRMAXRECORD): Define.
+	(xdr_domainname): Use XDRMAXNAME.
+	(xdr_mapname): Likewise.
+	(xdr_peername): Likewise.
+	(xdr_keydat): Use XDRMAXRECORD.
+	(xdr_valdat): Likewise.
+
+2013-05-30  Jeff Law  <law@xxxxxxxxxx>
+
+	[BZ #14256]
+	* manual/errno.texi (ESTALE): Update to account for more than
+	just NFS file systems.
+	* sysdeps/gnu/errlist.c: Regenerated.
+
+2013-05-29  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15465]
+	* elf/Makefile (tests): Add tst-null-argv.
+	(modules-names):  Add tst-null-argv-lib.
+	($(objpfx)tst-null-argv): Depend on tst-null-argv-lib.so.
+	(tst-null-argv-ENV): Set environment for tst-null-argv.
+	* sysdeps/generic/ldsodefs.h (DSO_FILENAME): New macro.
+	(RTLD_PROGNAME): New macro.
+	* elf/tst-null-argv.c: New test case.
+	* elf/tst-null-argv-lib.c: Library for test case.
+	* elf/dl-conflict.c (_dl_resolve_conflicts): Use DSO_FILENAME.
+	* elf/dl-deps.c (_dl_map_object_deps): Likewise.
+	* elf/dl-error.c (_dl_signal_error): Use RTLD_PROGNAME.
+	* elf/dl-fini.c (_dl_fini): Use DSO_FILENAME.
+	* elf/dl-init.c (call_init): Likewise.
+	(_dl_init): Likewise.
+	* elf/dl-load.c (print_search_path): Likewise.
+	(_dl_map_object): Likewise.
+	* elf/dl-lookup.c (do_lookup_x): Likewise.
+	(add_dependency): Likewise.
+	(_dl_lookup_symbol_x): Likewise.
+	(_dl_debug_bindings): Likewise.
+	* elf/dl-open.c (_dl_show_scope): Likewise.
+	* elf/dl-reloc.c (_dl_relocate_object): Likewise.
+	* elf/dl-version.c (match_symbol): Likewise.
+	(_dl_check_map_versions): Likewise.
+	* elf/rtld.c (dl_main): Likewise.
+	(print_unresolved): Use RTLD_PROGNAME.
+	(print_missing_version): Likewise.
+	* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
+	(elf_machine_rela): Likewise.
+	* sysdeps/powerpc/powerpc32/dl-machine.c
+	(__process_machine_rela): Likewise.
+	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
+	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela):
+	Likewise.
+	* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
+
+2013-05-28  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* po/be.po: Add descriptive title.
+	* po/zh_CN.po: Likewise.
+	* po/header.pot: Likewise.
+
+2013-05-28  Mike Frysinger  <vapier@xxxxxxxxxx>
+
+	* locale/programs/locarchive.c (create_archive): Inlucde fname in
+	error message.
+	(enlarge_archive): Likewise.
+
+2013-05-28  Ben North  <ben@xxxxxxxxxxxxxxxx>
+
+	* manual/arith.texi (frexp): It is the magnitude of the return
+	value which lies in [0.5, 1), not the return value itself.
+
+2013-05-28  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
+
+	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+2013-05-26  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+	* stdio-common/bug26.c (main): Correct fscanf template.
+
+	* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start:go): Don't
+	declare _dl_skip_args.
+
+	* sysdeps/mach/hurd/i386/init-first.c (_dl_non_dynamic_init):
+	Don't declare.
+
+	* manual/platform.texi: Add missing @end deftypefun.
+
+2013-05-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #15529]
+	* sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Set high
+	bit of mantissa of 2^16382.
+	* math/libm-test.inc (hypot_test_data): Add more tests.
+
+	* math/libm-test.inc: Add drem and pow10 to list of tested
+	functions.
+	(pow10_test): New function.
+	(drem_test): Likewise.
+	(drem_test_tonearest): Likewise.
+	(drem_test_towardzero): Likewise.
+	(drem_test_downward): Likewise.
+	(drem_test_upward): Likewise.
+	(main): Call the new functions.
+
+	* math/libm-test.inc (finite_test_data): Remove.
+	(finite_test): Run tests from isfinite_test_data.
+	(gamma_test_data): Remove.
+	(gamma_test): Run tests from lgamma_test_data.
+	* sysdeps/i386/fpu/libm-test-ulps: Update.
+	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2013-05-24  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
+
+	* manual/platform.texi: Add PowerPC PPR function set documentation.
+	* sysdeps/powerpc/sys/platform/ppc.h: Add PowerPC PPR set function
+	implementation.
+
+2013-05-24  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* math/libm-test.inc (MAX_EXP): Define.
+	(ULPDIFF): Define.
+	(ulp): New function.
+	(check_float_internal): Use ULPDIFF.
+	(cpow_test): Disable failing test.
+	(check_ulp): Test ulp() implemetnation.
+	(main): Call check_ulp before starting tests.
+
+2013-05-24  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* math/gen-libm-test.pl (generate_testfile): Do not handle
+	START_DATA and END_DATA.
+	* math/libm-test.inc (acos_test_data): Do not use START_DATA and
+	END_DATA.
+	(acos_tonearest_test_data): Likewise.
+	(acos_towardzero_test_data): Likewise.
+	(acos_downward_test_data): Likewise.
+	(acos_upward_test_data): Likewise.
+	(acosh_test_data): Likewise.
+	(asin_test_data): Likewise.
+	(asin_tonearest_test_data): Likewise.
+	(asin_towardzero_test_data): Likewise.
+	(asin_downward_test_data): Likewise.
+	(asin_upward_test_data): Likewise.
+	(asinh_test_data): Likewise.
+	(atan_test_data): Likewise.
+	(atanh_test_data): Likewise.
+	(atan2_test_data): Likewise.
+	(cabs_test_data): Likewise.
+	(cacos_test_data): Likewise.
+	(cacosh_test_data): Likewise.
+	(carg_test_data): Likewise.
+	(casin_test_data): Likewise.
+	(casinh_test_data): Likewise.
+	(catan_test_data): Likewise.
+	(catanh_test_data): Likewise.
+	(cbrt_test_data): Likewise.
+	(ccos_test_data): Likewise.
+	(ccosh_test_data): Likewise.
+	(ceil_test_data): Likewise.
+	(cexp_test_data): Likewise.
+	(cimag_test_data): Likewise.
+	(clog_test_data): Likewise.
+	(clog10_test_data): Likewise.
+	(conj_test_data): Likewise.
+	(copysign_test_data): Likewise.
+	(cos_test_data): Likewise.
+	(cos_tonearest_test_data): Likewise.
+	(cos_towardzero_test_data): Likewise.
+	(cos_downward_test_data): Likewise.
+	(cos_upward_test_data): Likewise.
+	(cosh_test_data): Likewise.
+	(cosh_tonearest_test_data): Likewise.
+	(cosh_towardzero_test_data): Likewise.
+	(cosh_downward_test_data): Likewise.
+	(cosh_upward_test_data): Likewise.
+	(cpow_test_data): Likewise.
+	(cproj_test_data): Likewise.
+	(creal_test_data): Likewise.
+	(csin_test_data): Likewise.
+	(csinh_test_data): Likewise.
+	(csqrt_test_data): Likewise.
+	(ctan_test_data): Likewise.
+	(ctan_tonearest_test_data): Likewise.
+	(ctan_towardzero_test_data): Likewise.
+	(ctan_downward_test_data): Likewise.
+	(ctan_upward_test_data): Likewise.
+	(ctanh_test_data): Likewise.
+	(ctanh_tonearest_test_data): Likewise.
+	(ctanh_towardzero_test_data): Likewise.
+	(ctanh_downward_test_data): Likewise.
+	(ctanh_upward_test_data): Likewise.
+	(erf_test_data): Likewise.
+	(erfc_test_data): Likewise.
+	(exp_test_data): Likewise.
+	(exp_tonearest_test_data): Likewise.
+	(exp_towardzero_test_data): Likewise.
+	(exp_downward_test_data): Likewise.
+	(exp_upward_test_data): Likewise.
+	(exp10_test_data): Likewise.
+	(exp2_test_data): Likewise.
+	(expm1_test_data): Likewise.
+	(fabs_test_data): Likewise.
+	(fdim_test_data): Likewise.
+	(finite_test_data): Likewise.
+	(floor_test_data): Likewise.
+	(fma_test_data): Likewise.
+	(fma_towardzero_test_data): Likewise.
+	(fma_downward_test_data): Likewise.
+	(fma_upward_test_data): Likewise.
+	(fmax_test_data): Likewise.
+	(fmin_test_data): Likewise.
+	(fmod_test_data): Likewise.
+	(fpclassify_test_data): Likewise.
+	(frexp_test_data): Likewise.
+	(gamma_test_data): Likewise.
+	(hypot_test_data): Likewise.
+	(ilogb_test_data): Likewise.
+	(isfinite_test_data): Likewise.
+	(isgreater_test_data): Likewise.
+	(isgreaterequal_test_data): Likewise.
+	(isinf_test_data): Likewise.
+	(isless_test_data): Likewise.
+	(islessequal_test_data): Likewise.
+	(islessgreater_test_data): Likewise.
+	(isnan_test_data): Likewise.
+	(isnormal_test_data): Likewise.
+	(issignaling_test_data): Likewise.
+	(isunordered_test_data): Likewise.
+	(j0_test_data): Likewise.
+	(j1_test_data): Likewise.
+	(jn_test_data): Likewise.
+	(ldexp_test_data): Likewise.
+	(lgamma_test_data): Likewise.
+	(lrint_test_data): Likewise.
+	(lrint_tonearest_test_data): Likewise.
+	(lrint_towardzero_test_data): Likewise.
+	(lrint_downward_test_data): Likewise.
+	(lrint_upward_test_data): Likewise.
+	(llrint_test_data): Likewise.
+	(llrint_tonearest_test_data): Likewise.
+	(llrint_towardzero_test_data): Likewise.
+	(llrint_downward_test_data): Likewise.
+	(llrint_upward_test_data): Likewise.
+	(log_test_data): Likewise.
+	(log10_test_data): Likewise.
+	(log1p_test_data): Likewise.
+	(log2_test_data): Likewise.
+	(logb_test_data): Likewise.
+	(logb_downward_test_data): Likewise.
+	(lround_test_data): Likewise.
+	(llround_test_data): Likewise.
+	(modf_test_data): Likewise.
+	(nearbyint_test_data): Likewise.
+	(nextafter_test_data): Likewise.
+	(nexttoward_test_data): Likewise.
+	(pow_test_data): Likewise.
+	(pow_tonearest_test_data): Likewise.
+	(pow_towardzero_test_data): Likewise.
+	(pow_downward_test_data): Likewise.
+	(pow_upward_test_data): Likewise.
+	(remainder_test_data): Likewise.
+	(remainder_tonearest_test_data): Likewise.
+	(remainder_towardzero_test_data): Likewise.
+	(remainder_downward_test_data): Likewise.
+	(remainder_upward_test_data): Likewise.
+	(remquo_test_data): Likewise.
+	(rint_test_data): Likewise.
+	(rint_tonearest_test_data): Likewise.
+	(rint_towardzero_test_data): Likewise.
+	(rint_downward_test_data): Likewise.
+	(rint_upward_test_data): Likewise.
+	(round_test_data): Likewise.
+	(scalb_test_data): Likewise.
+	(scalbn_test_data): Likewise.
+	(scalbln_test_data): Likewise.
+	(signbit_test_data): Likewise.
+	(sin_test_data): Likewise.
+	(sin_tonearest_test_data): Likewise.
+	(sin_towardzero_test_data): Likewise.
+	(sin_downward_test_data): Likewise.
+	(sin_upward_test_data): Likewise.
+	(sincos_test_data): Likewise.
+	(sinh_test_data): Likewise.
+	(sinh_tonearest_test_data): Likewise.
+	(sinh_towardzero_test_data): Likewise.
+	(sinh_downward_test_data): Likewise.
+	(sinh_upward_test_data): Likewise.
+	(sqrt_test_data): Likewise.
+	(tan_test_data): Likewise.
+	(tan_tonearest_test_data): Likewise.
+	(tan_towardzero_test_data): Likewise.
+	(tan_downward_test_data): Likewise.
+	(tan_upward_test_data): Likewise.
+	(tanh_test_data): Likewise.
+	(tgamma_test_data): Likewise.
+	(trunc_test_data): Likewise.
+	(y0_test_data): Likewise.
+	(y1_test_data): Likewise.
+	(yn_test_data): Likewise.
+	(significand_test_data): Likewise.
+
+	* math/gen-libm-test.pl (@functions): Remove variable.
+	(generate_testfile): Don't handle START and END lines.
+	* math/libm-test.inc (START): New macro.
+	(END): Likewise.
+	(END_COMPLEX): Likewise.
+	(acos_test): Use END macro without arguments.
+	(acos_test_tonearest): Likewise.
+	(acos_test_towardzero): Likewise.
+	(acos_test_downward): Likewise.
+	(acos_test_upward): Likewise.
+	(acosh_test): Likewise.
+	(asin_test): Likewise.
+	(asin_test_tonearest): Likewise.
+	(asin_test_towardzero): Likewise.
+	(asin_test_downward): Likewise.
+	(asin_test_upward): Likewise.
+	(asinh_test): Likewise.
+	(atan_test): Likewise.
+	(atanh_test): Likewise.
+	(atan2_test): Likewise.
+	(cabs_test): Likewise.
+	(cacos_test): Use END_COMPLEX macro without arguments.
+	(cacosh_test): Likewise.
+	(carg_test): Use END macro without arguments.
+	(casin_test): Use END_COMPLEX macro without arguments.
+	(casinh_test): Likewise.
+	(catan_test): Likewise.
+	(catanh_test): Likewise.
+	(cbrt_test): Use END macro without arguments.
+	(ccos_test): Use END_COMPLEX macro without arguments.
+	(ccosh_test): Likewise.
+	(ceil_test): Use END macro without arguments.
+	(cexp_test): Use END_COMPLEX macro without arguments.
+	(cimag_test): Use END macro without arguments.
+	(clog_test): Use END_COMPLEX macro without arguments.
+	(clog10_test): Likewise.
+	(conj_test): Likewise.
+	(copysign_test): Use END macro without arguments.
+	(cos_test): Likewise.
+	(cos_test_tonearest): Likewise.
+	(cos_test_towardzero): Likewise.
+	(cos_test_downward): Likewise.
+	(cos_test_upward): Likewise.
+	(cosh_test): Likewise.
+	(cosh_test_tonearest): Likewise.
+	(cosh_test_towardzero): Likewise.
+	(cosh_test_downward): Likewise.
+	(cosh_test_upward): Likewise.
+	(cpow_test): Use END_COMPLEX macro without arguments.
+	(cproj_test): Likewise.
+	(creal_test): Use END macro without arguments.
+	(csin_test): Use END_COMPLEX macro without arguments.
+	(csinh_test): Likewise.
+	(csqrt_test): Likewise.
+	(ctan_test): Likewise.
+	(ctan_test_tonearest): Likewise.
+	(ctan_test_towardzero): Likewise.
+	(ctan_test_downward): Likewise.
+	(ctan_test_upward): Likewise.
+	(ctanh_test): Likewise.
+	(ctanh_test_tonearest): Likewise.
+	(ctanh_test_towardzero): Likewise.
+	(ctanh_test_downward): Likewise.
+	(ctanh_test_upward): Likewise.
+	(erf_test): Use END macro without arguments.
+	(erfc_test): Likewise.
+	(exp_test): Likewise.
+	(exp_test_tonearest): Likewise.
+	(exp_test_towardzero): Likewise.
+	(exp_test_downward): Likewise.
+	(exp_test_upward): Likewise.
+	(exp10_test): Likewise.
+	(exp2_test): Likewise.
+	(expm1_test): Likewise.
+	(fabs_test): Likewise.
+	(fdim_test): Likewise.
+	(finite_test): Likewise.
+	(floor_test): Likewise.
+	(fma_test): Likewise.
+	(fma_test_towardzero): Likewise.
+	(fma_test_downward): Likewise.
+	(fma_test_upward): Likewise.
+	(fmax_test): Likewise.
+	(fmin_test): Likewise.
+	(fmod_test): Likewise.
+	(fpclassify_test): Likewise.
+	(frexp_test): Likewise.
+	(gamma_test): Likewise.
+	(hypot_test): Likewise.
+	(ilogb_test): Likewise.
+	(isfinite_test): Likewise.
+	(isgreater_test): Likewise.
+	(isgreaterequal_test): Likewise.
+	(isinf_test): Likewise.
+	(isless_test): Likewise.
+	(islessequal_test): Likewise.
+	(islessgreater_test): Likewise.
+	(isnan_test): Likewise.
+	(isnormal_test): Likewise.
+	(issignaling_test): Likewise.
+	(isunordered_test): Likewise.
+	(j0_test): Likewise.
+	(j1_test): Likewise.
+	(jn_test): Likewise.
+	(ldexp_test): Likewise.
+	(lgamma_test): Likewise.
+	(lrint_test): Likewise.
+	(lrint_test_tonearest): Likewise.
+	(lrint_test_towardzero): Likewise.
+	(lrint_test_downward): Likewise.
+	(lrint_test_upward): Likewise.
+	(llrint_test): Likewise.
+	(llrint_test_tonearest): Likewise.
+	(llrint_test_towardzero): Likewise.
+	(llrint_test_downward): Likewise.
+	(llrint_test_upward): Likewise.
+	(log_test): Likewise.
+	(log10_test): Likewise.
+	(log1p_test): Likewise.
+	(log2_test): Likewise.
+	(logb_test): Likewise.
+	(logb_test_downward): Likewise.
+	(lround_test): Likewise.
+	(llround_test): Likewise.
+	(modf_test): Likewise.
+	(nearbyint_test): Likewise.
+	(nextafter_test): Likewise.
+	(nexttoward_test): Likewise.
+	(pow_test): Likewise.
+	(pow_test_tonearest): Likewise.
+	(pow_test_towardzero): Likewise.
+	(pow_test_downward): Likewise.
+	(pow_test_upward): Likewise.
+	(remainder_test): Likewise.
+	(remainder_test_tonearest): Likewise.
+	(remainder_test_towardzero): Likewise.
+	(remainder_test_downward): Likewise.
+	(remainder_test_upward): Likewise.
+	(remquo_test): Likewise.
+	(rint_test): Likewise.
+	(rint_test_tonearest): Likewise.
+	(rint_test_towardzero): Likewise.
+	(rint_test_downward): Likewise.
+	(rint_test_upward): Likewise.
+	(round_test): Likewise.
+	(scalb_test): Likewise.
+	(scalbn_test): Likewise.
+	(scalbln_test): Likewise.
+	(signbit_test): Likewise.
+	(sin_test): Likewise.
+	(sin_test_tonearest): Likewise.
+	(sin_test_towardzero): Likewise.
+	(sin_test_downward): Likewise.
+	(sin_test_upward): Likewise.
+	(sincos_test): Likewise.
+	(sinh_test): Likewise.
+	(sinh_test_tonearest): Likewise.
+	(sinh_test_towardzero): Likewise.
+	(sinh_test_downward): Likewise.
+	(sinh_test_upward): Likewise.
+	(sqrt_test): Likewise.
+	(tan_test): Likewise.
+	(tan_test_tonearest): Likewise.
+	(tan_test_towardzero): Likewise.
+	(tan_test_downward): Likewise.
+	(tan_test_upward): Likewise.
+	(tanh_test): Likewise.
+	(tgamma_test): Likewise.
+	(trunc_test): Likewise.
+	(y0_test): Likewise.
+	(y1_test): Likewise.
+	(yn_test): Likewise.
+	(significand_test): Likewise.
+
+2013-05-24  OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
+
+	[BZ #15381]
+	* libio/genops.c (_IO_no_init): Initialize wide struct info.
+
+2013-05-23  Edjunior Machado  <emachado@xxxxxxxxxxxxxxxxxx>
+
+	[BZ #14894]
+	* sysdeps/powerpc/sys/platform/ppc.h: Add __ppc_yield,
+	__ppc_mdoio and __ppc_mdoom.
+	* manual/platform.texi: Document new functions __ppc_yield,
+	__ppc_mdoio and __ppc_mdoom.
+
+2013-05-22  Carlos O'Donell  <carlos@xxxxxxxxxx>
+
+	* elf/ldconfig.c (is_hwcap_platform): Make comments full setences.
+	(main): Mention "tls" pseudo-hwcap is legacy.
+	* elf/dl-hwcaps.c (_dl_important_hwcaps): Correct rounding comment.
+
+2013-05-22  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* math/gen-libm-test.pl (parse_args): Output only string of
+	arguments as text for test name, not full call or descriptions of
+	tests for extra outputs.
+	(generate_testfile): Do not pass function name to parse_args.
+	Generate this_func variable from START.
+	* math/libm-test.inc (struct test_f_f_data): Rename test_name
+	field to arg_str.
+	(struct test_ff_f_data): Likewise.
+	(test_ff_f_data_nexttoward): Likewise.
+	(struct test_fi_f_data): Likewise.
+	(struct test_fl_f_data): Likewise.
+	(struct test_if_f_data): Likewise.
+	(struct test_fff_f_data): Likewise.
+	(struct test_c_f_data): Likewise.
+	(struct test_f_f1_data): Likewise.  Remove field extra_name.
+	(struct test_fF_f1_data): Likewise.
+	(struct test_ffI_f1_data): Likewise.
+	(struct test_c_c_data): Rename test_name field to arg_str.
+	(struct test_cc_c_data): Likewise.
+	(struct test_f_i_data): Likewise.
+	(struct test_ff_i_data): Likewise.
+	(struct test_f_l_data): Likewise.
+	(struct test_f_L_data): Likewise.
+	(struct test_fFF_11_data): Likewise.  Remove fields extra1_name
+	and extra2_name.
+	(COMMON_TEST_SETUP): New macro.
+	(EXTRA_OUTPUT_TEST_SETUP): Likewise.
+	(COMMON_TEST_CLEANUP): Likewise.
+	(EXTRA_OUTPUT_TEST_CLEANUP): Likewise.
+	(RUN_TEST_f_f): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_f_f): Update call to RUN_TEST_f_f.
+	(RUN_TEST_2_f): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_2_f): Update call to RUN_TEST_2_f.
+	(RUN_TEST_fff_f): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_fff_f): Update call to RUN_TEST_fff_f.
+	(RUN_TEST_c_f): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_c_f): Update call to RUN_TEST_c_f.
+	(RUN_TEST_f_f1): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_f_f1): Update call to RUN_TEST_f_f1.
+	(RUN_TEST_fF_f1): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_fF_f1): Update call to RUN_TEST_fF_f1.
+	(RUN_TEST_fI_f1): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_fI_f1): Update call to RUN_TEST_fI_f1.
+	(RUN_TEST_ffI_f1): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_ffI_f1): Update call to RUN_TEST_ffI_f1.
+	(RUN_TEST_c_c): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_c_c): Update call to RUN_TEST_c_c.
+	(RUN_TEST_cc_c): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_cc_c): Update call to RUN_TEST_cc_c.
+	(RUN_TEST_f_i): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_f_i): Update call to RUN_TEST_f_i.
+	(RUN_TEST_f_i_tg): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_f_i_tg): Update call to RUN_TEST_f_i_tg.
+	(RUN_TEST_ff_i_tg): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_ff_i_tg): Update call to RUN_TEST_ff_i_tg.
+	(RUN_TEST_f_b): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_f_b): Update call to RUN_TEST_f_b.
+	(RUN_TEST_f_b_tg): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_f_b_tg): Update call to RUN_TEST_f_b_tg.
+	(RUN_TEST_f_l): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_f_l): Update call to RUN_TEST_f_l.
+	(RUN_TEST_f_L): Take argument string.  Call new setup and cleanup
+	macros.
+	(RUN_TEST_LOOP_f_L): Update call to RUN_TEST_f_L.
+	(RUN_TEST_fFF_11): Take argument string.  Call new setup and
+	cleanup macros.
+	(RUN_TEST_LOOP_fFF_11): Update call to RUN_TEST_fFF_11.
+
+2013-05-22  Edjunior Barbosa Machado  <emachado@xxxxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/bits/siginfo.h (siginfo_t): Add si_addr_lsb
+	to _sifields.sigfault.
+	(si_addr_lsb): Define new macro.
+	(BUS_MCEERR_AR, BUS_MCEERR_AO): Define new values.
+	* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86/bits/siginfo.h: Likewise.
+
+2013-05-03  Carlos O'Donell  <carlos at redhat.com>
+
+	[BZ #15441]
+	* intl/dcigettext.c (DCIGETTEXT): Skip translating if _nl_find_msg
+	returns -1.
+	(_nl_find_msg): Return -1 if recursive call returned -1. If newmem is
+	null return -1.
+	* intl/loadmsgcat.c (_nl_load_domain): If _nl_find_msg returns -1 abort
+	loading the domain.
+
+2013-05-22  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* math/gen-libm-test.pl (parse_args): Do not include expected
+	result in test name.
+	* sysdeps/i386/fpu/libm-test-ulps: Update test names.
+	* sysdeps/powerpc/fpu/libm-test-ulps: Likewise.
+	* sysdeps/s390/fpu/libm-test-ulps: Likewise.
+	* sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise.
+	* sysdeps/sparc/fpu/libm-test-ulps: Likewise.
+	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2013-05-22  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* benchtests/Makefile: Sort function entries.
+
+	* benchtests/Makefile (bench): Add asin, acos, sinh, cosh,
+	tanh, asinh, acosh, atanh.
+	* benchtests/acos-inputs: New file.
+	* benchtests/acosh-inputs: New file.
+	* benchtests/asin-inputs: New file.
+	* benchtests/asinh-inputs: New file.
+	* benchtests/atanh-inputs: New file.
+	* benchtests/cosh-inputs: New file.
+	* benchtests/log-inputs: New file.
+	* benchtests/sinh-inputs: New file.
+	* benchtests/tanh-inputs: New file.
+
+2013-05-21  Dmitry V. Levin  <ldv@xxxxxxxxxxxx>
+
+	[BZ #15339]
+	* posix/tst-getaddrinfo4.c: New test.
+	* posix/Makefile (tests): Add it.
+
+2013-05-21  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	[BZ #15339]
+	* nss/getXXbyYY_r.c (REENTRANT_NAME): Set NETDB_INTERNAL only
+	when no services were used.
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Set h_errno.
+	Return EAI_SYSTEM if h_errno is NETDB_INTERNAL.
+
+2013-05-21  Andreas Schwab  <schwab@xxxxxxx>
+
+	[BZ #15014]
+	* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME))
+	[HANDLE_DIGITS_DOTS]: Set any_service when digits-dots parsing was
+	successful.
+	* nss/digits_dots.c (__nss_hostname_digits_dots): Remove
+	redundant variable declarations and reallocation of buffer when
+	parsing as IPv6 address.  Always set NSS status when called from
+	reentrant functions.  Use NETDB_INTERNAL instead of TRY_AGAIN when
+	buffer too small.  Correct computation of needed size.
+	* nss/Makefile (tests): Add test-digits-dots.
+	* nss/test-digits-dots.c: New test.
+
+2013-05-21  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
+
+	* benchtests/Makefile: Remove instructions for adding
+	benchmark tests.
+	* benchtests/README: New file to explain how to execute and
+	enhance the benchmark tests.
+
+2013-05-21  Andreas Schwab  <schwab@xxxxxxx>
+
+	[BZ #15493]
+	* setjmp/Makefile (tests): Add tst-sigsetjmp.
+	* setjmp/tst-sigsetjmp.c: New test.
+
+2013-05-20  OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
+
+	* sysdeps/x86_64/memset.S (memset): New implementation.
+	(__bzero): Likewise.
+	(__memset_tail): New function.
+
+2013-05-20  OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
+
+	* sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S: New file.
+	* sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Add
+	__memcpy_sse2_unaligned ifunc selection.
+	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines):
+	Add memcpy-sse2-unaligned.S.
+	* sysdeps/x86_64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list):
+	Add: __memcpy_sse2_unaligned.
+
+2013-05-19  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #15490]
+	* sysdeps/ieee754/dbl-64/s_nearbyint.c (__nearbyint): Use
+	math_force_eval before restoring floating-point envrionment.
+	* sysdeps/ieee754/flt-32/s_nearbyintf.c (__nearbyintf): Likewise.
+	* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl):
+	Likewise.
+	* sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: Include
+	<math_private.h>.
+	(__nearbyintl): Use math_force_eval before restoring
+	floating-point environment.
+	* sysdeps/ieee754/ldbl-96/s_nearbyintl.c (__nearbyintl): Likewise.
+
+	* math/gen-libm-test.pl (special_functions): Remove.
+	(parse_args): Don't handle TEST_extra.  Handle functions with no
+	return value.
+	* math/libm-test.inc (struct test_sincos_data): Replace with
+	struct test_fFF_11_data.
+	(RUN_TEST_sincos): Replace with RUN_TEST_fFF_11.
+	(RUN_TEST_LOOP_sincos): Replace with RUN_TEST_LOOP_fFF_11.
+	(sincos_test_data): Change element type to struct
+	test_fFF_11_data.  Use TEST_fFF_11 instead of TEST_extra.
+	(sincos_test): Use RUN_TEST_LOOP_fFF_11 instead of
+	RUN_TEST_LOOP_sincos.
+	* math/README.libm-test: Don't mention special handling of
+	individual functions.
+	* sysdeps/i386/fpu/libm-test-ulps: Update names of sincos tests.
+	* sysdeps/powerpc/fpu/libm-test-ulps: Likewise.
+	* sysdeps/s390/fpu/libm-test-ulps: Likewise.
+	* sysdeps/sh/sh4/fpu/libm-test-ulps: Likewise.
+	* sysdeps/sparc/fpu/libm-test-ulps: Likewise.
+	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+	* math/gen-libm-test.pl (get_variable): Remove function.
+	(parse_args): Don't show pointer parameters to call in test
+	names.  Use "extra output N" in test names for extra outputs
+	rather than naming variables.
+
+2013-05-18  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #15488]
+	* math/complex.h [__USE_ISOC11 && __GNUC_PREREQ (4, 7) &&
+	__NO_LONG_DOUBLE_MATH] (CMPLXL): Define macro.
+	* math/tst-CMPLX.c (do_test) [NO_LONG_DOUBLE]: Do not disable long
+	double tests.
+	* make/tst-CMPLX2.c [NO_LONG_DOUBLE] (check_long_double): Do not
+	disable.
+	(do_test) [NO_LONG_DOUBLE]: Do not disable call to
+	check_long_double.
+
+	* math/gen-libm-test.pl (@tests): Remove variable.
+	($count): Likewise.
+	(new_test): Remove function.
+	(show_exceptions): New function.
+	(special_functions): Use show_exceptions instead of new_test.
+	(parse_args): Likewise.
+	(generate_testfile): Pass only function name in generated call to
+	print_max_error or print_complex_max_error.
+	(get_ulps): Do not handle complex tests specially.
+	(output_test): Rename to ...
+	(get_all_ulps_for_test): ... this.  Return a string rather than
+	printing to a file.  Require ulps to be present.
+	(output_ulps): Generate arrays rather than #defines.
+	* math/libm-test.inc: Move down #include of "libm-test-ulps.h".
+	(struct ulp_data): New type.
+	(BUILD_COMPLEX_ULP): Remove macro.
+	(compare_ulp_data): New function.
+	(find_ulps): Likewise.
+	(find_test_ulps): Likewise.
+	(find_function_ulps): Likewise.
+	(find_complex_function_ulps): Likewise.
+	(print_max_error): Determine allowed ulps using
+	find_function_ulps.
+	(print_complex_max_error): Determine allowed ulps using
+	find_complex_function_ulps.
+	(check_float_internal): Determine max ulps using find_test_ulps.
+	(check_float): Do not take max_ulp parameter.  Update call to
+	check_float_internal.
+	(check_complex): Likewise.
+	(check_int): Do not take max_ulp parameter.
+	(check_long): Likewise.
+	(check_bool): Likewise.
+	(check_longlong): Likewise.
+	(struct test_f_f_data): Remove max_ulp field.
+	(struct test_ff_f_data): Likewise.
+	(struct test_ff_f_data_nexttoward): Likewise.
+	(struct test_fi_f_data): Likewise.
+	(struct test_fl_f_data): Likewise.
+	(struct test_if_f_data): Likewise.
+	(struct test_fff_f_data): Likewise.
+	(struct test_c_f_data): Likewise.
+	(struct test_f_f1_data): Remove max_ulp and extra_ulp fields.
+	(struct test_fF_f1_data): Likewise.
+	(struct test_ffI_f1_data): Likewise.
+	(struct test_c_c_data): Remove max_ulp field.
+	(struct test_cc_c_data): Likewise.
+	(struct test_f_i_data): Likewise.
+	(struct test_ff_i_data): Likewise.
+	(struct test_f_l_data): Likewise.
+	(struct test_f_L_data): Likewise.
+	(struct test_sincos_data): Likewise.
+	(RUN_TEST_f_f): Do not handle ulps.
+	(RUN_TEST_LOOP_f_f): Likewise.
+	(RUN_TEST_2_f): Likewise.
+	(RUN_TEST_LOOP_2_f): Likewise.
+	(RUN_TEST_fff_f): Likewise.
+	(RUN_TEST_LOOP_fff_f): Likewise.
+	(RUN_TEST_c_f): Likewise.
+	(RUN_TEST_LOOP_c_f): Likewise.
+	(RUN_TEST_f_f1): Likewise.
+	(RUN_TEST_LOOP_f_f1): Likewise.
+	(RUN_TEST_fF_f1): Likewise.
+	(RUN_TEST_LOOP_fF_f1): Likewise.
+	(RUN_TEST_fI_f1): Likewise.
+	(RUN_TEST_LOOP_fI_f1): Likewise.
+	(RUN_TEST_ffI_f1): Likewise.
+	(RUN_TEST_LOOP_ffI_f1): Likewise.
+	(RUN_TEST_c_c): Likewise.
+	(RUN_TEST_LOOP_c_c): Likewise.
+	(RUN_TEST_cc_c): Likewise.
+	(RUN_TEST_LOOP_cc_c): Likewise.
+	(RUN_TEST_f_i): Likewise.
+	(RUN_TEST_LOOP_f_i): Likewise.
+	(RUN_TEST_f_i_tg): Likewise.
+	(RUN_TEST_LOOP_f_i_tg): Likewise.
+	(RUN_TEST_ff_i_tg): Likewise.
+	(RUN_TEST_LOOP_ff_i_tg): Likewise.
+	(RUN_TEST_f_b): Likewise.
+	(RUN_TEST_LOOP_f_b): Likewise.
+	(RUN_TEST_f_b_tg): Likewise.
+	(RUN_TEST_LOOP_f_b_tg): Likewise.
+	(RUN_TEST_f_l): Likewise.
+	(RUN_TEST_LOOP_f_l): Likewise.
+	(RUN_TEST_f_L): Likewise.
+	(RUN_TEST_LOOP_f_L): Likewise.
+	(RUN_TEST_sincos): Likewise.
+	(RUN_TEST_LOOP_sincos): Likewise.
+
 2013-05-17  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	[BZ #15480]
@@ -121,6 +1020,7 @@
 
 2013-05-17  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
 
+	[BZ # 15497]
 	* sysdeps/powerpc/fpu/e_hypot.c (GET_TWO_FLOAT_WORD): Fix test for
 	negative infinity on POWER6 or lower.
 	* sysdeps/powerpc/fpu/e_hypotf.c (GET_TWO_FLOAT_WORD): Likewise.

Modified: trunk/libc/Makefile
==============================================================================
--- trunk/libc/Makefile (original)
+++ trunk/libc/Makefile Tue Jun  4 15:48:26 2013
@@ -135,6 +135,9 @@
 lib: $(common-objpfx)libc.so
 
 lib: $(common-objpfx)linkobj/libc.so
+
+# Do not filter ld.so out of libc.so link.
+$(common-objpfx)linkobj/libc.so: link-libc-deps = # empty
 
 $(common-objpfx)linkobj/libc.so: $(elfobjdir)/soinit.os \
 				 $(common-objpfx)linkobj/libc_pic.a \

Modified: trunk/libc/Makerules
==============================================================================
--- trunk/libc/Makerules (original)
+++ trunk/libc/Makerules Tue Jun  4 15:48:26 2013
@@ -455,13 +455,33 @@
 load-map-file = $(map-file:%=-Wl,--version-script=%)
 # eglibc: endif
 
+# Compiler arguments to use to link a shared object with libc and
+# ld.so.  This is intended to be as similar as possible to a default
+# link with an installed libc.
+link-libc-args = -Wl,--start-group \
+		 $(libc-for-link) \
+		 $(common-objpfx)libc_nonshared.a \
+		 $(as-needed) $(elfobjdir)/ld.so $(no-as-needed) \
+		 -Wl,--end-group
+
+# The corresponding shared libc to use.  This may be modified for a
+# particular target.
+libc-for-link = $(common-objpfx)libc.so
+
+# The corresponding dependencies.  As these are used in dependencies,
+# not just commands, they cannot use target-specific variables so need
+# to name both possible libc.so objects.
+link-libc-deps = $(common-objpfx)libc.so $(common-objpfx)linkobj/libc.so \
+		 $(common-objpfx)libc_nonshared.a $(elfobjdir)/ld.so
+
 # Pattern rule to build a shared object from an archive of PIC objects.
 # This must come after the installation rules so Make doesn't try to
 # build shared libraries in place from the installed *_pic.a files.
 # $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
-# on other shared objects.
-lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp)
-	$(build-shlib)
+# on other shared objects.  The linking with libc and ld.so is intended
+# to be as similar as possible to a default link with an installed libc.
+lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp) $(link-libc-deps)
+	$(build-shlib) $(link-libc-args)
 
 define build-shlib-helper
 $(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
@@ -536,17 +556,19 @@
 # not for shared objects
 define build-module
 $(build-module-helper) -o $@ $(shlib-lds-flags) \
-	  $(csu-objpfx)abi-note.o $(build-module-objlist)
+	  $(csu-objpfx)abi-note.o $(build-module-objlist) $(link-libc-args)
 endef
 define build-module-asneeded
 $(build-module-helper) -o $@ $(shlib-lds-flags) \
 	  $(csu-objpfx)abi-note.o \
-	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed
+	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
+	  $(link-libc-args)
 endef
 
 build-module-helper-objlist = \
 	$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
-		   $(filter-out %.lds $(map-file) $(+preinit) $(+postinit),$^))
+		   $(filter-out %.lds $(map-file) $(+preinit) $(+postinit) \
+				$(link-libc-deps),$^))
 
 build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
 build-shlib-objlist = $(build-module-helper-objlist) \
@@ -595,6 +617,10 @@
 # libgcc_eh to get _Unwind_Find_FDE.
 libc_gcclibs := -lgcc_eh
 endif
+
+# Do not filter ld.so out of libc.so link.
+$(common-objpfx)libc.so: link-libc-deps = # empty
+
 # Use our own special initializer and finalizer files for libc.so.
 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
 			 $(common-objpfx)libc_pic.os$(libc_pic_clean) \
@@ -653,8 +679,7 @@
 
 extra-modules-build := $(filter-out $(modules-names-nobuild),$(modules-names))
 $(extra-modules-build:%=$(objpfx)%.so): $(objpfx)%.so: \
-		$(objpfx)%.os $(shlib-lds) \
-		$(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
+		$(objpfx)%.os $(shlib-lds) $(link-libs-deps)
 	$(build-module)
 endif
 

Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Tue Jun  4 15:48:26 2013
@@ -10,14 +10,16 @@
 * The following bugs are resolved with this release:
 
   2546, 2560, 5159, 6809, 10060, 10062, 10357, 10686, 11120, 11561, 12387,
-  12723, 13550, 13889, 13951, 13988, 14142, 14176, 14200, 14280, 14293,
-  14317, 14327, 14478, 14496, 14582, 14686, 14812, 14888, 14908, 14920,
-  14952, 14964, 14981, 14982, 14985, 14994, 14996, 15000, 15003, 15006,
-  15007, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15084, 15085,
-  15086, 15160, 15214, 15221, 15232, 15234, 15283, 15285, 15287, 15304,
-  15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337, 15342, 15346,
-  15359, 15361, 15366, 15380, 15394, 15395, 15405, 15406, 15409, 15416,
-  15418, 15419, 15423, 15424, 15426, 15429, 15442, 15448, 15480, 15485.
+  12723, 13550, 13889, 13951, 13988, 14142, 14176, 14200, 14256, 14280,
+  14293, 14317, 14327, 14478, 14496, 14582, 14686, 14812, 14888, 14894,
+  14908, 14920, 14952, 14964, 14981, 14982, 14985, 14994, 14996, 15000,
+  15003, 15006, 15007, 15014, 15020, 15023, 15036, 15054, 15055, 15062,
+  15078, 15084, 15085, 15086, 15160, 15214, 15221, 15232, 15234, 15283,
+  15285, 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336,
+  15337, 15339, 15342, 15346, 15359, 15361, 15366, 15380, 15381, 15394,
+  15395, 15405, 15406, 15409, 15416, 15418, 15419, 15423, 15424, 15426,
+  15429, 15441, 15442, 15448, 15465, 15480, 15485, 15488, 15490, 15493,
+  15497, 15506, 15529, 15536, 15553.
 
 * CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
   #15078).

Modified: trunk/libc/benchtests/Makefile
==============================================================================
--- trunk/libc/benchtests/Makefile (original)
+++ trunk/libc/benchtests/Makefile Tue Jun  4 15:48:26 2013
@@ -17,33 +17,51 @@
 
 
 # Makefile for benchmark tests.  The only useful target here is `bench`.
-
-# Adding a new function `foo`:
-# ---------------------------
-
-# - Append the function name to the bench variable
-
-# - Define foo-ARGLIST as a colon separated list of types of the input
-#   arguments.  Use `void` if function does not take any inputs.  Put in quotes
-#   if the input argument is a pointer, e.g.:
-
-#      malloc-ARGLIST: "void *"
-
-# - Define foo-RET as the type the function returns.  Skip if the function
-#   returns void.  One could even skip foo-ARGLIST if the function does not
-#   take any inputs AND the function returns void.
-
-
-# - Make a file called `foo-inputs` with one input value per line, an input
-#   being a comma separated list of arguments to be passed into the function.
-#   See pow-inputs for an example.
+# Add benchmark functions in alphabetical order.
 
 subdir := benchtests
-bench := exp pow rint sin cos tan atan modf
+bench := acos acosh asin asinh atan atanh cos cosh exp log modf pow rint sin \
+	 sinh tan tanh
+
+acos-ARGLIST = double
+acos-RET = double
+LDFLAGS-bench-acos = -lm
+
+acosh-ARGLIST = double
+acosh-RET = double
+LDFLAGS-bench-acosh = -lm
+
+asin-ARGLIST = double
+asin-RET = double
+LDFLAGS-bench-asin = -lm
+
+asinh-ARGLIST = double
+asinh-RET = double
+LDFLAGS-bench-asinh = -lm
+
+atan-ARGLIST = double
+atan-RET = double
+LDFLAGS-bench-atan = -lm
+
+atanh-ARGLIST = double
+atanh-RET = double
+LDFLAGS-bench-atanh = -lm
+
+cos-ARGLIST = double
+cos-RET = double
+LDFLAGS-bench-cos = -lm
+
+cosh-ARGLIST = double
+cosh-RET = double
+LDFLAGS-bench-cosh = -lm
 
 exp-ARGLIST = double
 exp-RET = double
 LDFLAGS-bench-exp = -lm
+
+log-ARGLIST = double
+log-RET = double
+LDFLAGS-bench-log = -lm
 
 pow-ARGLIST = double:double
 pow-RET = double
@@ -57,17 +75,17 @@
 sin-RET = double
 LDFLAGS-bench-sin = -lm
 
-cos-ARGLIST = double
-cos-RET = double
-LDFLAGS-bench-cos = -lm
+sinh-ARGLIST = double
+sinh-RET = double
+LDFLAGS-bench-sinh = -lm
 
 tan-ARGLIST = double
 tan-RET = double
 LDFLAGS-bench-tan = -lm
 
-atan-ARGLIST = double
-atan-RET = double
-LDFLAGS-bench-atan = -lm
+tanh-ARGLIST = double
+tanh-RET = double
+LDFLAGS-bench-tanh = -lm
 
 
 

Modified: trunk/libc/crypt/Makefile
==============================================================================
--- trunk/libc/crypt/Makefile (original)
+++ trunk/libc/crypt/Makefile Tue Jun  4 15:48:26 2013
@@ -75,8 +75,3 @@
 $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
 endif
 endif # eglibc: OPTION_EGLIBC_CRYPT
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)libcrypt.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a

Modified: trunk/libc/debug/Makefile
==============================================================================
--- trunk/libc/debug/Makefile (original)
+++ trunk/libc/debug/Makefile Tue Jun  4 15:48:26 2013
@@ -201,13 +201,3 @@
 	    -e 's|@PKGVERSION@|$(PKGVERSION)|' \
 	    -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
 	&& rm -f $@ && mv $@.new $@ && chmod +x $@
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)libSegFault.so: $(common-objpfx)libc.so \
-			 $(common-objpfx)libc_nonshared.a \
-			 $(elf-objpfx)$(rtld-installed-name)
-$(objpfx)libpcprofile.so: $(common-objpfx)libc.so \
-			  $(common-objpfx)libc_nonshared.a \
-			  $(elf-objpfx)$(rtld-installed-name)

Modified: trunk/libc/dlfcn/Makefile
==============================================================================
--- trunk/libc/dlfcn/Makefile (original)
+++ trunk/libc/dlfcn/Makefile Tue Jun  4 15:48:26 2013
@@ -121,14 +121,6 @@
 $(objpfx)bug-atexit2: $(libdl)
 $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
 
-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(elfobjdir)/ld.so \
-			    $(common-objpfx)libc_nonshared.a
+LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh
 $(objpfx)bug-atexit3: $(libdl)
 $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
-
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)libdl.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a \
-		   $(elfobjdir)/ld.so

Modified: trunk/libc/elf/Makefile
==============================================================================
--- trunk/libc/elf/Makefile (original)
+++ trunk/libc/elf/Makefile Tue Jun  4 15:48:26 2013
@@ -145,7 +145,7 @@
 	 tst-audit1 tst-audit2 tst-audit8 \
 	 tst-stackguard1 tst-addr1 tst-thrlock \
 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
-	 tst-initorder tst-initorder2 tst-relsort1
+	 tst-initorder tst-initorder2 tst-relsort1 tst-null-argv
 #	 reldep9
 test-srcs = tst-pathopt
 selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -208,7 +208,7 @@
 		tst-initorder2a tst-initorder2b tst-initorder2c \
 		tst-initorder2d \
 		tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
-		tst-array5dep
+		tst-array5dep tst-null-argv-lib
 ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 tests += tst-pie1
@@ -494,7 +494,9 @@
 $(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
 $(objpfx)tst-initordera4.so: $(objpfx)tst-initordera3.so
 $(objpfx)tst-initorder: $(objpfx)tst-initordera4.so $(objpfx)tst-initordera1.so $(objpfx)tst-initorderb2.so
-
+$(objpfx)tst-null-argv: $(objpfx)tst-null-argv-lib.so
+
+tst-null-argv-ENV = LD_DEBUG=all LD_DEBUG_OUTPUT=$(objpfx)tst-null-argv.debug.out
 LDFLAGS-nodel2mod3.so = $(no-as-needed)
 LDFLAGS-reldepmod5.so = $(no-as-needed)
 LDFLAGS-reldep6mod1.so = $(no-as-needed)

Modified: trunk/libc/elf/dl-conflict.c
==============================================================================
--- trunk/libc/elf/dl-conflict.c (original)
+++ trunk/libc/elf/dl-conflict.c Tue Jun  4 15:48:26 2013
@@ -33,8 +33,7 @@
 {
 #if ! ELF_MACHINE_NO_RELA
   if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_RELOC, 0))
-    _dl_debug_printf ("\nconflict processing: %s\n",
-		      l->l_name[0] ? l->l_name : rtld_progname);
+    _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
 
   {
     /* Do the conflict relocation of the object and library GOT and other

Modified: trunk/libc/elf/dl-deps.c
==============================================================================
--- trunk/libc/elf/dl-deps.c (original)
+++ trunk/libc/elf/dl-deps.c Tue Jun  4 15:48:26 2013
@@ -310,8 +310,7 @@
 		      _dl_debug_printf ("load auxiliary object=%s"
 					" requested by file=%s\n",
 					name,
-					l->l_name[0]
-					? l->l_name : rtld_progname);
+					DSO_FILENAME (l->l_name));
 
 		    /* We must be prepared that the addressed shared
 		       object is not available.  */
@@ -337,8 +336,7 @@
 		      _dl_debug_printf ("load filtered object=%s"
 					" requested by file=%s\n",
 					name,
-					l->l_name[0]
-					? l->l_name : rtld_progname);
+					DSO_FILENAME (l->l_name));
 
 		    /* For filter objects the dependency must be available.  */
 		    bool malloced;

Modified: trunk/libc/elf/dl-error.c
==============================================================================
--- trunk/libc/elf/dl-error.c (original)
+++ trunk/libc/elf/dl-error.c Tue Jun  4 15:48:26 2013
@@ -119,7 +119,7 @@
       /* Lossage while resolving the program's own symbols is always fatal.  */
       char buffer[1024];
       _dl_fatal_printf ("%s: %s: %s%s%s%s%s\n",
-			rtld_progname ?: "<program name unknown>",
+			RTLD_PROGNAME,
 			occation ?: N_("error while loading shared libraries"),
 			objname, *objname ? ": " : "",
 			errstring, errcode ? ": " : "",

Modified: trunk/libc/elf/dl-fini.c
==============================================================================
--- trunk/libc/elf/dl-fini.c (original)
+++ trunk/libc/elf/dl-fini.c Tue Jun  4 15:48:26 2013
@@ -237,7 +237,7 @@
 		  if (__builtin_expect (GLRO_dl_debug_mask
 					& DL_DEBUG_IMPCALLS, 0))
 		    _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
-				      l->l_name[0] ? l->l_name : rtld_progname,
+				      DSO_FILENAME (l->l_name),
 				      ns);
 
 		  /* First see whether an array is given.  */

Modified: trunk/libc/elf/dl-hwcaps.c
==============================================================================
--- trunk/libc/elf/dl-hwcaps.c (original)
+++ trunk/libc/elf/dl-hwcaps.c Tue Jun  4 15:48:26 2013
@@ -68,9 +68,9 @@
 				      + GLRO(dl_sysinfo_map)->l_addr);
 	    /* The standard ELF note layout is exactly as the anonymous struct.
 	       The next element is a variable length vendor name of length
-	       VENDORLEN (with a real length rounded to ElfW(Addr)), followed
+	       VENDORLEN (with a real length rounded to ElfW(Word)), followed
 	       by the data of length DATALEN (with a real length rounded to
-	       ElfW(Addr)).  */
+	       ElfW(Word)).  */
 	    const struct
 	    {
 	      ElfW(Word) vendorlen;

Modified: trunk/libc/elf/dl-init.c
==============================================================================
--- trunk/libc/elf/dl-init.c (original)
+++ trunk/libc/elf/dl-init.c Tue Jun  4 15:48:26 2013
@@ -54,7 +54,7 @@
   /* Print a debug message if wanted.  */
   if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
     _dl_debug_printf ("\ncalling init: %s\n\n",
-		      l->l_name[0] ? l->l_name : rtld_progname);
+		      DSO_FILENAME (l->l_name));
 
   /* Now run the local constructors.  There are two forms of them:
      - the one named by DT_INIT
@@ -110,8 +110,7 @@
 
       if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
 	_dl_debug_printf ("\ncalling preinit: %s\n\n",
-			  main_map->l_name[0]
-			  ? main_map->l_name : rtld_progname);
+			  DSO_FILENAME (main_map->l_name));
 
       addrs = (ElfW(Addr) *) (preinit_array->d_un.d_ptr + main_map->l_addr);
       for (cnt = 0; cnt < i; ++cnt)

Modified: trunk/libc/elf/dl-load.c
==============================================================================
--- trunk/libc/elf/dl-load.c (original)
+++ trunk/libc/elf/dl-load.c Tue Jun  4 15:48:26 2013
@@ -1655,7 +1655,7 @@
 
   if (name != NULL)
     _dl_debug_printf_c ("\t\t(%s from file %s)\n", what,
-			name[0] ? name : rtld_progname);
+			DSO_FILENAME (name));
   else
     _dl_debug_printf_c ("\t\t(%s)\n", what);
 }
@@ -2128,8 +2128,7 @@
     _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
 		      ? "\nfile=%s [%lu];  needed by %s [%lu]\n"
 		      : "\nfile=%s [%lu];  dynamically loaded by %s [%lu]\n",
-		      name, nsid, loader->l_name[0]
-		      ? loader->l_name : rtld_progname, loader->l_ns);
+		      name, nsid, DSO_FILENAME (loader->l_name), loader->l_ns);
 
 #ifdef SHARED
   /* Give the auditing libraries a chance to change the name before we

Modified: trunk/libc/elf/dl-lookup.c
==============================================================================
--- trunk/libc/elf/dl-lookup.c (original)
+++ trunk/libc/elf/dl-lookup.c Tue Jun  4 15:48:26 2013
@@ -112,8 +112,7 @@
       /* Print some debugging info if wanted.  */
       if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
 	_dl_debug_printf ("symbol=%s;  lookup in file=%s [%lu]\n",
-			  undef_name,
-			  map->l_name[0] ? map->l_name : rtld_progname,
+			  undef_name, DSO_FILENAME (map->l_name),
 			  map->l_ns);
 
       /* If the hash table is empty there is nothing to do here.  */
@@ -667,10 +666,9 @@
       if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("\
 \nfile=%s [%lu];  needed by %s [%lu] (relocation dependency)\n\n",
-			  map->l_name[0] ? map->l_name : rtld_progname,
+			  DSO_FILENAME (map->l_name),
 			  map->l_ns,
-			  undef_map->l_name[0]
-			  ? undef_map->l_name : rtld_progname,
+			  DSO_FILENAME (undef_map->l_name),
 			  undef_map->l_ns);
     }
   else
@@ -751,9 +749,7 @@
 	  const char *reference_name = undef_map ? undef_map->l_name : NULL;
 
 	  /* XXX We cannot translate the message.  */
-	  _dl_signal_cerror (0, (reference_name[0]
-				 ? reference_name
-				 : (rtld_progname ?: "<main program>")),
+	  _dl_signal_cerror (0, DSO_FILENAME (reference_name),
 			     N_("relocation error"),
 			     make_string ("symbol ", undef_name, ", version ",
 					  version->name,
@@ -780,9 +776,7 @@
 				     ? version->name : "");
 
 	  /* XXX We cannot translate the message.  */
-	  _dl_signal_cerror (0, (reference_name[0]
-				 ? reference_name
-				 : (rtld_progname ?: "<main program>")),
+	  _dl_signal_cerror (0, DSO_FILENAME (reference_name),
 			     N_("symbol lookup error"),
 			     make_string (undefined_msg, undef_name,
 					  versionstr, versionname));
@@ -912,11 +906,9 @@
   if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
     {
       _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
-			(reference_name[0]
-			 ? reference_name
-			 : (rtld_progname ?: "<main program>")),
+			DSO_FILENAME (reference_name),
 			undef_map->l_ns,
-			value->m->l_name[0] ? value->m->l_name : rtld_progname,
+			DSO_FILENAME (value->m->l_name),
 			value->m->l_ns,
 			protected ? "protected" : "normal", undef_name);
       if (version)

Modified: trunk/libc/elf/dl-open.c
==============================================================================
--- trunk/libc/elf/dl-open.c (original)
+++ trunk/libc/elf/dl-open.c Tue Jun  4 15:48:26 2013
@@ -733,7 +733,7 @@
 _dl_show_scope (struct link_map *l, int from)
 {
   _dl_debug_printf ("object=%s [%lu]\n",
-		    *l->l_name ? l->l_name : rtld_progname, l->l_ns);
+		    DSO_FILENAME (l->l_name), l->l_ns);
   if (l->l_scope != NULL)
     for (int scope_cnt = from; l->l_scope[scope_cnt] != NULL; ++scope_cnt)
       {
@@ -744,7 +744,7 @@
 	    _dl_debug_printf_c (" %s",
 				l->l_scope[scope_cnt]->r_list[cnt]->l_name);
 	  else
-	    _dl_debug_printf_c (" %s", rtld_progname);
+	    _dl_debug_printf_c (" %s", RTLD_PROGNAME);
 
 	_dl_debug_printf_c ("\n");
       }

Modified: trunk/libc/elf/dl-reloc.c
==============================================================================
--- trunk/libc/elf/dl-reloc.c (original)
+++ trunk/libc/elf/dl-reloc.c Tue Jun  4 15:48:26 2013
@@ -185,8 +185,7 @@
 
   if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_RELOC, 0))
     _dl_debug_printf ("\nrelocation processing: %s%s\n",
-		      l->l_name[0] ? l->l_name : rtld_progname,
-		      lazy ? " (lazy)" : "");
+		      DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
 
   /* DT_TEXTREL is now in level 2 and might phase out at some time.
      But we rewrite the DT_FLAGS entry to a DT_TEXTREL entry to make
@@ -276,7 +275,7 @@
 	    errstring = N_("%s: no PLTREL found in object %s\n");
 	  fatal:
 	    _dl_fatal_printf (errstring,
-			      rtld_progname ?: "<program name unknown>",
+			      RTLD_PROGNAME,
 			      l->l_name);
 	  }
 

Modified: trunk/libc/elf/dl-version.c
==============================================================================
--- trunk/libc/elf/dl-version.c (original)
+++ trunk/libc/elf/dl-version.c Tue Jun  4 15:48:26 2013
@@ -85,7 +85,7 @@
   if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_VERSIONS, 0))
     _dl_debug_printf ("\
 checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
-		      string, map->l_name[0] ? map->l_name : rtld_progname,
+		      string, DSO_FILENAME (map->l_name),
 		      map->l_ns, name, ns);
 
   if (__builtin_expect (map->l_info[VERSYMIDX (DT_VERDEF)] == NULL, 0))
@@ -162,7 +162,7 @@
 			   name, ")");
   result = 1;
  call_cerror:
-  _dl_signal_cerror (0, map->l_name[0] ? map->l_name : rtld_progname,
+  _dl_signal_cerror (0, DSO_FILENAME (map->l_name),
 		     N_("version lookup error"), errstring);
   return result;
 }
@@ -210,7 +210,7 @@
 					  &buf[sizeof (buf) - 1], 10, 0),
 				   " of Verneed record\n");
 	call_error:
-	  _dl_signal_error (errval, *map->l_name ? map->l_name : rtld_progname,
+	  _dl_signal_error (errval, DSO_FILENAME (map->l_name),
 			    NULL, errstring);
 	}
 
@@ -234,8 +234,7 @@
 	      while (1)
 		{
 		  /* Match the symbol.  */
-		  result |= match_symbol ((*map->l_name
-					   ? map->l_name : rtld_progname),
+		  result |= match_symbol (DSO_FILENAME (map->l_name),
 					  map->l_ns, aux->vna_hash,
 					  strtab + aux->vna_name,
 					  needed->l_real, verbose,

Modified: trunk/libc/elf/ldconfig.c
==============================================================================
--- trunk/libc/elf/ldconfig.c (original)
+++ trunk/libc/elf/ldconfig.c Tue Jun  4 15:48:26 2013
@@ -174,17 +174,17 @@
 {
   int hwcap_idx = _dl_string_hwcap (name);
 
-  /* Is this a normal hwcap for the machine e.g. fpu?  */
+  /* Is this a normal hwcap for the machine like "fpu?"  */
   if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask))
     return 1;
 
-  /* ... Or is it a platform pseudo-hwcap e.g. i686?  */
+  /* Is this a platform pseudo-hwcap like "i686?"  */
   hwcap_idx = _dl_string_platform (name);
   if (hwcap_idx != -1)
     return 1;
 
-  /* ... Or is this one of the extra pseudo-hwcaps that we map beyond
-     _DL_FIRST_EXTRA e.g. tls, or nosegneg?  */
+  /* Is this one of the extra pseudo-hwcaps that we map beyond
+     _DL_FIRST_EXTRA like "tls", or "nosegneg?"  */
   for (hwcap_idx = _DL_FIRST_EXTRA; hwcap_idx < 64; ++hwcap_idx)
     if (hwcap_extra[hwcap_idx - _DL_FIRST_EXTRA] != NULL
 	&& !strcmp (name, hwcap_extra[hwcap_idx - _DL_FIRST_EXTRA]))
@@ -1270,8 +1270,10 @@
 	  add_dir (argv[i]);
     }
 
-  /* The last entry in hwcap_extra is reserved for the "tls"
-     pseudo-hwcap which indicates support for TLS.  */
+  /* The last entry in hwcap_extra is reserved for the "tls" pseudo-hwcap which
+     indicates support for TLS.  This pseudo-hwcap is only used by old versions
+     under which TLS support was optional.  The entry is no longer needed, but
+     must remain for compatibility.  */
   hwcap_extra[63 - _DL_FIRST_EXTRA] = "tls";
 
   set_hwcap ();

Modified: trunk/libc/elf/rtld.c
==============================================================================
--- trunk/libc/elf/rtld.c (original)
+++ trunk/libc/elf/rtld.c Tue Jun  4 15:48:26 2013
@@ -1841,10 +1841,8 @@
 	      if (_dl_name_match_p (GLRO(dl_trace_prelink), l))
 		GLRO(dl_trace_prelink_map) = l;
 	      _dl_printf ("\t%s => %s (0x%0*Zx, 0x%0*Zx)",
-			  l->l_libname->name[0] ? l->l_libname->name
-			  : rtld_progname ?: "<main program>",
-			  l->l_name[0] ? l->l_name
-			  : rtld_progname ?: "<main program>",
+			  DSO_FILENAME (l->l_libname->name),
+			  DSO_FILENAME (l->l_name),
 			  (int) sizeof l->l_map_start * 2,
 			  (size_t) l->l_map_start,
 			  (int) sizeof l->l_addr * 2,
@@ -2001,8 +1999,7 @@
 		      first = 0;
 		    }
 
-		  _dl_printf ("\t%s:\n",
-			      map->l_name[0] ? map->l_name : rtld_progname);
+		  _dl_printf ("\t%s:\n", DSO_FILENAME (map->l_name));
 
 		  while (1)
 		    {
@@ -2325,7 +2322,7 @@
 		  const char *errstring)
 {
   if (objname[0] == '\0')
-    objname = rtld_progname ?: "<main program>";
+    objname = RTLD_PROGNAME;
   _dl_error_printf ("%s	(%s)\n", errstring, objname);
 }
 
@@ -2335,7 +2332,7 @@
 print_missing_version (int errcode __attribute__ ((unused)),
 		       const char *objname, const char *errstring)
 {
-  _dl_error_printf ("%s: %s: %s\n", rtld_progname ?: "<program name unknown>",
+  _dl_error_printf ("%s: %s: %s\n", RTLD_PROGNAME,
 		    objname, errstring);
 }
 

Modified: trunk/libc/hesiod/Makefile
==============================================================================
--- trunk/libc/hesiod/Makefile (original)
+++ trunk/libc/hesiod/Makefile Tue Jun  4 15:48:26 2013
@@ -35,12 +35,7 @@
 
 include ../Rules
 
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-# The Hesiod NSS modules also needs the resolver and some help from
+# The Hesiod NSS module also needs the resolver and some help from
 # the file service.
 $(objpfx)libnss_hesiod.so: $(common-objpfx)resolv/libresolv.so \
-			   $(common-objpfx)nss/libnss_files.so \
-			   $(common-objpfx)libc.so \
-			   $(common-objpfx)libc_nonshared.a
+			   $(common-objpfx)nss/libnss_files.so

Modified: trunk/libc/iconvdata/extra-module.mk
==============================================================================
--- trunk/libc/iconvdata/extra-module.mk (original)
+++ trunk/libc/iconvdata/extra-module.mk Tue Jun  4 15:48:26 2013
@@ -4,15 +4,8 @@
 extra-objs := $(extra-objs) $(patsubst %,%.os,$($(mod)-routines))
 
 $(objpfx)$(mod).so: $(addprefix $(objpfx),$(addsuffix .os,$($(mod)-routines)))\
-		    $(shlib-lds)
+		    $(shlib-lds) $(link-libc-deps)
 	$(build-module-asneeded)
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)$(mod).so: $(common-objpfx)libc.so \
-	$(common-objpfx)/elf/ld.so \
-	$(common-objpfx)libc_nonshared.a
 
 ifneq (,$(extra-modules-left))
 include extra-module.mk

Modified: trunk/libc/intl/dcigettext.c
==============================================================================
--- trunk/libc/intl/dcigettext.c (original)
+++ trunk/libc/intl/dcigettext.c Tue Jun  4 15:48:26 2013
@@ -652,6 +652,11 @@
 		  retval = _nl_find_msg (domain->successor[cnt], binding,
 					 msgid1, 1, &retlen);
 
+		  /* Resource problems are not fatal, instead we return no
+		     translation.  */
+		  if (__builtin_expect (retval == (char *) -1, 0))
+		    goto no_translation;
+
 		  if (retval != NULL)
 		    {
 		      domain = domain->successor[cnt];
@@ -957,6 +962,11 @@
 	    nullentry =
 	      _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen);
 
+	    /* Resource problems are fatal.  If we continue onwards we will
+	       only attempt to calloc a new conv_tab and fail later.  */
+	    if (__builtin_expect (nullentry == (char *) -1, 0))
+	      return (char *) -1;
+
 	    if (nullentry != NULL)
 	      {
 		const char *charsetstr;
@@ -1186,10 +1196,14 @@
 		      freemem_size = INITIAL_BLOCK_SIZE;
 		      newmem = (transmem_block_t *) malloc (freemem_size);
 # ifdef _LIBC
-		      /* Add the block to the list of blocks we have to free
-			 at some point.  */
-		      newmem->next = transmem_list;
-		      transmem_list = newmem;
+		      if (newmem != NULL)
+			{
+			  /* Add the block to the list of blocks we have to free
+			     at some point.  */
+			  newmem->next = transmem_list;
+			  transmem_list = newmem;
+			}
+		      /* Fall through and return -1.  */
 # endif
 		    }
 		  if (__builtin_expect (newmem == NULL, 0))

Modified: trunk/libc/intl/loadmsgcat.c
==============================================================================
--- trunk/libc/intl/loadmsgcat.c (original)
+++ trunk/libc/intl/loadmsgcat.c Tue Jun  4 15:48:26 2013
@@ -1237,7 +1237,7 @@
     default:
       /* This is an invalid revision.  */
     invalid:
-      /* This is an invalid .mo file.  */
+      /* This is an invalid .mo file or we ran out of resources.  */
       free (domain->malloced);
 #ifdef HAVE_MMAP
       if (use_mmap)
@@ -1257,6 +1257,11 @@
 
   /* Get the header entry and look for a plural specification.  */
   nullentry = _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen);
+  if (__builtin_expect (nullentry == (char *) -1, 0))
+    {
+      __libc_rwlock_fini (domain->conversions_lock);
+      goto invalid;
+    }
   EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
 
  out:

Modified: trunk/libc/libidn/ChangeLog
==============================================================================
--- trunk/libc/libidn/ChangeLog (original)
+++ trunk/libc/libidn/ChangeLog Tue Jun  4 15:48:26 2013
@@ -1,3 +1,7 @@
+2013-05-31  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* Makefile ($(objpfx)libcidn.so): Remove dependencies on libc.
+
 2013-05-16  Ryan S. Arnold  <rsa@xxxxxxxxxxxxxxxxxx>
 
 	* idna.c: Add missing #include <stdint.h> due to uint64_t or uint32_t

Modified: trunk/libc/libidn/Makefile
==============================================================================
--- trunk/libc/libidn/Makefile (original)
+++ trunk/libc/libidn/Makefile Tue Jun  4 15:48:26 2013
@@ -34,5 +34,3 @@
 libcidn-inhibit-o = $(filter-out .os,$(object-suffixes))
 
 include $(..)Rules
-
-$(objpfx)libcidn.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a

Modified: trunk/libc/libio/genops.c
==============================================================================
--- trunk/libc/libio/genops.c (original)
+++ trunk/libc/libio/genops.c Tue Jun  4 15:48:26 2013
@@ -661,6 +661,10 @@
 
       fp->_wide_data->_wide_vtable = jmp;
     }
+  else
+    /* Cause predictable crash when a wide function is called on a byte
+       stream.  */
+    fp->_wide_data = (struct _IO_wide_data *) -1L;
 #endif
   fp->_freeres_list = NULL;
 }

Modified: trunk/libc/locale/Makefile
==============================================================================
--- trunk/libc/locale/Makefile (original)
+++ trunk/libc/locale/Makefile Tue Jun  4 15:48:26 2013
@@ -117,9 +117,3 @@
 				$(locale-modules) $(lib-modules))
 lib := locale-programs
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)libBrokenLocale.so: $(common-objpfx)libc.so \
-			     $(common-objpfx)libc_nonshared.a

Modified: trunk/libc/locale/programs/locarchive.c
==============================================================================
--- trunk/libc/locale/programs/locarchive.c (original)
+++ trunk/libc/locale/programs/locarchive.c Tue Jun  4 15:48:26 2013
@@ -111,7 +111,7 @@
   /* Create a temporary file in the correct directory.  */
   fd = mkstemp (fname);
   if (fd == -1)
-    error (EXIT_FAILURE, errno, _("cannot create temporary file"));
+    error (EXIT_FAILURE, errno, _("cannot create temporary file: %s"), fname);
 
   /* Create the initial content of the archive.  */
   head.magic = AR_MAGIC;
@@ -346,7 +346,7 @@
   /* Create a temporary file in the correct directory.  */
   fd = mkstemp (fname);
   if (fd == -1)
-    error (EXIT_FAILURE, errno, _("cannot create temporary file"));
+    error (EXIT_FAILURE, errno, _("cannot create temporary file: %s"), fname);
 
   /* Copy the existing head information.  */
   newhead = *head;

Modified: trunk/libc/login/Makefile
==============================================================================
--- trunk/libc/login/Makefile (original)
+++ trunk/libc/login/Makefile Tue Jun  4 15:48:26 2013
@@ -72,8 +72,3 @@
 $(inst_libexecdir)/pt_chown: $(objpfx)pt_chown $(+force)
 	$(make-target-directory)
 	-$(INSTALL_PROGRAM) -m 4755 -o root $< $@
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)libutil.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a

Modified: trunk/libc/malloc/Makefile
==============================================================================
--- trunk/libc/malloc/Makefile (original)
+++ trunk/libc/malloc/Makefile Tue Jun  4 15:48:26 2013
@@ -149,8 +149,7 @@
 
 
 # The implementation uses `dlsym'
-$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so $(elfobjdir)/ld.so \
-			$(common-objpfx)libc_nonshared.a
+$(objpfx)libmemusage.so: $(common-objpfx)dlfcn/libdl.so
 
 # Extra dependencies
 $(foreach o,$(all-object-suffixes),$(objpfx)malloc$(o)): arena.c hooks.c

Modified: trunk/libc/manual/arith.texi
==============================================================================
--- trunk/libc/manual/arith.texi (original)
+++ trunk/libc/manual/arith.texi Tue Jun  4 15:48:26 2013
@@ -1221,8 +1221,8 @@
 into a normalized fraction and an exponent.
 
 If the argument @var{value} is not zero, the return value is @var{value}
-times a power of two, and is always in the range 1/2 (inclusive) to 1
-(exclusive).  The corresponding exponent is stored in
+times a power of two, and its magnitude is always in the range 1/2
+(inclusive) to 1 (exclusive).  The corresponding exponent is stored in
 @code{*@var{exponent}}; the return value multiplied by 2 raised to this
 exponent equals the original number @var{value}.
 

Modified: trunk/libc/manual/errno.texi
==============================================================================
--- trunk/libc/manual/errno.texi (original)
+++ trunk/libc/manual/errno.texi Tue Jun  4 15:48:26 2013
@@ -739,13 +739,14 @@
 @end deftypevr
 
 @comment errno.h
-@comment BSD: Stale NFS file handle
+@comment BSD: Stale file handle
 @deftypevr Macro int ESTALE
 @comment errno 70 @c DO NOT REMOVE
-Stale NFS file handle.  This indicates an internal confusion in the NFS
-system which is due to file system rearrangements on the server host.
-Repairing this condition usually requires unmounting and remounting
-the NFS file system on the local host.
+Stale file handle.  This indicates an internal confusion in the
+file system which is due to file system rearrangements on the server host
+for NFS file systems or corruption in other file systems.
+Repairing this condition usually requires unmounting, possibly repairing
+and remounting the file system.
 @end deftypevr
 
 @comment errno.h

Modified: trunk/libc/manual/platform.texi
==============================================================================
--- trunk/libc/manual/platform.texi (original)
+++ trunk/libc/manual/platform.texi Tue Jun  4 15:48:26 2013
@@ -34,3 +34,48 @@
 It is also possible that this frequency is not constant.  More information is
 available in @cite{Power ISA 2.06b - Book II - Section 5.2}.
 @end deftypefun
+
+The following functions provide hints about the usage of resources that are
+shared with other processors.  They can be used, for example, if a program
+waiting on a lock intends to divert the shared resources to be used by other
+processors.  More information is available in @cite{Power ISA 2.06b - Book II -
+Section 3.2}.
+
+@deftypefun {void} __ppc_yield (void)
+Provide a hint that performance will probably be improved if shared resources
+dedicated to the executing processor are released for use by other processors.
+@end deftypefun
+
+@deftypefun {void} __ppc_mdoio (void)
+Provide a hint that performance will probably be improved if shared resources
+dedicated to the executing processor are released until all outstanding storage
+accesses to caching-inhibited storage have been completed.
+@end deftypefun
+
+@deftypefun {void} __ppc_mdoom (void)
+Provide a hint that performance will probably be improved if shared resources
+dedicated to the executing processor are released until all outstanding storage
+accesses to cacheable storage for which the data is not in the cache have been
+completed.
+@end deftypefun
+
+@deftypefun {void} __ppc_set_ppr_med (void)
+Set the Program Priority Register to medium value (default).
+
+The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
+the program's priority.  By adjusting the PPR value the programmer may
+improve system throughput by causing the system resources to be used
+more efficiently, especially in contention situations.
+The three unprivileged states available are covered by the functions
+@code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
+and @code{__ppc_set_ppc_med_low} (medium low).  More information
+available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
+@end deftypefun
+
+@deftypefun {void} __ppc_set_ppr_low (void)
+Set the Program Priority Register to low value.
+@end deftypefun
+
+@deftypefun {void} __ppc_set_ppr_med_low (void)
+Set the Program Priority Register to medium low value.
+@end deftypefun

Modified: trunk/libc/math/Makefile
==============================================================================
--- trunk/libc/math/Makefile (original)
+++ trunk/libc/math/Makefile Tue Jun  4 15:48:26 2013
@@ -231,8 +231,3 @@
 $(objpfx)atest-exp: $(gmp-objs)
 $(objpfx)atest-sincos: $(gmp-objs)
 $(objpfx)atest-exp2: $(gmp-objs)
-
-# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
-# This ensures they will load libc.so for needed symbols if loaded by
-# a statically-linked program that hasn't already loaded it.
-$(objpfx)libm.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a

Modified: trunk/libc/math/README.libm-test
==============================================================================
--- trunk/libc/math/README.libm-test (original)
+++ trunk/libc/math/README.libm-test Tue Jun  4 15:48:26 2013
@@ -103,8 +103,3 @@
 - "L" for long long int.
 - "F" for the address of a FLOAT (only as input parameter)
 - "I" for the address of an int (only as input parameter)
-
-Some functions need special handling.  For example gamma sets the
-global variable signgam and frexp takes an argument to &int.  This
-special treatment is coded in "gen-libm-test.pl" and used while
-parsing "libm-test.inc".

Modified: trunk/libc/math/complex.h
==============================================================================
--- trunk/libc/math/complex.h (original)
+++ trunk/libc/math/complex.h Tue Jun  4 15:48:26 2013
@@ -52,9 +52,7 @@
 /* Macros to expand into expression of specified complex type.  */
 # define CMPLX(x, y) __builtin_complex ((double) (x), (double) (y))
 # define CMPLXF(x, y) __builtin_complex ((float) (x), (float) (y))
-# ifndef __NO_LONG_DOUBLE_MATH
-#  define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
-# endif
+# define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
 #endif
 
 /* The file <bits/cmathcalls.h> contains the prototypes for all the

Modified: trunk/libc/math/gen-libm-test.pl
==============================================================================
--- trunk/libc/math/gen-libm-test.pl (original)
+++ trunk/libc/math/gen-libm-test.pl Tue Jun  4 15:48:26 2013
@@ -41,8 +41,6 @@
 
 use vars qw ($input $output);
 use vars qw (%results);
-use vars qw (@tests @functions);
-use vars qw ($count);
 use vars qw (%beautify @all_floats);
 use vars qw ($output_dir $ulps_file);
 
@@ -103,8 +101,6 @@
 $input = "libm-test.inc";
 $output = "${output_dir}libm-test.c";
 
-$count = 0;
-
 &parse_ulps ($ulps_file);
 &generate_testfile ($input, $output) unless ($opt_n);
 &output_ulps ("${output_dir}libm-test-ulps.h", $ulps_file) unless ($opt_n);
@@ -148,133 +144,68 @@
   return $str1;
 }
 
-# Return name of a variable
-sub get_variable {
-  my ($number) = @_;
-
-  return "x" if ($number == 1);
-  return "y" if ($number == 2);
-  return "z" if ($number == 3);
-  # return x1,x2,...
-  $number =-3;
-  return "x$number";
-}
-
-# Add a new test to internal data structures and fill in the
-# ulps and exception information for the C line.
-sub new_test {
-  my ($test, $exception, $show_exception) = @_;
-  my $rest;
-
-  # Add ulp.
-  if (exists $results{$test}{'has_ulps'}) {
-    $rest = ", DELTA$count";
+# Return the text to put in an initializer for a test's exception
+# information.
+sub show_exceptions {
+  my ($exception) = @_;
+  if (defined $exception) {
+    return ", $exception";
   } else {
-    $rest = ', 0';
-  }
-  if ($show_exception) {
-    if (defined $exception) {
-      $rest .= ", $exception";
-    } else {
-      $rest .= ', 0';
-    }
-  }
-  # We must increment here to keep @tests and count in sync
-  push @tests, $test;
-  ++$count;
-  return $rest;
-}
-
-# Treat some functions especially.
-# Currently only sincos needs extra treatment.
-sub special_functions {
-  my ($file, $args) = @_;
-  my (@args, $str, $test, $cline);
-
-  @args = split /,\s*/, $args;
-
-  unless ($args[0] =~ /sincos/) {
-    die ("Don't know how to handle $args[0] extra.");
-  }
-  $cline = "    { $args[1]";
-
-  $str = 'sincos (' . &beautify ($args[1]) . ', &sin_res, &cos_res)';
-  # handle sin
-  $test = $str . ' puts ' . &beautify ($args[2]) . ' in sin_res';
-
-  $cline .= ", \"$test\", $args[2]";
-  $cline .= &new_test ($test, $args[4], 0);
-
-  # handle cos
-  $test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res';
-  $cline .= ", \"$test\", $args[3]";
-  $cline .= &new_test ($test, $args[4], 1);
-  $cline .= " },\n";
-  print $file $cline;
+    return ', 0';
+  }
 }
 
 # Parse the arguments to TEST_x_y
 sub parse_args {
-  my ($file, $descr, $fct, $args) = @_;
-  my (@args, $str, $descr_args, $descr_res, @descr);
+  my ($file, $descr, $args) = @_;
+  my (@args, $descr_args, $descr_res, @descr);
   my ($current_arg, $cline, $i);
   my (@special);
-  my ($extra_var, $call);
-
-  if ($descr eq 'extra') {
-    &special_functions ($file, $args);
-    return;
-  }
+  my ($call_args);
+
   ($descr_args, $descr_res) = split /_/,$descr, 2;
 
   @args = split /,\s*/, $args;
 
-  $call = "$fct (";
+  $call_args = "";
 
   # Generate first the string that's shown to the user
   $current_arg = 1;
-  $extra_var = 0;
   @descr = split //,$descr_args;
   for ($i = 0; $i <= $#descr; $i++) {
-    if ($i >= 1) {
-      $call .= ', ';
+    my $comma = "";
+    if ($current_arg > 1) {
+      $comma = ', ';
     }
     # FLOAT, int, long int, long long int
     if ($descr[$i] =~ /f|i|l|L/) {
-      $call .= &beautify ($args[$current_arg]);
+      $call_args .= $comma . &beautify ($args[$current_arg]);
       ++$current_arg;
       next;
     }
-    # &FLOAT, &int - argument is added here
+    # &FLOAT, &int - simplify call by not showing argument.
     if ($descr[$i] =~ /F|I/) {
-      ++$extra_var;
-      $call .= '&' . &get_variable ($extra_var);
       next;
     }
     # complex
     if ($descr[$i] eq 'c') {
-      $call .= &build_complex_beautify ($args[$current_arg], $args[$current_arg+1]);
+      $call_args .= $comma . &build_complex_beautify ($args[$current_arg], $args[$current_arg+1]);
       $current_arg += 2;
       next;
     }
 
     die ("$descr[$i] is unknown");
   }
-  $call .= ')';
-  $str = "$call == ";
 
   # Result
   @descr = split //,$descr_res;
   foreach (@descr) {
     if ($_ =~ /f|i|l|L/) {
-      $str .= &beautify ($args[$current_arg]);
       ++$current_arg;
     } elsif ($_ eq 'c') {
-      $str .= &build_complex_beautify ($args[$current_arg], $args[$current_arg+1]);
       $current_arg += 2;
     } elsif ($_ eq 'b') {
       # boolean
-      $str .= ($args[$current_arg] == 0) ? "false" : "true";
       ++$current_arg;
     } elsif ($_ eq '1') {
       ++$current_arg;
@@ -296,8 +227,7 @@
   # Put the C program line together
   # Reset some variables to start again
   $current_arg = 1;
-  $extra_var = 0;
-  $cline = "{ \"$str\"";
+  $cline = "{ \"$call_args\"";
   @descr = split //,$descr_args;
   for ($i=0; $i <= $#descr; $i++) {
     # FLOAT, int, long int, long long int
@@ -317,89 +247,35 @@
       next;
     }
   }
-  $cline .= ", ";
 
   @descr = split //,$descr_res;
   foreach (@descr) {
     if ($_ =~ /b|f|i|l|L/ ) {
-      $cline .= $args[$current_arg];
+      $cline .= ", $args[$current_arg]";
       $current_arg++;
     } elsif ($_ eq 'c') {
-      $cline .= "$args[$current_arg], $args[$current_arg+1]";
+      $cline .= ", $args[$current_arg], $args[$current_arg+1]";
       $current_arg += 2;
     } elsif ($_ eq '1') {
       push @special, $args[$current_arg];
       ++$current_arg;
     }
   }
-  # Add ulp.
-  $cline .= &new_test ($str, ($current_arg <= $#args) ? $args[$current_arg] : undef, 1);
+  # Add exceptions.
+  $cline .= show_exceptions (($current_arg <= $#args)
+			     ? $args[$current_arg]
+			     : undef);
 
   # special treatment for some functions
-  if ($args[0] eq 'frexp') {
-    if (defined $special[0]) {
-      my ($extra_expected) = $special[0];
-      my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
-      my ($str) = "$call sets x to $extra_expected";
-      if (!$run_extra) {
-	$str = "";
-	$extra_expected = "0";
-      }
-      $cline .= ", \"$str\", $run_extra, $extra_expected";
-      if ($run_extra) {
-	$cline .= &new_test ($str, undef, 0);
-      } else {
-	$cline .= ", 0";
-      }
-    }
-  } elsif ($args[0] eq 'gamma' || $args[0] eq 'lgamma') {
-    if (defined $special[0]) {
-      my ($extra_expected) = $special[0];
-      my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
-      my ($str) = "$call sets signgam to $extra_expected";
-      if (!$run_extra) {
-	$str = "";
-	$extra_expected = "0";
-      }
-      $cline .= ", \"$str\", $run_extra, $extra_expected";
-      if ($run_extra) {
-	$cline .= &new_test ($str, undef, 0);
-      } else {
-	$cline .= ", 0";
-      }
-    }
-  } elsif ($args[0] eq 'modf') {
-    if (defined $special[0]) {
-      my ($extra_expected) = $special[0];
-      my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
-      my ($str) = "$call sets x to $extra_expected";
-      if (!$run_extra) {
-	$str = "";
-	$extra_expected = "0";
-      }
-      $cline .= ", \"$str\", $run_extra, $extra_expected";
-      if ($run_extra) {
-	$cline .= &new_test ($str, undef, 0);
-      } else {
-	$cline .= ", 0";
-      }
-    }
-  } elsif ($args[0] eq 'remquo') {
-    if (defined $special[0]) {
-      my ($extra_expected) = $special[0];
-      my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
-      my ($str) = "$call sets x to $extra_expected";
-      if (!$run_extra) {
-	$str = "";
-	$extra_expected = "0";
-      }
-      $cline .= ", \"$str\", $run_extra, $extra_expected";
-      if ($run_extra) {
-	$cline .= &new_test ($str, undef, 0);
-      } else {
-	$cline .= ", 0";
-      }
-    }
+  $i = 0;
+  foreach (@special) {
+    ++$i;
+    my ($extra_expected) = $_;
+    my ($run_extra) = ($extra_expected ne "IGNORE" ? 1 : 0);
+    if (!$run_extra) {
+      $extra_expected = "0";
+    }
+    $cline .= ", $run_extra, $extra_expected";
   }
   print $file "    $cline },\n";
 }
@@ -408,7 +284,7 @@
 sub generate_testfile {
   my ($input, $output) = @_;
   my ($lasttext);
-  my (@args, $i, $str, $thisfct);
+  my (@args, $i);
 
   open INPUT, $input or die ("Can't open $input: $!");
   open OUTPUT, ">$output" or die ("Can't open $output: $!");
@@ -421,47 +297,7 @@
       my ($descr, $args);
       chop;
       ($descr, $args) = ($_ =~ /TEST_(\w+)\s*\((.*)\)/);
-      &parse_args (\*OUTPUT, $descr, $thisfct, $args);
-      next;
-    }
-    # START_DATA (function)
-    if (/START_DATA/) {
-      ($thisfct) = ($_ =~ /START_DATA\s*\((.*)\)/);
-      next;
-    }
-    # START (function)
-    if (/START/) {
-      ($thisfct) = ($_ =~ /START\s*\((.*)\)/);
-      print OUTPUT "  init_max_error ();\n";
-      next;
-    }
-    # END_DATA (function)
-    if (/END_DATA/) {
-      next;
-    }
-    # END (function)
-    if (/END/) {
-      my ($fct, $line, $type);
-      if (/complex/) {
-	s/,\s*complex\s*//;
-	$type = 'complex';
-      } else {
-	$type = 'normal';
-      }
-      ($fct) = ($_ =~ /END\s*\((.*)\)/);
-      if ($type eq 'complex') {
-	$line = "  print_complex_max_error (\"$fct\", ";
-      } else {
-	$line = "  print_max_error (\"$fct\", ";
-      }
-      if (exists $results{$fct}{'has_ulps'}) {
-	$line .= "DELTA$fct";
-      } else {
-	$line .= '0';
-      }
-      $line .= ");\n";
-      print OUTPUT $line;
-      push @functions, $fct;
+      &parse_args (\*OUTPUT, $descr, $args);
       next;
     }
     print OUTPUT;
@@ -620,37 +456,15 @@
 sub get_ulps {
   my ($test, $type, $float) = @_;
 
-  if ($type eq 'complex') {
-    my ($res);
-    # Return 0 instead of BUILD_COMPLEX_ULP (0,0)
-    if (!exists $results{$test}{'real'}{'ulp'}{$float} &&
-	!exists $results{$test}{'imag'}{'ulp'}{$float}) {
-      return "0";
-    }
-    $res = 'BUILD_COMPLEX_ULP (';
-    $res .= (exists $results{$test}{'real'}{'ulp'}{$float}
-	     ? $results{$test}{'real'}{'ulp'}{$float} : "0");
-    $res .= ', ';
-    $res .= (exists $results{$test}{'imag'}{'ulp'}{$float}
-	     ? $results{$test}{'imag'}{'ulp'}{$float} : "0");
-    $res .= ')';
-    return $res;
-  }
-  return (exists $results{$test}{'normal'}{'ulp'}{$float}
-	  ? $results{$test}{'normal'}{'ulp'}{$float} : "0");
-}
-
-# Output the defines for a single test
-sub output_test {
-  my ($file, $test, $name) = @_;
+  return (exists $results{$test}{$type}{'ulp'}{$float}
+	  ? $results{$test}{$type}{'ulp'}{$float} : "0");
+}
+
+# Return the ulps value for a single test.
+sub get_all_ulps_for_test {
+  my ($test, $type) = @_;
   my ($ldouble, $double, $float, $ildouble, $idouble, $ifloat);
-  my ($type);
-
-  # Do we have ulps?
-  if (!exists $results{$test}{'type'}) {
-    return;
-  }
-  $type = $results{$test}{'type'};
+
   if (exists $results{$test}{'has_ulps'}) {
     # XXX use all_floats (change order!)
     $ldouble = &get_ulps ($test, $type, "ldouble");
@@ -659,14 +473,17 @@
     $ildouble = &get_ulps ($test, $type, "ildouble");
     $idouble = &get_ulps ($test, $type, "idouble");
     $ifloat = &get_ulps ($test, $type, "ifloat");
-    print $file "#define DELTA$name CHOOSE($ldouble, $double, $float, $ildouble, $idouble, $ifloat)\t/* $test  */\n";
+    return "CHOOSE ($ldouble, $double, $float, $ildouble, $idouble, $ifloat)";
+  } else {
+    die "get_all_ulps_for_test called for \"$test\" with no ulps\n";
   }
 }
 
 # Print include file
 sub output_ulps {
   my ($file, $ulps_filename) = @_;
-  my ($i, $fct);
+  my ($i, $fct, $type, $ulp, $ulp_real, $ulp_imag);
+  my (%test_ulps, %func_ulps, %func_real_ulps, %func_imag_ulps);
 
   open ULP, ">$file" or die ("Can't open $file: $!");
 
@@ -674,14 +491,56 @@
   print ULP "   from $ulps_filename with gen-libm-test.pl.\n";
   print ULP "   Don't change it - change instead the master files.  */\n\n";
 
+  foreach $fct (keys %results) {
+    $type = $results{$fct}{'type'};
+    if ($type eq 'normal') {
+      $ulp = get_all_ulps_for_test ($fct, 'normal');
+    } elsif ($type eq 'complex') {
+      $ulp_real = get_all_ulps_for_test ($fct, 'real');
+      $ulp_imag = get_all_ulps_for_test ($fct, 'imag');
+    } else {
+      die "unknown results ($fct) type $type\n";
+    }
+    if ($results{$fct}{'kind'} eq 'fct') {
+      if ($type eq 'normal') {
+	$func_ulps{$fct} = $ulp;
+      } else {
+	$func_real_ulps{$fct} = $ulp_real;
+	$func_imag_ulps{$fct} = $ulp_imag;
+      }
+    } elsif ($results{$fct}{'kind'} eq 'test') {
+      if ($type eq 'normal') {
+	$test_ulps{$fct} = $ulp;
+      } else {
+	$test_ulps{"Real part of: $fct"} = $ulp_real;
+	$test_ulps{"Imaginary part of: $fct"} = $ulp_imag;
+      }
+    } else {
+      die "unknown results ($fct) kind $results{$fct}{'kind'}\n";
+    }
+  }
   print ULP "\n/* Maximal error of functions.  */\n";
-  foreach $fct (@functions) {
-    output_test (\*ULP, $fct, $fct);
-  }
+  print ULP "static const struct ulp_data func_ulps[] =\n  {\n";
+  foreach $fct (sort keys %func_ulps) {
+    print ULP "    { \"$fct\", $func_ulps{$fct} },\n";
+  }
+  print ULP "  };\n";
+  print ULP "static const struct ulp_data func_real_ulps[] =\n  {\n";
+  foreach $fct (sort keys %func_real_ulps) {
+    print ULP "    { \"$fct\", $func_real_ulps{$fct} },\n";
+  }
+  print ULP "  };\n";
+  print ULP "static const struct ulp_data func_imag_ulps[] =\n  {\n";
+  foreach $fct (sort keys %func_imag_ulps) {
+    print ULP "    { \"$fct\", $func_imag_ulps{$fct} },\n";
+  }
+  print ULP "  };\n";
 
   print ULP "\n/* Error of single function calls.  */\n";
-  for ($i = 0; $i < $count; $i++) {
-    output_test (\*ULP, $tests[$i], $i);
-  }
+  print ULP "static const struct ulp_data test_ulps[] =\n  {\n";
+  foreach $fct (sort keys %test_ulps) {
+    print ULP "    { \"$fct\", $test_ulps{$fct} },\n";
+  }
+  print ULP "  };\n";
   close ULP;
 }

Modified: trunk/libc/math/libm-test.inc
==============================================================================
--- trunk/libc/math/libm-test.inc (original)
+++ trunk/libc/math/libm-test.inc Tue Jun  4 15:48:26 2013
@@ -39,7 +39,7 @@
 
 /* This testsuite has currently tests for:
    acos, acosh, asin, asinh, atan, atan2, atanh,
-   cbrt, ceil, copysign, cos, cosh, erf, erfc, exp, exp10, exp2, expm1,
+   cbrt, ceil, copysign, cos, cosh, drem, erf, erfc, exp, exp10, exp2, expm1,
    fabs, fdim, finite, floor, fma, fmax, fmin, fmod, fpclassify,
    frexp, gamma, hypot,
    ilogb, isfinite, isinf, isnan, isnormal, issignaling,
@@ -47,7 +47,7 @@
    j0, j1, jn,
    ldexp, lgamma, log, log10, log1p, log2, logb,
    modf, nearbyint, nextafter, nexttoward,
-   pow, remainder, remquo, rint, lrint, llrint,
+   pow, pow10, remainder, remquo, rint, lrint, llrint,
    round, lround, llround,
    scalb, scalbn, scalbln, signbit, sin, sincos, sinh, sqrt, tan, tanh, tgamma, trunc,
    y0, y1, yn, significand
@@ -58,10 +58,8 @@
    csin, csinh, csqrt, ctan, ctanh.
 
    At the moment the following functions and macros aren't tested:
-   drem (alias for remainder),
    lgamma_r,
-   nan,
-   pow10 (alias for exp10).
+   nan.
 
    Parameter handling is primitive in the moment:
    --verbose=[0..3] for different levels of output:
@@ -115,7 +113,6 @@
 # define _GNU_SOURCE
 #endif
 
-#include "libm-test-ulps.h"
 #include <complex.h>
 #include <math.h>
 #include <float.h>
@@ -128,6 +125,18 @@
 #include <string.h>
 #include <argp.h>
 #include <tininess.h>
+
+/* Structure for ulp data for a test, a function, or the real or
+   imaginary part of a function.  */
+struct ulp_data
+{
+  const char *name;
+  FLOAT max_ulp;
+};
+
+/* This header defines test_ulps, func_ulps, func_real_ulps and
+   func_imag_ulps arrays.  */
+#include "libm-test-ulps.h"
 
 /* Allow platforms without all rounding modes to test properly,
    assuming they provide an __FE_UNDEFINED in <bits/fenv.h> which
@@ -257,10 +266,69 @@
      __real__ __retval = (real);					      \
      __imag__ __retval = (imag);					      \
      __retval; })
-#define BUILD_COMPLEX_ULP(real, imag) ((real) + I * (imag))
 
 #define MANT_DIG CHOOSE ((LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1),  \
 			 (LDBL_MANT_DIG-1), (DBL_MANT_DIG-1), (FLT_MANT_DIG-1))
+#define MIN_EXP CHOOSE ((LDBL_MIN_EXP-1), (DBL_MIN_EXP-1), (FLT_MIN_EXP-1),	\
+			(LDBL_MIN_EXP-1), (DBL_MIN_EXP-1), (FLT_MIN_EXP-1))
+
+/* Compare KEY (a string, with the name of a test or a function) with
+   ULP (a pointer to a struct ulp_data structure), returning a value
+   less than, equal to or greater than zero for use in bsearch.  */
+
+static int
+compare_ulp_data (const void *key, const void *ulp)
+{
+  const char *keystr = key;
+  const struct ulp_data *ulpdat = ulp;
+  return strcmp (keystr, ulpdat->name);
+}
+
+/* Return the ulps for NAME in array DATA with NMEMB elements, or 0 if
+   no ulps listed.  */
+
+static FLOAT
+find_ulps (const char *name, const struct ulp_data *data, size_t nmemb)
+{
+  const struct ulp_data *entry = bsearch (name, data, nmemb, sizeof (*data),
+					  compare_ulp_data);
+  if (entry == NULL)
+    return 0;
+  else
+    return entry->max_ulp;
+}
+
+/* Return the ulps for test NAME.  */
+
+static FLOAT
+find_test_ulps (const char *name)
+{
+  return find_ulps (name, test_ulps,
+		    sizeof (test_ulps) / sizeof (test_ulps[0]));
+}
+
+/* Return the ulps for real function NAME.  */
+
+static FLOAT
+find_function_ulps (const char *name)
+{
+  return find_ulps (name, func_ulps,
+		    sizeof (func_ulps) / sizeof (func_ulps[0]));
+}
+
+/* Return the ulps for complex function NAME.  */
+
+static __complex__ FLOAT
+find_complex_function_ulps (const char *name)
+{
+  FLOAT ulp_real = find_ulps (name, func_real_ulps,
+			      (sizeof (func_real_ulps)
+			       / sizeof (func_real_ulps[0])));
+  FLOAT ulp_imag = find_ulps (name, func_imag_ulps,
+			      (sizeof (func_imag_ulps)
+			       / sizeof (func_imag_ulps[0])));
+  return BUILD_COMPLEX (ulp_real, ulp_imag);
+}
 
 static void
 init_max_error (void)
@@ -407,8 +475,9 @@
 
 
 static void
-print_max_error (const char *func_name, FLOAT allowed)
-{
+print_max_error (const char *func_name)
+{
+  FLOAT allowed = find_function_ulps (func_name);
   int ok = 0;
 
   if (max_error == 0.0 || (max_error <= allowed && !ignore_max_ulp))
@@ -432,8 +501,9 @@
 
 
 static void
-print_complex_max_error (const char *func_name, __complex__ FLOAT allowed)
-{
+print_complex_max_error (const char *func_name)
+{
+  __complex__ FLOAT allowed = find_complex_function_ulps (func_name);
   int ok = 0;
 
   if ((real_max_error == 0 && imag_max_error == 0)
@@ -587,19 +657,58 @@

[... 137271 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits