summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-11-01 01:47:02 +0100
committerThomas Schwinge <thomas@codesourcery.com>2012-11-01 01:47:02 +0100
commit54ba70f8e505eb8cd7e2fa7c1daf76bf0fcc7663 (patch)
tree5a09827c7a9a2ae4b66afe7fed08b963e8dd03a3
parentf1501f42ac1e796434a05e327d513c995ba0f3d0 (diff)
parent343dc156c34702751b3cc63736caa0649c59421a (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
-rw-r--r--ChangeLog3401
-rw-r--r--INSTALL19
-rw-r--r--Makeconfig175
-rw-r--r--Makefile4
-rw-r--r--Makefile.in2
-rw-r--r--Makerules6
-rw-r--r--NEWS44
-rw-r--r--README25
-rw-r--r--Rules12
-rw-r--r--WUR-REPORT11
-rw-r--r--aclocal.m48
-rw-r--r--argp/argp-help.c1
-rw-r--r--bits/dirent.h36
-rw-r--r--bits/fcntl.h77
-rw-r--r--bits/libc-lock.h8
-rw-r--r--bits/param.h33
-rw-r--r--bits/signum.h69
-rw-r--r--bits/stat.h9
-rw-r--r--bits/types.h1
-rw-r--r--bits/typesizes.h11
-rw-r--r--catgets/Makefile6
-rwxr-xr-xcatgets/test-gencat.sh5
-rw-r--r--config.h.in16
-rw-r--r--config.make.in5
-rwxr-xr-xconfigure380
-rw-r--r--configure.in121
-rw-r--r--crypt/Makefile7
-rw-r--r--crypt/badsalttest.c86
-rw-r--r--crypt/crypt-entry.c31
-rw-r--r--crypt/crypt-private.h3
-rw-r--r--crypt/crypt_util.c42
-rw-r--r--crypt/md5.c9
-rw-r--r--crypt/md5c-test.c5
-rw-r--r--crypt/md5test-giant.c137
-rw-r--r--crypt/sha512.c9
-rw-r--r--csu/elf-init.c45
-rw-r--r--csu/init-first.c89
-rw-r--r--csu/libc-start.c39
-rw-r--r--csu/libc-tls.c20
-rw-r--r--debug/Makefile69
-rw-r--r--debug/test-stpcpy_chk-ifunc.c20
-rw-r--r--debug/test-stpcpy_chk.c3
-rw-r--r--debug/test-strcpy_chk-ifunc.c20
-rw-r--r--debug/test-strcpy_chk.c3
-rw-r--r--dirent/alphasort.c14
-rw-r--r--dirent/alphasort64.c7
-rw-r--r--dirent/opendir.c3
-rw-r--r--dirent/scandir.c15
-rw-r--r--dirent/scandir64.c7
-rw-r--r--dirent/scandirat.c15
-rw-r--r--dirent/scandirat64.c7
-rw-r--r--dirent/versionsort.c14
-rw-r--r--dirent/versionsort64.c7
-rw-r--r--dlfcn/dlerror.c11
-rw-r--r--elf/Makefile95
-rw-r--r--elf/chroot_canon.c7
-rw-r--r--elf/dl-close.c6
-rw-r--r--elf/dl-hwcaps.c279
-rw-r--r--elf/dl-iteratephdr.c4
-rw-r--r--elf/dl-load.c36
-rw-r--r--elf/dl-lookup.c3
-rw-r--r--elf/dl-open.c9
-rw-r--r--elf/dl-runtime.c4
-rw-r--r--elf/dl-support.c26
-rw-r--r--elf/dl-sym.c3
-rw-r--r--elf/dl-sysdep.c261
-rw-r--r--elf/dl-tls.c7
-rw-r--r--elf/dl-version.c5
-rw-r--r--elf/do-rel.h8
-rw-r--r--elf/dynamic-link.h149
-rw-r--r--elf/elf.h31
-rw-r--r--elf/get-dynamic-info.h161
-rw-r--r--elf/rtld.c112
-rw-r--r--elf/setup-vdso.h121
-rw-r--r--elf/tst-array1.c4
-rw-r--r--elf/tst-array2dep.c4
-rw-r--r--elf/tst-leaks1-static.c1
-rwxr-xr-xelf/tst-pathopt.sh8
-rwxr-xr-x[-rw-r--r--]elf/tst-rtld-load-self.sh (renamed from intl/tst-codeset.sh)45
-rw-r--r--elf/tst-unique1mod1.c5
-rw-r--r--elf/tst-unique1mod2.c5
-rw-r--r--elf/tst-unique2mod1.c5
-rw-r--r--elf/tst-unique2mod2.c5
-rw-r--r--grp/Makefile18
-rw-r--r--grp/initgroups.c4
-rw-r--r--grp/tst_fgetgrent.sh17
-rw-r--r--gshadow/Makefile6
-rw-r--r--gshadow/getsgent.c5
-rw-r--r--gshadow/getsgent_r.c5
-rw-r--r--gshadow/getsgnam.c5
-rw-r--r--gshadow/getsgnam_r.c5
-rw-r--r--hurd/lookup-retry.c5
-rw-r--r--iconv/Makefile2
-rw-r--r--iconv/gconv_db.c12
-rw-r--r--iconv/iconv_charmap.c4
-rw-r--r--iconvdata/Makefile9
-rwxr-xr-xiconvdata/run-iconv-test.sh19
-rwxr-xr-xiconvdata/tst-table.sh13
-rwxr-xr-xiconvdata/tst-tables.sh6
-rw-r--r--include/atomic.h18
-rw-r--r--include/dirent.h4
-rw-r--r--include/ifunc-impl-list.h56
-rw-r--r--include/libc-symbols.h53
-rw-r--r--include/rounding-mode.h65
-rw-r--r--include/string.h1
-rw-r--r--include/sys/mman.h5
-rw-r--r--include/sys/param.h1
-rw-r--r--include/sys/socket.h6
-rw-r--r--include/time.h6
-rw-r--r--include/unistd.h11
-rw-r--r--inet/Makefile8
-rw-r--r--inet/getaliasent.c5
-rw-r--r--inet/getaliasent_r.c5
-rw-r--r--inet/getaliasname.c5
-rw-r--r--inet/getaliasname_r.c5
-rw-r--r--inet/getnetbyad.c5
-rw-r--r--inet/getnetbyad_r.c5
-rw-r--r--inet/getnetbynm.c5
-rw-r--r--inet/getnetbynm_r.c5
-rw-r--r--inet/getnetent.c5
-rw-r--r--inet/getnetent_r.c5
-rw-r--r--inet/getnetgrent_r.c84
-rw-r--r--inet/getproto.c5
-rw-r--r--inet/getproto_r.c5
-rw-r--r--inet/getprtent.c5
-rw-r--r--inet/getprtent_r.c5
-rw-r--r--inet/getprtname.c5
-rw-r--r--inet/getprtname_r.c5
-rw-r--r--inet/getrpcbyname.c5
-rw-r--r--inet/getrpcbyname_r.c5
-rw-r--r--inet/getrpcbynumber.c5
-rw-r--r--inet/getrpcbynumber_r.c5
-rw-r--r--inet/getrpcent.c5
-rw-r--r--inet/getrpcent_r.c5
-rw-r--r--inet/netgroup.h14
-rw-r--r--inet/netinet/in.h2
-rw-r--r--intl/Makefile43
-rw-r--r--intl/loadmsgcat.c7
-rwxr-xr-xintl/tst-gettext.sh12
-rw-r--r--intl/tst-gettext2.sh10
-rw-r--r--intl/tst-gettext3.sh43
-rwxr-xr-xintl/tst-gettext4.sh5
-rwxr-xr-xintl/tst-gettext5.sh42
-rw-r--r--intl/tst-gettext6.sh5
-rwxr-xr-xintl/tst-translit.sh10
-rw-r--r--io/Makefile9
-rw-r--r--io/fchmodat.c3
-rw-r--r--io/fcntl.h56
-rw-r--r--io/ftw.c8
-rw-r--r--io/ftwtest-sh47
-rw-r--r--io/lockf.c16
-rw-r--r--io/lockf64.c7
-rw-r--r--io/lseek.c (renamed from misc/lseek.c)0
-rw-r--r--io/open.c13
-rw-r--r--io/openat.c9
-rw-r--r--io/tst-mknodat.c28
-rw-r--r--io/xmknod.c8
-rw-r--r--libidn/ChangeLog6
-rw-r--r--libidn/configure14
-rw-r--r--libidn/configure.in9
-rw-r--r--libio/Makefile33
-rw-r--r--libio/filedoalloc.c2
-rw-r--r--libio/fileops.c86
-rw-r--r--libio/freopen64.c5
-rw-r--r--libio/fseeko.c6
-rw-r--r--libio/fseeko64.c12
-rw-r--r--libio/ftello.c7
-rw-r--r--libio/ftello64.c11
-rw-r--r--libio/genops.c8
-rw-r--r--libio/iofgetpos.c20
-rw-r--r--libio/iofgetpos64.c11
-rw-r--r--libio/iofopen.c6
-rw-r--r--libio/iofopen64.c11
-rw-r--r--libio/iofsetpos.c20
-rw-r--r--libio/iofsetpos64.c12
-rw-r--r--libio/iogetdelim.c3
-rw-r--r--libio/iogetline.c4
-rw-r--r--libio/iogetwline.c4
-rw-r--r--libio/iopopen.c11
-rw-r--r--libio/libio.h33
-rw-r--r--libio/libioP.h84
-rw-r--r--libio/oldfileops.c8
-rw-r--r--libio/oldiofgetpos64.c8
-rw-r--r--libio/oldiofsetpos64.c8
-rw-r--r--libio/oldiopopen.c11
-rwxr-xr-xlibio/test-freopen.sh5
-rw-r--r--libio/tst-fseek.c173
-rw-r--r--libio/wfileops.c179
-rw-r--r--localedata/ChangeLog61
-rw-r--r--localedata/Makefile29
-rw-r--r--localedata/gen-locale.sh5
-rw-r--r--localedata/locales/de_AT2
-rw-r--r--localedata/locales/es_DO4
-rw-r--r--localedata/locales/es_GT4
-rw-r--r--localedata/locales/es_HN4
-rw-r--r--localedata/locales/es_MX4
-rw-r--r--localedata/locales/es_NI4
-rw-r--r--localedata/locales/es_PA4
-rw-r--r--localedata/locales/es_PR4
-rw-r--r--localedata/locales/es_SV4
-rw-r--r--localedata/locales/mr_IN17
-rw-r--r--localedata/sort-test.sh19
-rwxr-xr-xlocaledata/tst-ctype.sh5
-rwxr-xr-xlocaledata/tst-fmon.sh7
-rwxr-xr-xlocaledata/tst-langinfo.sh5
-rwxr-xr-xlocaledata/tst-locale.sh5
-rwxr-xr-xlocaledata/tst-mbswcs.sh5
-rw-r--r--localedata/tst-numeric.sh7
-rwxr-xr-xlocaledata/tst-rpmatch.sh6
-rwxr-xr-xlocaledata/tst-trans.sh5
-rwxr-xr-xlocaledata/tst-wctype.sh10
-rw-r--r--malloc/Makefile10
-rw-r--r--malloc/arena.c76
-rw-r--r--malloc/hooks.c31
-rw-r--r--malloc/malloc.c112
-rw-r--r--malloc/mcheck.c5
-rw-r--r--malloc/memusage.c8
-rw-r--r--malloc/tst-malloc-usable.c49
-rwxr-xr-xmalloc/tst-mtrace.sh8
-rw-r--r--manual/arith.texi6
-rw-r--r--manual/contrib.texi5
-rw-r--r--manual/examples/inetcli.c2
-rw-r--r--manual/install.texi20
-rw-r--r--manual/memory.texi7
-rw-r--r--manual/message.texi2
-rw-r--r--manual/platform.texi8
-rw-r--r--manual/socket.texi2
-rw-r--r--manual/stdio.texi2
-rw-r--r--manual/syslog.texi4
-rw-r--r--math/Makefile5
-rwxr-xr-xmath/gen-libm-test.pl4
-rw-r--r--math/libm-test.inc786
-rw-r--r--math/s_ccosh.c20
-rw-r--r--math/s_ccoshf.c20
-rw-r--r--math/s_ccoshl.c20
-rw-r--r--math/s_cexp.c20
-rw-r--r--math/s_cexpf.c20
-rw-r--r--math/s_cexpl.c20
-rw-r--r--math/s_clog.c20
-rw-r--r--math/s_clog10.c20
-rw-r--r--math/s_clog10f.c20
-rw-r--r--math/s_clog10l.c27
-rw-r--r--math/s_clogf.c20
-rw-r--r--math/s_clogl.c27
-rw-r--r--math/s_csin.c20
-rw-r--r--math/s_csinf.c20
-rw-r--r--math/s_csinh.c20
-rw-r--r--math/s_csinhf.c20
-rw-r--r--math/s_csinhl.c20
-rw-r--r--math/s_csinl.c20
-rw-r--r--math/s_ctan.c11
-rw-r--r--math/s_ctanf.c10
-rw-r--r--math/s_ctanh.c11
-rw-r--r--math/s_ctanhf.c10
-rw-r--r--math/s_ctanhl.c11
-rw-r--r--math/s_ctanl.c11
-rw-r--r--misc/Makefile8
-rw-r--r--misc/Versions4
-rw-r--r--misc/ifunc-impl-list.c32
-rw-r--r--misc/madvise.c9
-rw-r--r--misc/mkostemp.c6
-rw-r--r--misc/mkostemp64.c7
-rw-r--r--misc/mkostemps.c6
-rw-r--r--misc/mkostemps64.c7
-rw-r--r--misc/mkstemp.c6
-rw-r--r--misc/mkstemp64.c7
-rw-r--r--misc/mkstemps.c6
-rw-r--r--misc/mkstemps64.c7
-rw-r--r--misc/sys/cdefs.h9
-rw-r--r--misc/sys/param.h101
-rw-r--r--nis/yp_xdr.c10
-rw-r--r--nptl/ChangeLog358
-rw-r--r--nptl/Makefile86
-rw-r--r--nptl/allocatestack.c12
-rw-r--r--nptl/nptl-init.c12
-rw-r--r--nptl/pthread_cancel.c13
-rw-r--r--nptl/pthread_cond_timedwait.c22
-rw-r--r--nptl/pthread_condattr_setclock.c30
-rw-r--r--nptl/pthread_create.c4
-rw-r--r--nptl/pthread_spin_lock.c69
-rw-r--r--nptl/pthread_spin_trylock.c (renamed from ports/sysdeps/arm/nptl/pthread_spin_trylock.c)7
-rw-r--r--nptl/sysdeps/i386/tls.h6
-rw-r--r--nptl/sysdeps/pthread/bits/libc-lockP.h22
-rw-r--r--nptl/sysdeps/pthread/configure120
-rw-r--r--nptl/sysdeps/pthread/createthread.c13
-rw-r--r--nptl/sysdeps/pthread/pthread.h6
-rw-r--r--nptl/sysdeps/sparc/tls.h4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/Makefile4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S101
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S152
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c21
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pt-raise.c14
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c71
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread_kill.c12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/raise.c17
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sem_post.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S22
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S67
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_create.c340
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_delete.c104
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_getoverr.c56
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_gettime.c56
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_routines.c8
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_settime.c60
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S102
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S143
-rw-r--r--nptl/sysdeps/x86_64/configure82
-rw-r--r--nptl/sysdeps/x86_64/tls.h4
-rw-r--r--nptl/tst-basic2.c4
-rw-r--r--nptl/tst-cancel-wrappers.sh5
-rw-r--r--nptl/tst-cancel21-static.c1
-rw-r--r--nptl/tst-cancel24-static.cc1
-rw-r--r--nptl/tst-cond-except.c110
-rw-r--r--nptl/tst-cond24.c249
-rw-r--r--nptl/tst-cond25.c281
-rw-r--r--nptl/tst-cond8-static.c1
-rw-r--r--nptl/tst-mutex8-static.c1
-rw-r--r--nptl/tst-mutexpi8-static.c1
-rw-r--r--nptl/tst-oddstacklimit.c73
-rw-r--r--nptl/tst-sem11-static.c1
-rw-r--r--nptl/tst-sem12-static.c1
-rw-r--r--nptl/tst-sem14.c91
-rwxr-xr-xnptl/tst-tls6.sh47
-rw-r--r--nptl_db/ChangeLog6
-rw-r--r--nptl_db/Makefile2
-rw-r--r--nscd/Makefile55
-rw-r--r--nscd/gai.c3
-rw-r--r--nscd/getgrgid_r.c5
-rw-r--r--nscd/getgrnam_r.c5
-rw-r--r--nscd/gethstbyad_r.c5
-rw-r--r--nscd/gethstbynm3_r.c5
-rw-r--r--nscd/getpwnam_r.c5
-rw-r--r--nscd/getpwuid_r.c5
-rw-r--r--nscd/getsrvbynm_r.c5
-rw-r--r--nscd/getsrvbypt_r.c5
-rw-r--r--nscd/nscd.c2
-rw-r--r--nss/Makefile2
-rw-r--r--nss/getXXbyYY.c2
-rw-r--r--nss/getXXbyYY_r.c16
-rw-r--r--nss/getXXent.c2
-rw-r--r--nss/getXXent_r.c6
-rw-r--r--nss/makedb.c1
-rw-r--r--nss/nss_db/db-init.c4
-rw-r--r--nss/nss_db/db-initgroups.c1
-rw-r--r--nss/nss_db/db-netgrp.c3
-rw-r--r--nss/nss_files/files-init.c6
-rw-r--r--nss/nss_files/files-initgroups.c4
-rw-r--r--nss/nsswitch.c20
-rw-r--r--nss/nsswitch.h8
-rw-r--r--po/eo.po6992
-rw-r--r--po/ru.po55
-rw-r--r--ports/ChangeLog.alpha130
-rw-r--r--ports/ChangeLog.am3320
-rw-r--r--ports/ChangeLog.arm182
-rw-r--r--ports/ChangeLog.hppa100
-rw-r--r--ports/ChangeLog.ia6488
-rw-r--r--ports/ChangeLog.linux-generic22
-rw-r--r--ports/ChangeLog.m68k100
-rw-r--r--ports/ChangeLog.mips157
-rw-r--r--ports/ChangeLog.powerpc30
-rw-r--r--ports/ChangeLog.tile84
-rw-r--r--ports/sysdeps/alpha/configure175
-rw-r--r--ports/sysdeps/alpha/configure.in71
-rw-r--r--ports/sysdeps/alpha/fpu/get-rounding-mode.h35
-rw-r--r--ports/sysdeps/alpha/fpu/libm-test-ulps575
-rw-r--r--ports/sysdeps/alpha/fpu/s_isnan.c12
-rw-r--r--ports/sysdeps/alpha/fpu/s_nearbyint.c4
-rw-r--r--ports/sysdeps/alpha/ldsodefs.h2
-rw-r--r--ports/sysdeps/alpha/tininess.h1
-rw-r--r--ports/sysdeps/am33/tininess.h1
-rw-r--r--ports/sysdeps/arm/__longjmp.S60
-rw-r--r--ports/sysdeps/arm/arm-features.h39
-rw-r--r--ports/sysdeps/arm/bits/atomic.h81
-rw-r--r--[-rwxr-xr-x]ports/sysdeps/arm/configure99
-rw-r--r--ports/sysdeps/arm/dl-irel.h3
-rw-r--r--ports/sysdeps/arm/dl-machine.h137
-rw-r--r--ports/sysdeps/arm/dl-tlsdesc.h6
-rw-r--r--ports/sysdeps/arm/fclrexcpt.c9
-rw-r--r--ports/sysdeps/arm/fedisblxcpt.c9
-rw-r--r--ports/sysdeps/arm/feenablxcpt.c9
-rw-r--r--ports/sysdeps/arm/fegetenv.c9
-rw-r--r--ports/sysdeps/arm/fegetexcept.c9
-rw-r--r--ports/sysdeps/arm/fegetround.c9
-rw-r--r--ports/sysdeps/arm/feholdexcpt.c9
-rw-r--r--ports/sysdeps/arm/fesetenv.c9
-rw-r--r--ports/sysdeps/arm/fesetround.c9
-rw-r--r--ports/sysdeps/arm/feupdateenv.c9
-rw-r--r--ports/sysdeps/arm/fgetexcptflg.c9
-rw-r--r--ports/sysdeps/arm/fraiseexcpt.c9
-rw-r--r--ports/sysdeps/arm/fsetexcptflg.c9
-rw-r--r--ports/sysdeps/arm/ftestexcept.c9
-rw-r--r--ports/sysdeps/arm/get-rounding-mode.h42
-rw-r--r--ports/sysdeps/arm/ldsodefs.h4
-rw-r--r--ports/sysdeps/arm/nptl/pthread_spin_lock.c18
-rw-r--r--ports/sysdeps/arm/preconfigure2
-rw-r--r--ports/sysdeps/arm/setfpucw.c9
-rw-r--r--ports/sysdeps/arm/setjmp.S55
-rw-r--r--ports/sysdeps/arm/sotruss-lib.c49
-rw-r--r--ports/sysdeps/arm/sysdep.h4
-rw-r--r--ports/sysdeps/hppa/configure82
-rw-r--r--ports/sysdeps/hppa/nptl/Makefile8
-rw-r--r--ports/sysdeps/hppa/nptl/pthread_spin_lock.c26
-rw-r--r--ports/sysdeps/hppa/nptl/shlib-versions1
-rw-r--r--ports/sysdeps/hppa/nptl/tst-oddstacklimit.c26
-rw-r--r--ports/sysdeps/hppa/tininess.h1
-rw-r--r--ports/sysdeps/ia64/Makeconfig2
-rw-r--r--ports/sysdeps/ia64/bits/byteswap-16.h2
-rw-r--r--ports/sysdeps/ia64/bits/byteswap.h2
-rw-r--r--ports/sysdeps/ia64/configure171
-rw-r--r--ports/sysdeps/ia64/configure.in61
-rw-r--r--ports/sysdeps/ia64/fpu/fegetround.c10
-rw-r--r--ports/sysdeps/ia64/fpu/get-rounding-mode.h37
-rw-r--r--ports/sysdeps/ia64/fpu/libm-symbols.h7
-rw-r--r--ports/sysdeps/ia64/fpu/libm_tan.S2
-rw-r--r--ports/sysdeps/ia64/ldsodefs.h2
-rw-r--r--ports/sysdeps/ia64/tininess.h1
-rw-r--r--ports/sysdeps/m68k/asm-syntax.h11
-rw-r--r--ports/sysdeps/m68k/coldfire/fpu/bits/mathinline.h44
-rw-r--r--ports/sysdeps/m68k/ldsodefs.h4
-rw-r--r--ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps89
-rw-r--r--ports/sysdeps/m68k/nptl/pthread_spin_lock.c18
-rw-r--r--ports/sysdeps/m68k/sysdep.h16
-rw-r--r--ports/sysdeps/mips/bits/atomic.h22
-rw-r--r--ports/sysdeps/mips/dl-lookup.c3
-rw-r--r--ports/sysdeps/mips/dl-trampoline.c2
-rw-r--r--ports/sysdeps/mips/fpu_control.h2
-rw-r--r--ports/sysdeps/mips/ieee754/ieee754.h (renamed from ports/sysdeps/mips/ieee754.h)0
-rw-r--r--ports/sysdeps/mips/init-first.c65
-rw-r--r--ports/sysdeps/mips/ldsodefs.h6
-rw-r--r--ports/sysdeps/mips/memcpy.S704
-rw-r--r--ports/sysdeps/mips/mips32/Implies1
-rw-r--r--ports/sysdeps/mips/mips64/Implies1
-rw-r--r--ports/sysdeps/mips/mips64/memcpy.S138
-rw-r--r--ports/sysdeps/mips/mips64/n32/Implies1
-rw-r--r--ports/sysdeps/mips/mips64/n64/Implies1
-rw-r--r--ports/sysdeps/mips/nptl/pthread_spin_lock.c (renamed from ports/sysdeps/mips/nptl/pthread_spin_lock.S)25
-rw-r--r--ports/sysdeps/mips/sys/asm.h4
-rw-r--r--ports/sysdeps/mips/tininess.h1
-rw-r--r--ports/sysdeps/powerpc/nofpu/get-rounding-mode.h35
-rw-r--r--ports/sysdeps/powerpc/powerpc32/405/memset.S12
-rw-r--r--ports/sysdeps/powerpc/powerpc32/476/memset.S154
-rw-r--r--ports/sysdeps/tile/__tls_get_addr.S2
-rw-r--r--ports/sysdeps/tile/dl-machine.h4
-rw-r--r--ports/sysdeps/tile/dl-runtime.c4
-rw-r--r--ports/sysdeps/tile/libm-test-ulps145
-rw-r--r--ports/sysdeps/tile/sysdep.h9
-rw-r--r--ports/sysdeps/unix/alpha/sysdep.h35
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/Makefile1
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h5
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h7
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/clone.S79
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/configure6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/configure.in6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c65
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S56
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c91
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fxstat.c19
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c37
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S38
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S38
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h21
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/lxstat.c19
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data6
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h12
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c88
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/syscall.S11
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/xstat.c19
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c9
-rw-r--r--ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h7
-rw-r--r--[-rwxr-xr-x]ports/sysdeps/unix/sysv/linux/am33/configure2
-rw-r--r--ports/sysdeps/unix/sysv/linux/am33/configure.in2
-rw-r--r--ports/sysdeps/unix/sysv/linux/am33/getrlimit.c1
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/arm-features.h (renamed from ports/sysdeps/hppa/nptl/pthread_spin_trylock.c)21
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h (renamed from ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h)93
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h281
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/configure1
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/configure.in1
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/dl-machine.h30
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/getcontext.S78
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/getrlimit.c1
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/kernel-features.h15
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h18
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/arm/setcontext.S89
-rw-r--r--ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h291
-rw-r--r--ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h11
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/Versions5
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h10
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h273
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h9
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/configure5
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/configure.in5
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c108
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h22
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/syscalls.list1
-rw-r--r--ports/sysdeps/unix/sysv/linux/hppa/sysdep.h84
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h274
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/configure6
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/configure.in6
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c8
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h6
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h6
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/ia64/system.c4
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h280
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h12
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/configure1
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/configure.in1
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c1
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/init-first.c5
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h12
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/m68k/vfork.S23
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/Makefile43
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h270
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/configure111
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/configure.in49
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/kernel-features.h5
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/Makefile1
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/fcntl.c (renamed from ports/sysdeps/unix/sysv/linux/mips/fcntl.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/lockf64.c (renamed from ports/sysdeps/unix/sysv/linux/mips/lockf64.c)0
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c (renamed from sysdeps/unix/sysv/linux/i386/getrlimit.c)27
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c44
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile1
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c1
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c1
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile1
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c45
-rw-r--r--ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h41
-rw-r--r--ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist6
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/Makefile4
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h (renamed from ports/sysdeps/m68k/nptl/pthread_spin_trylock.c)23
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/gettimeofday.c37
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/init-first.c (renamed from ports/sysdeps/mips/nptl/pthread_spin_trylock.S)38
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/kernel-features.h8
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h2
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/tilegx/sched_getcpu.c87
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist5
-rw-r--r--ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist5
-rw-r--r--posix/Makefile30
-rw-r--r--posix/gai.conf16
-rw-r--r--posix/glob.c10
-rwxr-xr-xposix/globtest.sh132
-rw-r--r--posix/regcomp.c8
-rw-r--r--posix/regex.c5
-rw-r--r--posix/tst-getconf.sh36
-rw-r--r--posix/tst-rfc3484-2.c1
-rw-r--r--posix/tst-rfc3484-3.c1
-rw-r--r--posix/tst-rfc3484.c6
-rw-r--r--posix/unistd.h16
-rwxr-xr-xposix/wordexp-tst.sh44
-rw-r--r--posix/wordexp.c3
-rw-r--r--pwd/Makefile6
-rw-r--r--resolv/Makefile4
-rw-r--r--rt/Makefile9
-rw-r--r--rt/Versions14
-rw-r--r--rt/clock-compat.c65
-rw-r--r--rt/clock_getcpuclockid.c4
-rw-r--r--rt/clock_getres.c4
-rw-r--r--rt/clock_gettime.c5
-rw-r--r--rt/clock_nanosleep.c6
-rw-r--r--rt/clock_settime.c4
-rw-r--r--rt/tst-aio2.c3
-rw-r--r--rt/tst-aio3.c3
-rw-r--r--rt/tst-shm.c2
-rwxr-xr-xscripts/check-local-headers.sh8
-rwxr-xr-xscripts/config.guess33
-rwxr-xr-xscripts/config.sub29
-rwxr-xr-xscripts/cross-test-ssh.sh148
-rwxr-xr-xscripts/test-installation.pl7
-rw-r--r--shadow/Makefile6
-rw-r--r--shadow/getspent.c5
-rw-r--r--shadow/getspent_r.c5
-rw-r--r--shadow/getspnam.c5
-rw-r--r--shadow/getspnam_r.c5
-rw-r--r--socket/accept4.c6
-rw-r--r--socket/have_sock_cloexec.c11
-rw-r--r--stdio-common/Makefile26
-rw-r--r--stdio-common/_i18n_number.h3
-rw-r--r--stdio-common/_itoa.c14
-rw-r--r--stdio-common/_itowa.c10
-rw-r--r--stdio-common/isoc99_scanf.c4
-rw-r--r--stdio-common/printf_fp.c53
-rw-r--r--stdio-common/printf_fphex.c40
-rw-r--r--stdio-common/reg-modifier.c3
-rw-r--r--stdio-common/tmpfile.c4
-rw-r--r--stdio-common/tmpfile64.c31
-rw-r--r--stdio-common/tst-printf-round.c234
-rw-r--r--stdio-common/tst-printf.sh5
-rw-r--r--stdio-common/tst-sprintf.c13
-rwxr-xr-xstdio-common/tst-unbputc.sh5
-rw-r--r--stdio-common/vfprintf.c39
-rw-r--r--stdio-common/vfscanf.c1
-rw-r--r--stdlib/Makefile18
-rw-r--r--stdlib/canonicalize.c6
-rw-r--r--stdlib/divmod_1.c4
-rw-r--r--stdlib/fpioconst.c910
-rw-r--r--stdlib/fpioconst.h12
-rw-r--r--stdlib/gen-fpioconst.c107
-rw-r--r--stdlib/gen-tst-strtod-round.c147
-rw-r--r--stdlib/gmp-impl.h5
-rw-r--r--stdlib/longlong.h44
-rw-r--r--stdlib/mod_1.c4
-rw-r--r--stdlib/secure-getenv.c2
-rw-r--r--stdlib/strtod_l.c313
-rwxr-xr-xstdlib/tst-fmtmsg.sh5
-rw-r--r--stdlib/tst-secure-getenv.c64
-rw-r--r--stdlib/tst-strtod-overflow.c49
-rw-r--r--stdlib/tst-strtod-round-data111
-rw-r--r--stdlib/tst-strtod-round.c6934
-rw-r--r--stdlib/tst-strtod-underflow.c225
-rw-r--r--stdlib/tst-strtod.c4
-rw-r--r--stdlib/tst-tininess.c69
-rw-r--r--string/Makefile9
-rw-r--r--string/bug-strchr1.c14
-rw-r--r--string/bug-strstr1.c26
-rw-r--r--string/memmem.c3
-rw-r--r--string/str-two-way.h147
-rw-r--r--string/strcasestr.c7
-rw-r--r--string/strstr.c5
-rw-r--r--string/test-bcopy-ifunc.c20
-rw-r--r--string/test-bcopy.c20
-rw-r--r--string/test-bzero-ifunc.c20
-rw-r--r--string/test-bzero.c19
-rw-r--r--string/test-memccpy-ifunc.c20
-rw-r--r--string/test-memccpy.c3
-rw-r--r--string/test-memchr-ifunc.c20
-rw-r--r--string/test-memchr.c3
-rw-r--r--string/test-memcmp-ifunc.c20
-rw-r--r--string/test-memcmp.c5
-rw-r--r--string/test-memcpy-ifunc.c20
-rw-r--r--string/test-memcpy.c3
-rw-r--r--string/test-memmem-ifunc.c20
-rw-r--r--string/test-memmem.c38
-rw-r--r--string/test-memmove-ifunc.c20
-rw-r--r--string/test-memmove.c40
-rw-r--r--string/test-mempcpy-ifunc.c20
-rw-r--r--string/test-mempcpy.c3
-rw-r--r--string/test-memset-ifunc.c20
-rw-r--r--string/test-memset.c68
-rw-r--r--string/test-rawmemchr-ifunc.c (renamed from sysdeps/mach/hurd/dl-cache.c)16
-rw-r--r--string/test-rawmemchr.c3
-rw-r--r--string/test-stpcpy-ifunc.c20
-rw-r--r--string/test-stpcpy.c3
-rw-r--r--string/test-stpncpy-ifunc.c20
-rw-r--r--string/test-stpncpy.c3
-rw-r--r--string/test-strcasecmp-ifunc.c20
-rw-r--r--string/test-strcasecmp.c3
-rw-r--r--string/test-strcasestr-ifunc.c20
-rw-r--r--string/test-strcasestr.c31
-rw-r--r--string/test-strcat-ifunc.c20
-rw-r--r--string/test-strcat.c3
-rw-r--r--string/test-strchr-ifunc.c20
-rw-r--r--string/test-strchr.c38
-rw-r--r--string/test-strchrnul-ifunc.c20
-rw-r--r--string/test-strcmp-ifunc.c20
-rw-r--r--string/test-strcmp.c5
-rw-r--r--string/test-strcpy-ifunc.c20
-rw-r--r--string/test-strcpy.c7
-rw-r--r--string/test-strcspn-ifunc.c20
-rw-r--r--string/test-strcspn.c3
-rw-r--r--string/test-string.h57
-rw-r--r--string/test-strlen-ifunc.c20
-rw-r--r--string/test-strlen.c7
-rw-r--r--string/test-strncasecmp-ifunc.c20
-rw-r--r--string/test-strncasecmp.c19
-rw-r--r--string/test-strncat-ifunc.c20
-rw-r--r--string/test-strncat.c3
-rw-r--r--string/test-strncmp-ifunc.c20
-rw-r--r--string/test-strncmp.c3
-rw-r--r--string/test-strncpy-ifunc.c20
-rw-r--r--string/test-strncpy.c3
-rw-r--r--string/test-strnlen-ifunc.c20
-rw-r--r--string/test-strnlen.c3
-rw-r--r--string/test-strpbrk-ifunc.c20
-rw-r--r--string/test-strpbrk.c3
-rw-r--r--string/test-strrchr-ifunc.c20
-rw-r--r--string/test-strrchr.c7
-rw-r--r--string/test-strspn-ifunc.c20
-rw-r--r--string/test-strspn.c3
-rw-r--r--string/test-strstr-ifunc.c20
-rw-r--r--string/test-strstr.c50
-rw-r--r--sunrpc/rpc_main.c40
-rw-r--r--sysdeps/generic/_G_config.h28
-rw-r--r--sysdeps/generic/eloop-threshold.h72
-rw-r--r--sysdeps/generic/fips-private.h36
-rw-r--r--sysdeps/generic/get-rounding-mode.h124
-rw-r--r--sysdeps/generic/ldsodefs.h8
-rw-r--r--sysdeps/generic/malloc-machine.h11
-rw-r--r--sysdeps/generic/malloc-sysdep.h25
-rw-r--r--sysdeps/generic/math_private.h7
-rw-r--r--sysdeps/generic/siglist.h6
-rw-r--r--sysdeps/generic/sys/param.h15
-rw-r--r--sysdeps/generic/tininess.h33
-rw-r--r--sysdeps/i386/configure171
-rw-r--r--sysdeps/i386/configure.in33
-rw-r--r--sysdeps/i386/fpu/e_acosh.S4
-rw-r--r--sysdeps/i386/fpu/e_acoshf.S4
-rw-r--r--sysdeps/i386/fpu/e_acoshl.S4
-rw-r--r--sysdeps/i386/fpu/e_atanh.S8
-rw-r--r--sysdeps/i386/fpu/e_atanhf.S8
-rw-r--r--sysdeps/i386/fpu/e_atanhl.S8
-rw-r--r--sysdeps/i386/fpu/e_expl.S10
-rw-r--r--sysdeps/i386/fpu/e_log.S4
-rw-r--r--sysdeps/i386/fpu/e_log10.S4
-rw-r--r--sysdeps/i386/fpu/e_log10f.S4
-rw-r--r--sysdeps/i386/fpu/e_log10l.S4
-rw-r--r--sysdeps/i386/fpu/e_log2.S4
-rw-r--r--sysdeps/i386/fpu/e_log2f.S4
-rw-r--r--sysdeps/i386/fpu/e_log2l.S4
-rw-r--r--sysdeps/i386/fpu/e_logf.S4
-rw-r--r--sysdeps/i386/fpu/e_logl.S4
-rw-r--r--sysdeps/i386/fpu/e_pow.S14
-rw-r--r--sysdeps/i386/fpu/e_powf.S12
-rw-r--r--sysdeps/i386/fpu/e_powl.S16
-rw-r--r--sysdeps/i386/fpu/e_scalb.S2
-rw-r--r--sysdeps/i386/fpu/e_scalbf.S2
-rw-r--r--sysdeps/i386/fpu/e_scalbl.S2
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps253
-rw-r--r--sysdeps/i386/fpu/s_asinh.S6
-rw-r--r--sysdeps/i386/fpu/s_asinhf.S6
-rw-r--r--sysdeps/i386/fpu/s_asinhl.S6
-rw-r--r--sysdeps/i386/fpu/s_cbrt.S18
-rw-r--r--sysdeps/i386/fpu/s_cbrtf.S10
-rw-r--r--sysdeps/i386/fpu/s_cbrtl.S20
-rw-r--r--sysdeps/i386/fpu/s_expm1.S6
-rw-r--r--sysdeps/i386/fpu/s_expm1f.S6
-rw-r--r--sysdeps/i386/fpu/s_frexp.S2
-rw-r--r--sysdeps/i386/fpu/s_frexpf.S2
-rw-r--r--sysdeps/i386/fpu/s_frexpl.S2
-rw-r--r--sysdeps/i386/i386-mcount.S4
-rw-r--r--sysdeps/i386/i686/fpu/e_logl.S4
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/Makefile3
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S26
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/e_expf.c18
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S553
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/s_cosf.c29
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S586
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/s_sincosf.c29
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S566
-rw-r--r--sysdeps/i386/i686/fpu/multiarch/s_sinf.c28
-rw-r--r--sysdeps/i386/i686/multiarch/bcopy.S3
-rw-r--r--sysdeps/i386/i686/multiarch/bzero.S3
-rw-r--r--sysdeps/i386/i686/multiarch/ifunc-impl-list.c326
-rw-r--r--sysdeps/i386/i686/multiarch/memchr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/memcmp.S3
-rw-r--r--sysdeps/i386/i686/multiarch/memcpy.S3
-rw-r--r--sysdeps/i386/i686/multiarch/memcpy_chk.S1
-rw-r--r--sysdeps/i386/i686/multiarch/memmove.S3
-rw-r--r--sysdeps/i386/i686/multiarch/memmove_chk.S1
-rw-r--r--sysdeps/i386/i686/multiarch/mempcpy.S3
-rw-r--r--sysdeps/i386/i686/multiarch/mempcpy_chk.S1
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/memset.S1
-rw-r--r--sysdeps/i386/i686/multiarch/memset_chk.S1
-rw-r--r--sysdeps/i386/i686/multiarch/rawmemchr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/stpcpy.S2
-rw-r--r--sysdeps/i386/i686/multiarch/stpncpy.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp_l.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strcasestr-c.c2
-rw-r--r--sysdeps/i386/i686/multiarch/strcat.S3
-rw-r--r--sysdeps/i386/i686/multiarch/strchr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strcmp-ssse3.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strcmp.S3
-rw-r--r--sysdeps/i386/i686/multiarch/strcpy.S3
-rw-r--r--sysdeps/i386/i686/multiarch/strcspn.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strlen.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strncase.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strncase_l.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strncat.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strncmp.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strncpy.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strnlen.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strpbrk.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strrchr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strspn.S1
-rw-r--r--sysdeps/i386/i686/multiarch/strstr-c.c20
-rw-r--r--sysdeps/i386/i686/multiarch/wcschr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/wcscmp.S1
-rw-r--r--sysdeps/i386/i686/multiarch/wcscpy.S1
-rw-r--r--sysdeps/i386/i686/multiarch/wcslen.S1
-rw-r--r--sysdeps/i386/i686/multiarch/wcsrchr.S1
-rw-r--r--sysdeps/i386/i686/multiarch/wmemcmp.S1
-rw-r--r--sysdeps/i386/i686/strtok.S4
-rw-r--r--sysdeps/i386/init-first.c78
-rw-r--r--sysdeps/i386/strtok.S4
-rw-r--r--sysdeps/i386/sysdep.h35
-rw-r--r--sysdeps/ieee754/dbl-64/s_fma.c44
-rw-r--r--sysdeps/ieee754/dbl-64/s_fmaf.c7
-rw-r--r--sysdeps/ieee754/dbl-64/x2y2m1.c111
-rw-r--r--sysdeps/ieee754/dbl-64/x2y2m1f.c32
-rw-r--r--sysdeps/ieee754/flt-32/s_cosf.c11
-rw-r--r--sysdeps/ieee754/flt-32/s_sincosf.c10
-rw-r--r--sysdeps/ieee754/flt-32/s_sinf.c11
-rw-r--r--sysdeps/ieee754/k_standard.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/bits/huge_vall.h50
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fma.c8
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fmal.c44
-rw-r--r--sysdeps/ieee754/ldbl-128/x2y2m1l.c111
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_atan2l.c3
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c128
-rw-r--r--sysdeps/ieee754/ldbl-96/s_fma.c6
-rw-r--r--sysdeps/ieee754/ldbl-96/s_fmal.c44
-rw-r--r--sysdeps/ieee754/ldbl-96/s_sincosl.c4
-rw-r--r--sysdeps/ieee754/ldbl-96/x2y2m1.c39
-rw-r--r--sysdeps/ieee754/ldbl-96/x2y2m1l.c111
-rw-r--r--sysdeps/ieee754/ldbl-opt/configure120
-rw-r--r--sysdeps/mach/bits/libc-lock.h1
-rw-r--r--sysdeps/mach/configure138
-rw-r--r--sysdeps/mach/hurd/Makeconfig3
-rw-r--r--sysdeps/mach/hurd/_G_config.h92
-rw-r--r--sysdeps/mach/hurd/bits/libc-lock.h2
-rw-r--r--sysdeps/mach/hurd/bits/local_lim.h13
-rw-r--r--sysdeps/mach/hurd/bits/param.h (renamed from sysdeps/mach/hurd/sys/param.h)60
-rw-r--r--sysdeps/mach/hurd/bits/typesizes.h1
-rw-r--r--sysdeps/mach/hurd/configure123
-rw-r--r--sysdeps/mach/hurd/configure.in3
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c20
-rw-r--r--sysdeps/mach/hurd/eloop-threshold.h37
-rw-r--r--sysdeps/mach/hurd/fdatasync.c8
-rw-r--r--sysdeps/mach/hurd/fsync.c8
-rw-r--r--sysdeps/mach/hurd/malloc-machine.h5
-rw-r--r--sysdeps/mach/hurd/ptrace.c8
-rw-r--r--sysdeps/mach/hurd/renameat.c51
-rw-r--r--sysdeps/mach/hurd/sysconf.c26
-rw-r--r--sysdeps/posix/alarm.c (renamed from sysdeps/unix/alarm.c)0
-rw-r--r--sysdeps/posix/clock_getres.c3
-rw-r--r--sysdeps/posix/closedir.c (renamed from sysdeps/unix/closedir.c)0
-rw-r--r--sysdeps/posix/dirfd.c (renamed from sysdeps/unix/dirfd.c)0
-rw-r--r--sysdeps/posix/dirstream.h (renamed from sysdeps/unix/dirstream.h)0
-rw-r--r--sysdeps/posix/fdopendir.c (renamed from sysdeps/unix/fdopendir.c)3
-rw-r--r--sysdeps/posix/getaddrinfo.c52
-rw-r--r--sysdeps/posix/getcwd.c2
-rw-r--r--sysdeps/posix/mkfifo.c (renamed from sysdeps/unix/mkfifo.c)0
-rw-r--r--sysdeps/posix/mkfifoat.c (renamed from sysdeps/unix/mkfifoat.c)0
-rw-r--r--sysdeps/posix/nice.c (renamed from sysdeps/unix/nice.c)0
-rw-r--r--sysdeps/posix/opendir.c (renamed from sysdeps/unix/opendir.c)15
-rw-r--r--sysdeps/posix/pwrite64.c3
-rw-r--r--sysdeps/posix/readdir.c (renamed from sysdeps/unix/readdir.c)0
-rw-r--r--sysdeps/posix/readdir_r.c (renamed from sysdeps/unix/readdir_r.c)0
-rw-r--r--sysdeps/posix/rewinddir.c (renamed from sysdeps/unix/rewinddir.c)0
-rw-r--r--sysdeps/posix/seekdir.c (renamed from sysdeps/unix/seekdir.c)0
-rw-r--r--sysdeps/posix/sleep.c100
-rw-r--r--sysdeps/posix/spawni.c3
-rw-r--r--sysdeps/posix/sysconf.c1
-rw-r--r--sysdeps/posix/system.c6
-rw-r--r--sysdeps/posix/telldir.c (renamed from sysdeps/unix/telldir.c)0
-rw-r--r--sysdeps/posix/time.c (renamed from sysdeps/unix/time.c)0
-rw-r--r--sysdeps/posix/utime.c (renamed from sysdeps/unix/utime.c)0
-rw-r--r--sysdeps/powerpc/configure82
-rw-r--r--sysdeps/powerpc/fpu/libm-test-ulps440
-rw-r--r--sysdeps/powerpc/powerpc32/configure82
-rw-r--r--sysdeps/powerpc/powerpc32/power6/wcschr.c88
-rw-r--r--sysdeps/powerpc/powerpc32/power6/wcscpy.c104
-rw-r--r--sysdeps/powerpc/powerpc32/power6/wcsrchr.c88
-rw-r--r--sysdeps/powerpc/powerpc32/power7/memchr.S78
-rw-r--r--sysdeps/powerpc/powerpc32/sysdep.h18
-rw-r--r--sysdeps/powerpc/powerpc64/configure82
-rw-r--r--sysdeps/powerpc/powerpc64/power6/wcschr.c1
-rw-r--r--sysdeps/powerpc/powerpc64/power6/wcscpy.c1
-rw-r--r--sysdeps/powerpc/powerpc64/power6/wcsrchr.c1
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memchr.S85
-rw-r--r--sysdeps/powerpc/sys/platform/ppc.h1
-rw-r--r--sysdeps/powerpc/sysdep.h2
-rw-r--r--sysdeps/pthread/Makeconfig2
-rw-r--r--sysdeps/pthread/aio_fsync.c2
-rw-r--r--sysdeps/pthread/aio_notify.c2
-rw-r--r--sysdeps/pthread/configure3
-rw-r--r--sysdeps/s390/fpu/get-rounding-mode.h37
-rw-r--r--sysdeps/s390/s390-32/configure1
-rw-r--r--sysdeps/s390/s390-32/multiarch/Makefile6
-rw-r--r--sysdeps/s390/s390-32/multiarch/ifunc-resolve.c11
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcmp.S2
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcpy.S2
-rw-r--r--sysdeps/s390/s390-32/multiarch/memset.S2
-rw-r--r--sysdeps/s390/s390-32/s390-mcount.S2
-rw-r--r--sysdeps/s390/s390-32/sysdep.h6
-rw-r--r--sysdeps/s390/s390-64/configure1
-rw-r--r--sysdeps/s390/s390-64/multiarch/ifunc-resolve.c8
-rw-r--r--sysdeps/s390/s390-64/s390x-mcount.S2
-rw-r--r--sysdeps/s390/s390-64/sysdep.h6
-rw-r--r--sysdeps/sh/_mcount.S2
-rw-r--r--sysdeps/sh/configure1
-rw-r--r--sysdeps/sh/init-first.c78
-rw-r--r--sysdeps/sh/ldsodefs.h2
-rw-r--r--sysdeps/sh/sysdep.h6
-rw-r--r--sysdeps/sh/tininess.h1
-rw-r--r--sysdeps/sparc/bits/hwcap.h3
-rw-r--r--sysdeps/sparc/configure82
-rw-r--r--sysdeps/sparc/dl-procinfo.c4
-rw-r--r--sysdeps/sparc/dl-procinfo.h2
-rw-r--r--sysdeps/sparc/fpu/libm-test-ulps252
-rw-r--r--sysdeps/sparc/ldsodefs.h4
-rw-r--r--sysdeps/sparc/sparc32/dl-machine.h5
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/addmul_1.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/mul_1.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile2
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-niagara4.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S1
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/submul_1.S1
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h14
-rw-r--r--sysdeps/sparc/sparc64/multiarch/Makefile2
-rw-r--r--sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c75
-rw-r--r--sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S332
-rw-r--r--sysdeps/sparc/sparc64/multiarch/memcpy.S27
-rw-r--r--sysdeps/sparc/sparc64/multiarch/memset-niagara4.S124
-rw-r--r--sysdeps/sparc/sparc64/multiarch/memset.S31
-rw-r--r--sysdeps/unix/Makefile20
-rw-r--r--sysdeps/unix/bsd/bsd4.4/bits/dirent.h54
-rw-r--r--sysdeps/unix/bsd/bsd4.4/bits/fcntl.h112
-rw-r--r--sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h6
-rw-r--r--sysdeps/unix/bsd/confstr.h1
-rw-r--r--sysdeps/unix/clock_gettime.c4
-rw-r--r--sysdeps/unix/clock_nanosleep.c3
-rw-r--r--sysdeps/unix/clock_settime.c3
-rw-r--r--sysdeps/unix/inet/syscalls.list23
-rw-r--r--sysdeps/unix/make-syscalls.sh27
-rw-r--r--sysdeps/unix/syscalls.list23
-rw-r--r--sysdeps/unix/sysv/linux/Makefile1
-rw-r--r--sysdeps/unix/sysv/linux/_G_config.h (renamed from sysdeps/gnu/_G_config.h)35
-rw-r--r--sysdeps/unix/sysv/linux/bits/dirent.h7
-rw-r--r--sysdeps/unix/sysv/linux/bits/fcntl-linux.h386
-rw-r--r--sysdeps/unix/sysv/linux/bits/param.h42
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c38
-rw-r--r--sysdeps/unix/sysv/linux/clock_getcpuclockid.c73
-rw-r--r--sysdeps/unix/sysv/linux/clock_getres.c158
-rw-r--r--sysdeps/unix/sysv/linux/clock_gettime.c166
-rw-r--r--sysdeps/unix/sysv/linux/clock_nanosleep.c44
-rw-r--r--sysdeps/unix/sysv/linux/clock_settime.c112
-rw-r--r--sysdeps/unix/sysv/linux/configure115
-rw-r--r--sysdeps/unix/sysv/linux/configure.in16
-rw-r--r--sysdeps/unix/sysv/linux/dl-execstack.c96
-rw-r--r--sysdeps/unix/sysv/linux/dl-fxstatat64.c2
-rw-r--r--sysdeps/unix/sysv/linux/dl-sysdep.c23
-rw-r--r--sysdeps/unix/sysv/linux/fips-private.h74
-rw-r--r--sysdeps/unix/sysv/linux/fxstat64.c47
-rw-r--r--sysdeps/unix/sysv/linux/fxstatat64.c58
-rw-r--r--sysdeps/unix/sysv/linux/getdents.c6
-rw-r--r--sysdeps/unix/sysv/linux/i386/fcntl.c134
-rw-r--r--sysdeps/unix/sysv/linux/i386/fxstat.c41
-rw-r--r--sysdeps/unix/sysv/linux/i386/fxstatat.c46
-rw-r--r--sysdeps/unix/sysv/linux/i386/get_clockfreq.c8
-rw-r--r--sysdeps/unix/sysv/linux/i386/lockf64.c135
-rw-r--r--sysdeps/unix/sysv/linux/i386/lxstat.c40
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap.S23
-rw-r--r--sysdeps/unix/sysv/linux/i386/mmap64.S44
-rw-r--r--sysdeps/unix/sysv/linux/i386/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/i386/posix_fadvise64.S69
-rw-r--r--sysdeps/unix/sysv/linux/i386/readdir64.c6
-rw-r--r--sysdeps/unix/sysv/linux/i386/readdir64_r.c6
-rw-r--r--sysdeps/unix/sysv/linux/i386/vfork.S23
-rw-r--r--sysdeps/unix/sysv/linux/i386/xstat.c39
-rw-r--r--sysdeps/unix/sysv/linux/init-first.c115
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h215
-rw-r--r--sysdeps/unix/sysv/linux/ldsodefs.h4
-rw-r--r--sysdeps/unix/sysv/linux/lxstat64.c47
-rw-r--r--sysdeps/unix/sysv/linux/malloc-sysdep.h57
-rw-r--r--sysdeps/unix/sysv/linux/mmap64.c68
-rw-r--r--sysdeps/unix/sysv/linux/nice.c2
-rw-r--r--sysdeps/unix/sysv/linux/opendir.c2
-rw-r--r--sysdeps/unix/sysv/linux/posix_fadvise64.c27
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Makefile6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h28
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/ppc.h33
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/configure120
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c10
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c27
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/getrlimit.c1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/init-first.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c26
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S26
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S23
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c62
-rw-r--r--sysdeps/unix/sysv/linux/readdir64.c2
-rw-r--r--sysdeps/unix/sysv/linux/readdir64_r.c2
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/fcntl.h296
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/typesizes.h11
-rw-r--r--sysdeps/unix/sysv/linux/s390/init-first.c5
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/mmap.S15
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S37
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c27
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/s390/system.c6
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/fcntl.h281
-rw-r--r--sysdeps/unix/sysv/linux/sh/getrlimit.c1
-rw-r--r--sysdeps/unix/sysv/linux/sh/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/shm_open.c8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h273
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/typesizes.h11
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c32
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/time.c2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c9
-rw-r--r--sysdeps/unix/sysv/linux/sparc/system.c6
-rw-r--r--sysdeps/unix/sysv/linux/sys/fsuid.h4
-rw-r--r--sysdeps/unix/sysv/linux/sys/param.h82
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/sysconf.c12
-rw-r--r--sysdeps/unix/sysv/linux/system.c4
-rw-r--r--sysdeps/unix/sysv/linux/time.c4
-rw-r--r--sysdeps/unix/sysv/linux/ttyname.c6
-rw-r--r--sysdeps/unix/sysv/linux/ttyname_r.c6
-rw-r--r--sysdeps/unix/sysv/linux/waitid.c41
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/readdir.c2
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c2
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/fcntl.h288
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/typesizes.h11
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/init-first.c5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/time.c19
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/alphasort.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/alphasort64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/fseeko.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/fseeko64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/ftello.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/ftello64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/init-first.c5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/iofopen.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/iofopen64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/lockf.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/lockf64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/scandir.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/scandir64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/scandirat.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/scandirat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/versionsort.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/versionsort64.c1
-rw-r--r--sysdeps/unix/sysv/linux/xstat64.c49
-rw-r--r--sysdeps/unix/sysv/linux/xstatconv.c5
-rw-r--r--sysdeps/wordsize-64/Makefile3
-rw-r--r--sysdeps/wordsize-64/alphasort.c7
-rw-r--r--sysdeps/wordsize-64/alphasort64.c1
-rw-r--r--sysdeps/wordsize-64/fseeko.c3
-rw-r--r--sysdeps/wordsize-64/fseeko64.c1
-rw-r--r--sysdeps/wordsize-64/ftello.c3
-rw-r--r--sysdeps/wordsize-64/ftello64.c1
-rw-r--r--sysdeps/wordsize-64/iofgetpos.c12
-rw-r--r--sysdeps/wordsize-64/iofgetpos64.c1
-rw-r--r--sysdeps/wordsize-64/iofopen.c4
-rw-r--r--sysdeps/wordsize-64/iofopen64.c1
-rw-r--r--sysdeps/wordsize-64/iofsetpos.c12
-rw-r--r--sysdeps/wordsize-64/iofsetpos64.c1
-rw-r--r--sysdeps/wordsize-64/lockf.c3
-rw-r--r--sysdeps/wordsize-64/lockf64.c1
-rw-r--r--sysdeps/wordsize-64/mkostemp.c3
-rw-r--r--sysdeps/wordsize-64/mkostemp64.c1
-rw-r--r--sysdeps/wordsize-64/mkstemp.c3
-rw-r--r--sysdeps/wordsize-64/mkstemp64.c1
-rw-r--r--sysdeps/wordsize-64/scandir.c6
-rw-r--r--sysdeps/wordsize-64/scandir64.c1
-rw-r--r--sysdeps/wordsize-64/scandirat.c6
-rw-r--r--sysdeps/wordsize-64/scandirat64.c1
-rw-r--r--sysdeps/wordsize-64/tmpfile.c3
-rw-r--r--sysdeps/wordsize-64/tmpfile64.c1
-rw-r--r--sysdeps/wordsize-64/tst-writev.c5
-rw-r--r--sysdeps/wordsize-64/versionsort.c7
-rw-r--r--sysdeps/wordsize-64/versionsort64.c1
-rw-r--r--sysdeps/x86/bits/byteswap.h13
-rw-r--r--sysdeps/x86/tininess.h1
-rw-r--r--sysdeps/x86_64/Makefile2
-rw-r--r--sysdeps/x86_64/_mcount.S4
-rw-r--r--sysdeps/x86_64/configure170
-rw-r--r--sysdeps/x86_64/configure.in33
-rw-r--r--sysdeps/x86_64/dl-machine.h40
-rw-r--r--sysdeps/x86_64/dl-tlsdesc.h6
-rw-r--r--sysdeps/x86_64/fpu/e_expf.S28
-rw-r--r--sysdeps/x86_64/fpu/e_expl.S10
-rw-r--r--sysdeps/x86_64/fpu/e_log10l.S4
-rw-r--r--sysdeps/x86_64/fpu/e_log2l.S4
-rw-r--r--sysdeps/x86_64/fpu/e_logl.S4
-rw-r--r--sysdeps/x86_64/fpu/e_powl.S16
-rw-r--r--sysdeps/x86_64/fpu/e_scalbl.S2
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps257
-rw-r--r--sysdeps/x86_64/fpu/s_copysign.S4
-rw-r--r--sysdeps/x86_64/fpu/s_copysignf.S2
-rw-r--r--sysdeps/x86_64/fpu/s_cosf.S527
-rw-r--r--sysdeps/x86_64/fpu/s_sincosf.S558
-rw-r--r--sysdeps/x86_64/fpu/s_sinf.S553
-rw-r--r--sysdeps/x86_64/multiarch/bcopy.S2
-rw-r--r--sysdeps/x86_64/multiarch/bzero.S35
-rw-r--r--sysdeps/x86_64/multiarch/ifunc-impl-list.c283
-rw-r--r--sysdeps/x86_64/multiarch/init-arch.c3
-rw-r--r--sysdeps/x86_64/multiarch/init-arch.h9
-rw-r--r--sysdeps/x86_64/multiarch/memcmp.S5
-rw-r--r--sysdeps/x86_64/multiarch/memcpy.S6
-rw-r--r--sysdeps/x86_64/multiarch/memcpy_chk.S3
-rw-r--r--sysdeps/x86_64/multiarch/memmove.c50
-rw-r--r--sysdeps/x86_64/multiarch/memmove_chk.c3
-rw-r--r--sysdeps/x86_64/multiarch/mempcpy.S5
-rw-r--r--sysdeps/x86_64/multiarch/mempcpy_chk.S3
-rw-r--r--sysdeps/x86_64/multiarch/memset.S8
-rw-r--r--sysdeps/x86_64/multiarch/memset_chk.S3
-rw-r--r--sysdeps/x86_64/multiarch/rawmemchr.S8
-rw-r--r--sysdeps/x86_64/multiarch/stpcpy.S2
-rw-r--r--sysdeps/x86_64/multiarch/stpncpy.S2
-rw-r--r--sysdeps/x86_64/multiarch/strcasecmp_l.S2
-rw-r--r--sysdeps/x86_64/multiarch/strcasestr-c.c3
-rw-r--r--sysdeps/x86_64/multiarch/strcat.S5
-rw-r--r--sysdeps/x86_64/multiarch/strchr.S8
-rw-r--r--sysdeps/x86_64/multiarch/strcmp-sse42.S4
-rw-r--r--sysdeps/x86_64/multiarch/strcmp.S8
-rw-r--r--sysdeps/x86_64/multiarch/strcpy.S5
-rw-r--r--sysdeps/x86_64/multiarch/strcspn.S3
-rw-r--r--sysdeps/x86_64/multiarch/strlen.S7
-rw-r--r--sysdeps/x86_64/multiarch/strncase_l.S2
-rw-r--r--sysdeps/x86_64/multiarch/strncat.S2
-rw-r--r--sysdeps/x86_64/multiarch/strncmp-ssse3.S10
-rw-r--r--sysdeps/x86_64/multiarch/strncmp.S2
-rw-r--r--sysdeps/x86_64/multiarch/strncpy.S2
-rw-r--r--sysdeps/x86_64/multiarch/strnlen.S5
-rw-r--r--sysdeps/x86_64/multiarch/strpbrk.S2
-rw-r--r--sysdeps/x86_64/multiarch/strrchr.S9
-rw-r--r--sysdeps/x86_64/multiarch/strspn.S3
-rw-r--r--sysdeps/x86_64/multiarch/strstr-c.c40
-rw-r--r--sysdeps/x86_64/multiarch/wcscpy.S3
-rw-r--r--sysdeps/x86_64/multiarch/wmemcmp.S3
-rw-r--r--sysdeps/x86_64/strtok.S2
-rw-r--r--sysdeps/x86_64/sysdep.h6
-rwxr-xr-xsysdeps/x86_64/tst-xmmymm.sh20
-rw-r--r--time/time.h4
-rw-r--r--wcsmbs/Makefile7
-rw-r--r--wcsmbs/test-wcschr-ifunc.c20
-rw-r--r--wcsmbs/test-wcscmp-ifunc.c20
-rw-r--r--wcsmbs/test-wcscpy-ifunc.c20
-rw-r--r--wcsmbs/test-wcslen-ifunc.c20
-rw-r--r--wcsmbs/test-wcsrchr-ifunc.c20
-rw-r--r--wcsmbs/test-wmemcmp-ifunc.c20
1172 files changed, 41943 insertions, 13976 deletions
diff --git a/ChangeLog b/ChangeLog
index ea45adce16..1296ee6d87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,3404 @@
+2012-10-31 Thomas Schwinge <thomas@codesourcery.com>
+
+ * rt/tst-shm.c (worker): Correct checking for mmap failure.
+
+2012-10-31 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist:
+ Fix sort order.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist:
+ Likewise.
+
+2012-10-31 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist:
+ Fix the order of the list for glibc 2.17.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist:
+ Likewise.
+
+2012-10-31 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
+2012-10-31 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14610]
+ * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c (__ieee754_atan2l): Check
+ for low part of x being zero before using __atanl (y).
+ * math/libm-test.inc (atan2_test): Add another test.
+
+ * manual/install.texi (Configuring and compiling): Document
+ general use of test-wrapper and test-wrapper-env.
+ * INSTALL: Regenerated.
+
+ * sysdeps/ieee754/dbl-64/s_fma.c: Include <tininess.h>.
+ (__fma): Do not extract and scale down low bits on after-rounding
+ systems when result rounded to normal precision would have normal
+ exponent.
+ * sysdeps/ieee754/ldbl-128/s_fmal.c: Include <tininess.h>.
+ (__fmal): Do not extract and scale down low bits on after-rounding
+ systems when result rounded to normal precision would have normal
+ exponent.
+ * sysdeps/ieee754/ldbl-96/s_fmal.c: Include <tininess.h>.
+ (__fmal): Do not extract and scale down low bits on after-rounding
+ systems when result rounded to normal precision would have normal
+ exponent.
+ * math/libm-test.inc (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): New
+ macro.
+ (fma_test): Add more tests.
+ (fma_test_towardzero): Likewise.
+ (fma_test_downward): Likewise.
+ (fma_test_upward): Likewise.
+
+2012-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/tininess.h: Renamed to ...
+ * sysdeps/x86/tininess.h: This.
+ * sysdeps/x86_64/tininess.h: Removed.
+
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ * elf/Makefile ($(objpfx)tst-array1.out): Depend on comparison
+ input. Use $(build-program-cmd).
+ ($(objpfx)tst-array1-static.out): Likewise.
+ ($(objpfx)tst-array2.out): Likewise.
+ ($(objpfx)tst-array3.out): Likewise.
+ ($(objpfx)tst-array4.out): Likewise.
+ ($(objpfx)tst-array5.out): Likewise.
+ ($(objpfx)tst-array5-static.out): Likewise.
+
+2012-10-30 Chris Metcalf <cmetcalf@tilera.com>
+
+ * elf/dl-load.c (_dl_map_object_from_fd): Call DL_AFTER_LOAD
+ if defined.
+
+ * nss/nsswitch.h (nss_interface_function): Provide new
+ macro for use with NSS functions.
+ * grp/initgroups.c: Use new macro.
+ * nss/getXXbyYY.c: Likewise.
+ * nss/getXXbyYY_r.c: Likewise.
+ * nss/getXXent.c: Likewise.
+ * nss/getXXent_r.c: Likewise.
+ * sysdeps/posix/getaddrinfo.c: Likewise.
+
+2012-10-30 Andreas Jaeger <aj@suse.de>
+
+ * po/ru.po: Update Russion translation from translation project.
+
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14152]
+ [BZ #14783]
+ * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Extract low bits of
+ result and shift together with sticky bit instead of replicating
+ round-to-nearest rounding.
+ * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Likewise.
+ * sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Likewise.
+ * math/libm-test.inc (fma_test): Add more tests. Do not permit
+ missing underflow exceptions.
+ (fma_test_towardzero): Add more tests.
+ (fma_test_downward): Likewise.
+ (fma_test_upward): Likewise.
+
+ [BZ #14047]
+ * sysdeps/generic/tininess.h: New file.
+ * sysdeps/i386/tininess.h: Likewise.
+ * sysdeps/sh/tininess.h: Likewise.
+ * sysdeps/x86_64/tininess.h: Likewise.
+ * stdlib/tst-strtod-underflow.c: Likewise.
+ * stdlib/tst-tininess.c: Likewise.
+ * stdlib/strtod_l.c: Include <tininess.h>.
+ (round_and_return): Do not set errno for exact underflow cases.
+ Force an underflow exception when setting errno for underflow.
+ Determine underflow based on rounding to normal precision if
+ TININESS_AFTER_ROUNDING.
+ * stdlib/tst-strtod.c (tests): Do not expect errno to be set to
+ ERANGE for exact underflow cases.
+ * stdlib/Makefile (tests): Add tst-tininess and
+ tst-strtod-underflow.
+ ($(objpfx)tst-tininess): Use $(link-libm).
+ ($(objpfx)tst-strtod-underflow): Likewise.
+
+2012-10-30 Andreas Jaeger <aj@suse.de>
+
+ [BZ#14767]
+ * elf/Makefile (tests): Remove conditional for have-initfini-array
+ since this is now always required and the variable does not exist
+ anymore.
+ (tests-static): Likewise.
+ (modules-names): Likewise.
+
+ * po/eo.po: Add Esperanto translation from translation project.
+
+ * elf/tst-array1.c (fini_array): Make writeable so that it can be
+ merged with constructor/destructor.
+ (init_array): Likewise.
+ * elf/tst-array2dep.c (fini_array): Likewise.
+ (init_array): Likewise.
+
+2012-10-29 Mike Frysinger <vapier@gentoo.org>
+
+ * manual/message.texi: Delete @cartouche tags.
+
+2012-10-29 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/mach/hurd/fdatasync.c: Turn ERR into EINVAL if it is
+ EOPNOTSUPP.
+ * sysdeps/mach/hurd/fsync.c: Likewise.
+
+ * sysdeps/pthread/aio_notify.c (__aio_notify_only)
+ [_POSIX_REALTIME_SIGNALS]: Change condition to
+ [_POSIX_REALTIME_SIGNALS > 0].
+
+2012-10-27 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/x86/bits/fcntl.h (__O_LARGEFILE)
+ [!__x86_64]: Do not define, take value from <bits/fcntl-linux.h>.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (__O_LARGEFILE):
+ [__WORDSIZE != 64]: Likewise.
+
+2012-10-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * iconvdata/tst-table.sh: Remove ${SHELL}.
+ * iconvdata/tst-tables.sh: Likewise.
+
+2012-10-25 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+ (__get_clockfreq_via_proc_openprom): Use strtoumax instead
+ of strtoull.
+
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Add comments for
+ ifunc-impl-list.c
+ * sysdeps/sparc/sparc64/multiarch/memset.S: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c: New file.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c: New
+ file.
+
+2012-10-25 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+ (__get_clockfreq_via_proc_openprom): Use __getdents instead of
+ __getdirentries.
+
+2012-10-25 Joseph Myers <joseph@codesourcery.com>
+ Jim Blandy <jimb@codesourcery.com>
+
+ * scripts/cross-test-ssh.sh: New file.
+ * manual/install.texi (Configuring and compiling): Document use of
+ cross-test-ssh.sh.
+ * INSTALL: Regenerated.
+
+2012-10-25 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/mach/hurd/ptrace.c (ptrace): Use __hurd_fail to return
+ EOPNOTSUPP.
+
+2012-10-25 Joseph Myers <joseph@codesourcery.com>
+
+ * Makeconfig (run-program-prefix): Fix comment.
+
+2012-10-24 Joseph Myers <joseph@codesourcery.com>
+ Jim Blandy <jimb@codesourcery.com>
+
+ * Makeconfig (test-wrapper): New variable,
+ (test-wrapper-env): Likewise.
+ [$(cross-compiling) = yes && $(test-wrapper) != ""]
+ (run-built-tests): Define to yes.
+ (run-program-prefix): Use $(test-wrapper).
+ (built-program-cmd): Likewise.
+ * Rules (make-test-out): Use $(test-wrapper-env) and
+ $(host-built-program-cmd).
+ * elf/Makefile ($(objpfx)order.out): Use $(test-wrapper).
+ ($(objpfx)tst-pathopt.out): Pass $(test-wrapper-env) to
+ tst-pathopt.sh.
+ ($(objpfx)tst-rtld-load-self.out): Pass $(test-wrapper) and
+ $(test-wrapper-env) to tst-rtld-load-self.sh.
+ ($(objpfx)order2.out): Use $(test-wrapper).
+ ($(objpfx)tst-initorder.out): Likewise.
+ ($(objpfx)tst-initorder2.out): Likewise.
+ ($(objpfx)tst-unused-dep.out): Use $(test-wrapper-env).
+ * elf/tst-pathopt.sh (run_program_prefix): Remove unused variable.
+ (test_wrapper_env): New variable. Use it to run ld.so.
+ * elf/tst-rtld-load-self.sh (test_wrapper): New variable.
+ Use it to run ld.so.
+ (test_wrapper_env): Likewise.
+ * iconvdata/Makefile ($(objpfx)iconv-test.out): Pass
+ $(test-wrapper) to run-iconv-test.sh.
+ * iconvdata/run-iconv-test.sh (test_wrapper): New variable.
+ (ICONV): Use $test_wrapper.
+ * posix/Makefile ($(objpfx)globtest.out): Pass
+ $(run-via-rtld-prefix), $(test-wrapper) and $(test-wrapper-env) to
+ globtest.sh, not $(run-program-prefix).
+ * posix/globtest.sh (run_via_rtld_prefix): New variable.
+ (test_wrapper): Likewise.
+ (test_wrapper_env): Likewise. Use it to run globtest with HOME
+ set together with run_via_rtld_prefix.
+ (run_program_prefix): Define in terms of test_wrapper and
+ run_via_rtld_prefix.
+
+2012-10-24 Roland McGrath <roland@hack.frob.com>
+
+ * nscd/Makefile ($(objpfx)nscd): Remove librt dependency.
+ * posix/Makefile ($(objpfx)tst-regex, $(objpfx)tst-regex2):
+ Targets removed.
+
+ [BZ #14743]
+ * include/time.h: Remove librt_hidden_proto (clock_gettime).
+ Declare __clock_getres, __clock_gettime, __clock_settime,
+ __clock_nanosleep, and __clock_getcpuclockid.
+ * rt/clock_gettime.c: Define __clock_gettime as an alias.
+ Remove librt_hidden_def (clock_gettime).
+ * sysdeps/unix/clock_gettime.c: Likewise.
+ * rt/clock_getcpuclockid.c: Define __clock_getcpuclockid as an alias.
+ * sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise.
+ * rt/clock_getres.c: Define __clock_getres as an alias.
+ * sysdeps/posix/clock_getres.c: Likewise.
+ * rt/clock_settime.c: Define __clock_settime as an alias.
+ * sysdeps/unix/clock_settime.c: Likewise.
+ * rt/clock_nanosleep.c: Define __clock_nanosleep as an alias.
+ * sysdeps/unix/clock_nanosleep.c: Likewise.
+ * sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise.
+ * rt/clock-compat.c: New file.
+ * rt/Makefile (librt-routines): Add clock-compat and move
+ $(clock-routines) to ...
+ (routines): ... here, new variable.
+ * sysdeps/unix/sysv/linux/powerpc/Makefile (sysdep_routines):
+ Don't add get_clockfreq here.
+ * rt/Versions (libc: GLIBC_2.17): New version set.
+ Add clock_* symbols here.
+ (libc: GLIBC_PRIVATE): New version set. Add __clock_* symbols here.
+ * sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
+ (GLIBC_2.17): Add clock_* symbols.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/sh/nptl/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist: Likewise.
+ * NEWS: Mention the move.
+
+ * sysdeps/unix/sysv/linux/i386/get_clockfreq.c (__get_clockfreq):
+ Use __open, __read, __close rather than their public counterparts.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+ (__get_clockfreq_via_cpuinfo): Likewise.
+ (__get_clockfreq_via_proc_openprom): Likewise, and __getdirentries.
+ (__get_clockfreq_via_dev_openprom): Likewise, and __ioctl.
+
+ * config.h.in (HAVE_IFUNC): New #undef.
+ * configure.in: Define it if libc_cv_ld_gnu_indirect_function
+ was successful.
+ * configure: Regenerated.
+
+2012-10-24 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.in: Move READELF check to start of file.
+ (libc_cv_ld_gnu_indirect_function): Change to a link test. Rename from
+ libc_cv_asm_gnu_indirect_function in the process.
+ * configure: Regenerated.
+
+2012-10-24 Mike Frysinger <vapier@gentoo.org>
+
+ * configure.in (libc_cv_gcc_static_libgcc): Drop -q flag to grep and
+ send the output to /dev/null.
+ (libc_cv_cc_with_libunwind): Likewise.
+ (libc_cv_as_noexecstack): Likewise.
+ * configure: Regenerate.
+
+2012-10-24 Joseph Myers <joseph@codesourcery.com>
+
+ * io/ftwtest-sh (tmp): Define to ${objpfx}io, not using `pwd`.
+
+ * posix/globtest.sh (TMPDIR): Do not set.
+ (testdir): Define using ${common_objpfx}posix not $TMPDIR.
+ (testout): Likewise.
+
+2012-10-24 Andreas Jaeger <aj@suse.de>
+
+ * io/fcntl.h: Always define mode_t, off_t, pid_t and use these
+ types for creat, creat64, lockf, posix_fadvise, posix_fallocate.
+ [__USE_LARGEFILE64 && !__off64_t_defined]: Define off64_t.
+ [__USE_LARGEFILE64]: Use off64_t in declaration of lock64,
+ posix_fadvise64, posix_fallocate64.
+
+ * sysdeps/unix/sysv/linux/x86/bits/fcntl.h (F_GETLK, F_SETLK)
+ (F_SETLKW) [__x86_64]: Remove, provided by <bits/fcntl-linux.h>.
+ (F_GETLK, F_SETLK, F_SETLKW) [!__USE_FILE_OFFSET64 && !__x86_64__]:
+ Likewise.
+ (F_GETLK, F_SETLK, F_SETLKW) [__USE_FILE_OFFSET64 && ! __x86_64__]:
+ Likewise.
+ (F_GETLK64, F_SETLK64, F_SETLKW64) [!__x86_64__]: Likewise.
+
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_GETLK, F_SETLK)
+ (F_SETLKW) [__USE_FILE_OFFSET64]: Remove, provided by
+ <bits/fcntl-linux.h>.
+ (F_GETLK64, F_SETLK64, F_SETLKW64) [__WORDSIZE == 64]: Likewise.
+
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_DUPFD, F_GETFD)
+ (F_SETFD, F_GETFL, F_SETFL): Remove, provided by <bits/fcntl-linux.h>.
+ (F_GETLK, F_SETLK, F_SETLKW) [__WORDSIZE == 64]: Likewise.
+ (F_GETLK, F_SETLK, F_SETLKW, F_GETLK64, F_SETLK64, F_SETLKW64)
+ [__WORDSIZE != 64]: Likewise.
+
+2012-10-23 Joseph Myers <joseph@codesourcery.com>
+
+ * Makeconfig (run-built-tests): New variable.
+ * Rules [$(cross-compiling) = yes]: Change condition to
+ [$(run-built-tests) = no].
+ * catgets/Makefile [$(cross-compiling) != yes]: Change condition
+ to [$(run-built-tests) = yes].
+ * elf/Makefile [$(cross-compiling) = no]: Likewise
+ * grp/Makefile [$(cross-compiling) = no]: Likewise.
+ * iconv/Makefile [$(cross-compiling) != yes]: Likewise.
+ * iconvdata/Makefile [$(cross-compiling) = no]: Likewise.
+ * intl/Makefile [$(cross-compiling) = no]: Likewise.
+ * io/Makefile [$(cross-compiling) = no]: Likewise.
+ * libio/Makefile [$(cross-compiling) = no]: Likewise.
+ * malloc/Makefile [$(cross-compiling) = no]: Likewise.
+ * misc/Makefile [$(cross-compiling) = no]: Likewise.
+ * posix/Makefile [$(cross-compiling) = no]: Likewise.
+ * resolv/Makefile [$(cross-compiling) = no]: Likewise.
+ * stdio-common/Makefile [$(cross-compiling) = no]: Likewise.
+ * stdlib/Makefile [$(cross-compiling) = no]: Likewise.
+ * string/Makefile [$(cross-compiling) = no]: Likewise.
+
+ * posix/Makefile ($(objpfx)globtest.out): Pass
+ $(run-program-prefix) to globtest.sh, not $(elf-objpfx) and
+ $(rtld-installed-name).
+ * posix/globtest.sh (elf_objpfx): Remove variable.
+ (rtld_installed_name): Likewise.
+ (library_path): Likewise.
+ (run_program_prefix): New variable. Use for running globtest
+ binary.
+
+2012-10-23 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * Makeconfig (host-built-program-cmd): New variable.
+ * elf/Makefile (tst-stackguard1-ARGS): Use
+ $(host-built-program-cmd).
+ * posix/Makefile (tst-exec-ARGS): Use $(host-built-program-cmd).
+ (tst-spawn-ARGS): Likewise.
+ * rt/Makefile (tst-mqueue7-ARGS): Use $(host-built-program-cmd).
+
+2012-10-23 Joseph Myers <joseph@codesourcery.com>
+ Jim Blandy <jimb@codesourcery.com>
+
+ * Makeconfig (run-via-rtld-prefix): New variable.
+ (run-program-prefix): Define in terms of $(run-via-rtld-prefix).
+ (built-program-cmd): Likewise.
+
+2012-10-22 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/bits/fcntl-linux.h (O_RSYNC): Define to
+ __O_RSYNC if it exists, otherwise to O_SYNC.
+
+2012-10-22 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * iconvdata/run-iconv-test.sh: Redirect iconv stdin in loops from
+ /dev/null.
+ * iconvdata/tst-tables.sh: Redirect tst-table.sh stdin in loop
+ from /dev/null
+ * posix/tst-getconf.sh: Redirect getconf stdin in loop from
+ /dev/null.
+
+2012-10-22 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (__O_LARGEFILE):
+ Define always.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (__O_LARGEFILE): Likewise.
+
+ * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
+ bits/fcntl-linux.h.
+
+ * sysdeps/unix/sysv/linux/bits/fcntl-linux.h (F_GETLK, F_SETLK)
+ (F_SETLKW) [!F_GETLK]: Define values for [!__USE_FILE_OFFSET64].
+
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (O_LARGEFILE): Rename
+ to __O_LARGEFILE.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (O_LARGEFILE): Rename
+ to __O_LARGEFILE.
+
+2012-10-21 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * config.make.in (NM): New variable.
+
+2012-10-21 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
+2012-10-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14683]
+ * elf/Makefile (tests-static): Add tst-leaks1-static.
+ (tests): Also depend on $(objpfx)tst-leaks1-static-mem.
+ ($(objpfx)tst-leaks1-static): New rule.
+ ($(objpfx)tst-leaks1-static-mem): Likewise.
+ (tst-leaks1-static-ENV): New macro.
+ * elf/dl-open.c (dl_open_worker): Check the main application
+ only if SHARED is defined.
+ * elf/tst-leaks1-static.c: New file.
+
+2012-10-20 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/bits/fcntl-linux.h: New file, contains
+ generic values for Linux.
+ * sysdeps/unix/sysv/linux/x86/bits/fcntl.h: Remove all definitions
+ and declarations that are provided by <bits/fcntl-linux.h> and
+ include <bits/fcntl-linux.h>.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+
+2012-10-20 Roland McGrath <roland@hack.frob.com>
+
+ * io/fcntl.h: Move include of <bits/types.h> to the top and
+ include it unconditionally.
+
+2012-10-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * wcsmbs/Makefile (tests-ifunc): New variable.
+ (tests): Add $(tests-ifunc).
+ * wcsmbs/test-wcschr-ifunc.c: New file.
+ * wcsmbs/test-wcscmp-ifunc.c: Likewise.
+ * wcsmbs/test-wcscpy-ifunc.c: Likewise.
+ * wcsmbs/test-wcslen-ifunc.c: Likewise.
+ * wcsmbs/test-wcsrchr-ifunc.c: Likewise.
+ * wcsmbs/test-wmemcmp-ifunc.c: Likewise.
+
+ * string/Makefile (tests-ifunc): New variable.
+ (tests): Add $(tests-ifunc).
+ * string/test-memccpy.c (TEST_NAME): New macro.
+ * string/test-memchr.c (TEST_NAME): Likewise.
+ * string/test-memcmp.c (TEST_NAME): Likewise.
+ * string/test-memcpy.c (TEST_NAME): Likewise.
+ * string/test-memmem.c (TEST_NAME): Likewise.
+ * string/test-memmove.c (TEST_NAME): Likewise.
+ * string/test-memset.c (TEST_NAME): Likewise.
+ * string/test-rawmemchr.c (TEST_NAME): Likewise.
+ * string/test-stpcpy.c (TEST_NAME): Likewise.
+ * string/test-stpncpy.c (TEST_NAME): Likewise.
+ * string/test-strcasecmp.c (TEST_NAME): Likewise.
+ * string/test-strcasestr.c (TEST_NAME): Likewise.
+ * string/test-strcat.c (TEST_NAME): Likewise.
+ * string/test-strchr.c (TEST_NAME): Likewise.
+ * string/test-strcmp.c(TEST_NAME): Likewise.
+ * string/test-strcpy.c (TEST_NAME): Likewise.
+ * string/test-strcspn.c (TEST_NAME): Likewise.
+ * string/test-strlen.c (TEST_NAME): Likewise.
+ * string/test-strncasecmp.c (TEST_NAME): Likewise.
+ * string/test-strncmp.c (TEST_NAME): Likewise.
+ * string/test-strncpy.c (TEST_NAME): Likewise.
+ * string/test-strnlen.c (TEST_NAME): Likewise.
+ * string/test-strpbrk.c (TEST_NAME): Likewise.
+ * string/test-strrchr.c (TEST_NAME): Likewise.
+ * string/test-strspn.c (TEST_NAME): Likewise.
+ * string/test-strstr.c (TEST_NAME): Likewise.
+ * string/test-bcopy-ifunc.c: New file.
+ * string/test-bzero-ifunc.c: Likewise.
+ * string/test-memccpy-ifunc.c: Likewise.
+ * string/test-memchr-ifunc.c: Likewise.
+ * string/test-memcmp-ifunc.c: Likewise.
+ * string/test-memcpy-ifunc.c: Likewise.
+ * string/test-memmem-ifunc.c: Likewise.
+ * string/test-memmove-ifunc.c: Likewise.
+ * string/test-mempcpy-ifunc.c: Likewise.
+ * string/test-memset-ifunc.c: Likewise.
+ * string/test-rawmemchr-ifunc.c: Likewise.
+ * string/test-stpcpy-ifunc.c: Likewise.
+ * string/test-stpncpy-ifunc.c: Likewise.
+ * string/test-strcasecmp-ifunc.c: Likewise.
+ * string/test-strcasestr-ifunc.c: Likewise.
+ * string/test-strcat-ifunc.c: Likewise.
+ * string/test-strchr-ifunc.c: Likewise.
+ * string/test-strchrnul-ifunc.c: Likewise.
+ * string/test-strcmp-ifunc.c: Likewise.
+ * string/test-strcpy-ifunc.c: Likewise.
+ * string/test-strcspn-ifunc.c: Likewise.
+ * string/test-strlen-ifunc.c: Likewise.
+ * string/test-strncasecmp-ifunc.c: Likewise.
+ * string/test-strncat-ifunc.c: Likewise.
+ * string/test-strncmp-ifunc.c: Likewise.
+ * string/test-strncpy-ifunc.c: Likewise.
+ * string/test-strnlen-ifunc.c: Likewise.
+ * string/test-strpbrk-ifunc.c: Likewise.
+ * string/test-strrchr-ifunc.c: Likewise.
+ * string/test-strspn-ifunc.c: Likewise.
+ * string/test-strstr-ifunc.c: Likewise.
+
+ * debug/Makefile (tests-ifunc): New variable.
+ (tests): Add $(tests-ifunc).
+ * debug/test-stpcpy_chk.c (TEST_NAME): New macro.
+ * debug/test-strcpy_chk.c (TEST_NAME): Likewise.
+ * debug/test-stpcpy_chk-ifunc.c: New file.
+ * debug/test-strcpy_chk-ifunc.c: Likewise.
+
+2012-10-20 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #13601]
+ * elf/dl-load.c (open_verify): Retry read if the entire ELF
+ header is not read in.
+
+2012-10-19 Joseph Myers <joseph@codesourcery.com>
+
+ * io/Makefile ($(objpfx)ftwtest.out): Depend on ftwtest-sh. Pass
+ script to $(SHELL) as $<. Pass $(common-objpfx) to script
+ directly. Pass built executable to script as
+ $(built-program-cmd).
+ * io/ftwtest-sh (ldso): Remove variable. Run ftwtest directly as
+ $testprogram without using LD_LIBRARY_PATH and $ldso.
+
+ * grp/Makefile ($(objpfx)tst_fgetgrent.out): Pass
+ $(run-program-prefix) to tst_fgetgrent.sh, not $(elf-objpfx) and
+ $(rtld-installed-name).
+ * grp/tst_fgetgrent.sh (elf_objpfx): Remove variable.
+ (rtld_installed_name): Likewise.
+ (library_path): Likewise.
+ (run_program_prefix): New variable. Use it to run tst_fgetgrent.
+ * iconvdata/Makefile ($(objpfx)tst-tables.out): Pass
+ $(run-program-prefix) to tst-tables.sh.
+ * iconvdata/tst-table.sh (run_program_prefix): New variable. Use
+ it to run tst-table-from and tst-table-to.
+ * iconvdata/tst-tables.sh (run_program_prefix): New variable.
+ Pass it to tst-table.sh.
+ * intl/Makefile ($(objpfx)tst-gettext.out): Pass
+ $(run-program-prefix) to tst-gettext.sh.
+ ($(objpfx)tst-translit.out): Pass $(run-program-prefix) to
+ tst-translit.sh.
+ ($(objpfx)tst-gettext2.out): Pass $(run-program-prefix) to
+ tst-gettext2.sh.
+ * intl/tst-gettext.sh (run_program_prefix): New variable. Use it
+ to run tst-gettext.
+ * intl/tst-gettext2.sh (run_program_prefix): New variable. Use it
+ to run tst-gettext2.
+ * intl/tst-translit.sh (run_program_prefix): New variable. Use it
+ to run tst-translit.
+ * malloc/Makefile ($(objpfx)tst-mtrace.out): Pass
+ $(run-program-prefix) to tst-mtrace.sh.
+ * malloc/tst-mtrace.sh (run_program_prefix): New variable. Use it
+ to run tst-mtrace.
+ * posix/Makefile ($(objpfx)wordexp-tst.out): Pass
+ $(run-program-prefix) to wordexp-tst.sh, not $(elf-objpfx) and
+ $(rtld-installed-name).
+ * posix/wordexp-tst.sh (elf_objpfx): Remove variable.
+ (rtld_installed_name): Likewise.
+ (run_program_prefix): New variable. Use it to run wordexp-test.
+
+ * Makeconfig (ARCH): Remove all definitions.
+ (machine): Likewise.
+ [ARCH]: Remove conditional code.
+ [!objdir]: Give error.
+ [!objdir] (objpfx): Remove.
+ [!objdir] (common-objpfx): Likewise.
+ [!objdir] (common-objdir): Likewise.
+ * configure.in (config_makefile): Remove. Hardcode Makefile in
+ AC_CONFIG_FILES call.
+ * configure: Regenerated.
+
+ [BZ #13888]
+ * io/ftwtest-sh (tmp): Set to use the working directory, not /tmp
+ or TMPDIR.
+ (testout): Likewise.
+
+ * posix/Makefile ($(objpfx)tst-getconf.out): Pass
+ $(built-program-cmd) to tst-getconf.sh, not $(elf-objpfx) and
+ $(rtld-installed-name).
+ * posix/tst-getconf.sh (elf_objpfx): Remove variable.
+ (rtld_installed_name): Likwise.
+ (runit): Remove function.
+ (run_getconf): New variable, Use it for running getconf binary.
+
+2012-10-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14716]
+ * string/test-memmem.c (check_result): New function.
+ (do_one_test): Use it.
+ (check1): New function.
+ (test_main): Use it.
+
+2012-10-18 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ * math/Makefile: Comment on slow compilation of test-tgmath2.c.
+
+2012-10-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/generic/_G_config.h (_G_OPEN64): Remove.
+ (_G_LSEEK64): Likewise.
+ (_G_MMAP64): Likewise.
+ (_G_FSTAT64): Likewise.
+ * sysdeps/unix/sysv/linux/_G_config.h (_G_OPEN64): Remove.
+ (_G_LSEEK64): Likewise.
+ (_G_MMAP64): Likewise.
+ (_G_FSTAT64): Likewise.
+ * libio/fileops.c (mmap_remap_check) [_G_MMAP64]: Make code
+ unconditional. Call __mmap64 directly.
+ (mmap_remap_check) [!_G_MMAP64]: Remove conditional code.
+ (mmap_remap_check) [_G_LSEEK64]: Make code unconditional. Call
+ __lseek64 directly.
+ (mmap_remap_check) [!_G_LSEEK64]: Remove conditional code.
+ (decide_maybe_mmap) [_G_MMAP64]: Make code unconditional. Call
+ __mmap64 directly.
+ (decide_maybe_mmap) [!_G_MMAP64]: Remove conditional code.
+ (decide_maybe_mmap) [_G_LSEEK64]: Make code unconditional. Call
+ __lseek64 directly.
+ (decide_maybe_mmap) [!_G_LSEEK64]: Remove conditional code.
+ (_IO_file_sync_mmap) [_G_LSEEK64]: Make code unconditional. Call
+ __lseek64 directly.
+ (_IO_file_sync_mmap) [!_G_LSEEK64]: Remove conditional code.
+ (_IO_file_seek) [_G_LSEEK64]: Make code unconditional. Call
+ __lseek64 directly.
+ (_IO_file_seek) [!_G_LSEEK64]: Remove conditional code.
+ (_IO_file_stat) [_G_FSTAT64]: Make code unconditional. Call
+ __fxstat64 directly.
+ (_IO_file_stat) [!_G_FSTAT64]: Remove conditional code.
+ * libio/freopen64.c (freopen64) [_G_OPEN64]: Make code
+ unconditional.
+ (freopen64) [!_G_OPEN64]: Remove conditional code.
+ * libio/fseeko64.c (fseeko64) [_G_LSEEK64]: Make code
+ unconditional.
+ (fseeko64) [!_G_LSEEK64]: Remove conditional code.
+ * libio/ftello64.c (ftello64) [_G_LSEEK64]: Make code
+ unconditional.
+ (ftello64) [!_G_LSEEK64]: Remove conditional code.
+ * libio/iofgetpos64.c (_IO_new_fgetpos64) [_G_LSEEK64]: Make code
+ unconditional.
+ (_IO_new_fgetpos64) [!_G_LSEEK64]: Remove conditional code.
+ * libio/iofopen64.c (_IO_fopen64) [_G_OPEN64]: Make code
+ unconditional.
+ (_IO_fopen64) [!_G_OPEN64]: Remove conditional code.
+ * libio/iofsetpos64.c (_IO_new_fsetpos64) [_G_LSEEK64]: Make code
+ unconditional.
+ (_IO_new_fsetpos64) [!_G_LSEEK64]: Remove conditional code.
+ * libio/oldiofgetpos64.c (_IO_old_fgetpos64) [_G_LSEEK64]: Make code
+ unconditional.
+ (_IO_old_fgetpos64) [!_G_LSEEK64]: Remove conditional code.
+ * libio/oldiofsetpos64.c (_IO_old_fsetpos64) [_G_LSEEK64]: Make code
+ unconditional.
+ (_IO_old_fsetpos64) [!_G_LSEEK64]: Remove conditional code.
+
+2012-10-18 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #12140]
+ * manual/memory.texi (Malloc Tunable Parameters): Add note
+ about free list pointers overwriting some perturb bytes.
+ Wording suggested by Roland McGrath.
+
+2012-10-17 Joseph Myers <joseph@codesourcery.com>
+
+ * math/libm-test.inc (gamma_test): Do not call feclearexcept.
+ (lgamma_test): Likewise.
+ (tgamma_test): Likewise.
+
+2012-10-16 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #14700]
+ * sysdeps/posix/opendir.c (MAX_DIR_BUFFER_SIZE): New constant.
+ (__alloc_dir): Limit buffer to MAX_DIR_BUFFER_SIZE.
+
+2012-10-16 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * NEWS: Mention BZ #14716.
+ * string/str-two-way.h (two_way_short_needle): Fix thinko introduced
+ when removing AVAILABLE1_USES_J macro.
+
+2012-10-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86/bits/byteswap.h: Include <bits/types.h>.
+ (__bswap_64): __uint64_t for unsigned 64-bit int.
+
+2012-10-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * include/string.h (memmem): Declare libc hidden alias.
+ * string/memmem.c (memmem): Define libc hidden alias.
+ * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c: Use __open,
+ __read, __close instead of open, read, close.
+
+2012-10-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/multiarch/ifunc-impl-list.c: New file.
+ * sysdeps/x86_64/multiarch/memcmp.S (__memcmp_sse2): Make it
+ global and hidden.
+ * sysdeps/x86_64/multiarch/memcpy.S (__memcpy_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/rawmemchr.S (__rawmemchr_sse42):
+ Likewise.
+ (__rawmemchr_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/strcat.S (STRCAT_SSE2): Likewise.
+ * sysdeps/x86_64/multiarch/strchr.S (__strchr_sse42): Likewise.
+ (__strchr_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/strcmp-sse42.S (STRCMP_SSE42): Likewise.
+ * sysdeps/x86_64/multiarch/strcmp.S (STRCMP_SSE2): Likewise.
+ (__strcasecmp_sse2): Likewise.
+ (__strncasecmp_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/strcpy.S (STRCPY_SSE2): Likewise.
+ * sysdeps/x86_64/multiarch/strlen.S (__strlen_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/strnlen.S (__strnlen_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/strrchr.S (__strrchr_sse42): Likewise.
+ (__strrchr_sse2): Likewise.
+ * sysdeps/x86_64/multiarch/memcmp.S: Add comments for
+ ifunc-impl-list.c.
+ * sysdeps/x86_64/multiarch/memcpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/memcpy_chk.S: Likewise.
+ * sysdeps/x86_64/multiarch/memmove.c: Likewise.
+ * sysdeps/x86_64/multiarch/memmove_chk.c: Likewise.
+ * sysdeps/x86_64/multiarch/mempcpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/mempcpy_chk.S: Likewise.
+ * sysdeps/x86_64/multiarch/memset.S: Likewise.
+ * sysdeps/x86_64/multiarch/memset_chk.S: Likewise.
+ * sysdeps/x86_64/multiarch/rawmemchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/stpcpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/stpncpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcasecmp_l.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcasestr-c.c: Likewise.
+ * sysdeps/x86_64/multiarch/strcat.S: Likewise.
+ * sysdeps/x86_64/multiarch/strchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcmp.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/strcspn.S: Likewise.
+ * sysdeps/x86_64/multiarch/strlen.S: Likewise.
+ * sysdeps/x86_64/multiarch/strncase_l.S: Likewise.
+ * sysdeps/x86_64/multiarch/strncat.S: Likewise.
+ * sysdeps/x86_64/multiarch/strncmp.S: Likewise.
+ * sysdeps/x86_64/multiarch/strncpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/strnlen.S: Likewise.
+ * sysdeps/x86_64/multiarch/strpbrk.S: Likewise.
+ * sysdeps/x86_64/multiarch/strrchr.S: Likewise.
+ * sysdeps/x86_64/multiarch/strspn.S: Likewise.
+ * sysdeps/x86_64/multiarch/strstr-c.c: Likewise.
+ * sysdeps/x86_64/multiarch/wcscpy.S: Likewise.
+ * sysdeps/x86_64/multiarch/wmemcmp.S: Likewise.
+
+ * sysdeps/i386/i686/multiarch/bcopy.S (__bcopy_ia32): Make it
+ global and hidden.
+ * sysdeps/i386/i686/multiarch/bzero.S (__bzero_ia32): Likewise.
+ * sysdeps/i386/i686/multiarch/memcmp.S (__memcmp_ia32): Likewise.
+ * sysdeps/i386/i686/multiarch/memcpy.S (__memcpy_ia32): Likewise.
+ * sysdeps/i386/i686/multiarch/memmove.S (__memmove_ia32):
+ Likewise.
+ * sysdeps/i386/i686/multiarch/mempcpy.S (__mempcpy_ia32):
+ Likewise.
+ * sysdeps/i386/i686/multiarch/strcat.S (STRCAT_IA32): Likewise.
+ * sysdeps/i386/i686/multiarch/strcmp.S (__STRCMP_IA32): Likewise.
+ * sysdeps/i386/i686/multiarch/strcpy.S (STRCPY_IA32): Likewise.
+ * sysdeps/i386/i686/multiarch/bcopy.S: Add comments for
+ ifunc-impl-list.c.
+ * sysdeps/i386/i686/multiarch/bzero.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memchr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memcmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memcpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memmove.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise.
+ * sysdeps/i386/i686/multiarch/mempcpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memrchr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memset.S: Likewise.
+ * sysdeps/i386/i686/multiarch/memset_chk.S: Likewise.
+ * sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/stpcpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/stpncpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcasecmp_l.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcasestr-c.c: Likewise.
+ * sysdeps/i386/i686/multiarch/strcat.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strchr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcspn.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strlen.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strncase.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strncase_l.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strncat.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strncmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strncpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strnlen.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strpbrk.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strrchr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strspn.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strstr-c.c: Likewise.
+ * sysdeps/i386/i686/multiarch/wcschr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/wcscmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/wcscpy.S: Likewise.
+ * sysdeps/i386/i686/multiarch/wcslen.S: Likewise.
+ * sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise.
+ * sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/ifunc-impl-list.c: New file.
+
+ * Rules [$(multi-arch) = no] (tests): Filter out $(tests-ifunc).
+ [$(multi-arch) = no] (xtests): Filter out $(xtests-ifunc).
+ * include/ifunc-impl-list.h: New file.
+ * misc/ifunc-impl-list.c: Likewise.
+ * misc/Makefile (routines): Add ifunc-impl-list.
+ * misc/Versions (GLIBC_PRIVATE): Add __libc_ifunc_impl_list.
+ * string/test-string.h: Include <ifunc-impl-list.h>.
+ [TEST_IFUNC && TEST_NAME] (func_list, func_count, impl_count,
+ impl_array): New variables.
+ (FOR_EACH_IMPL): Support func_list if TEST_IFUNC and TEST_NAME
+ are defined.
+ (test_init): Call __libc_ifunc_impl_list to initialize
+ func_list if TEST_IFUNC and TEST_NAME are defined.
+
+ * string/Makefile (strop-tests): Add bcopy and bzero.
+ * string/test-bcopy.c: New file.
+ * string/test-bzero.c: Likewise.
+ * string/test-memmove.c: Support bcopy test if TEST_BCOPY is
+ defined.
+ * string/test-memset.c: Support bzero test if TEST_BZERO is
+ defined.
+ * sysdeps/x86_64/multiarch/bcopy.S (bcopy): Jump to
+ __libc_memmove.
+ * sysdeps/x86_64/multiarch/bzero.S (__bzero): Jump to
+ __libc_memset.
+ * sysdeps/x86_64/multiarch/memset.S (__libc_memset): New alias
+ of memset.
+
+2012-10-10 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in: Run $CXX, not cc1plus, to locate C++ headers.
+ * configure: Regenerated.
+
+ * Makeconfig (+link-static-before-libc): Don't include
+ $(link-static-libc).
+
+ * libio/libio.h (_IO_pos_t): Remove.
+
+2012-10-10 Alexandre Oliva <aoliva@redhat.com>
+
+ * NEWS: Add note about FIPS mode. Wording suggested by Roland
+ McGrath.
+
+2012-10-10 Alexandre Oliva <aoliva@redhat.com>
+
+ * crypt/crypt-entry.c: Include fips-private.h.
+ (__crypt_r, __crypt): Disable MD5 and DES if FIPS is enabled.
+ * crypt/md5c-test.c (main): Tolerate disabled MD5.
+ * sysdeps/unix/sysv/linux/fips-private.h: New file.
+ * sysdeps/generic/fips-private.h: New file, dummy fallback.
+
+2012-10-10 Alexandre Oliva <aoliva@redhat.com>
+
+ * crypt/crypt-private.h: Include stdbool.h.
+ (_ufc_setup_salt_r): Return bool.
+ * crypt/crypt-entry.c: Include errno.h.
+ (__crypt_r): Return NULL with EINVAL for bad salt.
+ * crypt/crypt_util.c (bad_for_salt): New.
+ (_ufc_setup_salt_r): Check that salt is long enough and within
+ the specified alphabet.
+ * crypt/badsalttest.c: New file.
+ * crypt/Makefile (tests): Add it.
+ ($(objpfx)badsalttest): New.
+
+2012-10-09 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * NEWS: Add entry for BZ #14602.
+
+2012-10-09 Joseph Myers <joseph@codesourcery.com>
+
+ * math/gen-libm-test.pl (parse_args): Handle comparison macros as
+ type-generic.
+ * math/libm-test.inc: Update comment listing what functions and
+ macros are tested.
+ (isgreater_test): New function.
+ (isgreaterequal_test): Likewise.
+ (isless_test): Likewise.
+ (islessequal_test): Likewise.
+ (islessgreater_test): Likewise.
+ (isunordered_test): Likewise.
+ (main): Call the new functions.
+
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * aclocal.m4 (GLIBC_PROVIDES): Provide _AS_BASENAME_PREPARE,
+ _AS_ME_PREPARE, _AS_VAR_ARITH_PREPARE, AS_SHELL_FN_as_fn_set_status,
+ AS_SHELL_FN_as_fn_exit, AS_SHELL_FN_ac_fn_c_try_compile.
+ * sysdeps/i386/configure: Regenerated.
+ * sysdeps/ieee754/ldbl-opt/configure: Regenerated.
+ * sysdeps/mach/configure: Regenerated.
+ * sysdeps/mach/hurd/configure: Regenerated.
+ * sysdeps/powerpc/configure: Regenerated.
+ * sysdeps/powerpc/powerpc32/configure: Regenerated.
+ * sysdeps/powerpc/powerpc64/configure: Regenerated.
+ * sysdeps/s390/s390-32/configure: Regenerated.
+ * sysdeps/s390/s390-64/configure: Regenerated.
+ * sysdeps/sh/configure: Regenerated.
+ * sysdeps/sparc/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/powerpc/configure: Regenerated.
+ * sysdeps/x86_64/configure: Regenerated.
+
+ * dlfcn/dlerror.c (check_free): Call _dl_addr only if SHARED is
+ defined. Don't check if MAP is NULL.
+
+2012-10-09 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/generic/_G_config.h (_G_off64_t): Remove.
+ (_G_stat64): Likewise.
+ * sysdeps/unix/sysv/linux/_G_config.h (_G_off64_t): Remove.
+ (_G_stat64): Likewise.
+ * libio/filedoalloc.c (_IO_file_doallocate): Use struct stat64
+ instead of struct _G_stat64.
+ * libio/fileops.c (mmap_remap_check): Likewise.
+ (decide_maybe_mmap): Likewise.
+ (_IO_new_file_seekoff): Likewise.
+ (_IO_file_stat): Likewise.
+ * libio/libio.h (_IO_off64_t): Define to __off64_t, not
+ _G_off64_t.
+ * libio/oldfileops.c (_IO_old_file_seekoff): Use struct stat64
+ instead of struct _G_stat64.
+ * libio/wfileops.c (_IO_wfile_seekoff): Likewise.
+
+2012-10-08 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ [BZ #14602]
+ * string/str-two-way.h (AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J):
+ Replace with ...
+ (CHECK_EOL): New macro.
+ (two_way_short_needle): Check beginning of haystack for EOL. Use
+ CHECK_EOL.
+ * string/strcasestr.c (AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J):
+ Replace with CHECK_EOL.
+ * string/strstr.c (AVAILABLE1, AVAILABLE2, AVAILABLE1_USES_J):
+ Replace with CHECK_EOL.
+
+2012-10-08 Joseph Myers <joseph@codesourcery.com>
+
+ * math/gen-libm-test.pl (parse_args): Handle isinf and isnan as
+ type-generic.
+ * math/libm-test.inc: Update comment listing what functions and
+ macros are tested.
+ (finite_test): New function.
+ (isinf_test): Likewise.
+ (isnan_test): Likewise.
+ (fpclassify_test): Test subnormal input.
+ (isfinite_test): Likewise.
+ (isnormal_test): Likewise.
+ (main): Call the new functions.
+
+2012-10-08 Jonathan Nieder <jrnieder@gmail.com>
+
+ [BZ #14660]
+ * Makerules (%.dynsym): Force C locale when running
+ $(OBJDUMP) --dynamic-syms.
+
+2012-10-08 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c: Include
+ <stdint.h>.
+
+2012-10-06 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: On 32-bit, clear
+ upper 32-bits of the length value in %o2 since we use branch-on-register
+ tests which consider the entire 64-bit register.
+
+2012-10-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * string/test-strstr.c (check2): Add a test for page boundary.
+
+2012-10-05 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc64/multiarch/memset-niagara4.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S: New
+ file.
+ * sysdeps/sparc/sparc64/multiarch/Makefile: Add to
+ sysdep_routines.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memset.S: Use Niagara-4 memset
+ and bzero when HWCAP_SPARC_CRYPTO is present.
+
+2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14602]
+ * string/test-strstr.c (check2): New function.
+ (test_main): Call check2.
+
+ * string/Makefile (tests): Remove bug-strstr1, bug-strcasestr1
+ and bug-strchr1.
+ * string/bug-strcasestr1.c (do_test): Moved to ...
+ * string/test-strcasestr.c (check1): Here. New function.
+ (do_one_test): Break out result checking code into ...
+ (check_result): This. New function.
+ (do_one_test): Call check_result.
+ (test_main): Call check1.
+ * string/bug-strchr1.c (do_test): Moved to ...
+ * string/test-strchr.c (check1): Here. New function.
+ (do_one_test): Break out result checking code into ...
+ (check_result): This. New function.
+ (do_one_test): Call check_result.
+ (test_main): Call check1.
+ * string/bug-strstr1.c (main): Moved to ...
+ * string/test-strchr.c (check1): Here. New function.
+ (do_one_test): Break out result checking code into ...
+ (check_result): This. New function.
+ (do_one_test): Call check_result.
+ (test_main): Call check1.
+ * string/bug-strcasestr1.c: Removed.
+ * string/bug-strchr1.c: Likewise.
+ * string/bug-strstr1.c: Likewise.
+
+ * elf/Makefile (dl-routines): Add hwcaps.
+ * elf/dl-support.c (_dl_important_hwcaps): Removed.
+ * elf/dl-sysdep.c (_DL_FIRST_EXTRA): Likewise.
+ (_dl_important_hwcaps): Moved to ...
+ * elf/dl-hwcaps.c: Here. New file.
+ * sysdeps/mach/hurd/dl-sysdep.c (_dl_important_hwcaps): Removed.
+
+ [BZ #14557]
+ * elf/setup-vdso.h (setup_vdso): Set GL(dl_nns) to 1 for vDSO
+ if IS_IN_rtld isn't defined.
+
+ * elf/dl-support.c (_dl_sysinfo_map): New.
+ Include "get-dynamic-info.h" and "setup-vdso.h".
+ (_dl_non_dynamic_init): Call setup_vdso.
+ * elf/dynamic-link.h: Don't include <assert.h>.
+ (elf_get_dynamic_info): Moved to ...
+ * elf/get-dynamic-info.h: Here. New file.
+ * elf/dynamic-link.h: Include "get-dynamic-info.h".
+ * elf/rtld.c (dl_main): Break out vDSO setup code into ...
+ * elf/setup-vdso.h: Here. New file.
+ * elf/rtld.c: Include "setup-vdso.h".
+ (dl_main): Call setup_vdso.
+
+2012-10-05 Joseph Myers <joseph@codesourcery.com>
+
+ * math/libm-test.inc: List nexttoward, cimag, clog10, conf and
+ creal in comment listing functions tested. List finite, isinf,
+ isnan, isless, islessequal, isgreater, isgreaterequal,
+ islessgreater, isunordered, lgamma_r and pow10 as functions and
+ macros not tested. Mention which functions not tested are aliases
+ for other functions. Fix typo. Note that signs of NaNs are not
+ tested.
+
+ * scripts/config.guess: Update from config.git.
+ * scripts/config.sub: Likewise.
+
+2012-10-04 Roland McGrath <roland@hack.frob.com>
+
+ * misc/Versions (GLIBC_PRIVATE): New set, add __madvise.
+ * misc/madvise.c (madvise): Renamed to __madvise.
+ Make madvise a weak alias.
+ * include/sys/mman.h: Declare __madvise.
+ Replace libc_hidden_proto (madvise) with libc_hidden_proto (__madvise).
+ * sysdeps/unix/syscalls.list
+ (madvise): Make __madvise the strong name, and madvise a weak alias.
+ * sysdeps/unix/sysv/linux/syscalls.list
+ (madvise, mmap): Remove redundant entries.
+ * malloc/arena.c (shrink_heap): Use __madvise, not madvise.
+ * malloc/malloc.c (mtrim): Likewise.
+ * sysdeps/mach/hurd/malloc-machine.h (madvise): Renamed to __madvise.
+
+2012-10-03 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/mach/hurd/dl-cache.c: File removed.
+ * config.h.in (USE_LDCONFIG): New #undef.
+ * configure.in (use_ldconfig): If set, define USE_LDCONFIG.
+ * configure: Regenerated.
+ * elf/Makefile (dl-routines): Add dl-cache only under
+ [$(use-ldconfig) = yes].
+ * elf/dl-load.c (_dl_map_object): Conditionalize code consulting the
+ cache on [USE_LDCONFIG].
+ * elf/dl-open.c (_dl_open): Call _dl_unload_cache only under
+ [USE_LDCONFIG].
+ * elf/rtld.c (dl_main): Likewise.
+
+2012-10-03 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/posix/sysconf.c (__sysconf): Return 0 also for
+ _SC_LEVEL4_CACHE_LINESIZE.
+
+2012-10-03 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/bsd/confstr.h: File removed.
+
+2012-10-02 Alexandre Oliva <aoliva@redhat.com>
+
+ * scripts/check-local-headers.sh: Exclude sys/sdt.h and
+ sys/sdt-config.h.
+
+2012-10-02 Roland McGrath <roland@hack.frob.com>
+
+ * elf/dl-load.c (_dl_map_object_from_fd: struct loadcmd):
+ Make 'mapoff' field ElfW(Off) rather than off_t.
+
+2012-10-02 Dmitry V. Levin <ldv@altlinux.org>
+
+ * nscd/Makefile: Remove nscd-cflags and all its users.
+ (CPPFLAGS-nonlib): Add preprocessor flags for nscd modules.
+ (CFLAGS-nonlib): Add compiler flags for nscd modules.
+
+ [BZ #10631]
+ * malloc.c (malloc_printerr): Clarify error message.
+
+2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14648]
+ * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
+ Set bit_FMA_Usable if FMA is supported.
+ * sysdeps/x86_64/multiarch/init-arch.h (bit_FMA_Usable): New
+ macro.
+ (bit_FMA4_Usable): Updated.
+ (index_FMA_Usable): New macro.
+ (CPUID_FMA): Likewise
+ (HAS_FMA): Defined with bit_FMA_Usable.
+
+2012-10-01 Roland McGrath <roland@hack.frob.com>
+
+ * bits/types.h (__swblk_t): Type removed.
+ * bits/typesizes.h (__SWBLK_T_TYPE): Macro removed.
+ * sysdeps/mach/hurd/bits/typesizes.h (__SWBLK_T_TYPE): Likewise.
+ * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
+ (__SWBLK_T_TYPE): Likewise.
+ * sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+ (__SWBLK_T_TYPE): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+ (__SWBLK_T_TYPE): Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/typesizes.h
+ (__SWBLK_T_TYPE): Likewise.
+
+2012-10-01 Patsy Franklin <pfrankli@redhat.com>
+ Honza Horak <hhorak@redhat.com>
+
+ * nis/yp_xdr.c (xdr_domainname): Use YPMAXDOMAIN as maxsize.
+ (xdr_mapname): Use YPMAXMAP as maxsize.
+ (xdr_peername): Use YPMAXPEER as maxsize.
+ (xdr_keydat): Use YPAXRECORD as maxsize.
+ (xdr_valdat): Use YPMAXRECORD as maxsize.
+
+2012-10-01 Roland McGrath <roland@hack.frob.com>
+
+ * io/openat.c [!__ASSUME_ATFCTS] (__have_atfcts): New global variable.
+
+ * sysdeps/unix/sysv/linux/init-first.c: Moved to ...
+ * csu/init-first.c: ... here.
+ * sysdeps/unix/sysv/linux/powerpc/init-first.c: Update #include.
+ * sysdeps/unix/sysv/linux/s390/init-first.c: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/init-first.c: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/x32/init-first.c: Likewise.
+ * sysdeps/i386/init-first.c: File removed.
+ * sysdeps/sh/init-first.c: File removed.
+
+2012-10-01 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14645]
+ * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Compute result as x * y
+ if x * y might underflow to zero and z is zero.
+ * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Likewise.
+ * sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Likewise.
+ * math/libm-test.inc (min_subnorm_value): New variable.
+ (fma_test): Add more tests.
+ (fma_test_towardzero): Likewise.
+ (fma_test_downward): Likewise
+ (fma_test_upward): Likewise.
+ (initialize): Set min_subnorm_value.
+
+2012-09-29 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14638]
+ * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Use x * y + z for exact
+ 0 + 0.
+ * sysdeps/ieee754/dbl-64/s_fmaf.c (__fmaf): Use original rounding
+ mode for addition resulting in exact zero.
+ * sysdeps/ieee754/ldbl-128/s_fma.c (__fma): Likewise.
+ * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Use x * y + z for
+ exact 0 + 0.
+ * sysdeps/ieee754/ldbl-96/s_fma.c (__fma): Likewise.
+ * sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Likewise.
+ * math/libm-test.inc (fma_test): Add more tests.
+ (fma_test_towardzero): New function.
+ (fma_test_downward): Likewise.
+ (fma_test_upward): Likewise.
+ (main): Call the new functions.
+
+2012-09-28 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Fix garbage in file.
+
+2012-09-28 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/posix/sleep.c (__sleep): Rewritten using __nanosleep
+ instead of SIGALRM.
+
+ * sysdeps/gnu/_G_config.h: Moved to ...
+ * sysdeps/unix/sysv/linux/_G_config.h: ... here.
+ * sysdeps/mach/hurd/_G_config.h: Moved to ...
+ * sysdeps/generic/_G_config.h: ... here.
+
+ * io/open.c (__open): Renamed to __libc_open. Make __open an alias.
+
+ * posix/Makefile ($(objpfx)config-name.h): Do $(make-target-directory).
+
+ * nss/Makefile ($(objpfx)/libnss_test1.so$(libnss_test1.so-version)):
+ Conditionalize target on [libnss_test1.so-version].
+
+ * elf/dl-sysdep.c: Conditionalize whole contents on [SHARED].
+
+ * Makeconfig (nssobjdir, resolvobjdir): Remove variables.
+ (elfobjdir): Move out of conditionals.
+
+ * nss/nsswitch.c (nss_new_service): Conditionalize definition and
+ declaration on [!DO_STATIC_NSS || SHARED], matching its only caller.
+ (__nss_lookup_function): Conditionalize label remove_from_tree on
+ [!DO_STATIC_NSS || SHARED], matching its only use.
+
+2012-09-28 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-niagara4.S: New
+ file.
+ * sysdeps/sparc/sparc64/multiarch/Makefile: Add to
+ sysdep_routines.
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Likewise.
+ * sysdeps/sparc/sparc64/multiarch/memcpy.S: Use Niagara-4 memcpy
+ when HWCAP_SPARC_CRYPTO is present.
+
+2012-09-28 Pino Toscano <toscano.pino@tiscali.it>
+
+ * io/tst-mknodat.c: Create a FIFO instead of a socket.
+
+2012-09-28 Andreas Schwab <schwab@linux-m68k.org>
+
+ [BZ #6530]
+ * stdio-common/vfprintf.c (process_string_arg): Revert
+ 2000-07-22 change.
+
+2011-09-28 Jonathan Nieder <jrnieder@gmail.com>
+
+ * stdio-common/Makefile (tst-sprintf-ENV): Set environment
+ for testcase.
+ * stdio-common/tst-sprintf.c: Include <locale.h>
+ (main): Test sprintf's handling of incomplete multibyte
+ characters.
+
+2012-09-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf/dl-runtime.c (VERSYMIDX): Removed.
+ * elf/dl-version.c (VERSYMIDX): Likewise.
+ * elf/do-rel.h (VERSYMIDX): Likewise.
+ (VALIDX): Likewise.
+ * elf/dynamic-link.h (VERSYMIDX): Likewise.
+ * elf/rtld.c (VALIDX): Likewise.
+ (ADDRIDX): Likewise.
+ * sysdeps/sparc/sparc32/dl-machine.h (VALIDX): Likewise.
+ * sysdeps/sparc/sparc64/dl-machine.h (VALIDX): Likewise.
+ * sysdeps/x86_64/dl-tlsdesc.h (ADDRIDX): Likewise.
+ * sysdeps/generic/ldsodefs.h (VERSYMIDX): New macro.
+ (VALIDX): Likewise.
+ (ADDRIDX): Likewise.
+
+2012-09-28 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/pthread/aio_fsync.c: Fix the file mode checking.
+
+2012-09-28 Dmitry V. Levin <ldv@altlinux.org>
+
+ [BZ #11438]
+ * sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918 addresses
+ to global scope.
+ * posix/tst-rfc3484.c: Verify 10/8, 172.16/12 and 196.128/16
+ addresses are in the same scope as 192.0.2/24.
+ * posix/gai.conf: Document new scope table defaults.
+
+2012-09-28 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #5298]
+ * libio/fileops.c (_IO_new_file_seekoff): Don't flush buffer
+ for ftell. Compute offsets from write pointers instead.
+ * libio/wfileops.c (_IO_wfile_seekoff): Likewise.
+
+2012-09-28 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #14543]
+ * libio/Makefile (tests): New test case tst-fseek.
+ * libio/tst-fseek.c: New test case to verify that fseek/ftell
+ combination works in wide mode.
+ * libio/wfileops.c (_IO_wfile_seekoff): Adjust internal buffer
+ state when the external buffer state changes.
+
+2012-09-27 David S. Miller <davem@davemloft.net>
+
+ [BZ #14376]
+ * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Do not
+ pass reloc->r_addend in as the 'high' argument to
+ sparc64_fixup_plt when handling R_SPARC_JMP_IREL relocations.
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-09-28 Pino Toscano <toscano.pino@tiscali.it>
+
+ * rt/tst-aio2.c: Include <pthread.h>.
+ * rt/tst-aio3.c: Likewise.
+
+2012-09-27 Steve Ellcey <sellcey@mips.com>
+
+ * sysdeps/ieee754/ldbl-128/bits/huge_vall.h: Remove.
+
+2012-09-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/multiarch/strncmp-ssse3.S: Conditionalize
+ contents on [SHARED].
+
+2012-09-26 Marek Polacek <polacek@redhat.com>
+
+ [BZ #14530]
+ [BZ #13741]
+ * misc/sys/cdefs.h: Define __extern_inline and __extern_always_inline
+ for C++ and GCC <4.3 as well as for non GCC compilers.
+
+2012-09-26 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+2012-09-25 Roland McGrath <roland@hack.frob.com>
+
+ * Makefile.in (all, install): Declare with .PHONY.
+ Reported by Michael Hope <michael.hope@linaro.org>.
+
+2012-09-25 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
+
+ * manual/platform.texi (PowerPC): Document __ppc_get_timebase_freq.
+ * sysdeps/powerpc/sys/platform/ppc.h: Include the operating
+ system header.
+ * sysdeps/unix/sysv/linux/powerpc/Makefile (sysdep_headers):
+ Likewise.
+ (sydep_routines): Add the new and the internal functions.
+ * sysdeps/unix/sysv/linux/powerpc/bits/ppc.h: New file.
+ * sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions
+ (GLIBC_2.17): Add the new function.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
+ (GLIBC_2.17): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
+ (GLIBC_2.17): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
+ (GLIBC_2.17): Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c: New file.
+
+2012-09-25 Alan Modra <amodra@gmail.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
+ Add release barrier before setting once_control to say
+ initialisation is done. Add hints on lwarx. Use macro in
+ place of isync.
+ (clear_once_control): Add release barrier.
+
+2012-09-25 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13629]
+ * math/s_clog.c (__clog): Handle more values close to |z| = 1
+ specially.
+ * math/s_clog10.c (__clog10): Likewise.
+ * math/s_clog10f.c (__clog10f): Likewise.
+ * math/s_clog10l.c (__clog10l): Likewise.
+ * math/s_clogf.c (__clogf): Likewise.
+ * math/s_clogl.c (__clogl): Likewise.
+ * math/Makefile (libm-calls): Add x2y2m1.
+ * sysdeps/generic/math_private.h (__x2y2m1f): Declare.
+ (__x2y2m1): Likewise.
+ (__x2y2m1l): Likewise.
+ * sysdeps/ieee754/dbl-64/x2y2m1.c: New file.
+ * sysdeps/ieee754/dbl-64/x2y2m1f.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/x2y2m1l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/x2y2m1.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/x2y2m1l.c: Likewise.
+ * math/libm-test.inc (clog_test, clog10_test): Add more tests.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+ [BZ #14621]
+ * posix/glob.c (next_brace_sub): Use size_t instead of unsigned
+ int as type of variable DEPTH.
+ (glob): Use size_t instead of int as type of variables NEWCOUNT
+ and OLD_PATHC.
+
+2012-09-25 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/i386/i686/fpu/multiarch/Makefile (sysdep_routines):
+ Add s_sincosf-sse2.
+ * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: New file.
+ * sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S: New file.
+ * sysdeps/ieee754/flt-32/s_sincosf.c (SINCOSF, SINCOSF_FUNC): Add
+ macros for using routine as __sincosf_ia32.
+ Use macro for function declaration and weak_alias.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+
+ * sysdeps/x86_64/fpu/s_sincosf.S: New file.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+ * math/s_ccoshf.c (__ccoshf): Fix wrong usage of sincos for
+ subnormal argument.
+ * math/s_cexpf.c (__cexpf): Likewise.
+ * math/s_csinf.c (__csinf): Likewise.
+ * math/s_csinhf.c (__csinhf): Likewise.
+ * math/s_ctanf.c (__ctanf): Likewise.
+ * math/s_ctanhf.c (__ctanhf): Likewise.
+ * math/s_ccosh.c (__ccoshf): Likewise.
+ * math/s_cexp.c (__cexpl): Likewise.
+ * math/s_csin.c (__csin): Likewise.
+ * math/s_csinh.c (__csinh): Likewise.
+ * math/s_ctan.c (__ctan): Likewise.
+ * math/s_ctanh.c (ctanh): Likewise.
+ * math/s_ccoshl.c (__ccoshl): Likewise.
+ * math/s_cexpl.c (__cexpl): Likewise.
+ * math/s_csinl.c (__csinl): Likewise.
+ * math/s_csinhl.c (__csinhl): Likewise.
+ * math/s_ctanl.c (__ctanl): Likewise.
+ * math/s_ctanhl.c (__ctanhl): Likewise.
+
+2012-09-25 Joseph Myers <joseph@codesourcery.com>
+
+ * libio/libio.h (_IO_size_t): Define to size_t, not _G_size_t.
+ (_IO_ssize_t): Define to __ssize_t, not _G_ssize_t.
+ (_IO_off_t): Define to __off_t, not _G_off_t.
+ (_IO_pid_t): Define to __pid_t, not _G_pid_t.
+ (_IO_uid_t): Define to __uid_t, not _G_uid_t.
+ (_IO_wint_t): Define to wint_t, not _G_wint_t.
+ * libio/libioP.h (struct _IO_jump_t): Use size_t not _G_size_t as
+ type of __dummy and __dummy2 fields.
+ * sysdeps/generic/_G_config.h (_G_size_t): Remove.
+ (_G_ssize_t): Likewise.
+ (_G_off_t): Likewise.
+ (_G_pid_t): Likewise.
+ (_G_uid_t): Likewise.
+ (_G_wchar_t): Likewise.
+ (_G_wint_t): Likewise.
+ * sysdeps/gnu/_G_config.h (_G_size_t): Remove.
+ (_G_ssize_t): Likewise.
+ (_G_off_t): Likewise.
+ (_G_pid_t): Likewise.
+ (_G_uid_t): Likewise.
+ (_G_wchar_t): Likewise.
+ (_G_wint_t): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_size_t): Remove.
+ (_G_ssize_t): Likewise.
+ (_G_off_t): Likewise.
+ (_G_pid_t): Likewise.
+ (_G_uid_t): Likewise.
+ (_G_wchar_t): Likewise.
+ (_G_wint_t): Likewise.
+
+2012-09-25 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * malloc/arena.c: Include malloc-sysdep.h.
+ (shrink_heap): Use check_may_shrink_heap to decide if madvise
+ is sufficient to shrink the heap or an unmap is needed.
+ * sysdeps/generic/malloc-sysdep.h: New file. Define
+ new function check_may_shrink_heap.
+ * sysdeps/unix/sysv/linux/malloc-sysdep.h: New file. Define
+ new function check_may_shrink_heap.
+
+2012-09-25 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * libio/fileops.c (_IO_new_file_seekoff): Fix typos in
+ comments.
+
+2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ * catgets/test-gencat.sh: Add "set -e".
+ * elf/tst-pathopt.sh: Likewise.
+ * grp/tst_fgetgrent.sh: Likewise.
+ * iconvdata/run-iconv-test.sh: Likewise.
+ * intl/tst-gettext.sh: Likewise.
+ * intl/tst-gettext2.sh: Likewise.
+ * intl/tst-gettext4.sh: Likewise.
+ * intl/tst-gettext6.sh: Likewise.
+ * intl/tst-translit.sh: Likewise.
+ * io/ftwtest-sh: Likewise.
+ * libio/test-freopen.sh: Likewise.
+ * malloc/tst-mtrace.sh: Likewise.
+ * posix/globtest.sh: Likewise.
+ * posix/tst-getconf.sh: Likewise.
+ * posix/wordexp-tst.sh: Likewise.
+ * stdio-common/tst-printf.sh: Likewise.
+ * stdio-common/tst-unbputc.sh: Likewise.
+ * stdlib/tst-fmtmsg.sh: Likewise.
+ * sysdeps/x86_64/tst-xmmymm.sh: Likewise.
+ * catgets/Makefile: Do not specify -e option when running
+ testsuite shell scripts.
+ * elf/Makefile: Likewise.
+ * grp/Makefile: Likewise.
+ * iconvdata/Makefile: Likewise.
+ * intl/Makefile: Likewise.
+ * io/Makefile: Likewise.
+ * libio/Makefile: Likewise.
+ * malloc/Makefile: Likewise.
+ * posix/Makefile: Likewise.
+ * stdio-common/Makefile: Likewise.
+ * stdlib/Makefile: Likewise.
+ * sysdeps/x86_64/Makefile: Likewise.
+
+ * io/ftwtest-sh: Add copyright header.
+ * posix/globtest.sh: Likewise.
+ * posix/tst-getconf.sh: Likewise.
+ * posix/wordexp-tst.sh: Likewise.
+ * sysdeps/x86_64/tst-xmmymm.sh: Likewise.
+
+2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #13679]
+ * Makeconfig (+link): Defined as $(+link-static) if
+ $(build-shared) isn't yes.
+ (link-tests): Defined as $(+link-static-tests) if $(build-shared)
+ isn't yes.
+ (static-gnulib): Add -lgcc_eh if $(build-shared) isn't yes.
+
+ * Makeconfig (+postctorT): Replace crtendS.o with crtend.o.
+
+ [BZ #14562]
+ * malloc/arena.c (heap_trim): Properly get fencepost and adjust
+ new chunk size with MALLOC_ALIGN_MASK.
+
+2012-09-24 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #5044]
+ * stdio-common/printf_fphex.c: Include <stdbool.h> and
+ <rounding-mode.h>.
+ (__printf_fphex): Determine rounding using get_rounding_mode and
+ round_away.
+ * stdio-common/tst-printf-round.c (struct hex_test): New
+ structure.
+ (hex_tests): New variable.
+ (test_hex_in_one_mode): New function.
+ (do_test): Also run tests for hex float output.
+
+2012-09-21 Joseph Myers <joseph@codesourcery.com>
+
+ * libio/iopopen.c [_IO_HAVE_SYS_WAIT]: Make code unconditional.
+ [!_IO_HAVE_SYS_WAIT]: Remove conditional code.
+ * libio/libio.h (_IO_HAVE_SYS_WAIT): Remove.
+ * libio/oldiopopen.c [_IO_HAVE_SYS_WAIT]: Make code unconditional.
+ [!_IO_HAVE_SYS_WAIT]: Remove conditional code.
+ * sysdeps/generic/_G_config.h (_G_HAVE_SYS_WAIT): Remove.
+ * sysdeps/gnu/_G_config.h (_G_HAVE_SYS_WAIT): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_HAVE_SYS_WAIT): Likewise.
+
+2012-09-20 Joseph Myers <joseph@codesourcery.com>
+
+ * libio/libio.h [_G_NEED_STDARG_H]: Make code unconditional.
+ * sysdeps/generic/_G_config.h (_G_NEED_STDARG_H): Remove.
+ * sysdeps/gnu/_G_config.h (_G_NEED_STDARG_H): Remove.
+ * sysdeps/mach/hurd/_G_config.h (_G_NEED_STDARG_H): Remove.
+
+2012-09-19 Dmitry V. Levin <ldv@altlinux.org>
+
+ [BZ #14579]
+ * elf/rtld.c (dl_main): Limit the check for self loading to normal
+ mode only.
+ * elf/tst-rtld-load-self.sh: New test.
+ * elf/Makefile: Run it.
+
+2012-09-18 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/wordsize-64/Makefile [$(subdir) = misc]
+ (tst-writev-ENV): Remove.
+ * sysdeps/wordsize-64/tst-writev.c (TIMEOUT): Define.
+
+2012-09-17 Chris Metcalf <cmetcalf@tilera.com>
+
+ * crypt/md5test-giant.c (TIMEOUT): Increase to 8 minutes for tilegx.
+
+2012-09-17 Joseph Myers <joseph@codesourcery.com>
+
+ * libio/iogetline.c [_LIBC || !_G_HAVE_IO_GETLINE_INFO]: Make code
+ unconditional.
+ * libio/iogetwline.c [_LIBC || !_G_HAVE_IO_GETLINE_INFO]:
+ Likewise.
+ * sysdeps/generic/_G_config.h (_G_HAVE_IO_GETLINE_INFO): Remove.
+ * sysdeps/gnu/_G_config.h (_G_HAVE_IO_GETLINE_INFO): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_HAVE_IO_GETLINE_INFO):
+ Likewise.
+
+2012-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14587]
+ * Makeconfig (ASFLAGS): Remove $(have-cpp-asm-debuginfo) check.
+ * config.make.in (have-cpp-asm-debuginfo): Removed.
+ * configure.in: Don't substitute libc_cv_cpp_asm_debuginfo.
+ * configure: Regenerated.
+
+2012-09-14 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #5044]
+ * stdio-common/printf_fp.c: Include <stdbool.h> and
+ <rounding-mode.h>.
+ (___printf_fp): Determine rounding using get_rounding_mode and
+ round_away.
+ * stdio-common/tst-printf-round.c: New file.
+ * stdio-common/Makefile (tests): Add tst-printf-round.
+ (link-libm): New variable.
+ ($(objpfx)tst-printf-round): Depend in $(link-libm).
+
+2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14576]
+ * bits/libc-lock.h (__rtld_lock_init_recursive): Removed.
+ * sysdeps/mach/bits/libc-lock.h (__rtld_lock_init_recursive):
+ Likewise.
+ * sysdeps/mach/hurd/bits/libc-lock.h (__rtld_lock_init_recursive):
+ Likewise.
+
+2012-09-13 Joseph Myers <joseph@codesourcery.com>
+
+ * libio/libio.h [!_G_HAVE_PRINTF_FP] (_IO_USE_DTOA): Remove.
+ * sysdeps/generic/_G_config.h (_G_HAVE_PRINTF_FP): Likewise.
+ * sysdeps/gnu/_G_config.h (_G_HAVE_PRINTF_FP): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_HAVE_PRINTF_FP): Likewise.
+
+2012-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14518]
+ * include/rounding-mode.h: New file.
+ * sysdeps/generic/get-rounding-mode.h: Likewise.
+ * sysdeps/s390/fpu/get-rounding-mode.h: Likewise.
+ * stdlib/strtod_l.c: Include <rounding-mode.h>.
+ (MAX_VALUE): New macro.
+ (MIN_VALUE): Likewise.
+ (overflow_value): New function.
+ (underflow_value): Likewise.
+ (round_and_return): Use overflow_value and underflow_value to
+ determine return values in overflow and underflow cases. Use
+ round_away to determine rounding depending on rounding mode.
+ (____STRTOF_INTERNAL): Use overflow_value and underflow_value to
+ determine return values in overflow and underflow cases.
+ * stdlib/tst-strtod-round.c: Include <fenv.h>.
+ (struct test_results): New structure.
+ (struct test): Use struct test_results to store expected results
+ for all rounding modes.
+ (TEST): Include expected results for all rounding modes.
+ (test_in_one_mode): New function.
+ (do_test): Use test_in_one_mode to compute and check results.
+ Check results for all rounding modes.
+ * stdlib/Makefile ($(objpfx)tst-strtod-round): Depend on
+ $(link-libm).
+
+2012-12-09 Allan McRae <allan@archlinux.org>
+
+ * sysdeps/i386/fpu/libm-test-ulps: Update
+
+2012-09-11 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/generic/_G_config.h (_G_int16_t): Remove.
+ (_G_int32_t): Likewise.
+ (_G_uint16_t): Likewise.
+ (_G_uint32_t): Likewise.
+ (_G_HAVE_BOOL): Likewise.
+ (_G_HAVE_ATEXIT): Likewise.
+ (_G_HAVE_LONG_DOUBLE_IO): Likewise.
+ (_G_HAVE_IO_FILE_OPEN): Likewise.
+ * sysdeps/gnu/_G_config.h (_G_int16_t): Remove.
+ (_G_int32_t): Likewise.
+ (_G_uint16_t): Likewise.
+ (_G_uint32_t): Likewise.
+ (_G_HAVE_BOOL): Likewise.
+ (_G_HAVE_ATEXIT): Likewise.
+ (_G_HAVE_LONG_DOUBLE_IO): Likewise.
+ (_G_HAVE_IO_FILE_OPEN): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_int16_t): Remove.
+ (_G_int32_t): Likewise.
+ (_G_uint16_t): Likewise.
+ (_G_uint32_t): Likewise.
+ (_G_HAVE_BOOL): Likewise.
+ (_G_HAVE_ATEXIT): Likewise.
+ (_G_HAVE_LONG_DOUBLE_IO): Likewise.
+ (_G_HAVE_IO_FILE_OPEN): Likewise.
+
+2012-09-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * csu/libc-tls.c: Update copyright years.
+
+2012-09-10 Joseph Myers <joseph@codesourcery.com>
+
+ * libioP.h [_G_USING_THUNKS]: Make code unconditional.
+ [!_G_USING_THUNKS]: Remove conditional code.
+ * sysdeps/gnu/_G_config.h (_G_USING_THUNKS): Remove.
+ * sysdeps/mach/hurd/_G_config.h (_G_USING_THUNKS): Likewise.
+
+ * libio/libioP.h [__GNUC__] (VTABLE_LABEL): Remove.
+ [!builtinbuf_vtable && __cplusplus] (builtinbuf_vtable): Likewise.
+ * sysdeps/generic/_G_config.h (_G_NAMES_HAVE_UNDERSCORE): Remove.
+ (_G_VTABLE_LABEL_PREFIX): Likewise.
+ (_G_VTABLE_LABEL_HAS_LENGTH): Likewise.
+ * sysdeps/gnu/_G_config.h (_G_NAMES_HAVE_UNDERSCORE): Remove.
+ (_G_VTABLE_LABEL_HAS_LENGTH): Likewise.
+ (_G_VTABLE_LABEL_PREFIX): Likewise.
+ (_G_VTABLE_LABEL_PREFIX_ID): Likewise.
+ * sysdeps/mach/hurd/_G_config.h (_G_NAMES_HAVE_UNDERSCORE): Remove.
+ (_G_VTABLE_LABEL_HAS_LENGTH): Likewise.
+ (_G_VTABLE_LABEL_PREFIX): Likewise.
+ (_G_VTABLE_LABEL_PREFIX_ID): Likewise.
+
+2012-09-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * libio/Makefile: Include ../Makeconfig before tests.
+ (tests): Add tst-fopenloc and depend on $(objpfx)tst-fopenloc.check
+ only if $(build-shared) is yes.
+
+ * iconv/gconv_db.c: Update copyright years.
+
+2012-09-10 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S: Fix
+ unwind info if defined PIC. Fix special cases description.
+ * sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S: Likewise.
+
+ * sysdeps/x86_64/fpu/s_sinf.S: Fix special cases description, fix
+ DP_HI_MASK entry.
+ * sysdeps/x86_64/fpu/s_cosf.S: Likewise.
+
+2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * scripts/check-local-headers.sh: Add "shopt -s nullglob".
+
+ * iconv/gconv_db.c (free_derivation): Check if deriv->steps
+ is NULL.
+
+ * debug/Makefile (LDFLAGS-tst-chk4): Renamed to ...
+ (LDLIBS-tst-chk4): This.
+ (LDFLAGS-tst-chk5): Renamed to ...
+ (LDLIBS-tst-chk5): This.
+ (LDFLAGS-tst-chk6): Renamed to ...
+ (LDLIBS-tst-chk6): This.
+ (LDFLAGS-tst-lfschk4): Renamed to ...
+ (LDLIBS-tst-lfschk4): This.
+ (LDFLAGS-tst-lfschk5): Renamed to ...
+ (LDLIBS-tst-lfschk5): This.
+ (LDFLAGS-tst-lfschk6): Renamed to ...
+ (LDLIBS-tst-lfschk6): This.
+
+ * Makefile ($(inst_includedir)/gnu/stubs.h): Remove dependency
+ on $(common-objpfx)soversions.mk.
+
+2012-09-07 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10014]
+ * manual/examples/inetcli.c (SERVERHOST): Use www.gnu.org as
+ example host name.
+
+2012-09-07 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * malloc/arena.c (arena_get_retry): New function that gets
+ another arena for the caller to try its request on.
+ * malloc/malloc.c (__libc_malloc): Use get_another_arena if the
+ current arena cannot fulfill the request.
+ (__libc_memalign): Likewise.
+ (__libc_memalign): Likewise.
+ (__libc_pvalloc): Likewise.
+ (__libc_calloc): Likewise.
+
+2012-09-05 John Tobey <john.tobey@gmail.com>
+
+ [BZ #13542]
+ * manual/arith.texi (Operations on Complex): Fix description
+ of carg branch cut.
+
+2012-09-06 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10014]
+ * manual/socket.texi (Host Addresses): Use www.gnu.org as example
+ host name.
+
+ [BZ #10038]
+ * manual/memory.texi (Memory): Make order of menu items match
+ order of sections.
+
+2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf/dl-tls.c (DL_INITIAL_DTV): Removed.
+ (_dl_initial_dtv): New. Defined if SHARED isn't defined.
+ (_dl_deallocate_tls): Restore GL(dl_initial_dtv).
+
+2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * csu/libc-tls.c (static_dtv): Renamed to ...
+ (_dl_static_dtv): This. Make it global.
+ (_dl_initial_dtv): Removed.
+ (__libc_setup_tls): Updated.
+ * elf/dl-tls.c (DL_INITIAL_DTV): New macro.
+ (_dl_deallocate_tls): Replace GL(dl_initial_dtv) with
+ DL_INITIAL_DTV.
+
+2012-09-06 Petr Machata <pmachata@redhat.com>
+
+ * elf/elf.h (NT_S390_HIGH_GPRS): New macro.
+ (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG): Likewise.
+ (NT_S390_CTRS, NT_S390_PREFIX, NT_S390_LAST_BREAK): Likewise.
+ (NT_S390_SYSTEM_CALL, NT_ARM_VFP): Likewise.
+
+2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14545]
+ * csu/libc-tls.c (_dl_initial_dtv): New variable.
+ * elf/dl-tls.c (_dl_deallocate_tls): Always check dtv before
+ freeing dtv[-1].
+
+2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14544]
+ * Makeconfig (link-static-before-libc): Replace $(+prector)
+ with $(+prectorT).
+ (link-static-after-libc): Replace $(+postctor) with
+ $(+postctorT).
+ (link-bounded): Replace $(+prector)/$(+postctor) with
+ $(+prectorT)/$(+postctorT).
+ (+prectorT): New macro.
+ (+postctorT): Likewise.
+
+2012-09-06 Joseph Myers <joseph@codesourcery.com>
+
+ * stdlib/gen-tst-strtod-round.c: Include <assert.h>.
+ (round_str): Handle values above the maximum for IBM long double
+ as inexact.
+ * stdlib/tst-strtod-round.c (tests): Regenerated.
+
+2012-09-06 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * sysdeps/s390/s390-32/multiarch/Makefile: Remove -mzarch
+ assembler flag.
+ * sysdeps/s390/s390-32/multiarch/memcmp.S: Use .machinemode
+ zarch_nohighgprs around the zarch optimized routines.
+ * sysdeps/s390/s390-32/multiarch/memcpy.S: Likewise.
+ * sysdeps/s390/s390-32/multiarch/memset.S: Likewise.
+ * sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Explicitly check
+ for zarch.
+
+2012-09-05 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+ * sysdeps/sparc/bits/hwcap.h (HWCAP_SPARC_PAUSE,
+ HWCAP_SPARC_CBCOND, HWCAP_SPARC_CRYPTO): Define.
+ * sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Increase to 27.
+ * sysdeps/sparc/dl-procinfo.c (_dl_sparc_cap_flags): Add new
+ entries.
+
+2012-09-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * malloc/arena.c: Fold copyright years.
+ * malloc/mcheck.c, malloc/memusage.c: Likewise.
+
+2012-09-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * malloc/malloc.c (__libc_mallopt) <M_MMAP_MAX>: Fix indentation.
+
+2012-09-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * manual/contrib.texi (Contributors): Fix typo. Complete entry.
+
+2012-09-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * malloc/malloc.c (__libc_mallopt) <M_MMAP_THRESHOLD>: Do not
+ change internal state upon failure.
+
+2012-09-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * malloc/mcheck.c (mcheck_check_all): Fix typo.
+ * malloc/memusage.c (mmap): Likewise.
+ (mmap64, mremap): Likewise. Adjust name in comment.
+
+2012-09-05 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * libio/fileops.c: Fix typos in comments.
+ * libio/oldfileops.c: Likewise.
+ * libio/wfileops.c: Likewise.
+
+2012-09-05 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #1349]
+ * malloc/Makefile (tests): Add tst-malloc-usable test case.
+ (tst-malloc-usable-ENV): Set environment for test case.
+ * malloc/hooks.c (malloc_check_get_size): New function to get
+ requested size.
+ * malloc/malloc.c (musable): Use malloc_check_get_size.
+ * malloc/tst-malloc-usable.c: New test case.
+
+2012-09-05 Andreas Schwab <schwab@linux-m68k.org>
+
+ * stdlib/tst-strtod-overflow.c (TIMEOUT): Define.
+
+2012-09-05 Allan McRae <allan@archlinux.org>
+
+ [BZ #13966]
+ * configure.in (CXX_SYSINCLUDES): Use compiler output to
+ determine header location.
+ * configure: Regenerated.
+
+2012-09-05 Andreas Schwab <schwab@linux-m68k.org>
+
+ * stdlib/gen-tst-strtod-round.c (formats): Add Motorola extended
+ float format.
+ * stdlib/tst-strtod-round.c (TEST) [LDBL_MANT_DIG == 64 &&
+ LDBL_MAX_EXP == 16384]: Add case for Motorola extended float
+ format.
+ (test): Regenerate.
+
+2012-09-04 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc32/sparcv9/addmul_1.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/submul_1.S: New file.
+ * sysdeps/sparc/sparc32/sparcv9/mul_1.S: New file.
+
+2012-09-04 Florian Weimer <fweimer@redhat.com>
+
+ * stdlib/tst-secure-getenv.c (alternative_main): Only warn on SGID
+ failures.
+
+ * stdlib/tst-secure-getenv.c: Fix whitespace in comments.
+
+2012-09-04 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #9914]
+ * libio/iogetdelim.c: Include <limits.h>.
+ (_IO_getdelim): Avoid integer overflow in testing whether cur_len
+ + len + 1 would overflow.
+
+2012-09-03 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+
+2012-09-03 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/i386/i686/fpu/multiarch/Makefile (sysdep_routines):
+ Add s_sinf-sse2, s_conf-sse2.
+
+ * sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S: New file.
+ * sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S: New file.
+ * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: New file.
+ * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: New file.
+
+ * sysdeps/ieee754/flt-32/s_sinf.c (SINF, SINF_FUNC): Add macros
+ for using routine as __sinf_ia32.
+ Use macro for function declaration and weak_alias.
+ * sysdeps/ieee754/flt-32/s_cosf.c (COSF, COSF_FUNC): Add macros
+ for using routine as __cosf_ia32.
+ Use macro for function declaration and weak_alias.
+
+ * sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S: Fix Copyright.
+ * sysdeps/i386/i686/fpu/multiarch/e_expf.c: Fix Copyright.
+
+ * sysdeps/x86_64/fpu/s_sinf.S: New file.
+ * sysdeps/x86_64/fpu/s_cosf.S: New file.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+ * math/libm-test.inc (cos_test): Add more test cases.
+ (sin_test): Likewise.
+ (sincos_test): Likewise.
+
+2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
+ (IFUNC_RESOLVE): Make pointers to the specialized implementations
+ hidden.
+ * sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise.
+
+2012-09-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14538]
+ * sysdeps/x86_64/dl-machine.h (elf_machine_dynamic): Use the
+ first element of the GOT.
+ (elf_machine_load_address): Return the difference between
+ the runtime address of _DYNAMIC and elf_machine_dynamic ().
+
+2012-09-01 Allan McRae <allan@archlinux.org>
+
+ [BZ #13412]
+ * configure.in (AWK): Require gawk version 3.0 or later.
+ * configure: Regenerated.
+
+2012-09-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_POSIX_CPU_TIMERS): Remove.
+ * sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+ [__NR_clock_getres]: Make code unconditional.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remoce conditional code.
+ (clock_getcpuclockid): Remove code left unreachable by removal of
+ conditionals.
+ * sysdeps/unix/sysv/linux/clock_getres.c [__NR_clock_getres]: Make
+ code unconditional.
+ [__ASSUME_POSIX_CPU_TIMERS]: Likewise.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_gettime.c [__NR_clock_gettime]:
+ Make code unconditional.
+ [__ASSUME_POSIX_CPU_TIMERS]: Likewise.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_settime.c
+ [__ASSUME_POSIX_CPU_TIMERS <= 0 && __NR_clock_settime]: Remove
+ conditional code.
+ [__ASSUME_POSIX_CPU_TIMERS]: Make code unconditional.
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+
+2012-08-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14476]
+ * Makefile (install): Also pass LD_SO=$(ld.so-version) to
+ scripts/test-installation.pl.
+
+ * scripts/test-installation.pl: Use LD_SO to get $ld_so_name
+ and $ld_so_version if it is set.
+
+2012-08-29 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #14516]
+ * sysdeps/unix/sysv/linux/ttyname.c (ttyname): Don't return
+ failure if reading from procfs failed.
+ * sysdeps/unix/sysv/linux/ttyname_r.c (ttyname_r): Likewise.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove all definitions.
+ * sysdeps/unix/sysv/linux/fxstat64.c [!__ASSUME_STAT64_SYSCALL]:
+ Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/fxstatat64.c [!__ASSUME_STAT64_SYSCALL]:
+ Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/i386/fxstat.c
+ [!__ASSUME_STAT64_SYSCALL]: Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/i386/fxstatat.c
+ [!__ASSUME_STAT64_SYSCALL]: Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/i386/lxstat.c
+ [!__ASSUME_STAT64_SYSCALL]: Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/i386/xstat.c [!__ASSUME_STAT64_SYSCALL]:
+ Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/lxstat64.c [!__ASSUME_STAT64_SYSCALL]:
+ Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Do not include
+ <kernel-features.h>.
+ [__NR_stat64 && !__ASSUME_STAT64_SYSCALL] (__have_no_stat64):
+ Remove.
+ * sysdeps/unix/sysv/linux/xstat64.c [!__ASSUME_STAT64_SYSCALL]:
+ Remove conditional code.
+ [__ASSUME_STAT64_SYSCALL]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/xstatconv.c [!__ASSUME_STAT64_SYSCALL]:
+ Remove conditional.
+
+2012-08-27 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #5400]
+ * NEWS: Add fixed bug number.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14519]
+ * stdlib/strtod_l.c (round_and_return): Return -0.0 for
+ underflowing exponent in case of negative sign.
+ * stdlib/tst-strtod-round-data: Add more tests.
+ * stdlib/tst-strtod-round.c (tests): Regenerated.
+
+ [BZ #3479]
+ * stdlib/strtod_l.c (NDIG): Remove.
+ (HEXNDIG): Likewise.
+ (MPNSIZE): Increase to represent 10^n where 2^-n is 1/4 ulp of the
+ smallest representable value.
+ (____STRTOF_INTERNAL): Use all fractional decimal digits that may
+ lie within an exact representation of 1/2 ulp of the result.
+ * stdlib/fpioconst.c (__tens): Include 10^2^9 and 10^2^10
+ unconditionally.
+ (TENS_P9_IDX): Define unconditionally.
+ (TENS_P9_SIZE): Likewise.
+ (TENS_P10_IDX): Likewise.
+ (TENS_P10_SIZE): Likewise.
+ [BITS_PER_MP_LIMB == 32]: Change condition for larger powers of 10
+ to !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024.
+ [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024] (__tens): Add
+ entries for 10^2^13 and 10^2^14.
+ [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024]
+ (TENS_P13_IDX): Define.
+ (TENS_P13_SIZE): Likewise.
+ (TENS_P14_IDX): Likewise.
+ (TENS_P14_SIZE): Likewise.
+ (_fpioconst_pow10): Change array size to
+ FPIOCONST_POW10_ARRAY_SIZE. Make entries for 10^2^9 and 10^2^10
+ unconditional.
+ (_fpioconst_pow10) [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ >
+ 1024]: Add entries for 10^2^13 and 10^2^14.
+ [LAST_POW10 > _LAST_POW10]: Remove #error.
+ * stdlib/fpioconst.h (FPIOCONST_POW10_ARRAY_SIZE): Define.
+ (_fpioconst_pow10): Change array size to
+ FPIOCONST_POW10_ARRAY_SIZE.
+ * stdlib/gen-fpioconst.c: New file.
+ * stdlib/gen-tst-strtod-round.c: Likewise.
+ * stdlib/tst-strtod-round-data: Likewise.
+ * stdlib/tst-strtod-round.c: Likewise.
+ * stdlib/Makefile (tests): Add tst-strtod-round.
+
+ [BZ #14459]
+ * stdlib/strtod_l.c: Include <stdint.h>.
+ (NDEBUG): Do not define.
+ (round_and_return): Change EXPONENT parameter to type intmax_t.
+ Rearrange calculations to avoid internal overflow possibilities.
+ (str_to_mpn): Change EXPONENT parameter to type intmax_t *.
+ Rearrange calculations to avoid internal overflow possibilities.
+ Assert that number fits inside MPNSIZE limbs.
+ (____STRTOF_INTERNAL): Change EXPONENT variable to type intmax_t.
+ Change DIG_NO, INT_NO and LEAD_ZERO to type size_t. Rearrange
+ calculations and add assertions to avoid internal overflow
+ possibilities. Add casts to avoid signed/unsigned operations.
+ * stdlib/tst-strtod-overflow.c: New file.
+ * stdlib/Makefile (tests): Add tst-strtod-overflow.
+
+2012-08-25 Marek Polacek <polacek@redhat.com>
+
+ * time/time.h: Fix some typos in comments.
+
+2012-08-23 Roland McGrath <roland@hack.frob.com>
+
+ * posix/tst-rfc3484.c: #undef USE_NSCD before including getaddrinfo.c.
+ * posix/tst-rfc3484-2.c: Likewise.
+ * posix/tst-rfc3484-3.c: Likewise.
+
+2012-08-23 Steve McIntyre <steve.mcintyre@linaro.org>
+
+ * elf/elf.h (EF_ARM_ABI_FLOAT_SOFT): New macro.
+ (EF_ARM_ABI_FLOAT_HARD): Likewise.
+
+2012-08-23 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/dl-fxstatat64.c: Use <> instead of "" in
+ #include of fxstatat64.c.
+
+2012-08-22 Roland McGrath <roland@hack.frob.com>
+
+ * shadow/getspent.c: #undef USE_NSCD before #include that gets the code.
+ * shadow/getspent_r.c: Likewise.
+ * shadow/getspnam.c: Likewise.
+ * shadow/getspnam_r.c: Likewise.
+ * gshadow/getsgent.c: Likewise.
+ * gshadow/getsgent_r.c: Likewise.
+ * gshadow/getsgnam.c: Likewise.
+ * gshadow/getsgnam_r.c: Likewise.
+ * inet/getnetbyad.c: Likewise.
+ * inet/getnetbyad_r.c: Likewise.
+ * inet/getnetbynm.c: Likewise.
+ * inet/getnetbynm_r.c: Likewise.
+ * inet/getnetent.c: Likewise.
+ * inet/getnetent_r.c: Likewise.
+ * inet/getproto.c: Likewise.
+ * inet/getproto_r.c: Likewise.
+ * inet/getprtent.c: Likewise.
+ * inet/getprtent_r.c: Likewise.
+ * inet/getprtname.c: Likewise.
+ * inet/getprtname_r.c: Likewise.
+ * inet/getrpcbyname.c: Likewise.
+ * inet/getrpcbyname_r.c: Likewise.
+ * inet/getrpcbynumber.c: Likewise.
+ * inet/getrpcbynumber_r.c: Likewise.
+ * inet/getrpcent.c: Likewise.
+ * inet/getrpcent_r.c: Likewise.
+ * inet/getaliasent.c: Likewise.
+ * inet/getaliasent_r.c: Likewise.
+ * inet/getaliasname.c: Likewise.
+ * inet/getaliasname_r.c: Likewise.
+ * nscd/getgrgid_r.c: Likewise.
+ * nscd/getgrnam_r.c: Likewise.
+ * nscd/gethstbyad_r.c: Likewise.
+ * nscd/gethstbynm3_r.c: Likewise.
+ * nscd/getpwnam_r.c: Likewise.
+ * nscd/getpwuid_r.c: Likewise.
+ * nscd/getsrvbynm_r.c: Likewise.
+ * nscd/getsrvbypt_r.c: Likewise.
+ * nscd/gai.c: Likewise.
+
+ * configure.in (build_nscd): New substituted variable, set
+ by --disable-build-nscd and defaults to $use_nscd.
+ * configure: Regenerated.
+ * config.make.in (build-nscd): New substituted variable.
+ * nscd/Makefile (others, others-pie, install-sbin, extra-objs):
+ Change conditional to require [$(build-nscd) = yes] as well.
+ * NEWS: Mention --disable-build-nscd in the --disable-nscd item.
+
+ [BZ# 13696]
+ * configure.in (use_nscd): New substituted variable, set by
+ --disable-nscd. If enabled, define USE_NSCD.
+ * configure: Regenerated.
+ * config.h.in: Add USE_NSCD.
+ * config.make.in (use-nscd): New substituted variable.
+ * inet/Makefile (CFLAGS-gethstbyad_r.c): Likewise.
+ (CFLAGS-gethstbynm_r.c, CFLAGS-gethstbynm2_r.c): Likewise.
+ (CFLAGS-getsrvbynm_r.c, CFLAGS-getsrvbypt_r.c): Variables removed.
+ * grp/Makefile (CFLAGS-getgrgid_r.c): Remove -DUSE_NSCD.
+ (CFLAGS-getgrnam_r.c): Likewise.
+ (CFLAGS-initgroups.c): Likewise.
+ * posix/Makefile (CFLAGS-getaddrinfo.c): Remove -DUSE_NSCD.
+ * pwd/Makefile (CFLAGS-getpwuid_r.c, CFLAGS-getpwnam_r.c):
+ Variables removed.
+ * inet/getnetgrent_r.c
+ (nscd_setnetgrent): New function, broken out of ...
+ (setnetgrent): ... here. Call it.
+ (innetgr): Conditionalize nscd bits on [USE_NSCD].
+ (nscd_getnetgrent): Conditionalize on [USE_NSCD].
+ (__internal_getnetgrent_r): Conditionalize its use on [USE_NSCD].
+ * nscd/Makefile (routines, aux): Move definitions after include of
+ Makeconfig. Conditionalize on [$(use-nscd) != no].
+ * nss/nsswitch.c (nss_load_all_libraries, __nss_disable_nscd):
+ Conditionalize on [USE_NSCD].
+ (is_nscd, nscd_init_cb): Likewise.
+ (nss_load_library): Conditionalize init callback on [USE_NSCD].
+ * nss/nss_files/files-init.c: Conditionalize body on [USE_NSCD].
+ * nss/nss_db/db-init.c: Likewise.
+ * nscd/nscd.c (main): Conditionalize __nss_disable_nscd call on
+ [USE_NSCD].
+ * sysdeps/unix/sysv/linux/check_pf.c (get_nl_timestamp): New function.
+ (make_request): Use it.
+ (cache_valid_p): New function.
+ (__check_pf): Use it.
+ * NEWS: Add item for --disable-nscd.
+
+2012-08-22 Dmitry V. Levin <ldv@altlinux.org>
+
+ * configure.in (SED): Update AC_CHECK_PROG_VER's version extract regexp
+ to support sed >= 4.2.1-20-ga9bf076.
+ * configure: Regenerated.
+
+2012-08-22 Roland McGrath <roland@hack.frob.com>
+
+ * csu/libc-start.c (apply_irel): Move extern declarations inside here.
+ Conditionalize whole body on [IREL].
+
+2012-08-22 Jeff Law <law@redhat.com>
+
+ [BZ #14505]
+ * sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r
+ if the family is PF_UNSPEC.
+
+2012-08-22 Mike Frysinger <vapier@gentoo.org>
+
+ * Makerules (lib-version): Rename from V.
+ (install-lib-nosubdir): Change V to lib-version.
+
+2012-08-22 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ [BZ #14252]
+ * powerpc32/power6/wcschr.c: New file.
+ * powerpc32/power6/wcscpy.c: New file.
+ * powerpc32/power6/wcsrchr.c: New file.
+ * powerpc64/power6/wcschr.c: New file.
+ * powerpc64/power6/wcscpy.c: New file.
+ * powerpc64/power6/wcsrchr.c: New file.
+
+2012-08-21 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * string/str-two-way.h (AVAILABLE1_USES_J): New macro, define default.
+ (two_way_short_needle): Use it.
+ * string/strstr.c (AVAILABLE1_USES_J): Define.
+ * string/strcasestr.c: Likewise.
+
+ * string/str-two-way.h (two_way_short_needle): Use pointers instead of
+ array references.
+ * string/strcasestr.c (TOLOWER): Make side-effect safe.
+
+ [BZ #11607]
+ * NEWS: Add an entry.
+ * string/str-two-way.h (AVAILABLE1, AVAILABLE2, RET0_IF_0): New macros,
+ define their defaults.
+ (two_way_short_needle): Detect end-of-string on-the-fly.
+ * string/strcasestr.c, string/strstr.c (AVAILABLE): Update.
+ (AVAILABLE1, AVAILABLE2, RET0_IF_0, AVAILABLE_USES_J): Define.
+ * string/bug-strcasestr1.c: New test.
+ * string/Makefile: Run it.
+
+2012-08-21 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ [BZ #11607]
+ * string/str-two-way.h (two_way_short_needle): Optimize matching of
+ the first character.
+
+2012-08-21 Roland McGrath <roland@hack.frob.com>
+
+ * csu/elf-init.c (__libc_csu_irel): Function removed.
+ * csu/libc-start.c (apply_irel): New function.
+ (LIBC_START_MAIN): Call it instead of __libc_csu_irel.
+
+2012-08-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_FADVISE64_64_SYSCALL): Remove.
+ * sysdeps/unix/sysv/linux/i386/posix_fadvise64.S: Do not include
+ <kernel-features.h>.
+ [__NR_fadvise64_64]: Make code unconditional.
+ [!__ASSUME_FADVISE64_64_SYSCALL]: Remove conditional code.
+ [__NR_fadvise64 && (!__ASSUME_FADVISE64_64_SYSCALL ||
+ !__NR_fadvise64_64)]: Likewise.
+ [!(__NR_fadvise64 && (!__ASSUME_FADVISE64_64_SYSCALL ||
+ !__NR_fadvise64_64))]: Likewise.
+ [__NR_fadvise64]: Make code unconditional.
+ [!__NR_fadvise64]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/posix_fadvise64.c: Do not include
+ <kernel-features.h>.
+ (__posix_fadvise64_l64) [__NR_fadvise64_64]: Make code
+ unconditional.
+ (_posix_fadvise64_l64) [!__ASSUME_FADVISE64_64_SYSCALL]: Remove
+ conditional code.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c: Do
+ not include <kernel-features.h>.
+ (__posix_fadvise64_l64) [__NR_fadvise64_64]: Make code
+ unconditional.
+ (_posix_fadvise64_l64) [!__ASSUME_FADVISE64_64_SYSCALL]: Remove
+ conditional code.
+ * sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c: Do not
+ include <kernel-features.h>.
+ (__posix_fadvise64_l64) [__NR_fadvise64_64]: Make code
+ unconditional.
+ (_posix_fadvise64_l64) [!__ASSUME_FADVISE64_64_SYSCALL]: Remove
+ conditional code.
+
+2012-08-21 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * sysdeps/powerpc/powerpc64/power7/memchr.S: Unrolled short loop and
+ slight instruction rearrangements per scrollpipe analysis.
+ * sysdeps/powerpc/powerpc64/power7/memchr.S: Likewise.
+
+2012-08-20 Roland McGrath <roland@hack.frob.com>
+
+ * manual/syslog.texi (syslog; vsyslog, closelog):
+ Fix typo repeated twice: @file{dev/log} -> @file{/dev/log}.
+ Reported by Ricardo Catalinas Jiménez <jimenezrick@gmail.com>.
+
+ * elf/dl-sysdep.c (_dl_important_hwcaps): Fix conditional on using
+ DSOCAPS to match condition on defining it.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_SWAPCONTEXT_SYSCALL): Remove.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
+ [__ASSUME_SWAPCONTEXT_SYSCALL]: Make code unconditional.
+ [!__ASSUME_SWAPCONTEXT_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
+ [__ASSUME_SWAPCONTEXT_SYSCALL]: Make code unconditional.
+ [!__ASSUME_SWAPCONTEXT_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
+ [__ASSUME_SWAPCONTEXT_SYSCALL]: Make code unconditional.
+ [!__ASSUME_SWAPCONTEXT_SYSCALL]: Remove conditional code.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h [__s390__ &&
+ __LINUX_KERNEL_VERSION >= 0x020616] (__ASSUME_UTIMES): Define.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove all definitions.
+ * sysdeps/unix/sysv/linux/mmap64.c [__NR_mmap2]: Make code
+ unconditional.
+ [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/i386/mmap.S (__mmap)
+ [__ASSUME_MMAP2_SYSCALL]: Make code unconditional.
+ (__mmap) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/i386/mmap64.S (__mmap64) [__NR_mmap2]:
+ Make code unconditional.
+ (__mmap64) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+ (__mmap64) [!__NR_mmap2]: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/mmap.S (__mmap)
+ [__ASSUME_MMAP2_SYSCALL]: Make code unconditional.
+ (__mmap) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S (__mmap64)
+ [__NR_mmap2]: Make code unconditional.
+ (__mmap64) [!__ASSUME_MMAP2_SYSCALL]: Remove conditional code.
+ (__mmap64) [!__NR_mmap2]: Likewise.
+
+2012-08-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c: Remove.
+
+2012-08-18 Andreas Jaeger <aj@suse.de>
+
+ * stdio-common/_itoa.c (_itoa): Add missing DUMMY variable.
+
+2012-08-18 Mike Frysinger <vapier@gentoo.org>
+
+ * include/sys/socket.h (__have_sock_cloexec): Add attribute_hidden.
+ * include/unistd.h (__have_sock_cloexec): Likewise.
+ (__have_pipe2): Likewise.
+ (__have_dup3): Likewise.
+
+2012-08-18 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #9685]
+ * include/unistd.h (__have_pipe2): Change define into an extern int.
+ (__have_dup3): Likewise.
+ * socket/have_sock_cloexec.c: Include fcntl.h.
+ (__have_pipe2): New variable.
+ (__have_dup3): Likewise.
+
+2012-08-17 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/nice.c: Adjust #include.
+
+2012-08-17 Marek Polacek <polacek@redhat.com>
+
+ * sysdeps/ieee754/ldbl-96/s_sincosl.c (__sincosl): Use __attribute__
+ ((unused)) on I1, which is set by GET_LDOUBLE_WORDS but never used.
+
+2012-08-17 Roland McGrath <roland@hack.frob.com>
+
+ * configure.in: Add AC_SUBST for sysheaders.
+ * configure: Regenerated.
+ * config.make.in (sysheaders): New substituted variable.
+
+ * sysdeps/unix/mkfifo.c: Moved ...
+ * sysdeps/posix/mkfifo.c: ... here.
+ * sysdeps/unix/mkfifoat.c: Moved ...
+ * sysdeps/posix/mkfifoat.c: ... here.
+
+ * sysdeps/unix/utime.c: Moved ...
+ * sysdeps/posix/utime.c: ... here.
+
+ * sysdeps/unix/time.c: Moved ...
+ * sysdeps/posix/time.c: ... here.
+ * sysdeps/unix/sysv/linux/time.c: Adjust #include.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/time.c: Likewise.
+
+ * sysdeps/unix/nice.c: Moved ...
+ * sysdeps/posix/nice.c: ... here.
+
+ * sysdeps/unix/alarm.c: Moved ...
+ * sysdeps/posix/alarm.c: ... here.
+
+ * intl/Makefile ($(codeset_mo)): Depend on the input file.
+
+2012-08-17 Jeff Law <law@redhat.com>
+
+ * intl/Makefile (codeset_mo): New variable.
+ ($(codeset_mo)): New target.
+ (tst-codeset.out): Depend on that. Remove explicit rule.
+ (tst-gettext3.out, tst-gettext5.out): Likewise.
+ (LOCPATH-ENV, tst-codeset-ENV): New variables.
+ (tst-gettext3-ENV, tst-gettext5-ENV): Likewise.
+ * intl/tst-codeset.sh: Remove.
+ * intl/tst-gettext3.sh: Likewise.
+ * intl/tst-gettext5.sh: Likewise.
+
+2012-08-17 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/inet/syscalls.list: File removed. Move contents into ...
+ * sysdeps/unix/syscalls.list: ... here.
+
+ * sysdeps/posix/getaddrinfo.c
+ (save_gaiconf_mtime, check_gaiconf_mtime): New functions.
+ (gaiconf_init, gaiconf_reload): Use them.
+ [!_STATBUF_ST_NSEC]
+ (gaiconf_mtime, save_gaiconf_mtime, check_gaiconf_mtime):
+ Define using time_t rather than struct timespec.
+
+ * sysdeps/generic/malloc-machine.h (MUTEX_INITIALIZER): New macro.
+ (atomic_full_barrier, atomic_read_barrier, atomic_write_barrier):
+ Macros removed.
+ * malloc/arena.c (save_malloc_hook, save_free_hook): Conditionalize on
+ [!NO_THREADS].
+ (malloc_atfork, free_atfork, atfork_recursive_cntr): Likewise.
+ (ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_unlock_all2):
+ Likewise.
+
+ * elf/dl-iteratephdr.c (__dl_iterate_phdr): Use NULL rather than 0 for
+ __libc_cleanup_push argument.
+
+ * bits/param.h: New file.
+ * misc/sys/param.h: New file.
+ * include/sys/param.h: New file.
+ * misc/Makefile (headers): Add bits/param.h.
+ * sysdeps/generic/sys/param.h: File removed.
+ * sysdeps/unix/sysv/linux/bits/param.h: New file.
+ * sysdeps/unix/sysv/linux/sys/param.h: File removed.
+ * sysdeps/mach/hurd/bits/param.h: New file.
+ * sysdeps/mach/hurd/sys/param.h: New file.
+
+ * elf/dl-close.c (_dl_close_worker): Add a cast and a comment to the
+ last change.
+
+ * libio/genops.c (_IO_unbuffer_write): Conditionalize locking code on
+ [_IO_MTSAFE_IO].
+ * libio/libioP.h [!_IO_MTSAFE_IO && !NOT_IN_libc]
+ (_IO_acquire_lock, _IO_acquire_lock_clear_flags2, _IO_release_lock):
+ New macros.
+
+ * Makeconfig [$(libc-reentrant) = yes] (libio-mtsafe): New variable.
+ * libio/Makefile (CPPFLAGS): Append $(libio-mtsafe) unconditionally
+ rather than -D_IO_MTSAFE_IO conditionally.
+ * stdio-common/Makefile (CPPFLAGS): Likewise.
+ * wcsmbs/Makefile (CPPFLAGS): Likewise.
+ * stdlib/Makefile (CFLAGS-strfmon.c, CFLAGS-strfmon_l.c):
+ Use $(libio-mtsafe).
+ * debug/Makefile (CFLAGS-sprintf_chk.c): Use $(libio-mtsafe) instead
+ of -D_IO_MTSAFE_IO.
+ (CFLAGS-snprintf_chk.c, CFLAGS-vsprintf_chk.c): Likewise.
+ (CFLAGS-vsnprintf_chk.c, CFLAGS-asprintf_chk.c): Likewise.
+ (CFLAGS-vasprintf_chk.c, CFLAGS-obprintf_chk.c): Likewise.
+ (CFLAGS-dprintf_chk.c, CFLAGS-vdprintf_chk.c): Likewise.
+ (CFLAGS-printf_chk.c, CFLAGS-fprintf_chk.c): Likewise.
+ (CFLAGS-vprintf_chk.c, CFLAGS-vfprintf_chk.c): Likewise.
+ (CFLAGS-gets_chk.c, CFLAGS-fgets_chk.c): Likewise.
+ (CFLAGS-fgets_u_chk.c, CFLAGS-fread_chk.c): Likewise.
+ (CFLAGS-fread_u_chk.c): Likewise.
+ (CFLAGS-swprintf_chk.c, CFLAGS-vswprintf_chk.c): Likewise.
+ (CFLAGS-wprintf_chk.c, CFLAGS-fwprintf_chk.c): Likewise.
+ (CFLAGS-vwprintf_chk.c, CFLAGS-vfwprintf_chk.c): Likewise.
+ (CFLAGS-fgetws_chk.c, CFLAGS-fgetws_u_chk.c): Likewise.
+ * grp/Makefile (CFLAGS-fgetgrent_r.c, CFLAGS-putgrent.c): Likewise.
+ * gshadow/Makefile (CFLAGS-fgetsgent_r.c, CFLAGS-putsgent.c): Likewise.
+ * misc/Makefile (CFLAGS-mntent_r.c): Likewise.
+ * pwd/Makefile (CFLAGS-fgetpwent_r.c): Likewise.
+ * shadow/Makefile (CFLAGS-fgetspent_r.c, CFLAGS-putspent.c): Likewise.
+
+ * libio/Makefile: Test [$(libc-reentrant) = yes]
+ instead of [$(filter %REENTRANT, $(defines)) nonempty].
+
+ * Makeconfig
+ [$(libc-reentrant) = yes] (defines): Append -D_LIBC_REENTRANT.
+ * sysdeps/pthread/configure: File removed.
+ * sysdeps/pthread/Makeconfig: New file.
+ * sysdeps/mach/hurd/Makeconfig (libc-reentrant): New variable.
+ * sysdeps/mach/hurd/configure.in: Don't touch DEFINES here.
+
+2012-08-16 Gary Benson <gbenson@redhat.com>
+
+ * elf/dl-close.c (_dl_close_worker): Also set r->r_map when
+ unmapping the first object in a namespace.
+
+2012-08-16 Roland McGrath <roland@hack.frob.com>
+
+ * inet/getnetgrent_r.c (internal_setnetgrent): Renamed to ...
+ (__internal_setnetgrent): ... this. Add internal_function to
+ definition. Add libc_hidden_def.
+ (setnetgrent): Update caller.
+ (internal_endnetgrent): Renamed to ...
+ (__internal_endnetgrent): ... this. Add internal_function to
+ definition. Add libc_hidden_def.
+ (endnetgrent): Update caller.
+ (internal_getnetgrent_r): Renamed to ...
+ (__internal_getnetgrent_r): ... this. Add internal_function to
+ definition. Add libc_hidden_def.
+ (__getnetgrent_r): Update caller.
+ * inet/netgroup.h: Update declarations. Add libc_hidden_proto uses.
+
+2012-08-16 Joseph Myers <joseph@codesourcery.com>
+
+ * stdlib/longlong.h: Update from GCC.
+
+2012-08-16 Roland McGrath <roland@hack.frob.com>
+
+ * stdlib/gmp-impl.h (udiv_qrnnd_preinv): Use __attribute__ ((unused))
+ on _QL, which is set by umul_ppmm but never used.
+ * stdio-common/_itoa.c (_itoa): Use __attribute__ ((unused)) on DUMMY
+ variables, which are set by GMP macros but never used.
+ * stdio-common/_itowa.c (_itowa): Likewise.
+ * stdlib/divmod_1.c (mpn_divmod_1): Likewise.
+ * stdlib/mod_1.c (mpn_mod_1): Likewise.
+
+2012-08-16 Carlos O'Donell <carlos_odonell@mentor.com>
+
+ * sysdeps/sh/ldsodefs.h (ARCH_PLTENTER_MEMBERS) <sh_gnu_pltenter>:
+ struct La_sh_regs is not constant.
+ * sysdeps/sparc/ldsodefs.h (ARCH_PLTENTER_MEMBERS)
+ <sparc32_gnu_pltenter, sparc64_gnu_pltenter>: struct La_sparc32_regs
+ and struct La_sparc64_regs are not constant.
+
+2012-08-16 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_POSIX_TIMERS): Remove.
+ * sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_getres.c [__ASSUME_POSIX_TIMERS]:
+ Make code unconditional.
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_gettime.c [__ASSUME_POSIX_TIMERS]:
+ Make code unconditional.
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_nanosleep.c
+ [__ASSUME_POSIX_TIMERS]: Make code unconditional.
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/clock_settime.c [__ASSUME_POSIX_TIMERS]:
+ Make code unconditional.
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ [__ASSUME_POSIX_CPU_TIMERS <= 0 && __NR_clock_settime]
+ (__libc_missing_posix_timers): Remove.
+
+2012-08-15 Roland McGrath <roland@hack.frob.com>
+
+ * elf/dl-load.c (_dl_map_object_from_fd) [SHARED]: Conditionalize
+ check of GL(dl_error_catch_tsd) on [_LIBC_REENTRANT].
+
+ * bits/libc-lock.h (__rtld_lock_initialize): New macro.
+
+ * elf/dl-sym.c: Include <stdlib.h>.
+
+ * posix/regcomp.c (init_word_char): Use temporaries to hold the 64-bit
+ constants, which avoids warnings in 32-bit builds.
+
+ * bits/fcntl.h [__USE_POSIX199309 || __USE_UNIX98]:
+ (O_DSYNC, O_RSYNC): New macros (with NetBSD values).
+
+ * misc/lseek.c: File moved to ...
+ * io/lseek.c: ... here.
+
+ * rt/clock_nanosleep.c: Include <time.h>, not <sys/time.h>.
+
+ * crypt/sha512.c (sha512_process_block) [!USE_TOTAL128]: Avoid
+ shifting LEN more than 31 bits at once.
+
+2012-08-15 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ [BZ #14195]
+ * sysdeps/i386/i686/multiarch/strcmp-sssse3.S: Fix
+ segmentation fault for a case of two empty input strings.
+ * string/test-strncasecmp.c (check1): Renamed to...
+ (bz12205): ...this.
+ (bz14195): Add new testcase for two empty input strings and N > 0.
+ (test_main): Call new testcase, adapt for renamed function.
+
+2012-08-15 Andreas Jaeger <aj@suse.de>
+
+ [BZ #14090]
+ * crypt/md5test2.c: New test, based on test supplied by Serge
+ Belyshev <belyshev@depni.sinp.msu.ru>.
+ * crypt/Makefile (xtests): Add md5test-giant..
+ * crypt/Makefile ($(objpfx)md5test-giant): Add.
+
+2012-08-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ [BZ #14090]
+ * crypt/md5.c (md5_process_block): Don't assume the buffer
+ length is less than 2**32.
+ * crypt/sha512.c (sha512_process_block): Don't assume the buffer
+ length is less than 2**64.
+
+2012-08-15 Roland McGrath <roland@hack.frob.com>
+
+ * string/str-two-way.h: Include <sys/param.h>.
+ (MAX): Macro removed.
+
+ * sysdeps/x86_64/multiarch/strstr-c.c: Add copyright header.
+ Move #define and #undef of memmove to just before and after
+ including <string.h>.
+
+ * sysdeps/x86_64/multiarch/memmove.c: Don't include <stddef.h>.
+ [!NOT_IN_libc]: Move #define and #undef of memmove to just before
+ and after including <string.h>. Move declarations of
+ __memmove_sse2, __memmove_ssse3, and __memmove_ssse3_back
+ to before #include "string/memmove.c".
+
+ * include/dirent.h: Declare __getdirentries.
+
+ * sysdeps/posix/system.c (do_system): Cast SUB_REF () to void when not
+ using its value, to avoid warnings in the [!_LIBC_REENTRANT] case.
+
+2012-08-14 Mike Frysinger <vapier@gentoo.org>
+
+ * config.h.in (HAVE_CPP_ASM_DEBUGINFO): Delete.
+ * sysdeps/i386/configure.in: Remove assembler-with-cpp debug check.
+ * sysdeps/i386/configure: Regenerated.
+ * sysdeps/i386/sysdep.h (ENTRY): Remove calls to STABS_CURRENT_FILE1,
+ STABS_CURRENT_FILE, and STABS_FUN.
+ (END): Remove call to STABS_FUN_END.
+ (STABS_CURRENT_FILE1): Delete.
+ (STABS_CURRENT_FILE): Likewise.
+ (STABS_FUN): Likewise.
+ (STABS_FUN_END): Likewise.
+ (STABS_FUN2): Likewise.
+ * sysdeps/x86_64/configure.in: Remove assembler-with-cpp debug check.
+ * sysdeps/x86_64/configure: Regenerated.
+
+2012-08-14 Roland McGrath <roland@hack.frob.com>
+
+ * elf/dl-open.c: Include <atomic.h>.
+ * elf/dl-lookup.c: Likewise.
+
+2012-08-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_CLONE_THREAD_FLAGS): Remove.
+ * sysdeps/unix/sysv/linux/s390/system.c (FORK): Define
+ unconditionally.
+ * sysdeps/unix/sysv/linux/sparc/system.c (FORK): Define
+ unconditionally.
+ * sysdeps/unix/sysv/linux/system.c [!FORK] (FORK): Do not
+ condition on __ASSUME_CLONE_THREAD_FLAGS.
+
+2012-08-14 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+
+2012-08-13 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * include/atomic.h (atomic_exchange_and_add): Split into ...
+ (atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
+ New atomic macros.
+
+2012-08-13 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+2012-08-13 Jeff Law <law@redhat.com>
+
+ * manual/stdio.texi (snprintf): Clarify handling of the trailing
+ null byte in the output string.
+
+2012-08-10 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL): Define.
+ [__LINUX_KERNEL_VERSION >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL]
+ (__ASSUME_ARG_MAX_STACK_BASED): Define.
+ * sysdeps/unix/sysv/linux/sysconf.c (__sysconf)
+ [__LINUX_KERNEL_VERSION < 0x020617]: Change condition to
+ !__ASSUME_ARG_MAX_STACK_BASED. Compare version with
+ __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL.
+
+2012-08-09 Jeff Law <law@redhat.com>
+
+ [BZ #13939]
+ * malloc.c/arena.c (reused_arena): New parameter, avoid_arena.
+ When avoid_arena is set, don't retry in the that arena. Pick the
+ next one, whatever it might be.
+ (arena_get2): New parameter avoid_arena, pass through to reused_arena.
+ (arena_lock): Pass in new parameter to arena_get2.
+ * malloc/malloc.c (__libc_memalign): Pass in new parameter to
+ arena_get2.
+ (__libc_malloc): Unify retrying after main arena failure with
+ __libc_memalign version.
+ (__libc_valloc, __libc_pvalloc, __libc_calloc): Likewise.
+
+2012-08-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14166]
+ * sysdeps/i386/i686/multiarch/strstr-c.c (strstr): Redefined
+ to __redirect_strstr.
+ (__strstr_sse42): Use typeof __redirect_strstr.
+ (__strstr_ia32): Likewise.
+ (__libc_strstr): New prototype.
+ (strstr): Renamed to ...
+ (__libc_strstr): This.
+ (strstr): New strong alias of __libc_strstr.
+ * sysdeps/x86_64/multiarch/strstr-c.c: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/time.c (time): Redefined to
+ __redirect_time.
+ Include <time.h>.
+ (__libc_time): New prototype.
+ (time_ifunc): Replace time with __libc_time.
+ (time): New strong alias and hidden definition of __libc_time.
+ (__GI_time): Remove strong alias.
+ * sysdeps/x86_64/multiarch/memmove.c: Don't include <string.h>.
+ Include <stddef.h>.
+ (memmove): Redefined to __redirect_memmove.
+ (__memmove_sse2): Use typeof __redirect_memmove.
+ (__memmove_ssse3): Likewise.
+ (__memmove_ssse3_back): Likewise.
+ (__libc_memmove): New prototype.
+ (memmove): Renamed to ...
+ (__libc_memmove): This.
+ (memmove): New strong alias of __libc_memmove.
+
+2012-08-08 Mark Salter <msalter@redhat.com>
+
+ * elf/elf.h
+ (R_MN10300_TLS_GD): Define.
+ (R_MN10300_TLS_LD): Likewise.
+ (R_MN10300_TLS_LDO): Likewise.
+ (R_MN10300_TLS_GOTIE): Likewise.
+ (R_MN10300_TLS_IE): Likewise.
+ (R_MN10300_TLS_LE): Likewise.
+ (R_MN10300_TLS_DTPMOD): Likewise.
+ (R_MN10300_TLS_DTPOFF): Likewise.
+ (R_MN10300_TLS_TPOFF): Likewise.
+ (R_MN10300_SYM_DIFF): Likewise.
+ (R_MN10300_ALIGN): Likewise.
+ (R_MN10300_NUM): Update.
+
+2012-08-08 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_TGKILL):
+ Remove.
+
+2012-08-08 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/posix/fdopendir.c: Include <stddef.h>.
+
+ * sysdeps/unix/sysv/linux/readdir64_r.c: Update #include for
+ sysdeps/unix -> sysdeps/posix move.
+ * sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise.
+
+2012-08-07 Allan McRae <allan@archlinux.org>
+
+ [BZ #14303]
+ * sunrpc/rpc_main.c (SVR4_CPP): Remove.
+ (SUNOS_CPP): Likewise.
+ (find_cpp): Fall back to selecting system cpp when /lib/cpp is
+ not found.
+ (open_input): Call CPP using execvp.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_PROT_GROWSUPDOWN): Remove.
+ (__ASSUME_NO_CLONE_DETACHED): Likewise.
+ (__ASSUME_GETDENTS32_D_TYPE): Likewise.
+ (__ASSUME_WAITID_SYSCALL): Likewise.
+ * sysdeps/unix/sysv/linux/dl-execstack.c
+ (_dl_make_stack_executable) [PROT_GROWSDOWN || PROT_GROWSUP]: Make
+ code unconditional.
+ (_dl_make_stack_executable) [!__ASSUME_PROT_GROWSUPDOWN]: Remove
+ conditional code.
+ * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS)
+ [__ASSUME_GETDENTS32_D_TYPE]: Make code unconditional.
+ (__GETDENTS) [!__ASSUME_GETDENTS32_D_TYPE]: Remove conditional
+ code.
+ * sysdeps/unix/sysv/linux/waitid.c [__NR_waitid]: Make code
+ unconditional.
+ [__ASSUME_WAITID_SYSCALL]: Likewise.
+ [!__ASSUME_WAITID_SYSCALL]: Remove conditional code.
+
+2012-08-07 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/closedir.c: Renamed to ...
+ * sysdeps/posix/closedir.c: ... here.
+ * sysdeps/unix/dirfd.c: Renamed to ...
+ * sysdeps/posix/dirfd.c: ... here.
+ * sysdeps/unix/dirstream.h: Renamed to ...
+ * sysdeps/posix/dirstream.h: ... here.
+ * sysdeps/unix/fdopendir.c: Renamed to ...
+ * sysdeps/posix/fdopendir.c: ... here.
+ * sysdeps/unix/opendir.c: Renamed to ...
+ * sysdeps/posix/opendir.c: ... here.
+ * sysdeps/unix/readdir.c: Renamed to ...
+ * sysdeps/posix/readdir.c: ... here.
+ * sysdeps/unix/readdir_r.c: Renamed to ...
+ * sysdeps/posix/readdir_r.c: ... here.
+ * sysdeps/unix/rewinddir.c: Renamed to ...
+ * sysdeps/posix/rewinddir.c: ... here.
+ * sysdeps/unix/seekdir.c: Renamed to ...
+ * sysdeps/posix/seekdir.c: ... here.
+ * sysdeps/unix/telldir.c: Renamed to ...
+ * sysdeps/posix/telldir.c: ... here.
+ * sysdeps/unix/sysv/linux/opendir.c: Update #include.
+ * sysdeps/unix/sysv/linux/readdir64.c: Likewise.
+ * sysdeps/unix/sysv/linux/i386/readdir64.c: Likewise.
+ * sysdeps/unix/sysv/linux/wordsize-64/readdir.c: Likewise.
+
+ * sysdeps/unix/bsd/bsd4.4/bits/fcntl.h: Renamed to ...
+ * bits/fcntl.h: ... here.
+
+ * sysdeps/unix/bsd/bsd4.4/bits/fcntl.h (O_NOCTTY): Define to 0x8000,
+ not 0.
+ (O_ASYNC, O_FSYNC, O_SYNC): Move outside [__USE_MISC].
+ [__USE_XOPEN2K8] (O_DIRECTORY, O_NOFOLLOW, O_CLOEXEC): New macros.
+ (FCREAT, FEXCL, FTRUNC, FNOCTTY, FNONBLOCK): Macros removed.
+ (struct flock): Move l_start, l_len to the beginning.
+ Use __pid_t for l_pid.
+ [__USE_XOPEN2K] (POSIX_FADV_NORMAL, POSIX_FADV_RANDOM): New macros.
+ [__USE_XOPEN2K] (POSIX_FADV_SEQUENTIAL, POSIX_FADV_WILLNEED): Likewise.
+ [__USE_XOPEN2K] (POSIX_FADV_DONTNEED, POSIX_FADV_NOREUSE): Likewise.
+ (F_GETLK64, F_SETLK64, F_SETLKW64): New macros.
+ [__USE_XOPEN2K8] (F_DUPFD_CLOEXEC): New macro.
+ [__USE_LARGEFILE64] (struct flock64): New type.
+ (F_GETOWN, F_SETOWN): Also define for [__USE_XOPEN2K8].
+
+ * sysdeps/unix/bsd/bsd4.4/bits/dirent.h: Renamed to ...
+ * bits/dirent.h: ... here.
+
+ * sysdeps/unix/bsd/bsd4.4/bits/dirent.h
+ [__INO_T_MATCHES_INO64_T] (_DIRENT_MATCHES_DIRENT64): New macro.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel):
+ Change from 2.6.0 to 2.6.16.
+ * sysdeps/unix/sysv/linux/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_POSIX_CPU_TIMERS): Define unconditionally.
+ (__ASSUME_TGKILL): Define conditional on architectures, not kernel
+ version.
+ (__ASSUME_UTIMES): Likewise.
+ (__ASSUME_CLONE_STOPPED): Remove.
+ (__ASSUME_FADVISE64_64_SYSCALL): Define conditional on
+ architectures, not kernel version.
+ (__ASSUME_PROT_GROWSUPDOWN): Define unconditionally.
+ (__ASSUME_NO_CLONE_DETACHED): Likewise.
+ (__ASSUME_GETDENTS32_D_TYPE): Likewise.
+ (__ASSUME_WAITID_SYSCALL): Likewise.
+ [__sparc__ && __arch64__] (__ASSUME_STAT64_SYSCALL): Do not
+ condition definition on __LINUX_KERNEL_VERSION >= 0x02060c.
+ * README: State 2.6.16 as minimum Linux kernel version. Do not
+ refer to older versions.
+
+2012-08-06 Roland McGrath <roland@hack.frob.com>
+
+ * dirent/alphasort.c [_DIRENT_MATCHES_DIRENT64]:
+ Define alphasort64 as an alias.
+ * dirent/versionsort.c [_DIRENT_MATCHES_DIRENT64]:
+ Define versionsort64 as an alias.
+ * dirent/scandir.c [_DIRENT_MATCHES_DIRENT64]:
+ Define scandir64 as an alias.
+ * dirent/scandirat.c [_DIRENT_MATCHES_DIRENT64]:
+ Define scandirat64 as an alias.
+ * dirent/alphasort64.c (alphasort64):
+ Conditionalize on [!_DIRENT_MATCHES_DIRENT64].
+ * dirent/versionsort64.c: Likewise.
+ * dirent/scandir64.c: Likewise.
+ * dirent/scandirat64.c: Likewise.
+ * sysdeps/wordsize-64/alphasort.c: File removed.
+ * sysdeps/wordsize-64/alphasort64.c: File removed.
+ * sysdeps/wordsize-64/scandir.c: File removed.
+ * sysdeps/wordsize-64/scandir64.c: File removed.
+ * sysdeps/wordsize-64/scandirat.c: File removed.
+ * sysdeps/wordsize-64/scandirat64.c: File removed.
+ * sysdeps/wordsize-64/versionsort.c: File removed.
+ * sysdeps/wordsize-64/versionsort64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/alphasort.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/alphasort64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/scandir.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/scandir64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/scandirat.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/scandirat64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/versionsort.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/versionsort64.c: File removed.
+
+ * bits/typesizes.h [__LP64__] (__INO_T_MATCHES_INO64_T): New macros.
+ * sysdeps/unix/sysv/linux/s390/bits/typesizes.h:
+ [__s390x__] (__INO_T_MATCHES_INO64_T): New macro.
+ * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+ [defined __arch64__ || defined __sparcv9]
+ (__INO_T_MATCHES_INO64_T): New macro.
+ * sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+ [__x86_64__] (__INO_T_MATCHES_INO64_T): New macro.
+ * bits/dirent.h (_DIRENT_MATCHES_DIRENT64): New macro.
+ * sysdeps/unix/sysv/linux/bits/dirent.h
+ [defined __OFF_T_MATCHES_OFF64_T && defined __INO_T_MATCHES_INO64_T]
+ (_DIRENT_MATCHES_DIRENT64): New macro.
+
+ * io/lockf.c [__OFF_T_MATCHES_OFF64_T]:
+ Define lockf64 as an alias.
+ * libio/fseeko.c [__OFF_T_MATCHES_OFF64_T]:
+ Define fseeko64 as an alias.
+ * libio/ftello.c [__OFF_T_MATCHES_OFF64_T]:
+ Define ftello64 as an alias.
+ * libio/iofgetpos.c [__OFF_T_MATCHES_OFF64_T]:
+ Define _IO_fgetpos64 and fgetpos64 as aliases.
+ * libio/iofsetpos.c [__OFF_T_MATCHES_OFF64_T]:
+ Define _IO_fsetpos64 and fsetpos64 as aliases.
+ * io/lockf64.c [!__OFF_T_MATCHES_OFF64_T]:
+ Conditionalize body on this.
+ * libio/fseeko64.c: Likewise.
+ * libio/ftello64.c: Likewise.
+ * libio/iofgetpos64.c: Likewise.
+ * libio/iofsetpos64.c: Likewise.
+ * sysdeps/wordsize-64/lockf.c: File removed.
+ * sysdeps/wordsize-64/lockf64.c: File removed.
+ * sysdeps/wordsize-64/fseeko.c: File removed.
+ * sysdeps/wordsize-64/fseeko64.c: File removed.
+ * sysdeps/wordsize-64/ftello.c: File removed.
+ * sysdeps/wordsize-64/ftello64.c: File removed.
+ * sysdeps/wordsize-64/iofgetpos.c: File removed.
+ * sysdeps/wordsize-64/iofgetpos64.c: File removed.
+ * sysdeps/wordsize-64/iofsetpos.c: File removed.
+ * sysdeps/wordsize-64/iofsetpos64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/lockf.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/lockf64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/fseeko.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/fseeko64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/ftello.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/ftello64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos64.c: File removed.
+
+ * bits/typesizes.h [__LP64__] (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/sysv/linux/s390/bits/typesizes.h:
+ [__s390x__] (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+ [defined __arch64__ || defined __sparcv9]
+ (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+ [__x86_64__] (__OFF_T_MATCHES_OFF64_T): New macro.
+ * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
+ (__OFF_T_MATCHES_OFF64_T): New macro.
+
+2012-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * stdlib/secure-getenv.c (__secure_getenv): Replace
+ GLIBC_2_16 with GLIBC_2_17.
+
+2012-08-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofopen.c: Removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/iofopen64.c: Likewise.
+
+2012-08-03 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_AT_SECURE):
+ Remove.
+ (__ASSUME_CORRECT_SI_PID): Likewise.
+ (__ASSUME_BRK_PAGE_ROUNDED): Likewise.
+ (__ASSUME_TMPFS_NAME): Likewise.
+ * sysdeps/unix/sysv/linux/dl-sysdep.c (frob_brk)
+ [!__ASSUME_BRK_PAGE_ROUNDED]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/ldsodefs.h [__ASSUME_AT_SECURE]
+ (HAVE_AUX_SECURE): Make definition unconditional.
+ * sysdeps/unix/sysv/linux/shm_open.c (where_is_shmfs)
+ [!__ASSUME_TMPFS_NAME]: Remove conditional code.
+
+2012-08-03 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/mach/hurd/sys/param.h (MAXSYMLINKS): Macro removed.
+ * sysdeps/mach/hurd/bits/local_lim.h (SYMLOOP_MAX): Macro removed.
+ * sysdeps/mach/hurd/eloop-threshold.h: New file.
+ * hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Use
+ __eloop_threshold instead of SYMLOOP_MAX.
+
+ * sysdeps/generic/eloop-threshold.h: New file.
+ * stdlib/canonicalize.c (__realpath): Use __eloop_threshold instead
+ of MAXSYMLINKS.
+ * elf/chroot_canon.c (chroot_canon): Likewise.
+
+2012-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13717]
+ * sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel):
+ Change to 2.6.0 everywhere.
+ * sysdeps/unix/sysv/linux/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_SET_THREAD_AREA_SYSCALL): Remove.
+ (__ASSUME_CLONE_THREAD_FLAGS): Condition on architectures, not
+ kernel versions.
+ (__ASSUME_POSIX_TIMERS): Define unconditionally.
+ (__ASSUME_FUTEX_REQUEUE): Remove.
+ (__ASSUME_STATFS64): Define unconditionally.
+ (__ASSUME_AT_SECURE): Likewise.
+ (__ASSUME_CORRECT_SI_PID): Likewise.
+ (__ASSUME_TGKILL): Define without depending on kernel version for
+ i386.
+ (__ASSUME_UTIMES): Likewise.
+ (__ASSUME_SWAPCONTEXT_SYSCALL): Condition on architecture, not
+ kernel version.
+ (__ASSUME_BRK_PAGE_ROUNDED): Define unconditionally.
+ (__ASSUME_TMPFS_NAME): Likewise.
+ * README: Update reference to Linux kernel versions.
+
+2012-08-02 Marek Polacek <polacek@redhat.com>
+
+ [BZ# 14150]
+ * configure.in (libc_cv_asm_type_prefix): Remove test. Replace
+ libc_cv_asm_type_prefix with %.
+ * configure: Regenerated.
+ * include/libc-symbols.h: Remove comment about
+ ASM_TYPE_DIRECTIVE_PREFIX. Replace ASM_TYPE_DIRECTIVE_PREFIX with %.
+ (declare_symbol_alias_1_paste) [__ASSEMBLER__]: Do not define.
+ (declare_symbol_alias_1_paste_1) [__ASSEMBLER__]: Likewise.
+ (declare_symbol_alias_1_stringify) [!__ASSEMBLER__]: Likewise.
+ (declare_symbol_alias_1_stringify_1) [!__ASSEMBLER__]: Likewise.
+ * elf/tst-unique2mod2.c: Replace ASM_TYPE_DIRECTIVE_PREFIX with %.
+ [HAVE_ASM_UNIQUE_OBJECT]: Do not define S.
+ [HAVE_ASM_UNIQUE_OBJECT]: Do not define _S.
+ * elf/tst-unique2mod1.c: Likewise.
+ * elf/tst-unique1mod2.c: Likewise.
+ * elf/tst-unique1mod1.c: Likewise.
+ * config.h.in: Do not undef ASM_TYPE_DIRECTIVE_PREFIX.
+ * sysdeps/s390/s390-32/sysdep.h: Do not define ASM_TYPE_DIRECTIVE.
+ Replace ASM_TYPE_DIRECTIVE with .type.
+ * sysdeps/s390/s390-64/sysdep.h: Likewise.
+ * sysdeps/i386/sysdep.h: Likewise.
+ * sysdeps/x86_64/sysdep.h: Likewise.
+ * sysdeps/sh/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:
+ Do not define ASM_TYPE_DIRECTIVE.
+ * sysdeps/powerpc/sysdep.h: Likewise.
+ * sysdeps/powerpc/powerpc32/sysdep.h:
+ Replace ASM_TYPE_DIRECTIVE with .type.
+ * sysdeps/s390/s390-32/s390-mcount.S: Likewise.
+ * sysdeps/s390/s390-64/s390x-mcount.S: Likewise.
+ * sysdeps/i386/fpu/e_powf.S: Likewise.
+ * sysdeps/i386/fpu/e_expl.S: Likewise.
+ * sysdeps/i386/fpu/e_atanhf.S: Likewise.
+ * sysdeps/i386/fpu/e_acosh.S: Likewise.
+ * sysdeps/i386/fpu/e_pow.S: Likewise.
+ * sysdeps/i386/fpu/s_asinhl.S: Likewise.
+ * sysdeps/i386/fpu/e_acoshl.S: Likewise.
+ * sysdeps/i386/fpu/s_expm1.S: Likewise.
+ * sysdeps/i386/fpu/s_frexpf.S: Likewise.
+ * sysdeps/i386/fpu/e_log2.S: Likewise.
+ * sysdeps/i386/fpu/e_log2l.S: Likewise.
+ * sysdeps/i386/fpu/e_scalb.S: Likewise.
+ * sysdeps/i386/fpu/e_powl.S: Likewise.
+ * sysdeps/i386/fpu/e_log10f.S: Likewise.
+ * sysdeps/i386/fpu/s_cbrtf.S: Likewise.
+ * sysdeps/i386/fpu/e_logl.S: Likewise.
+ * sysdeps/i386/fpu/s_cbrt.S: Likewise.
+ * sysdeps/i386/fpu/s_frexpl.S: Likewise.
+ * sysdeps/i386/fpu/s_expm1f.S: Likewise.
+ * sysdeps/i386/fpu/e_log2f.S: Likewise.
+ * sysdeps/i386/fpu/e_acoshf.S: Likewise.
+ * sysdeps/i386/fpu/e_log.S: Likewise.
+ * sysdeps/i386/fpu/e_scalbf.S: Likewise.
+ * sysdeps/i386/fpu/e_logf.S: Likewise.
+ * sysdeps/i386/fpu/e_log10l.S: Likewise.
+ * sysdeps/i386/fpu/e_atanh.S: Likewise.
+ * sysdeps/i386/fpu/s_asinhf.S: Likewise.
+ * sysdeps/i386/fpu/e_log10.S: Likewise.
+ * sysdeps/i386/fpu/s_frexp.S: Likewise.
+ * sysdeps/i386/fpu/e_atanhl.S: Likewise.
+ * sysdeps/i386/fpu/s_asinh.S: Likewise.
+ * sysdeps/i386/fpu/s_cbrtl.S: Likewise.
+ * sysdeps/i386/fpu/e_scalbl.S: Likewise.
+ * sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S: Likewise.
+ * sysdeps/i386/i686/fpu/e_logl.S: Likewise.
+ * sysdeps/i386/i686/strtok.S: Likewise.
+ * sysdeps/i386/i386-mcount.S: Likewise.
+ * sysdeps/i386/strtok.S: Likewise.
+ * sysdeps/x86_64/fpu/e_expl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_log2l.S: Likewise.
+ * sysdeps/x86_64/fpu/e_powl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_logl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_expf.S: Likewise.
+ * sysdeps/x86_64/fpu/e_log10l.S: Likewise.
+ * sysdeps/x86_64/fpu/s_copysignf.S: Likewise.
+ * sysdeps/x86_64/fpu/s_copysign.S: Likewise.
+ * sysdeps/x86_64/fpu/e_scalbl.S: Likewise.
+ * sysdeps/x86_64/_mcount.S: Likewise.
+ * sysdeps/x86_64/strtok.S: Likewise.
+ * sysdeps/sh/_mcount.S: Likewise.
+
+2012-08-01 Roland McGrath <roland@hack.frob.com>
+
+ * libio/iofopen.c: Include <fcntl.h>.
+ [_LIBC] [!defined O_LARGEFILE || O_LARGEFILE == 0]
+ (_IO_fopen64, fopen64): Define as aliases.
+ * libio/iofopen64.c: Include <fcntl.h>.
+ [!defined _LIBC || (defined O_LARGEFILE && O_LARGEFILE != 0)]:
+ Conditionalize body on this.
+ * sysdeps/wordsize-64/iofopen.c: File removed.
+ * sysdeps/wordsize-64/iofopen64.c: File removed.
+
+2012-08-01 Marek Polacek <polacek@redhat.com>
+
+ * libc/Makeconfig: Use elf in place of binfmt-subdir.
+ Use dlfcn directly instead of a variable.
+ (binfmt-subdir): Do not define.
+ (dlfcn): Likewise.
+
+2012-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_FCNTL64):
+ Remove all definitions.
+ * sysdeps/unix/sysv/linux/i386/fcntl.c: Do not include
+ <kernel-features.h>.
+ [!__ASSUME_FCNTL64] (__have_no_fcntl64): Remove.
+ (miss_F_GETOWN_EX): Remove all definitions.
+ [NO_CANCELLATION && !__ASSUME_FCNTL64] (__fcntl_nocancel): Remove
+ macro definition.
+ [!__ASSUME_FCNTL64]: Remove conditional code.
+ [__ASSUME_FCNTL64]: Make code unconditional.
+ * sysdeps/unix/sysv/linux/i386/lockf64.c: Do not include
+ <kernel-features.h>.
+ [__NR_fcntl64 && !__ASSUME_FCNTL64] (__have_no_fcntl64): Remove.
+ (lockf64) [!__ASSUME_FCNTL64]: Remove conditional code.
+ (lockf64) [__NR_fcntl64]: Make code unconditional.
+ (lockf64) [__ASSUME_FCNTL64]: Likewise.
+
+ * sysdeps/unix/sysv/linux/kernel-features.h
+ (__ASSUME_VFORK_SYSCALL): Remove all definitions.
+ * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork) [__NR_vfork]:
+ Make code unconditional.
+ (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+ (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork)
+ [__NR_vfork]: Make code unconditional.
+ (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+ (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork)
+ [__NR_vfork]: Make code unconditional.
+ (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+ (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+
+2012-08-01 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/generic/sys/param.h (NGROUPS): Define only if [NGROUPS_MAX].
+ (MAXSYMLINKS): Define only if [SYMLOOP_MAX].
+
+ * misc/mkstemp.c [!defined O_LARGEFILE || O_LARGEFILE == 0]:
+ Define mkstemp64 as an alias.
+ * misc/mkstemps.c [!defined O_LARGEFILE || O_LARGEFILE == 0]:
+ Define mkstemps64 as an alias.
+ * misc/mkostemp.c [!defined O_LARGEFILE || O_LARGEFILE == 0]:
+ Define mkostemp64 as an alias.
+ * misc/mkostemps.c [!defined O_LARGEFILE || O_LARGEFILE == 0]:
+ Define mkostemps64 as an alias.
+ * misc/mkstemp64.c [defined O_LARGEFILE && O_LARGEFILE != 0]:
+ Conditionalize body on this.
+ * misc/mkostemp64.c: Likewise.
+ * misc/mkostemps64.c: Likewise.
+ * misc/mkstemps64.c: Likewise.
+ * sysdeps/wordsize-64/mkstemp64.c: File removed.
+ * sysdeps/wordsize-64/mkostemp64.c: File removed.
+ * sysdeps/wordsize-64/mkostemp.c: File removed.
+ * sysdeps/wordsize-64/mkstemp.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c: File removed.
+
+ [BZ #14138]
+ * sysdeps/unix/sysv/linux/syscalls.list: Add getrlimit/ugetrlimit line.
+ * sysdeps/unix/sysv/linux/i386/getrlimit.c: File removed.
+ * sysdeps/unix/sysv/linux/powerpc/getrlimit.c: File removed.
+ * sysdeps/unix/sysv/linux/sh/getrlimit.c: File removed.
+
+ * sysdeps/unix/make-syscalls.sh: Emit uses of the versioned_symbol and
+ compat_symbol macros from <shlib-compat.h> rather than the underlying
+ default_symbol_version and symbol_version macros, so that DEFAULT
+ lines in shlib-versions are respected.
+ * sysdeps/unix/Makefile ($(objpfx)stub-syscalls.c): Likewise.
+
+2012-08-01 Florian Weimer <fweimer@redhat.com>
+
+ * posix/unistd.h (setuid, setreuid, seteuid, setresuid):
+ Declare with warn_unused_result.
+ (setgid, setregid, setegid, setresgid): Likewise.
+ * sysdeps/unix/sysv/linux/sys/fsuid.h (setfsuid, setfsgid):
+ Likewise.
+ * WUR-REPORT: Remove set*id functions.
+
+2012-07-31 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/mach/hurd/renameat.c: New file, mostly copied from rename.c.
+
+2012-07-31 Roland McGrath <roland@hack.frob.com>
+
+ * include/sys/socket.h (__libc_accept, __libc_accept4):
+ Add attribute_hidden.
+ * socket/accept4.c (__libc_accept4): Remove libc_hidden_def.
+
+ * nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)): Conditionalize
+ use of PTR_MANGLE.
+ * inet/getnetgrent_r.c (setup): Likewise.
+
+ * sysdeps/generic/siglist.h: Put SIGWINCH under #ifdef.
+
+2012-07-31 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/fpu/libm-test-ulps: Update.
+
+2012-07-31 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13629]
+ * math/s_clog.c (__clog): Use __log1p if larger part has absolute
+ value between 1.0 and 2.0 and smaller part has absolute value less
+ than 1.0.
+ * math/s_clog10.c (__clog10): Likewise.
+ * math/s_clog10f.c (__clog10f): Likewise.
+ * math/s_clog10l.c (__clog10l): Likewise.
+ * math/s_clogf.c (__clogf): Likewise.
+ * math/s_clogl.c (__clogl): Likewise.
+ * math/libm-test.inc (clog_test): Add more tests.
+ (clog10_test): Likewise.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
+2012-07-31 Florian Weimer <fweimer@redhat.com>
+
+ * stdlib/tst-secure-getenv.c: Use printf for error reporting.
+ Exit with zero in case no suitable GID is found, and write a
+ message to standard error.
+
+2012-07-30 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/generic/sys/param.h (MAXSYMLINKS): Define to SYMLOOP_MAX
+ rather than to 1.
+ (NBBY, NGROUPS, CANBSIZ, NCARGS): New macros.
+ (MAXPATHLEN): Removed.
+ (NOGROUP, NODEV): New macros.
+ (setbit, clrbit, isset, isclr): New macros.
+ (howmany, roundup, powerof2): New macros.
+ (DEV_BSIZE): New macro.
+
+ * include/unistd.h: Add attribute_hidden on __libc_pwrite64.
+ * sysdeps/posix/pwrite64.c: Remove libc_hidden_def (__libc_pwrite64).
+
+ * sysdeps/ieee754/k_standard.c (__kernel_standard_l): Conditionalize
+ definition on [!__NO_LONG_DOUBLE_MATH].
+
+ * nss/nsswitch.c (__nss_lookup_function): Conditionalize use of
+ PTR_MANGLE and PTR_DEMANGLE.
+
+ * socket/accept4.c (accept4): Rename to __libc_accept4.
+ Define accept4 as a weak alias.
+
+ * sysdeps/posix/getcwd.c (__getcwd): Conditionalize d_type field use
+ on [_DIRENT_HAVE_D_TYPE].
+ * io/ftw.c (ftw_dir): Likewise.
+
+ * io/xmknod.c (__xmknod): Don't check PATH for being null.
+
+ * libio/genops.c (flush_cleanup): Move inside [_IO_MTSAFE_IO].
+
+ * bits/signum.h (SIGSTOP, SIGCONT, SIGTSTP, SIGTTIN, SIGTTOU, SIGCHLD):
+ Use the BSD numbers rather than the arbitrary ones we had.
+ (SIGBUS, SIGIO, SIGPOLL, SIGPROF, SIGSYS): New macros.
+ (SIGTRAP, SIGURG, SIGUSR1, SIGUSR2, SIGVTALRM): New macros.
+ (SIGXCPU, SIGXFSZ): New macros.
+ (_NSIG): Now 32.
+
+ * elf/rtld.c (_rtld_global): Conditionalize .dl_ns[LM_ID_BASE]
+ initializer on [_LIBC_REENTRANT].
+
+ * iconv/iconv_charmap.c (charmap_conversion): Move ST, ADDR
+ definitions inside [_POSIX_MAPPED_FILES].
+
+ * posix/regex.c: Include <sys/param.h> for MIN/MAX.
+
+ * dirent/opendir.c: Include <fcntl.h>.
+
+ * bits/libc-lock.h (__libc_setspecific): Evaluate arguments.
+ (__libc_getspecific): Likewise.
+ (__libc_key_create): Likewise.
+
+ * stdio-common/tmpfile64.c: Include <fcntl.h> first.
+ [defined O_LARGEFILE && O_LARGEFILE != 0]: Conditionalize on this.
+ * stdio-common/tmpfile.c [!defined O_LARGEFILE || O_LARGEFILE == 0]
+ (tmpfile64): Define as alias.
+ * sysdeps/wordsize-64/tmpfile.c: File removed.
+ * sysdeps/wordsize-64/tmpfile64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c: File removed.
+ * sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c: File removed.
+
+ * stdio-common/vfscanf.c: Include <stdbool.h>.
+ * nss/makedb.c: Likewise.
+ * stdio-common/_i18n_number.h: Likewise.
+ * argp/argp-help.c: Likewise.
+ * posix/wordexp.c: Likewise.
+ * sysdeps/posix/spawni.c: Likewise.
+ * nss/nss_files/files-initgroups.c: Likewise.
+ * stdio-common/reg-modifier.c: Include <stdlib.h>.
+ * nss/nss_files/files-initgroups.c: Likewise.
+ * nss/nss_db/db-netgrp.c: Likewise.
+ * nss/nss_db/db-initgroups.c: Likewise.
+ * io/fchmodat.c: Include <sys/stat.h>.
+
+ * sysdeps/generic/ldsodefs.h (struct rtld_global): Use
+ __rtld_lock_define_recursive macro instead of __rtld_lock_recursive_t.
+
+ * intl/loadmsgcat.c (_nl_load_domain): Don't use MAP_FAILED outside of
+ [HAVE_MMAP].
+
+ * bits/stat.h: Fix inclusion guard to accept _FCNTL_H too.
+ Add multiple inclusion protection.
+
2012-07-27 David S. Miller <davem@davemloft.net>
* sysdeps/sparc/fpu/libm-test-ulps: Update.
diff --git a/INSTALL b/INSTALL
index d4fabe96c7..d70019883a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -196,7 +196,24 @@ this: `CC=TARGET-gcc configure TARGET'. Set `BUILD_CC' to the compiler
to use for programs run on the build system as part of compiling the
library. You may need to set `AR' to cross-compiling versions of `ar'
if the native tools are not configured to work with object files for
-the target you configured for.
+the target you configured for. When cross-compiling the GNU C Library,
+it may be tested using `make check
+test-wrapper="SRCDIR/scripts/cross-test-ssh.sh HOSTNAME"', where SRCDIR
+is the absolute directory name for the main source directory and
+HOSTNAME is the host name of a system that can run the newly built
+binaries of the GNU C Library. The source and build directories must
+be visible at the same locations on both the build system and HOSTNAME.
+
+ In general, when testing the GNU C Library, `test-wrapper' may be set
+to the name and arguments of any program to run newly built binaries.
+This program must preserve the arguments to the binary being run, its
+working directory, all environment variables set as part of testing and
+the standard input, output and error file descriptors. If
+`TEST-WRAPPER env' will not work to run a program with environment
+variables set, then `test-wrapper-env' must be set to a program that
+runs a newly built program with environment variable assignments in
+effect, those assignments being specified as `VAR=VALUE' before the
+name of the program to be run.
Installing the C Library
========================
diff --git a/Makeconfig b/Makeconfig
index 859b588e00..70a3d9dba5 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -33,31 +33,6 @@ ifdef subdir
.. := ../
endif
-# If config.make exists, the source directory was configured,
-# so don't try to be clever and find another directory to build in.
-ifneq (,$(wildcard $(..)config.make))
-ARCH =
-machine =
-else # Not configured.
-ifndef ARCH
-ifdef machine
-ARCH = $(machine)
-endif # machine
-endif # ARCH
-endif # config.make
-
-# Directory for object files and libc.a. If this is not defined, the
-# object files live in the subdirectories where their sources live, and
-# libc.a lives in the parent directory (this probably doesn't work any
-# more).
-ifdef ARCH
-ifeq ($(filter /%,$(ARCH)),)
-objdir := $(..)$(ARCH)
-else
-objdir = $(ARCH)
-endif
-endif
-
# $(common-objdir) is the place to put objects and
# such that are not specific to a single subdir.
ifdef objdir
@@ -65,15 +40,7 @@ objpfx := $(patsubst %//,%/,$(objdir)/$(subdir)/)
common-objpfx = $(objdir)/
common-objdir = $(objdir)
else
-objpfx :=
-ifdef ..
-common-objpfx = $(..)
-common-objdir = ..
-else
-# This is a kludge. make wizards might grok.
-common-objpfx = sysdeps/../
-common-objdir = .
-endif
+objdir must be defined by the build-directory Makefile.
endif
# Root of the sysdeps tree.
@@ -89,10 +56,6 @@ uses-callbacks = $(exceptions)
# What flags to give to tests which test stack alignment
stack-align-test-flags =
-# We have a special subdir for each binary format.
-# For now, only ELF is fully supported.
-binfmt-subdir = elf
-
# Complete path to sysdep dirs.
# `configure' writes a definition of `config-sysdirs' in `config.make'.
sysdirs := $(foreach D,$(config-sysdirs),$(firstword $(filter /%,$D) $(..)$D))
@@ -415,22 +378,6 @@ LDFLAGS.so += $(hashstyle-LDFLAGS)
LDFLAGS-rtld += $(hashstyle-LDFLAGS)
endif
-# Commands for linking programs with the C library.
-ifndef +link
-+link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
- $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
- $(addprefix $(csu-objpfx),$(start-installed-name)) \
- $(+preinit) $(+prector) \
- $(filter-out $(addprefix $(csu-objpfx),start.o \
- $(start-installed-name))\
- $(+preinit) $(link-extra-libs) \
- $(common-objpfx)libc% $(+postinit),$^) \
- $(link-extra-libs)
-+link-after-libc = $(+postctor) $(+postinit)
-+link = $(+link-before-libc) $(link-libc) $(+link-after-libc)
-+link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc)
-endif
# Command for linking PIE programs with the C library.
ifndef +link-pie
+link-pie = $(CC) -pie -Wl,-O1 -nostdlib -nostartfiles -o $@ \
@@ -449,29 +396,50 @@ ifndef +link-static
+link-static-before-libc = $(CC) -nostdlib -nostartfiles -static -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
$(addprefix $(csu-objpfx),$(static-start-installed-name)) \
- $(+preinit) $(+prector) \
+ $(+preinit) $(+prectorT) \
$(filter-out $(addprefix $(csu-objpfx),start.o \
$(start-installed-name))\
$(+preinit) $(link-extra-libs-static) \
$(common-objpfx)libc% $(+postinit),$^) \
- $(link-extra-libs-static) $(link-libc-static)
-+link-static-after-libc = $(+postctor) $(+postinit)
+ $(link-extra-libs-static)
++link-static-after-libc = $(+postctorT) $(+postinit)
+link-static = $(+link-static-before-libc) $(link-libc-static) \
$(+link-static-after-libc)
+link-static-tests = $(+link-static-before-libc) $(link-libc-static-tests) \
$(+link-static-after-libc)
endif
+# Commands for linking programs with the C library.
+ifndef +link
+ifeq (yes,$(build-shared))
++link-before-libc = $(CC) -nostdlib -nostartfiles -o $@ \
+ $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
+ $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
+ $(addprefix $(csu-objpfx),$(start-installed-name)) \
+ $(+preinit) $(+prector) \
+ $(filter-out $(addprefix $(csu-objpfx),start.o \
+ $(start-installed-name))\
+ $(+preinit) $(link-extra-libs) \
+ $(common-objpfx)libc% $(+postinit),$^) \
+ $(link-extra-libs)
++link-after-libc = $(+postctor) $(+postinit)
++link = $(+link-before-libc) $(link-libc) $(+link-after-libc)
++link-tests = $(+link-before-libc) $(link-libc-tests) $(+link-after-libc)
+else
++link = $(+link-static)
++link-tests = $(+link-static-tests)
+endif
+endif
# Command for statically linking bounded-pointer programs with the C library.
ifndef +link-bounded
+link-bounded = $(CC) -nostdlib -nostartfiles -static -fbounded-pointers -o $@ \
$(sysdep-LDFLAGS) $(LDFLAGS) \
$(addprefix $(csu-objpfx),b$(static-start-installed-name)) \
- $(+preinit) $(+prector) \
+ $(+preinit) $(+prectorT) \
$(filter-out $(addprefix $(csu-objpfx),start.ob \
$(start-installed-name))\
$(+preinit) $(link-extra-libs-bounded) \
$(common-objpfx)libc% $(+postinit),$^) \
- $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) $(+postinit)
+ $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctorT) $(+postinit)
endif
ifndef config-LDFLAGS
ifeq (yes,$(build-shared))
@@ -493,15 +461,14 @@ link-libc-tests = $(link-libc-before-gnulib) $(gnulib-tests)
rpath-dirs = math elf dlfcn nss nis rt resolv crypt
rpath-link = \
$(common-objdir):$(subst $(empty) ,:,$(patsubst ../$(subdir),.,$(rpath-dirs:%=$(common-objpfx)%)))
-elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
else
-nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
-resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
link-libc = $(common-objpfx)libc.a $(otherlibs) $(gnulib) $(common-objpfx)libc.a $(gnulib)
link-libc-tests = $(common-objpfx)libc.a $(otherlibs) $(gnulib-tests) $(common-objpfx)libc.a $(gnulib-tests)
endif
endif
+elfobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)elf)
+
# Differences in the linkers on the various platforms.
LDFLAGS-rpath-ORIGIN = -Wl,-rpath,'$$ORIGIN'
LDFLAGS-soname-fname = -Wl,-soname,$(@F)
@@ -572,7 +539,14 @@ gnulib-arch =
gnulib = -lgcc $(gnulib-arch)
gnulib-tests := -lgcc $(libgcc_eh)
static-gnulib-arch =
+# By default, elf/static-stubs.o, instead of -lgcc_eh, is used to
+# statically link programs. When --disable-shared is used, we use
+# -lgcc_eh since elf/static-stubs.o isn't sufficient.
+ifeq (yes,$(build-shared))
static-gnulib = -lgcc $(static-gnulib-arch)
+else
+static-gnulib = -lgcc -lgcc_eh $(static-gnulib-arch)
+endif
static-gnulib-tests := -lgcc -lgcc_eh $(libunwind)
libc.so-gnulib := -lgcc
endif
@@ -583,10 +557,34 @@ endif
# Variants of the two previous definitions for linking PIE programs.
+prectorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginS.o`
+postctorS = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtendS.o`
+# Variants of the two previous definitions for statically linking programs.
++prectorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtbeginT.o`
++postctorT = `$(CC) $(sysdep-LDFLAGS) --print-file-name=crtend.o`
+interp = $(addprefix $(elf-objpfx),interp.os)
csu-objpfx = $(common-objpfx)csu/
elf-objpfx = $(common-objpfx)elf/
+# A command that, prepended to the name and arguments of a program,
+# and run on the build system, causes that program with those
+# arguments to be run on the host for which the library is built.
+ifndef test-wrapper
+test-wrapper =
+endif
+# Likewise, but the name of the program is preceded by
+# <variable>=<value> assignments for environment variables.
+ifndef test-wrapper-env
+test-wrapper-env = $(test-wrapper) env
+endif
+
+# Whether to run test programs built for the library's host system.
+ifndef run-built-tests
+ifeq (yes|,$(cross-compiling)|$(test-wrapper))
+run-built-tests = no
+else
+run-built-tests = yes
+endif
+endif
+
# How to run a program we just linked with our library.
# The program binary is assumed to be $(word 2,$^).
built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^))
@@ -596,17 +594,36 @@ sysdep-library-path = \
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
$(filter -Wl$(comma)-rpath-link=%,\
$(sysdep-LDFLAGS)))))
-run-program-prefix = $(if $(filter $(notdir $(built-program-file)),\
- $(tests-static) $(xtests-static)),, \
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
+# $(run-via-rtld-prefix) is a command that, when prepended to the name
+# of a program built with the newly built library, produces a command
+# that, executed on the host for which the library is built, runs that
+# program. For the statically-linked %-bp test programs, and for
+# tests listed in tests-static or xtests-static, it is empty.
+run-via-rtld-prefix = \
+ $(if $(strip $(filter $(notdir $(built-program-file)), \
+ $(tests-static) $(xtests-static)) \
+ $(filter %-bp,$(built-program-file))),, \
+ $(elf-objpfx)$(rtld-installed-name) \
+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)))
else
-run-program-prefix =
-endif
-# Never use $(run-program-prefix) for the statically-linked %-bp test programs
-built-program-cmd = $(patsubst %,$(run-program-prefix),\
- $(filter-out %-bp,$(built-program-file))) \
- $(built-program-file)
+run-via-rtld-prefix =
+endif
+# $(run-program-prefix) is a command that, when prepended to the name
+# of a program built with the newly built library, produces a command
+# that, executed on the build system on which "make" is run, runs that
+# program.
+run-program-prefix = $(test-wrapper) $(run-via-rtld-prefix)
+# $(built-program-cmd) is a command that, executed on the build system
+# on which "make" is run, runs the newly built program that is the
+# second dependency of the makefile target in which
+# $(built-program-cmd) is used.
+built-program-cmd = $(test-wrapper) \
+ $(run-via-rtld-prefix) $(built-program-file)
+# $(host-built-program-cmd) is a command that, executed on the host
+# for which the library is built, runs the newly built program that is
+# the second dependency of the makefile target in which
+# $(host-built-program-cmd) is used.
+host-built-program-cmd = $(run-via-rtld-prefix) $(built-program-file)
ifndef LD
LD := ld -X
@@ -802,11 +819,7 @@ endif
# The assembler can generate debug information too.
ifndef ASFLAGS
-ifeq ($(have-cpp-asm-debuginfo),yes)
ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
-else
-ASFLAGS :=
-endif
endif
ASFLAGS += $(ASFLAGS-config) $(asflags-cpu)
@@ -955,7 +968,6 @@ endif
endif # build-shared
-dlfcn = dlfcn
ifeq ($(build-shared),yes)
libdl = $(common-objpfx)dlfcn/libdl.so$(libdl.so-version)
else
@@ -976,7 +988,7 @@ all-subdirs = csu assert ctype locale intl catgets math setjmp signal \
grp pwd posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow gshadow po argp \
crypt nss localedata timezone rt conform debug \
- $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
+ $(add-on-subdirs) dlfcn elf
ifndef avoid-generated
all-Depend-files := $(wildcard $(foreach dir,$(all-subdirs),\
@@ -1010,6 +1022,13 @@ endif
sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
$(firstword $(subst :, ,$p))))
+# A sysdeps Makeconfig fragment may set libc-reentrant to yes.
+ifeq (yes,$(libc-reentrant))
+defines += -D_LIBC_REENTRANT
+
+libio-mtsafe = -D_IO_MTSAFE_IO
+endif
+
endif # Makeconfig not yet included
# Local Variables:
diff --git a/Makefile b/Makefile
index b0d3edb1a7..5617acce9e 100644
--- a/Makefile
+++ b/Makefile
@@ -111,7 +111,7 @@ install:
ifneq (no,$(PERL))
ifeq (/usr,$(prefix))
ifeq (,$(install_root))
- CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx)
+ LD_SO=$(ld.so-version) CC="$(CC)" $(PERL) scripts/test-installation.pl $(common-objpfx)
endif
endif
endif
@@ -175,7 +175,7 @@ installed-stubs = $(inst_includedir)/gnu/stubs.h
else
installed-stubs = $(inst_includedir)/gnu/stubs-$(default-abi).h
-$(inst_includedir)/gnu/stubs.h: $(common-objpfx)soversions.mk $(+force)
+$(inst_includedir)/gnu/stubs.h: $(+force)
$(make-target-directory)
{ \
echo '/* This file is automatically generated.';\
diff --git a/Makefile.in b/Makefile.in
index 1f5dc1cd72..d73a78f8e9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,6 +3,8 @@ srcdir = @srcdir@
# Uncomment the line below if you want to do parallel build.
# PARALLELMFLAGS = -j 4
+.PHONY: all install
+
all .DEFAULT:
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
diff --git a/Makerules b/Makerules
index 685b1b86c6..ebb9895039 100644
--- a/Makerules
+++ b/Makerules
@@ -841,11 +841,11 @@ install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
# $(inst_libdir)/libfoo.so -- for linking, symlink or ld script
# $(inst_slibdir)/libfoo.so.NN -- for loading by SONAME, symlink
# $(inst_slibdir)/libfoo-X.Y.Z.so -- the real shared object file
-V := $(firstword $($(subdir)-version) $(version))
+lib-version := $(firstword $($(subdir)-version) $(version))
install-lib-nosubdir: $(install-lib.so-unversioned:%=$(inst_slibdir)/%) \
$(foreach L,$(install-lib.so-versioned),\
$(inst_libdir)/$L \
- $(inst_slibdir)/$(L:.so=)-$V.so \
+ $(inst_slibdir)/$(L:.so=)-$(lib-version).so \
$(inst_slibdir)/$L$($L-version))
# Install all the unversioned shared libraries.
@@ -1149,7 +1149,7 @@ ifeq ($(versioning),yes)
mv -f $@T $@
%.dynsym: %.so
- $(OBJDUMP) --dynamic-syms $< > $@T
+ LC_ALL=C $(OBJDUMP) --dynamic-syms $< > $@T
mv -f $@T $@
vpath %.abilist $(+sysdep_dirs)
diff --git a/NEWS b/NEWS
index 3c12922faf..8b691e5e7c 100644
--- a/NEWS
+++ b/NEWS
@@ -9,8 +9,15 @@ Version 2.17
* The following bugs are resolved with this release:
- 6778, 6808, 14042, 14151, 14154, 14157, 14173, 14283, 14298, 14328, 14331,
- 14337, 14347, 14349
+ 1349, 3479, 5044, 5298, 5400, 6530, 6778, 6808, 9685, 9914, 10014, 10038,
+ 10631, 11438, 11607, 12140, 13412, 13542, 13601, 13629, 13679, 13696,
+ 13717, 13741, 13939, 13966, 14042, 14047, 14090, 14150, 14151, 14152,
+ 14154, 14157, 14166, 14173, 14195, 14237, 14251, 14252, 14283, 14298,
+ 14303, 14307, 14328, 14331, 14336, 14337, 14347, 14349, 14376, 14417,
+ 14459, 14476, 14477, 14505, 14510, 14516, 14518, 14519, 14530, 14532,
+ 14538, 14543, 14544, 14545, 14557, 14562, 14568, 14576, 14579, 14583,
+ 14587, 14595, 14602, 14610, 14621, 14638, 14645, 14648, 14652, 14660,
+ 14661, 14683, 14694, 14716, 14743, 14767, 14783.
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
@@ -24,6 +31,37 @@ Version 2.17
* SystemTap static probes have been added into the dynamic linker.
Implemented by Gary Benson.
+* Optimizations of string functions strstr, strcasestr and memmem.
+ Implemented by Maxim Kuvyrkov.
+
+* The minimum Linux kernel version that this version of the GNU C Library
+ can be used with is 2.6.16.
+
+* Optimizations of string functions memchr, wcschr, wcscpy, and wcsrchr for
+ powerpc POWER7. Implemented by Will Schmidt.
+
+* New configure option --disable-nscd builds the C library such that it
+ never attempts to contact the Name Service Caching Daemon (nscd).
+ New configure option --disable-build-nscd avoids building nscd itself;
+ this is the default if --disable-nscd is used.
+
+* The ttyname and ttyname_r functions on Linux now fall back to searching for
+ the tty file descriptor in /dev/pts or /dev if /proc is not available. This
+ allows creation of chroots without the procfs mounted on /proc.
+
+* The `crypt' function now fails if passed salt bytes that violate the
+ specification for those values. On Linux, the `crypt' function will
+ consult /proc/sys/crypto/fips_enabled to determine if "FIPS mode" is
+ enabled, and fail on encrypted strings using the MD5 or DES algorithm
+ when the mode is enabled.
+
+* The `clock_*' suite of functions (declared in <time.h>) is now available
+ directly in the main C library. Previously it was necessary to link with
+ -lrt to use these functions. This change has the effect that a
+ single-threaded program that uses a function such as `clock_gettime' (and
+ is not linked with -lrt) will no longer implicitly load the pthreads
+ library at runtime and so will not suffer the overheads associated with
+ multi-thread support in other code such as the C++ runtime library.
Version 2.16
@@ -51,7 +89,7 @@ Version 2.16
14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075,
14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134,
14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277,
- 14278
+ 14278.
* Support for the x32 ABI on x86-64 added. The x32 target is selected by
configuring glibc with:
diff --git a/README b/README
index 1e2e3ba18a..1d90b55208 100644
--- a/README
+++ b/README
@@ -16,19 +16,8 @@ GNU/Hurd system, using configurations i[34567]86-*-gnu. The current
GNU/Hurd support requires out-of-tree patches that will eventually be
incorporated into an official GNU C Library release.
-When working with Linux kernels, the GNU C Library version from
-version 2.4 on is intended primarily for use with Linux kernel version
-2.6.0 and later. We only support using the NPTL implementation of
-pthreads, which is now the default configuration. The library is
-unlikely to build without NPTL, or to work on Linux kernels prior to
-2.6. The old LinuxThreads add-on implementation of pthreads for older
-Linux kernels is no longer supported, and we are not distributing it
-with this release.
-
-All Linux kernel versions prior to 2.6.16 are known to have some bugs that
-may cause some of the tests related to pthreads in "make check" to fail.
-If you see such problems, please try the test suite on the most recent
-Linux kernel version that you can use, before pursuing those bugs further.
+When working with Linux kernels, this version of the GNU C Library
+requires Linux kernel version 2.6.16 or later.
Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.
@@ -41,7 +30,7 @@ The GNU C Library supports these configurations for using Linux kernels:
powerpc64-*-linux-gnu
s390-*-linux-gnu
s390x-*-linux-gnu
- sh[34]-*-linux-gnu Requires Linux 2.6.11 or newer
+ sh[34]-*-linux-gnu
sparc*-*-linux-gnu
sparc64*-*-linux-gnu
@@ -51,14 +40,14 @@ add-on. You can find glibc-ports-VERSION distributed separately in the
same place where you got the main glibc distribution files.
Currently these configurations have code in the `ports' add-on:
- alpha*-*-linux-gnu Requires Linux 2.6.9 or newer for NPTL
+ alpha*-*-linux-gnu
am33*-*-linux-gnu Not currently functional
- arm-*-linux-gnueabi Requires Linux 2.6.16-rc1 or newer for NPTL
+ arm-*-linux-gnueabi
hppa-*-linux-gnu Not currently functional without patches.
ia64-*-linux-gnu
m68k-*-linux-gnu
- mips-*-linux-gnu Requires Linux 2.6.12 or newer for NPTL
- mips64-*-linux-gnu Requires Linux 2.6.12 or newer for NPTL
+ mips-*-linux-gnu
+ mips64-*-linux-gnu
powerpc-*-linux-gnu Software floating point (--without-fp)
tilegx-*-linux-gnu
tilepro-*-linux-gnu
diff --git a/Rules b/Rules
index 17d938e39c..35e6ce0bf1 100644
--- a/Rules
+++ b/Rules
@@ -84,12 +84,17 @@ common-generated += dummy.o dummy.c
# This makes all the auxiliary and test programs.
.PHONY: others tests
+ifeq ($(multi-arch),no)
+tests := $(filter-out $(tests-ifunc), $(tests))
+xtests := $(filter-out $(xtests-ifunc), $(xtests))
+endif
+
ifeq ($(build-programs),yes)
others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
else
others: $(addprefix $(objpfx),$(extra-objs))
endif
-ifeq ($(cross-compiling),yes)
+ifeq ($(run-built-tests),no)
tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
xtests: tests
else
@@ -175,8 +180,9 @@ ifneq "$(strip $(tests) $(xtests) $(test-srcs))" ""
# These are the implicit rules for making test outputs
# from the test programs and whatever input files are present.
-make-test-out = GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
- $($*-ENV) $(built-program-cmd) $($*-ARGS)
+make-test-out = $(test-wrapper-env) \
+ GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
+ $($*-ENV) $(host-built-program-cmd) $($*-ARGS)
$(objpfx)%-bp.out: %.input $(objpfx)%-bp
$(make-test-out) > $@ < $(word 1,$^)
$(objpfx)%.out: %.input $(objpfx)%
diff --git a/WUR-REPORT b/WUR-REPORT
index ef407cfdbe..d997bd0391 100644
--- a/WUR-REPORT
+++ b/WUR-REPORT
@@ -4,17 +4,6 @@ lssek: Probably should be __wur but lseek(fd,SEEK_SET,0) will succeed if
the descriptor is fine.
lseek64: same
-setuid: will always succeed given correct privileges, so there might
- be places which don't check for it.
-setreuid: same
-seteuid: same
-setgid: same
-setregid: same
-setegid: same
-setresuid: same
-setresgid: same
-
-
<stdio.h>:
setvbuf: if stream and buffer are fine and other parameters constant,
diff --git a/aclocal.m4 b/aclocal.m4
index e89993237f..60a5fea279 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -10,11 +10,19 @@ AC_PROVIDE([_AS_ECHO_N_PREPARE])dnl
AC_PROVIDE([_AS_ECHO_PREPARE])dnl
AC_PROVIDE([_AS_CR_PREPARE])dnl
AC_PROVIDE([_AS_TR_SH_PREPARE])dnl
+AC_PROVIDE([_AS_VAR_ARITH_PREPARE])dnl
AC_PROVIDE([AC_PROG_INSTALL])dnl
AC_PROVIDE([AC_PROG_CC])dnl
AC_PROVIDE([AC_PROG_CPP])dnl
AC_PROVIDE([_AS_PATH_SEPARATOR_PREPARE])dnl
AC_PROVIDE([_AS_TEST_PREPARE])dnl
+AC_PROVIDE([_AS_BASENAME_PREPARE])dnl
+AC_PROVIDE([_AS_ME_PREPARE])dnl
+AC_PROVIDE([_AS_LINENO_PREPARE])dnl
+AC_PROVIDE([AS_SHELL_FN_as_fn_set_status])dnl
+AC_PROVIDE([AS_SHELL_FN_as_fn_exit])dnl
+AC_PROVIDE([AS_SHELL_FN_as_fn_arith])dnl
+AC_PROVIDE([AS_SHELL_FN_ac_fn_c_try_compile])dnl
define([AS_MESSAGE_LOG_FD],5)dnl
define([AS_MESSAGE_FD],6)dnl
dnl Ripped out of AS_INIT, which does more cruft we do not want.
diff --git a/argp/argp-help.c b/argp/argp-help.c
index 0af680530b..80c2b7d85c 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -40,6 +40,7 @@ char *alloca ();
# endif
#endif
+#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/bits/dirent.h b/bits/dirent.h
index ac1928d3db..948510c068 100644
--- a/bits/dirent.h
+++ b/bits/dirent.h
@@ -1,5 +1,5 @@
-/* Directory entry structure `struct dirent'. Stub version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Directory entry structure `struct dirent'. 4.4BSD/Generic version.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,14 +22,38 @@
struct dirent
{
- char d_name[1]; /* Variable length. */
- int d_fileno;
+#ifndef __USE_FILE_OFFSET64
+ __ino_t d_ino; /* File serial number. */
+#else
+ __ino64_t d_ino;
+#endif
+ unsigned short int d_reclen; /* Length of the whole `struct dirent'. */
+ unsigned char d_type; /* File type, possibly unknown. */
+ unsigned char d_namlen; /* Length of the file name. */
+
+ /* Only this member is in the POSIX standard. */
+ char d_name[1]; /* File name (actually longer). */
};
#ifdef __USE_LARGEFILE64
struct dirent64
{
- char d_name[1]; /* Variable length. */
- int d_fileno;
+ __ino64_t d_ino;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ unsigned char d_namlen;
+
+ char d_name[1];
};
#endif
+
+#define d_fileno d_ino /* Backwards compatibility. */
+
+#define _DIRENT_HAVE_D_RECLEN 1
+#define _DIRENT_HAVE_D_NAMLEN 1
+#define _DIRENT_HAVE_D_TYPE 1
+
+#ifdef __INO_T_MATCHES_INO64_T
+/* Inform libc code that these two types are effectively identical. */
+# define _DIRENT_MATCHES_DIRENT64 1
+#endif
diff --git a/bits/fcntl.h b/bits/fcntl.h
index ba5de0071e..65b366ab7f 100644
--- a/bits/fcntl.h
+++ b/bits/fcntl.h
@@ -1,5 +1,5 @@
-/* O_*, F_*, FD_* bit values for stub configuration.
- Copyright (C) 1991, 1992, 1997, 2000, 2004 Free Software Foundation, Inc.
+/* O_*, F_*, FD_* bit values. 4.4BSD/Generic version.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,10 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-/* These values should be changed as appropriate for your system. */
-
#ifndef _FCNTL_H
-# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
@@ -33,7 +31,28 @@
#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
#define O_EXCL 0x0800 /* Fail if file already exists. */
#define O_TRUNC 0x0400 /* Truncate file to zero length. */
-#define O_NOCTTY 0x0100 /* Don't assign a controlling terminal. */
+#define O_NOCTTY 0x8000 /* Don't assign a controlling terminal. */
+#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
+#define O_FSYNC 0x0080 /* Synchronous writes. */
+#define O_SYNC O_FSYNC
+#ifdef __USE_MISC
+#define O_SHLOCK 0x0010 /* Open with shared file lock. */
+#define O_EXLOCK 0x0020 /* Open with shared exclusive lock. */
+#endif
+#ifdef __USE_XOPEN2K8
+# define O_DIRECTORY 0x00200000 /* Must be a directory. */
+# define O_NOFOLLOW 0x00000100 /* Do not follow links. */
+# define O_CLOEXEC 0x00400000 /* Set close_on_exec. */
+#endif
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC 0x00010000 /* Synchronize data. */
+# define O_RSYNC 0x00020000 /* Synchronize read operations. */
+#endif
+
+/* All opens support large file sizes, so there is no flag bit for this. */
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE 0
+#endif
/* File status flags for `open' and `fcntl'. */
#define O_APPEND 0x0008 /* Writes append to the file. */
@@ -43,6 +62,22 @@
# define O_NDELAY O_NONBLOCK
#endif
+#ifdef __USE_BSD
+/* Bits in the file status flags returned by F_GETFL.
+ These are all the O_* flags, plus FREAD and FWRITE, which are
+ independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
+ given to `open'. */
+# define FREAD 1
+# define FWRITE 2
+
+/* Traditional BSD names the O_* bits. */
+# define FASYNC O_ASYNC
+# define FFSYNC O_FSYNC
+# define FSYNC O_SYNC
+# define FAPPEND O_APPEND
+# define FNDELAY O_NDELAY
+#endif
+
/* Mask for file access modes. This is system-dependent in case
some system ever wants to define some other flavor of access. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
@@ -53,13 +88,21 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#if defined __USE_BSD || defined __USE_UNIX98
-# define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
-# define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
+#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
+#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
#define F_GETLK 7 /* Get record locking info. */
-#define F_SETLK 8 /* Set record locking info. */
-#define F_SETLKW 9 /* Set record locking info, wait. */
+#define F_SETLK 8 /* Set record locking info (non-blocking). */
+#define F_SETLKW 9 /* Set record locking info (blocking). */
+/* Not necessary, we always have 64-bit offsets. */
+#define F_GETLK64 F_GETLK /* Get record locking info. */
+#define F_SETLK64 F_SETLK /* Set record locking info (non-blocking). */
+#define F_SETLKW64 F_SETLKW/* Set record locking info (blocking). */
+#ifdef __USE_XOPEN2K8
+# define F_DUPFD_CLOEXEC 12 /* Duplicate file descriptor with
+ close-on-exit set. */
+#endif
/* File descriptor flags used with F_GETFD and F_SETFD. */
#define FD_CLOEXEC 1 /* Close on exec. */
@@ -71,12 +114,24 @@
argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
struct flock
{
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ };
+
+#ifdef __USE_LARGEFILE64
+/* Note this matches struct flock exactly. */
+struct flock64
+ {
__off_t l_start; /* Offset where the lock begins. */
__off_t l_len; /* Size of the locked area; zero means until EOF. */
__pid_t l_pid; /* Process holding the lock. */
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
};
+#endif
/* Values for the `l_type' field of a `struct flock'. */
#define F_RDLCK 1 /* Read lock. */
diff --git a/bits/libc-lock.h b/bits/libc-lock.h
index d7c49e7bb5..d372722b95 100644
--- a/bits/libc-lock.h
+++ b/bits/libc-lock.h
@@ -44,11 +44,11 @@
/* Initialize the named lock variable, leaving it in a consistent, unlocked
state. */
#define __libc_lock_init(NAME)
+#define __rtld_lock_initialize(NAME)
#define __libc_rwlock_init(NAME)
/* Same as last but this time we initialize a recursive mutex. */
#define __libc_lock_init_recursive(NAME)
-#define __rtld_lock_init_recursive(NAME)
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
@@ -129,12 +129,12 @@
typedef int __libc_key_t;
/* Create key for thread specific data. */
-#define __libc_key_create(KEY,DEST) -1
+#define __libc_key_create(KEY,DEST) ((void) (KEY), (void) (DEST), -1)
/* Set thread-specific data associated with KEY to VAL. */
-#define __libc_setspecific(KEY,VAL) ((void)0)
+#define __libc_setspecific(KEY,VAL) ((void) (KEY), (void) (VAL))
/* Get thread-specific data associated with KEY. */
-#define __libc_getspecific(KEY) 0
+#define __libc_getspecific(KEY) ((void) (KEY), (void *) 0)
#endif /* bits/libc-lock.h */
diff --git a/bits/param.h b/bits/param.h
new file mode 100644
index 0000000000..8a2bc71de6
--- /dev/null
+++ b/bits/param.h
@@ -0,0 +1,33 @@
+/* Old-style Unix parameters and limits. Stub version.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PARAM_H
+# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
+#endif
+
+/* This header is expected to define a few particular macros.
+
+ The traditional BSD macros that correspond directly to POSIX <limits.h>
+ macros don't need to be defined here if <bits/local_lim.h> defines the
+ POSIX limit macro, as the common <sys/param.h> code will define each
+ traditional name to its POSIX name if available.
+
+ This file should define at least:
+
+ EXEC_PAGESIZE
+*/
diff --git a/bits/signum.h b/bits/signum.h
index 48bb7b8050..0a0acb23af 100644
--- a/bits/signum.h
+++ b/bits/signum.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1993, 1996, 1998 Free Software Foundation, Inc.
+/* Signal number constants. Generic version.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,37 +28,49 @@
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
#endif
-/* Signals in the 1-15 range are defined with their historical numbers.
- Signals in the 20-25 range are relatively new and have no ingrained
- numbers. */
+/* We define here all the signal names listed in POSIX (1003.1-2008).
+ Signals in the 1-15 range are defined with their historical numbers.
+ For other signals specified by POSIX, we use the BSD numbers. */
-/* ANSI signals. */
-#define SIGINT 2 /* Interactive attention signal. */
-#define SIGILL 4 /* Illegal instruction. */
-#define SIGABRT 6 /* Abnormal termination. */
-#define SIGFPE 8 /* Erroneous arithmetic operation. */
-#define SIGSEGV 11 /* Invalid access to storage. */
-#define SIGTERM 15 /* Termination request. */
+/* ISO C99 signals. */
+#define SIGINT 2 /* Interactive attention signal. */
+#define SIGILL 4 /* Illegal instruction. */
+#define SIGABRT 6 /* Abnormal termination. */
+#define SIGFPE 8 /* Erroneous arithmetic operation. */
+#define SIGSEGV 11 /* Invalid access to storage. */
+#define SIGTERM 15 /* Termination request. */
/* Historical signals specified by POSIX. */
-#define SIGHUP 1 /* Hangup. */
-#define SIGQUIT 3 /* Quit. */
-#define SIGKILL 9 /* Kill (cannot be blocked, caught, or ignored). */
-#define SIGPIPE 13 /* Broken pipe. */
-#define SIGALRM 14 /* Alarm clock. */
-
-/* New(er) POSIX signals. */
-#define SIGSTOP 20 /* Stop (cannot be blocked, caught, or ignored). */
-#define SIGCONT 21 /* Continue. */
-#define SIGTSTP 22 /* Keyboard stop. */
-#define SIGTTIN 23 /* Background read from control terminal. */
-#define SIGTTOU 24 /* Background write to control terminal. */
-#define SIGCHLD 25 /* Child terminated or stopped. */
-
-#define _NSIG 26
+#define SIGHUP 1 /* Hangup. */
+#define SIGQUIT 3 /* Quit. */
+#define SIGTRAP 5 /* Trace/breakpoint trap. */
+#define SIGKILL 9 /* Killed. */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSYS 12 /* Bad system call. */
+#define SIGPIPE 13 /* Broken pipe. */
+#define SIGALRM 14 /* Alarm clock. */
+
+/* New(er) POSIX signals (1003.1-2008). */
+#define SIGURG 16 /* High bandwidth data is available at a socket. */
+#define SIGSTOP 17 /* Stopped (signal). */
+#define SIGTSTP 18 /* Stopped. */
+#define SIGCONT 19 /* Continued. */
+#define SIGCHLD 20 /* Child terminated or stopped. */
+#define SIGTTIN 21 /* Background read from control terminal. */
+#define SIGTTOU 22 /* Background write to control terminal. */
+#define SIGPOLL 23 /* Pollable event occurred (System V). */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
+#define SIGXCPU 24 /* CPU time limit exceeded. */
+#define SIGXFSZ 25 /* File size limit exceeded. */
+#define SIGVTALRM 26 /* Virtual timer expired. */
+#define SIGPROF 27 /* Profiling timer expired. */
+#define SIGUSR1 30 /* User-defined signal 1. */
+#define SIGUSR2 31 /* User-defined signal 2. */
+
+#define _NSIG 32
/* Archaic names for compatibility. */
-#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP11 */
-#define SIGCLD SIGCHLD /* Old System V name */
+#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP11 */
+#define SIGCLD SIGCHLD /* Old System V name */
#endif /* <signal.h> included. */
diff --git a/bits/stat.h b/bits/stat.h
index 06b4816c81..b9495c52e2 100644
--- a/bits/stat.h
+++ b/bits/stat.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,10 +15,13 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _SYS_STAT_H
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
#endif
+#ifndef _BITS_STAT_H
+#define _BITS_STAT_H 1
+
/* This structure needs to be defined in accordance with the
implementation of __stat, __fstat, and __lstat. */
@@ -96,3 +99,5 @@ struct stat64
__time_t st_ctime; /* Time of last status change. */
};
#endif
+
+#endif /* bits/stat.h */
diff --git a/bits/types.h b/bits/types.h
index 041ace6316..51ef89b7a4 100644
--- a/bits/types.h
+++ b/bits/types.h
@@ -150,7 +150,6 @@ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */
__STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */
__STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */
-__STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */
__STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */
/* Clock ID used in clock and timer functions. */
diff --git a/bits/typesizes.h b/bits/typesizes.h
index 3fd4a2e067..ac18c8199e 100644
--- a/bits/typesizes.h
+++ b/bits/typesizes.h
@@ -51,7 +51,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
@@ -61,6 +60,16 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#ifdef __LP64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/catgets/Makefile b/catgets/Makefile
index c11edd33c2..bbd438a27c 100644
--- a/catgets/Makefile
+++ b/catgets/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2000, 2002-2004, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -50,7 +50,7 @@ generated-dirs = de
tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
-ifneq ($(cross-compiling),yes)
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
$(objpfx)test-gencat.out
# This test just checks whether the program produces any error or not.
@@ -75,7 +75,7 @@ $(objpfx)de.msg: xopen-msg.awk $(..)po/de.po
$(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \
$(objpfx)sample.SJIS.cat
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
diff --git a/catgets/test-gencat.sh b/catgets/test-gencat.sh
index 50594bc351..c884b8f200 100755
--- a/catgets/test-gencat.sh
+++ b/catgets/test-gencat.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test escape character handling in gencat.
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
diff --git a/config.h.in b/config.h.in
index 22c62db9e0..653df54e56 100644
--- a/config.h.in
+++ b/config.h.in
@@ -37,10 +37,6 @@
/* Define if the assembler supports the `.set' directive. */
#undef HAVE_ASM_SET_DIRECTIVE
-/* Define to the prefix before `object' or `function' in the
- assembler's `.type' directive, if it has one. */
-#undef ASM_TYPE_DIRECTIVE_PREFIX
-
/* Define if the assembler supports the gnu_unique_object symbol type. */
#undef HAVE_ASM_UNIQUE_OBJECT
@@ -50,9 +46,6 @@
/* On powerpc64, use overlapping .opd entries. */
#undef USE_PPC64_OVERLAPPING_OPD
-/* Define if the assembler generates debugging information directly. */
-#undef HAVE_CPP_ASM_DEBUGINFO
-
/* Define if _Unwind_Find_FDE should be exported from glibc. */
#undef EXPORT_UNWIND_FIND_FDE
@@ -181,6 +174,15 @@
/* Define if Systemtap <sys/sdt.h> probes should be defined. */
#undef USE_STAP_PROBE
+/* Define if library functions should try to contact the nscd daemon. */
+#undef USE_NSCD
+
+/* Define if the dynamic linker should consult an ld.so.cache file. */
+#undef USE_LDCONFIG
+
+/* Define if STT_GNU_IFUNC support actually works. */
+#undef HAVE_IFUNC
+
/*
*/
diff --git a/config.make.in b/config.make.in
index 65410abe1b..c22acf4a10 100644
--- a/config.make.in
+++ b/config.make.in
@@ -44,6 +44,7 @@ config-cflags-nofma = @libc_cv_cc_nofma@
config-asflags-i686 = @libc_cv_as_i686@
defines = @DEFINES@
+sysheaders = @sysheaders@
sysincludes = @SYSINCLUDES@
c++-sysincludes = @CXX_SYSINCLUDES@
all-warnings = @all_warnings@
@@ -54,7 +55,6 @@ have-Bgroup = @libc_cv_Bgroup@
with-fp = @with_fp@
old-glibc-headers = @old_glibc_headers@
unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
-have-cpp-asm-debuginfo = @libc_cv_cpp_asm_debuginfo@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
have-mfma4 = @libc_cv_cc_fma4@
@@ -99,6 +99,8 @@ sysdeps-add-ons = @sysdeps_add_ons@
cross-compiling = @cross_compiling@
force-install = @force_install@
link-obsolete-rpc = @link_obsolete_rpc@
+build-nscd = @build_nscd@
+use-nscd = @use_nscd@
# Build tools.
CC = @CC@
@@ -109,6 +111,7 @@ CPPFLAGS-config = @CPPFLAGS@
CPPUNDEFS = @CPPUNDEFS@
ASFLAGS-config = @ASFLAGS_config@
AR = @AR@
+NM = @NM@
MAKEINFO = @MAKEINFO@
AS = $(CC) -c
MIG = @MIG@
diff --git a/configure b/configure
index db070c1a4b..35b06c1473 100755
--- a/configure
+++ b/configure
@@ -589,7 +589,6 @@ libc_cv_cc_novzeroupper
libc_cv_cc_sse2avx
libc_cv_cc_avx
libc_cv_cc_sse4
-libc_cv_cpp_asm_debuginfo
libc_cv_forced_unwind
libc_cv_rootsbindir
libc_cv_localstatedir
@@ -597,6 +596,7 @@ libc_cv_sysconfdir
libc_cv_localedir
libc_cv_slibdir
old_glibc_headers
+use_nscd
libc_cv_gcc_unwind_find_fde
libc_extra_cflags
CPPUNDEFS
@@ -622,7 +622,6 @@ VERSIONING
BISON
INSTALL_INFO
PERL
-AWK
libc_cv_have_ksh
KSH
libc_cv_have_bash2
@@ -632,7 +631,7 @@ CXX_SYSINCLUDES
SYSINCLUDES
AUTOCONF
NM
-READELF
+AWK
SED
MAKEINFO
MSGFMT
@@ -654,6 +653,7 @@ multi_arch
base_machine
add_on_subdirs
add_ons
+build_nscd
link_obsolete_rpc
libc_cv_nss_crypt
all_warnings
@@ -661,7 +661,9 @@ force_install
bindnow
oldest_abi
use_default_link
+sysheaders
with_fp
+READELF
ac_ct_CXX
CXXFLAGS
CXX
@@ -749,6 +751,8 @@ enable_multi_arch
enable_nss_crypt
enable_obsolete_rpc
enable_systemtap
+enable_build_nscd
+enable_nscd
with_cpu
'
ac_precious_vars='build_alias
@@ -1407,6 +1411,8 @@ Optional Features:
--enable-obsolete-rpc build and install the obsolete RPC code for
link-time usage
--enable-systemtap enable systemtap static probe points [default=no]
+ --disable-build-nscd disable building and installing the nscd daemon
+ --disable-nscd library functions will not contact the nscd daemon
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -3391,6 +3397,98 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$READELF"; then
+ ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+ ac_ct_READELF=$READELF
+ # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_READELF"; then
+ ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_READELF="readelf"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_READELF" = x; then
+ READELF="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ READELF=$ac_ct_READELF
+ fi
+else
+ READELF="$ac_cv_prog_READELF"
+fi
+
if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
as_fn_error $? "you must configure in a separate build directory" "$LINENO" 5
@@ -3478,6 +3576,7 @@ fi
+
# Check whether --with-default-link was given.
if test "${with_default_link+set}" = set; then :
withval=$with_default_link; use_default_link=$withval
@@ -3751,6 +3850,24 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
+# Check whether --enable-build-nscd was given.
+if test "${enable_build_nscd+set}" = set; then :
+ enableval=$enable_build_nscd; build_nscd=$enableval
+else
+ build_nscd=default
+fi
+
+
+
+# Note the use of $use_nscd is near the bottom of the file.
+# Check whether --enable-nscd was given.
+if test "${enable_nscd+set}" = set; then :
+ enableval=$enable_nscd; use_nscd=$enableval
+else
+ use_nscd=yes
+fi
+
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
@@ -4028,25 +4145,36 @@ if test "$base_machine" = "i386"; then
fi
-# For the multi-arch option we need support in the assembler.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler gnu_indirect_function symbol type support" >&5
-$as_echo_n "checking for assembler gnu_indirect_function symbol type support... " >&6; }
-if ${libc_cv_asm_gnu_indirect_function+:} false; then :
+# For the multi-arch option we need support in the assembler & linker.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler and linker STT_GNU_IFUNC support" >&5
+$as_echo_n "checking for assembler and linker STT_GNU_IFUNC support... " >&6; }
+if ${libc_cv_ld_gnu_indirect_function+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.s <<EOF
.type foo,%gnu_indirect_function
+foo:
+.globl _start
+_start:
+.globl __start
+__start:
+.data
+.long foo
EOF
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
-then
- libc_cv_asm_gnu_indirect_function=yes
-else
- libc_cv_asm_gnu_indirect_function=no
+libc_cv_ld_gnu_indirect_function=no
+if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -nostartfiles -nostdlib \
+ -o conftest conftest.s 1>&5 2>&5; then
+ # Do a link to see if the backend supports IFUNC relocs.
+ $READELF -r conftest 1>&5
+ LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || {
+ libc_cv_ld_gnu_indirect_function=yes
+ }
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_gnu_indirect_function" >&5
-$as_echo "$libc_cv_asm_gnu_indirect_function" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_gnu_indirect_function" >&5
+$as_echo "$libc_cv_ld_gnu_indirect_function" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .text pseudo-op must be used" >&5
$as_echo_n "checking whether .text pseudo-op must be used... " >&6; }
@@ -4076,43 +4204,7 @@ else
$as_echo "yes" >&6; }
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive prefix" >&5
-$as_echo_n "checking for assembler .type directive prefix... " >&6; }
-if ${libc_cv_asm_type_prefix+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- libc_cv_asm_type_prefix=no
-for ac_try_prefix in '@' '%' '#'; do
- cat > conftest.s <<EOF
- ${libc_cv_dot_text}
- .globl foo
- .type foo, ${ac_try_prefix}object
- .size foo, 1
-foo:
- .byte 1
-EOF
- if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_asm_type_prefix=${ac_try_prefix}
- fi
- rm -f conftest*
- test "x$libc_cv_asm_type_prefix" != xno && break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_type_prefix" >&5
-$as_echo "$libc_cv_asm_type_prefix" >&6; }
-if test "x$libc_cv_asm_type_prefix" != xno; then
- cat >>confdefs.h <<_ACEOF
-#define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
-_ACEOF
-
-fi
-
-if test x"$libc_cv_asm_gnu_indirect_function" != xyes -o x"$libc_cv_asm_type_prefix" = xno; then
+if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then
if test x"$multi_arch" = xyes; then
as_fn_error $? "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5
else
@@ -4997,7 +5089,7 @@ else
# Found it, now check the version.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5
$as_echo_n "checking version of $SED... " >&6; }
- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3.0[2-9]*|3.[1-9]*|[4-9]*)
@@ -5012,17 +5104,17 @@ if test $ac_verc_fail = yes; then
SED=: aux_missing="$aux_missing sed"
fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
-set dummy ${ac_tool_prefix}readelf; ac_word=$2
+for ac_prog in gawk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_READELF+:} false; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -n "$READELF"; then
- ac_cv_prog_READELF="$READELF" # Let the user override the test.
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -5031,7 +5123,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+ ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -5041,70 +5133,41 @@ IFS=$as_save_IFS
fi
fi
-READELF=$ac_cv_prog_READELF
-if test -n "$READELF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
-$as_echo "$READELF" >&6; }
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-fi
-if test -z "$ac_cv_prog_READELF"; then
- ac_ct_READELF=$READELF
- # Extract the first word of "readelf", so it can be a program name with args.
-set dummy readelf; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_READELF+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_READELF"; then
- ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_READELF="readelf"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
+ test -n "$AWK" && break
done
- done
-IFS=$as_save_IFS
-fi
-fi
-ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
-if test -n "$ac_ct_READELF"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
-$as_echo "$ac_ct_READELF" >&6; }
+if test -z "$AWK"; then
+ ac_verc_fail=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+ # Found it, now check the version.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AWK" >&5
+$as_echo_n "checking version of $AWK... " >&6; }
+ ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ [3-9].*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- if test "x$ac_ct_READELF" = x; then
- READELF="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- READELF=$ac_ct_READELF
- fi
-else
- READELF="$ac_cv_prog_READELF"
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
+fi
+if test $ac_verc_fail = yes; then
+ critic_missing="$critic_missing gawk"
fi
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
set dummy ${ac_tool_prefix}nm; ac_word=$2
@@ -5290,15 +5353,12 @@ if test -n "$sysheaders"; then
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
if test -n "$CXX"; then
CXX_SYSINCLUDES=
- cxxversion=`$CXX -dumpversion 2>&5` &&
cxxmachine=`$CXX -dumpmachine 2>&5` &&
- for d in include "$cxxmachine/include"; do
- i=../../../../$d/c++/$cxxversion
- cxxheaders=`$CXX -print-file-name="$i"` &&
- test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
- CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
+ cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
+ | sed -n -e '1,/#include/d' -e '/^ \//{p;q;}' | sed 's/ //'`
+ test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+ CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
- done
fi
fi
@@ -5335,7 +5395,7 @@ $as_echo_n "checking whether GCC supports -static-libgcc... " >&6; }
if ${libc_cv_gcc_static_libgcc+:} false; then :
$as_echo_n "(cached) " >&6
else
- if $CC -v -static-libgcc 2>&1 | grep -q 'unrecognized option.*static-libgcc'; then
+ if $CC -v -static-libgcc 2>&1 | grep 'unrecognized option.*static-libgcc' >/dev/null; then
libc_cv_gcc_static_libgcc=
else
libc_cv_gcc_static_libgcc=-static-libgcc
@@ -5449,48 +5509,6 @@ else
fi
-for ac_prog in gawk mawk nawk awk
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5728,7 +5746,7 @@ else
cat > conftest.s <<EOF
${libc_cv_dot_text}
_sym:
-.type _sym, ${libc_cv_asm_type_prefix}gnu_unique_object
+.type _sym, %gnu_unique_object
EOF
if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5; then
libc_cv_asm_unique_object=yes
@@ -6132,7 +6150,7 @@ else
int main (void) { return 0; }
EOF
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
- conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
+ conftest.c -v 2>&1 >/dev/null | grep ' -lunwind ' >/dev/null; then
libc_cv_cc_with_libunwind=yes
else
libc_cv_cc_with_libunwind=no
@@ -6363,7 +6381,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; } \
- && grep -q .note.GNU-stack conftest.s \
+ && grep .note.GNU-stack conftest.s >/dev/null \
&& { ac_try='${CC-cc} $ASFLAGS -Wa,--noexecstack
-c -o conftest.o conftest.s 1>&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
@@ -7438,6 +7456,24 @@ if test x$libc_cv_gcc_unwind_find_fde = xyes; then
fi
+# A sysdeps configure fragment can reset this if IFUNC is not actually
+# usable even though the assembler knows how to generate the symbol type.
+if test x"$libc_cv_ld_gnu_indirect_function" = xyes; then
+ $as_echo "#define HAVE_IFUNC 1" >>confdefs.h
+
+fi
+
+# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps
+# configure fragment can override the value to prevent this AC_DEFINE.
+
+if test "x$use_nscd" != xno; then
+ $as_echo "#define USE_NSCD 1" >>confdefs.h
+
+fi
+if test "x$build_nscd" = xdefault; then
+ build_nscd=$use_nscd
+fi
+
# Test for old glibc 2.0.x headers so that they can be removed properly
# Search only in includedir.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for old glibc 2.0.x headers" >&5
@@ -7474,7 +7510,10 @@ fi
+if test x$use_ldconfig = xyes; then
+ $as_echo "#define USE_LDCONFIG 1" >>confdefs.h
+fi
@@ -7508,18 +7547,12 @@ $as_echo "$libc_cv_pic_default" >&6; }
-if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
- config_makefile=
-else
- config_makefile=Makefile
-fi
-
VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
-ac_config_files="$ac_config_files config.make ${config_makefile}"
+ac_config_files="$ac_config_files config.make Makefile"
ac_config_commands="$ac_config_commands default"
@@ -8120,7 +8153,6 @@ gives unlimited permission to copy, distribute and modify it."
ac_pwd='$ac_pwd'
srcdir='$srcdir'
INSTALL='$INSTALL'
-AWK='$AWK'
test -n "\$AWK" || AWK=awk
_ACEOF
@@ -8239,7 +8271,7 @@ do
case $ac_config_target in
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"config.make") CONFIG_FILES="$CONFIG_FILES config.make" ;;
- "${config_makefile}") CONFIG_FILES="$CONFIG_FILES ${config_makefile}" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
diff --git a/configure.in b/configure.in
index 037ee1e485..928b7b62a9 100644
--- a/configure.in
+++ b/configure.in
@@ -23,6 +23,7 @@ AC_SUBST(cross_compiling)
AC_PROG_CPP
# We need the C++ compiler only for testing.
AC_PROG_CXX
+AC_CHECK_TOOL(READELF, readelf, false)
if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then
AC_MSG_ERROR([you must configure in a separate build directory])
@@ -95,6 +96,7 @@ AC_ARG_WITH([headers],
@<:@default=compiler default@:>@]),
[sysheaders=$withval],
[sysheaders=''])
+AC_SUBST(sysheaders)
AC_SUBST(use_default_link)
AC_ARG_WITH([default-link],
@@ -292,6 +294,20 @@ void foo (int i, void *p)
fi
fi
+AC_ARG_ENABLE([build-nscd],
+ [AS_HELP_STRING([--disable-build-nscd],
+ [disable building and installing the nscd daemon])],
+ [build_nscd=$enableval],
+ [build_nscd=default])
+AC_SUBST(build_nscd)
+
+# Note the use of $use_nscd is near the bottom of the file.
+AC_ARG_ENABLE([nscd],
+ [AS_HELP_STRING([--disable-nscd],
+ [library functions will not contact the nscd daemon])],
+ [use_nscd=$enableval],
+ [use_nscd=yes])
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
@@ -551,17 +567,28 @@ if test "$base_machine" = "i386"; then
AC_DEFINE(USE_REGPARMS)
fi
-# For the multi-arch option we need support in the assembler.
-AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
- libc_cv_asm_gnu_indirect_function, [dnl
+# For the multi-arch option we need support in the assembler & linker.
+AC_CACHE_CHECK([for assembler and linker STT_GNU_IFUNC support],
+ libc_cv_ld_gnu_indirect_function, [dnl
cat > conftest.s <<EOF
.type foo,%gnu_indirect_function
+foo:
+.globl _start
+_start:
+.globl __start
+__start:
+.data
+.long foo
EOF
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
-then
- libc_cv_asm_gnu_indirect_function=yes
-else
- libc_cv_asm_gnu_indirect_function=no
+libc_cv_ld_gnu_indirect_function=no
+if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -nostartfiles -nostdlib \
+ -o conftest conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+ # Do a link to see if the backend supports IFUNC relocs.
+ $READELF -r conftest 1>&AS_MESSAGE_LOG_FD
+ LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || {
+ libc_cv_ld_gnu_indirect_function=yes
+ }
fi
rm -f conftest*])
@@ -581,29 +608,7 @@ else
AC_MSG_RESULT(yes)
fi
-AC_CACHE_CHECK(for assembler .type directive prefix,
- libc_cv_asm_type_prefix, [dnl
-libc_cv_asm_type_prefix=no
-for ac_try_prefix in '@' '%' '#'; do
- cat > conftest.s <<EOF
- ${libc_cv_dot_text}
- .globl foo
- .type foo, ${ac_try_prefix}object
- .size foo, 1
-foo:
- .byte 1
-EOF
- if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_asm_type_prefix=${ac_try_prefix}
- fi
- rm -f conftest*
- test "x$libc_cv_asm_type_prefix" != xno && break
-done])
-if test "x$libc_cv_asm_type_prefix" != xno; then
- AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
-fi
-
-if test x"$libc_cv_asm_gnu_indirect_function" != xyes -o x"$libc_cv_asm_type_prefix" = xno; then
+if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then
if test x"$multi_arch" = xyes; then
AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
else
@@ -930,11 +935,13 @@ AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
[4.[5-9]*|4.[1-9][0-9]*|[5-9].*],
MAKEINFO=: aux_missing="$aux_missing makeinfo")
AC_CHECK_PROG_VER(SED, sed, --version,
- [GNU sed version \([0-9]*\.[0-9.]*\)],
+ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)],
[3.0[2-9]*|3.[1-9]*|[4-9]*],
SED=: aux_missing="$aux_missing sed")
+AC_CHECK_PROG_VER(AWK, gawk, --version,
+ [GNU Awk[^0-9]*\([0-9][0-9.]*\)],
+ [[3-9].*], critic_missing="$critic_missing gawk")
-AC_CHECK_TOOL(READELF, readelf, false)
AC_CHECK_TOOL(NM, nm, false)
AC_CHECK_PROGS(AUTOCONF, autoconf, no)
@@ -977,15 +984,12 @@ if test -n "$sysheaders"; then
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
if test -n "$CXX"; then
CXX_SYSINCLUDES=
- cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
- for d in include "$cxxmachine/include"; do
- i=../../../../$d/c++/$cxxversion
- cxxheaders=`$CXX -print-file-name="$i"` &&
- test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
- CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
+ cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
+ | sed -n -e '1,/#include/d' -e '/^ \//{p;q;}' | sed 's/ //'`
+ test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+ CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
- done
fi
fi
AC_SUBST(SYSINCLUDES)
@@ -1018,7 +1022,7 @@ AC_MSG_ERROR([
fi
AC_CACHE_CHECK(whether GCC supports -static-libgcc, libc_cv_gcc_static_libgcc, [dnl
-if $CC -v -static-libgcc 2>&1 | grep -q 'unrecognized option.*static-libgcc'; then
+if $CC -v -static-libgcc 2>&1 | grep 'unrecognized option.*static-libgcc' >/dev/null; then
libc_cv_gcc_static_libgcc=
else
libc_cv_gcc_static_libgcc=-static-libgcc
@@ -1050,7 +1054,6 @@ else
fi
AC_SUBST(libc_cv_have_ksh)
-AC_PROG_AWK
AC_PATH_PROG(PERL, perl, no)
if test "$PERL" != no &&
(eval `$PERL -V:apiversion`; test `expr "$apiversion" \< 5` -ne 0); then
@@ -1125,7 +1128,7 @@ AC_CACHE_CHECK(for assembler gnu_unique_object symbol type,
cat > conftest.s <<EOF
${libc_cv_dot_text}
_sym:
-.type _sym, ${libc_cv_asm_type_prefix}gnu_unique_object
+.type _sym, %gnu_unique_object
EOF
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
libc_cv_asm_unique_object=yes
@@ -1384,7 +1387,7 @@ AC_CACHE_CHECK(for libunwind-support in compiler,
int main (void) { return 0; }
EOF
if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
- conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
+ conftest.c -v 2>&1 >/dev/null | grep ' -lunwind ' >/dev/null; then
libc_cv_cc_with_libunwind=yes
else
libc_cv_cc_with_libunwind=no
@@ -1534,7 +1537,7 @@ void foo (void) { }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS
-S -o conftest.s conftest.c 1>&AS_MESSAGE_LOG_FD]) \
- && grep -q .note.GNU-stack conftest.s \
+ && grep .note.GNU-stack conftest.s >/dev/null \
&& AC_TRY_COMMAND([${CC-cc} $ASFLAGS -Wa,--noexecstack
-c -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD])
then
@@ -2120,6 +2123,22 @@ if test x$libc_cv_gcc_unwind_find_fde = xyes; then
fi
AC_SUBST(libc_cv_gcc_unwind_find_fde)
+# A sysdeps configure fragment can reset this if IFUNC is not actually
+# usable even though the assembler knows how to generate the symbol type.
+if test x"$libc_cv_ld_gnu_indirect_function" = xyes; then
+ AC_DEFINE(HAVE_IFUNC)
+fi
+
+# This is far from the AC_ARG_ENABLE that sets it so that a sysdeps
+# configure fragment can override the value to prevent this AC_DEFINE.
+AC_SUBST(use_nscd)
+if test "x$use_nscd" != xno; then
+ AC_DEFINE([USE_NSCD])
+fi
+if test "x$build_nscd" = xdefault; then
+ build_nscd=$use_nscd
+fi
+
# Test for old glibc 2.0.x headers so that they can be removed properly
# Search only in includedir.
AC_MSG_CHECKING(for old glibc 2.0.x headers)
@@ -2144,7 +2163,6 @@ AC_SUBST(libc_cv_rootsbindir)
AC_SUBST(libc_cv_forced_unwind)
dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests
-AC_SUBST(libc_cv_cpp_asm_debuginfo)
AC_SUBST(libc_cv_cc_sse4)
AC_SUBST(libc_cv_cc_avx)
AC_SUBST(libc_cv_cc_sse2avx)
@@ -2154,6 +2172,9 @@ AC_SUBST(libc_cv_cc_nofma)
AC_SUBST(libc_cv_as_i686)
AC_SUBST(libc_cv_sparc_as_vis3)
+if test x$use_ldconfig = xyes; then
+ AC_DEFINE(USE_LDCONFIG)
+fi
AC_SUBST(use_ldconfig)
AC_SUBST(ldd_rewrite_script)
@@ -2181,18 +2202,12 @@ AC_SUBST(DEFINES)
dnl See sysdeps/mach/configure.in for this variable.
AC_SUBST(mach_interface_list)
-if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
- config_makefile=
-else
- config_makefile=Makefile
-fi
-
VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
AC_SUBST(VERSION)
AC_SUBST(RELEASE)
-AC_CONFIG_FILES([config.make ${config_makefile}])
+AC_CONFIG_FILES([config.make Makefile])
AC_CONFIG_COMMANDS([default],[[
case $CONFIG_FILES in *config.make*)
echo "$config_vars" >> config.make;;
diff --git a/crypt/Makefile b/crypt/Makefile
index d276092215..3d4f243ed5 100644
--- a/crypt/Makefile
+++ b/crypt/Makefile
@@ -28,7 +28,7 @@ extra-libs-others := $(extra-libs)
libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
crypt_util
-tests := cert md5c-test sha256c-test sha512c-test
+tests := cert md5c-test sha256c-test sha512c-test badsalttest
include ../Makeconfig
@@ -46,7 +46,12 @@ libcrypt-routines += md5 sha256 sha512
tests += md5test sha256test sha512test
+# The test md5test-giant uses up to 400 MB of RSS and runs on a fast
+# machine over a minute.
+xtests = md5test-giant
+
$(objpfx)md5test: $(objpfx)md5.o
+$(objpfx)md5test-giant: $(objpfx)md5.o
$(objpfx)sha256test: $(objpfx)sha256.o
$(objpfx)sha512test: $(objpfx)sha512.o
endif
diff --git a/crypt/badsalttest.c b/crypt/badsalttest.c
new file mode 100644
index 0000000000..e0e207bac3
--- /dev/null
+++ b/crypt/badsalttest.c
@@ -0,0 +1,86 @@
+/* Test program for bad DES salt detection in crypt.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <crypt.h>
+
+static const char *tests[][2] =
+ {
+ { "no salt", "" },
+ { "single char", "/" },
+ { "first char bad", "!x" },
+ { "second char bad", "Z%" },
+ { "both chars bad", ":@" },
+ { "un$upported algorithm", "$2$" },
+ { "unsupported_algorithm", "_1" },
+ { "end of page", NULL }
+ };
+
+static int
+do_test (void)
+{
+ int result = 0;
+ struct crypt_data cd;
+ size_t n = sizeof (tests) / sizeof (*tests);
+ size_t pagesize = (size_t) sysconf (_SC_PAGESIZE);
+ char *page;
+
+ /* Check that crypt won't look at the second character if the first
+ one is invalid. */
+ page = mmap (NULL, pagesize * 2, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON, -1, 0);
+ if (page == MAP_FAILED)
+ {
+ perror ("mmap");
+ n--;
+ }
+ else
+ {
+ if (mmap (page + pagesize, pagesize, 0,
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED,
+ -1, 0) != page + pagesize)
+ perror ("mmap 2");
+ page[pagesize - 1] = '*';
+ tests[n - 1][1] = &page[pagesize - 1];
+ }
+
+ for (size_t i = 0; i < n; i++)
+ {
+ if (crypt (tests[i][0], tests[i][1]))
+ {
+ result++;
+ printf ("%s: crypt returned non-NULL with salt \"%s\"\n",
+ tests[i][0], tests[i][1]);
+ }
+
+ if (crypt_r (tests[i][0], tests[i][1], &cd))
+ {
+ result++;
+ printf ("%s: crypt_r returned non-NULL with salt \"%s\"\n",
+ tests[i][0], tests[i][1]);
+ }
+ }
+
+ return result;
+}
+
+#define TIMEOUT 5
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c
index 91e2c4e97b..89c22e6897 100644
--- a/crypt/crypt-entry.c
+++ b/crypt/crypt-entry.c
@@ -27,6 +27,8 @@
#include <stdio.h>
#endif
#include <string.h>
+#include <errno.h>
+#include <fips-private.h>
#ifndef STATIC
#define STATIC static
@@ -91,8 +93,16 @@ __crypt_r (key, salt, data)
#ifdef _LIBC
/* Try to find out whether we have to use MD5 encryption replacement. */
if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
- return __md5_crypt_r (key, salt, (char *) data,
- sizeof (struct crypt_data));
+ {
+ /* FIPS rules out MD5 password encryption. */
+ if (fips_enabled_p ())
+ {
+ __set_errno (EPERM);
+ return NULL;
+ }
+ return __md5_crypt_r (key, salt, (char *) data,
+ sizeof (struct crypt_data));
+ }
/* Try to find out whether we have to use SHA256 encryption replacement. */
if (strncmp (sha256_salt_prefix, salt, sizeof (sha256_salt_prefix) - 1) == 0)
@@ -108,7 +118,18 @@ __crypt_r (key, salt, data)
/*
* Hack DES tables according to salt
*/
- _ufc_setup_salt_r (salt, data);
+ if (!_ufc_setup_salt_r (salt, data))
+ {
+ __set_errno (EINVAL);
+ return NULL;
+ }
+
+ /* FIPS rules out DES password encryption. */
+ if (fips_enabled_p ())
+ {
+ __set_errno (EPERM);
+ return NULL;
+ }
/*
* Setup key schedule
@@ -143,7 +164,9 @@ crypt (key, salt)
{
#ifdef _LIBC
/* Try to find out whether we have to use MD5 encryption replacement. */
- if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
+ if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0
+ /* Let __crypt_r deal with the error code if FIPS is enabled. */
+ && !fips_enabled_p ())
return __md5_crypt (key, salt);
/* Try to find out whether we have to use SHA256 encryption replacement. */
diff --git a/crypt/crypt-private.h b/crypt/crypt-private.h
index b4bfa8b4ac..54418fcb54 100644
--- a/crypt/crypt-private.h
+++ b/crypt/crypt-private.h
@@ -26,6 +26,7 @@
#define CRYPT_PRIVATE_H 1
#include <features.h>
+#include <stdbool.h>
/* crypt.c */
extern void _ufc_doit_r (ufc_long itr, struct crypt_data * __restrict __data,
@@ -36,7 +37,7 @@ extern void _ufc_doit_r (ufc_long itr, struct crypt_data * __restrict __data,
extern void __init_des_r (struct crypt_data * __restrict __data);
extern void __init_des (void);
-extern void _ufc_setup_salt_r (const char *s,
+extern bool _ufc_setup_salt_r (const char *s,
struct crypt_data * __restrict __data);
extern void _ufc_mk_keytab_r (const char *key,
struct crypt_data * __restrict __data);
diff --git a/crypt/crypt_util.c b/crypt/crypt_util.c
index a1ff88b0da..e08dd8fa99 100644
--- a/crypt/crypt_util.c
+++ b/crypt/crypt_util.c
@@ -596,23 +596,55 @@ shuffle_sb(k, saltbits)
#endif
/*
+ * Return false iff C is in the specified alphabet for crypt salt.
+ */
+
+static bool
+bad_for_salt (char c)
+{
+ switch (c)
+ {
+ case '0' ... '9':
+ case 'A' ... 'Z':
+ case 'a' ... 'z':
+ case '.': case '/':
+ return false;
+
+ default:
+ return true;
+ }
+}
+
+/*
* Setup the unit for a new salt
* Hopefully we'll not see a new salt in each crypt call.
+ * Return false if an unexpected character was found in s[0] or s[1].
*/
-void
+bool
_ufc_setup_salt_r(s, __data)
const char *s;
struct crypt_data * __restrict __data;
{
ufc_long i, j, saltbits;
+ char s0, s1;
if(__data->initialized == 0)
__init_des_r(__data);
- if(s[0] == __data->current_salt[0] && s[1] == __data->current_salt[1])
- return;
- __data->current_salt[0] = s[0]; __data->current_salt[1] = s[1];
+ s0 = s[0];
+ if(bad_for_salt (s0))
+ return false;
+
+ s1 = s[1];
+ if(bad_for_salt (s1))
+ return false;
+
+ if(s0 == __data->current_salt[0] && s1 == __data->current_salt[1])
+ return true;
+
+ __data->current_salt[0] = s0;
+ __data->current_salt[1] = s1;
/*
* This is the only crypt change to DES:
@@ -646,6 +678,8 @@ _ufc_setup_salt_r(s, __data)
shuffle_sb((LONGG)__data->sb3, __data->current_saltbits ^ saltbits);
__data->current_saltbits = saltbits;
+
+ return true;
}
void
diff --git a/crypt/md5.c b/crypt/md5.c
index 292bee1845..3d2e79b905 100644
--- a/crypt/md5.c
+++ b/crypt/md5.c
@@ -1,7 +1,6 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -312,13 +311,13 @@ md5_process_block (buffer, len, ctx)
md5_uint32 B = ctx->B;
md5_uint32 C = ctx->C;
md5_uint32 D = ctx->D;
+ md5_uint32 lolen = len;
/* First increment the byte count. RFC 1321 specifies the possible
length of the file up to 2^64 bits. Here we only compute the
number of bytes. Do a double word increment. */
- ctx->total[0] += len;
- if (ctx->total[0] < len)
- ++ctx->total[1];
+ ctx->total[0] += lolen;
+ ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
/* Process all bytes in the buffer with 64 bytes in each round of
the loop. */
diff --git a/crypt/md5c-test.c b/crypt/md5c-test.c
index f56d0eb4ab..c80e40202d 100644
--- a/crypt/md5c-test.c
+++ b/crypt/md5c-test.c
@@ -9,7 +9,10 @@ main (int argc, char *argv[])
int result = 0;
cp = crypt ("Hello world!", salt);
- result |= strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp);
+
+ /* MD5 is disabled in FIPS mode. */
+ if (cp)
+ result |= strcmp ("$1$saltstri$YMyguxXMBpd2TEZ.vS/3q1", cp);
return result;
}
diff --git a/crypt/md5test-giant.c b/crypt/md5test-giant.c
new file mode 100644
index 0000000000..63a9c3a791
--- /dev/null
+++ b/crypt/md5test-giant.c
@@ -0,0 +1,137 @@
+/* Testcase for http://sourceware.org/bugzilla/show_bug.cgi?id=14090.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+
+#include "md5.h"
+
+/* This test will not work with 32-bit size_t, so let it succeed
+ there. */
+#if SIZE_MAX <= UINT32_MAX
+static int
+do_test (void)
+{
+ return 0;
+}
+#else
+
+# define CONST_2G 0x080000000
+# define CONST_10G 0x280000000
+
+/* MD5 sum values of zero-filled blocks of specified sizes. */
+static const struct test_data_s
+{
+ const char ref[16];
+ size_t len;
+} test_data[] =
+ {
+ { "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\x09\x98\xec\xf8\x42\x7e",
+ 0x000000000 },
+ { "\xa9\x81\x13\x0c\xf2\xb7\xe0\x9f\x46\x86\xdc\x27\x3c\xf7\x18\x7e",
+ 0x080000000 },
+ { "\xc9\xa5\xa6\x87\x8d\x97\xb4\x8c\xc9\x65\xc1\xe4\x18\x59\xf0\x34",
+ 0x100000000 },
+ { "\x58\xcf\x63\x8a\x73\x3f\x91\x90\x07\xb4\x28\x7c\xf5\x39\x6d\x0c",
+ 0x180000000 },
+ { "\xb7\x70\x35\x1f\xad\xae\x5a\x96\xbb\xaf\x97\x02\xed\x97\xd2\x8d",
+ 0x200000000 },
+ { "\x2d\xd2\x6c\x4d\x47\x99\xeb\xd2\x9f\xa3\x1e\x48\xd4\x9e\x8e\x53",
+ 0x280000000 },
+};
+
+static int
+report (const char *id, const char *md5, size_t len, const char *ref)
+{
+ if (memcmp (md5, ref, 16))
+ {
+ printf ("test %s with size %zd failed\n", id, len);
+ return 1;
+ }
+ return 0;
+}
+
+/* Test md5 in a single md5_process_bytes call. */
+static int
+test_single (void *buf, size_t len, const char *ref)
+{
+ char sum[16];
+ struct md5_ctx ctx;
+
+ __md5_init_ctx (&ctx);
+ __md5_process_bytes (buf, len, &ctx);
+ __md5_finish_ctx (&ctx, sum);
+
+ return report ("single", sum, len, ref);
+}
+
+/* Test md5 with two md5_process_bytes calls to trigger a
+ different path in md5_process_block for sizes > 2 GB. */
+static int
+test_double (void *buf, size_t len, const char *ref)
+{
+ char sum[16];
+ struct md5_ctx ctx;
+
+ __md5_init_ctx (&ctx);
+ if (len >= CONST_2G)
+ {
+ __md5_process_bytes (buf, CONST_2G, &ctx);
+ __md5_process_bytes (buf + CONST_2G, len - CONST_2G, &ctx);
+ }
+ else
+ __md5_process_bytes (buf, len, &ctx);
+
+ __md5_finish_ctx (&ctx, sum);
+
+ return report ("double", sum, len, ref);
+}
+
+
+static int
+do_test (void)
+{
+ void *buf;
+ unsigned int j;
+ int result = 0;
+
+ buf = mmap64 (0, CONST_10G, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ if (buf == MAP_FAILED)
+ {
+ puts ("Could not allocate 10 GB via mmap, skipping test.");
+ return 0;
+ }
+
+ for (j = 0; j < sizeof (test_data) / sizeof (struct test_data_s); j++)
+ {
+ if (test_single (buf, test_data[j].len, test_data[j].ref))
+ result = 1;
+ if (test_double (buf, test_data[j].len, test_data[j].ref))
+ result = 1;
+ }
+
+ return result;
+}
+#endif
+
+/* This needs on a fast machine 90s. */
+#define TIMEOUT 480
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/crypt/sha512.c b/crypt/sha512.c
index 6e531c58ec..0675c948c1 100644
--- a/crypt/sha512.c
+++ b/crypt/sha512.c
@@ -1,6 +1,6 @@
/* Functions to compute SHA512 message digest of files or memory blocks.
according to the definition of SHA512 in FIPS 180-2.
- Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -123,9 +123,10 @@ sha512_process_block (const void *buffer, size_t len, struct sha512_ctx *ctx)
#ifdef USE_TOTAL128
ctx->total128 += len;
#else
- ctx->total[TOTAL128_low] += len;
- if (ctx->total[TOTAL128_low] < len)
- ++ctx->total[TOTAL128_high];
+ uint64_t lolen = len;
+ ctx->total[TOTAL128_low] += lolen;
+ ctx->total[TOTAL128_high] += ((len >> 31 >> 31 >> 2)
+ + (ctx->total[TOTAL128_low] < lolen));
#endif
/* Process all bytes in the buffer with 128 bytes in each round of
diff --git a/csu/elf-init.c b/csu/elf-init.c
index 91ba74ce55..8b4431ba0c 100644
--- a/csu/elf-init.c
+++ b/csu/elf-init.c
@@ -1,6 +1,5 @@
/* Startup support for ELF initializers/finalizers in the main executable.
- Copyright (C) 2002,2003,2004,2005,2009,2011
- Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,20 +35,6 @@
#include <stddef.h>
-#if defined USE_MULTIARCH && !defined LIBC_NONSHARED
-# include <link.h>
-# include <dl-irel.h>
-
-# ifdef ELF_MACHINE_IRELA
-extern const ElfW(Rela) __rela_iplt_start [];
-extern const ElfW(Rela) __rela_iplt_end [];
-# endif
-
-# ifdef ELF_MACHINE_IREL
-extern const ElfW(Rel) __rel_iplt_start [];
-extern const ElfW(Rel) __rel_iplt_end [];
-# endif
-#endif /* LIBC_NONSHARED */
/* These magic symbols are provided by the linker. */
extern void (*__preinit_array_start []) (int, char **, char **)
@@ -72,33 +57,7 @@ extern void _fini (void);
/* These functions are passed to __libc_start_main by the startup code.
These get statically linked into each program. For dynamically linked
programs, this module will come from libc_nonshared.a and differs from
- the libc.a module in that it doesn't call the preinit array and performs
- explicit IREL{,A} relocations. */
-
-
-#ifndef LIBC_NONSHARED
-void
-__libc_csu_irel (void)
-{
-# ifdef USE_MULTIARCH
-# ifdef ELF_MACHINE_IRELA
- {
- const size_t size = __rela_iplt_end - __rela_iplt_start;
- for (size_t i = 0; i < size; i++)
- elf_irela (&__rela_iplt_start [i]);
- }
-# endif
-
-# ifdef ELF_MACHINE_IREL
- {
- const size_t size = __rel_iplt_end - __rel_iplt_start;
- for (size_t i = 0; i < size; i++)
- elf_irel (&__rel_iplt_start [i]);
- }
-# endif
-# endif
-}
-#endif
+ the libc.a module in that it doesn't call the preinit array. */
void
diff --git a/csu/init-first.c b/csu/init-first.c
index 050959dcb2..0cfabbce28 100644
--- a/csu/init-first.c
+++ b/csu/init-first.c
@@ -1,4 +1,4 @@
-/* Initialization code run first thing by the ELF startup code. Stub version.
+/* Initialization code run first thing by the ELF startup code. Common version
Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,40 +17,76 @@
<http://www.gnu.org/licenses/>. */
#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
#include <unistd.h>
+#include <sysdep.h>
+#include <fpu_control.h>
+#include <sys/param.h>
#include <sys/types.h>
+#include <libc-internal.h>
+
+#include <ldsodefs.h>
/* Set nonzero if we have to be prepared for more then one libc being
used in the process. Safe assumption if initializer never runs. */
int __libc_multiple_libcs attribute_hidden = 1;
-extern void __libc_init (int, char **, char **);
-#ifdef USE_NONOPTION_FLAGS
-extern void __getopt_clean_environment (char **);
-#endif
+/* Remember the command line argument and enviroment contents for
+ later calls of initializers for dynamic libraries. */
+int __libc_argc attribute_hidden;
+char **__libc_argv attribute_hidden;
+
-#ifdef SHARED
void
-__libc_init_first (void)
+__libc_init_first (int argc, char **argv, char **envp)
{
+#ifdef SHARED
+ /* For DSOs we do not need __libc_init_first but instead _init. */
}
+
+void
+attribute_hidden
+_init (int argc, char **argv, char **envp)
+{
+#endif
+#ifdef USE_NONOPTION_FLAGS
+ extern void __getopt_clean_environment (char **);
#endif
+ __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;
+
+ /* Make sure we don't initialize twice. */
+ if (!__libc_multiple_libcs)
+ {
+ /* Set the FPU control word to the proper default value if the
+ kernel would use a different value. (In a static program we
+ don't have this information.) */
#ifdef SHARED
-/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
- pointer in the dynamic section based solely on that. It is convention
- for this function to be in the `.init' section, but the symbol name is
- the only thing that really matters!! */
-void _init
-#else
-void __libc_init_first
+ if (__fpu_control != GLRO(dl_fpu_control))
#endif
-(int argc, char *arg0, ...)
-{
- char **argv = &arg0, **envp = &argv[argc + 1];
+ __setfpucw (__fpu_control);
+ }
+ /* Save the command-line arguments. */
+ __libc_argc = argc;
+ __libc_argv = argv;
__environ = envp;
- __libc_init (argc, argv, envp);
+
+#ifndef SHARED
+ __libc_init_secure ();
+
+ /* First the initialization which normally would be done by the
+ dynamic linker. */
+ _dl_non_dynamic_init ();
+#endif
+
+#ifdef VDSO_SETUP
+ VDSO_SETUP ();
+#endif
+
+ __init_misc (argc, argv, envp);
#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
@@ -59,4 +95,21 @@ void __libc_init_first
/* Initialize ctype data. */
__ctype_init ();
+
+#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
+ __libc_global_ctors ();
+#endif
+}
+
+/* This function is defined here so that if this file ever gets into
+ ld.so we will get a link error. Having this file silently included
+ in ld.so causes disaster, because the _init definition above will
+ cause ld.so to gain an init function, which is not a cool thing. */
+
+extern void _dl_start (void) __attribute__ ((noreturn));
+
+void
+_dl_start (void)
+{
+ abort ();
}
diff --git a/csu/libc-start.c b/csu/libc-start.c
index 0f9bfd7fc5..e335b64d15 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2006, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,6 +46,39 @@ uintptr_t __stack_chk_guard attribute_relro;
#endif
+#ifndef SHARED
+# include <link.h>
+# include <dl-irel.h>
+
+# ifdef ELF_MACHINE_IRELA
+# define IREL_T ElfW(Rela)
+# define IPLT_START __rela_iplt_start
+# define IPLT_END __rela_iplt_end
+# define IREL elf_irela
+# elif defined ELF_MACHINE_IREL
+# define IREL_T ElfW(Rel)
+# define IPLT_START __rel_iplt_start
+# define IPLT_END __rel_iplt_end
+# define IREL elf_irel
+# endif
+
+static void
+apply_irel (void)
+{
+# ifdef IREL
+ /* We use weak references for these so that we'll still work with a linker
+ that doesn't define them. Such a linker doesn't support IFUNC at all
+ and so uses won't work, but a statically-linked program that doesn't
+ use any IFUNC symbols won't have a problem. */
+ extern const IREL_T IPLT_START[] __attribute__ ((weak));
+ extern const IREL_T IPLT_END[] __attribute__ ((weak));
+ for (const IREL_T *ipltent = IPLT_START; ipltent < IPLT_END; ++ipltent)
+ IREL (ipltent);
+# endif
+}
+#endif
+
+
#ifdef LIBC_START_MAIN
# ifdef LIBC_START_DISABLE_INLINE
# define STATIC static
@@ -136,8 +169,8 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
}
# endif
- /* Performe IREL{,A} relocations. */
- __libc_csu_irel ();
+ /* Perform IREL{,A} relocations. */
+ apply_irel ();
/* Initialize the thread library at least a bit since the libgcc
functions are using thread functions if these are available and
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index b00a5ccb9d..6c52262bab 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -1,5 +1,5 @@
/* Initialization code for TLS in statically linked application.
- Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ extern ElfW(Phdr) *_dl_phdr;
extern size_t _dl_phnum;
-static dtv_t static_dtv[2 + TLS_SLOTINFO_SURPLUS];
+dtv_t _dl_static_dtv[2 + TLS_SLOTINFO_SURPLUS];
static struct
@@ -163,33 +163,33 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
& ~(max_align - 1));
/* Initialize the dtv. [0] is the length, [1] the generation counter. */
- static_dtv[0].counter = (sizeof (static_dtv) / sizeof (static_dtv[0])) - 2;
- // static_dtv[1].counter = 0; would be needed if not already done
+ _dl_static_dtv[0].counter = (sizeof (_dl_static_dtv) / sizeof (_dl_static_dtv[0])) - 2;
+ // _dl_static_dtv[1].counter = 0; would be needed if not already done
/* Initialize the TLS block. */
#if TLS_TCB_AT_TP
- static_dtv[2].pointer.val = ((char *) tlsblock + tcb_offset
+ _dl_static_dtv[2].pointer.val = ((char *) tlsblock + tcb_offset
- roundup (memsz, align ?: 1));
static_map.l_tls_offset = roundup (memsz, align ?: 1);
#elif TLS_DTV_AT_TP
- static_dtv[2].pointer.val = (char *) tlsblock + tcb_offset;
+ _dl_static_dtv[2].pointer.val = (char *) tlsblock + tcb_offset;
static_map.l_tls_offset = tcb_offset;
#else
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
#endif
- static_dtv[2].pointer.is_static = true;
+ _dl_static_dtv[2].pointer.is_static = true;
/* sbrk gives us zero'd memory, so we don't need to clear the remainder. */
- memcpy (static_dtv[2].pointer.val, initimage, filesz);
+ memcpy (_dl_static_dtv[2].pointer.val, initimage, filesz);
/* Install the pointer to the dtv. */
/* Initialize the thread pointer. */
#if TLS_TCB_AT_TP
- INSTALL_DTV ((char *) tlsblock + tcb_offset, static_dtv);
+ INSTALL_DTV ((char *) tlsblock + tcb_offset, _dl_static_dtv);
const char *lossage = TLS_INIT_TP ((char *) tlsblock + tcb_offset, 0);
#elif TLS_DTV_AT_TP
- INSTALL_DTV (tlsblock, static_dtv);
+ INSTALL_DTV (tlsblock, _dl_static_dtv);
const char *lossage = TLS_INIT_TP (tlsblock, 0);
#else
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
diff --git a/debug/Makefile b/debug/Makefile
index 4c01a66e39..04dd79981a 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2001,2004-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -48,32 +48,32 @@ routines = backtrace backtracesyms backtracesymsfd noophooks \
static-only-routines := warning-nop stack_chk_fail_local
CFLAGS-backtrace.c = -fno-omit-frame-pointer
-CFLAGS-sprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-snprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-vsprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-vsnprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-asprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-vasprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-obprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-dprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-vdprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-printf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-vprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-vfprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-gets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fgets_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fgets_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fread_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fread_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-swprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-vswprintf_chk.c = -D_IO_MTSAFE_IO
-CFLAGS-wprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-vwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-vfwprintf_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fgetws_chk.c = -D_IO_MTSAFE_IO $(exceptions)
-CFLAGS-fgetws_u_chk.c = -D_IO_MTSAFE_IO $(exceptions)
+CFLAGS-sprintf_chk.c = $(libio-mtsafe)
+CFLAGS-snprintf_chk.c = $(libio-mtsafe)
+CFLAGS-vsprintf_chk.c = $(libio-mtsafe)
+CFLAGS-vsnprintf_chk.c = $(libio-mtsafe)
+CFLAGS-asprintf_chk.c = $(libio-mtsafe)
+CFLAGS-vasprintf_chk.c = $(libio-mtsafe)
+CFLAGS-obprintf_chk.c = $(libio-mtsafe)
+CFLAGS-dprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-vdprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-printf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-vprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-vfprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-gets_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fgets_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fgets_u_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fread_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fread_u_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-swprintf_chk.c = $(libio-mtsafe)
+CFLAGS-vswprintf_chk.c = $(libio-mtsafe)
+CFLAGS-wprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fwprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-vwprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-vfwprintf_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fgetws_chk.c = $(libio-mtsafe) $(exceptions)
+CFLAGS-fgetws_u_chk.c = $(libio-mtsafe) $(exceptions)
CFLAGS-read_chk.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-pread_chk.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-pread64_chk.c = -fexceptions -fasynchronous-unwind-tables
@@ -114,18 +114,21 @@ tst-lfschk3-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk4-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk5-ENV = LOCPATH=$(common-objpfx)localedata
tst-lfschk6-ENV = LOCPATH=$(common-objpfx)localedata
-LDFLAGS-tst-chk4 = -lstdc++
-LDFLAGS-tst-chk5 = -lstdc++
-LDFLAGS-tst-chk6 = -lstdc++
-LDFLAGS-tst-lfschk4 = -lstdc++
-LDFLAGS-tst-lfschk5 = -lstdc++
-LDFLAGS-tst-lfschk6 = -lstdc++
+LDLIBS-tst-chk4 = -lstdc++
+LDLIBS-tst-chk5 = -lstdc++
+LDLIBS-tst-chk6 = -lstdc++
+LDLIBS-tst-lfschk4 = -lstdc++
+LDLIBS-tst-lfschk5 = -lstdc++
+LDLIBS-tst-lfschk6 = -lstdc++
tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 \
tst-longjmp_chk2
+tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc)
+tests += $(tests-ifunc)
+
extra-libs = libSegFault libpcprofile
extra-libs-others = $(extra-libs)
diff --git a/debug/test-stpcpy_chk-ifunc.c b/debug/test-stpcpy_chk-ifunc.c
new file mode 100644
index 0000000000..1b2bad1576
--- /dev/null
+++ b/debug/test-stpcpy_chk-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of stpcpy checking function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-stpcpy_chk.c"
diff --git a/debug/test-stpcpy_chk.c b/debug/test-stpcpy_chk.c
index f7f9a54636..8e2d2d9e02 100644
--- a/debug/test-stpcpy_chk.c
+++ b/debug/test-stpcpy_chk.c
@@ -1,5 +1,5 @@
/* Test and measure stpcpy checking functions.
- Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -19,6 +19,7 @@
#define STRCPY_RESULT(dst, len) ((dst) + (len))
#define TEST_MAIN
+#define TEST_NAME "stpcpy_chk"
#include "../string/test-string.h"
extern void __attribute__ ((noreturn)) __chk_fail (void);
diff --git a/debug/test-strcpy_chk-ifunc.c b/debug/test-strcpy_chk-ifunc.c
new file mode 100644
index 0000000000..73ed226d5a
--- /dev/null
+++ b/debug/test-strcpy_chk-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcpy checking function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcpy_chk.c"
diff --git a/debug/test-strcpy_chk.c b/debug/test-strcpy_chk.c
index 2536362893..fb9bc78d45 100644
--- a/debug/test-strcpy_chk.c
+++ b/debug/test-strcpy_chk.c
@@ -1,5 +1,5 @@
/* Test and measure __strcpy_chk functions.
- Copyright (C) 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -20,6 +20,7 @@
#ifndef STRCPY_RESULT
# define STRCPY_RESULT(dst, len) dst
# define TEST_MAIN
+# define TEST_NAME "strcpy_chk"
# include "../string/test-string.h"
extern void __attribute__ ((noreturn)) __chk_fail (void);
diff --git a/dirent/alphasort.c b/dirent/alphasort.c
index 5939322ab8..6fab7f89bd 100644
--- a/dirent/alphasort.c
+++ b/dirent/alphasort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,7 +15,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We need to avoid the header declaration of alphasort64, because
+ the types don't match alphasort and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define alphasort64 __renamed_alphasort64
+
#include <dirent.h>
+
+#undef alphasort64
+
#include <string.h>
int
@@ -23,3 +31,7 @@ alphasort (const struct dirent **a, const struct dirent **b)
{
return strcoll ((*a)->d_name, (*b)->d_name);
}
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (alphasort, alphasort64)
+#endif
diff --git a/dirent/alphasort64.c b/dirent/alphasort64.c
index 4f5c1ddc35..a4d37abbac 100644
--- a/dirent/alphasort64.c
+++ b/dirent/alphasort64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2000, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,13 @@
#include <dirent.h>
#include <string.h>
+/* alphasort.c defines alphasort64 as an alias if _DIRENT_MATCHES_DIRENT64. */
+#ifndef _DIRENT_MATCHES_DIRENT64
+
int
alphasort64 (const struct dirent64 **a, const struct dirent64 **b)
{
return strcoll ((*a)->d_name, (*b)->d_name);
}
+
+#endif
diff --git a/dirent/opendir.c b/dirent/opendir.c
index 7fe4210c8f..ce7084c9c1 100644
--- a/dirent/opendir.c
+++ b/dirent/opendir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <errno.h>
#include <stddef.h>
#include <dirent.h>
+#include <fcntl.h>
DIR *
diff --git a/dirent/scandir.c b/dirent/scandir.c
index 8b0a87ba06..6dce54d64a 100644
--- a/dirent/scandir.c
+++ b/dirent/scandir.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992-1998,2000,2002,2003,2009,2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +15,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We need to avoid the header declaration of scandir64, because
+ the types don't match scandir and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define scandir64 __renamed_scandir64
+
#include <dirent.h>
+
+#undef scandir64
+
#include <fcntl.h>
#ifndef SCANDIR
@@ -35,3 +42,7 @@ SCANDIR (dir, namelist, select, cmp)
{
return SCANDIRAT (AT_FDCWD, dir, namelist, select, cmp);
}
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (scandir, scandir64)
+#endif
diff --git a/dirent/scandir64.c b/dirent/scandir64.c
index 78ac570a18..bba302f01a 100644
--- a/dirent/scandir64.c
+++ b/dirent/scandir64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,8 +17,13 @@
#include <dirent.h>
+/* scandir.c defines scandir64 as an alias if _DIRENT_MATCHES_DIRENT64. */
+#ifndef _DIRENT_MATCHES_DIRENT64
+
#define SCANDIR scandir64
#define SCANDIRAT scandirat64
#define DIRENT_TYPE struct dirent64
#include <dirent/scandir.c>
+
+#endif
diff --git a/dirent/scandirat.c b/dirent/scandirat.c
index 13bd57416a..c2704baa88 100644
--- a/dirent/scandirat.c
+++ b/dirent/scandirat.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992-1998,2000,2002,2003,2009,2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,7 +15,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We need to avoid the header declaration of scandir64, because
+ the types don't match scandir and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define scandirat64 __renamed_scandirat64
+
#include <dirent.h>
+
+#undef scandirat64
+
#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -141,3 +148,7 @@ SCANDIRAT (dfd, dir, namelist, select, cmp)
return c.cnt;
}
libc_hidden_def (SCANDIRAT)
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (scandirat, scandirat64)
+#endif
diff --git a/dirent/scandirat64.c b/dirent/scandirat64.c
index a816ee9e85..608ca33ac9 100644
--- a/dirent/scandirat64.c
+++ b/dirent/scandirat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,9 +17,14 @@
#include <dirent.h>
+/* scandirat.c defines scandirat64 as an alias if _DIRENT_MATCHES_DIRENT64. */
+#ifndef _DIRENT_MATCHES_DIRENT64
+
#define SCANDIRAT scandirat64
#define READDIR __readdir64
#define DIRENT_TYPE struct dirent64
#define SKIP_SCANDIR_CANCEL 1
#include "scandirat.c"
+
+#endif
diff --git a/dirent/versionsort.c b/dirent/versionsort.c
index 47bda040db..ee34659042 100644
--- a/dirent/versionsort.c
+++ b/dirent/versionsort.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,7 +15,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We need to avoid the header declaration of versionsort64, because
+ the types don't match versionsort and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define versionsort64 __renamed_versionsort64
+
#include <dirent.h>
+
+#undef versionsort64
+
#include <string.h>
int
@@ -23,3 +31,7 @@ versionsort (const struct dirent **a, const struct dirent **b)
{
return __strverscmp ((*a)->d_name, (*b)->d_name);
}
+
+#ifdef _DIRENT_MATCHES_DIRENT64
+weak_alias (versionsort, versionsort64)
+#endif
diff --git a/dirent/versionsort64.c b/dirent/versionsort64.c
index 5b40e10bd7..dca72e8d1c 100644
--- a/dirent/versionsort64.c
+++ b/dirent/versionsort64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1997, 1998, 2000, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,8 +18,13 @@
#include <dirent.h>
#include <string.h>
+/* versionsort.c defines a versionsort64 alias if _DIRENT_MATCHES_DIRENT64. */
+#ifndef _DIRENT_MATCHES_DIRENT64
+
int
versionsort64 (const struct dirent64 **a, const struct dirent64 **b)
{
return __strverscmp ((*a)->d_name, (*b)->d_name);
}
+
+#endif
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index 8138cc2781..c30b4f1d39 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -1,5 +1,5 @@
/* Return error detail for failing <dlfcn.h> functions.
- Copyright (C) 1995-2000,2002,2003,2004,2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -190,11 +190,14 @@ check_free (struct dl_action_result *rec)
{
/* We can free the string only if the allocation happened in the
C library used by the dynamic linker. This means, it is
- always the C library in the base namespave. */
+ always the C library in the base namespace. When we're statically
+ linked, the dynamic linker is part of the program and so always
+ uses the same C library we use here. */
+#ifdef SHARED
struct link_map *map = NULL;
Dl_info info;
- if (_dl_addr (check_free, &info, &map, NULL) != 0
- && map != NULL && map->l_ns == 0)
+ if (_dl_addr (check_free, &info, &map, NULL) != 0 && map->l_ns == 0)
+#endif
free ((char *) rec->errstring);
}
}
diff --git a/elf/Makefile b/elf/Makefile
index b99937624c..42b792bce8 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -19,6 +19,8 @@
subdir := elf
+include ../Makeconfig
+
headers = elf.h bits/elfclass.h link.h bits/link.h
routines = $(dl-routines) dl-support dl-iteratephdr \
dl-addr enbl-secure dl-profstub \
@@ -26,10 +28,13 @@ routines = $(dl-routines) dl-support dl-iteratephdr \
# The core dynamic linking functions are in libc for the static and
# profiled libraries.
-dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
+dl-routines = $(addprefix dl-,load lookup object reloc deps hwcaps \
runtime error init fini debug misc \
version profile conflict tls origin scope \
execstack caller open close trampoline)
+ifeq (yes,$(use-ldconfig))
+dl-routines += dl-cache
+endif
all-dl-routines = $(dl-routines) $(sysdep-dl-routines)
# But they are absent from the shared libc, because that code is in ld.so.
elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin \
@@ -45,8 +50,6 @@ CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-iterate-phdr.c = $(uses-callbacks)
-include ../Makeconfig
-
ifeq ($(unwind-find-fde),yes)
routines += unwind-dw2-fde-glibc
shared-only-routines += unwind-dw2-fde-glibc
@@ -112,19 +115,15 @@ $(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force)
$(do-install-program)
endif
-tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1
-ifeq (yes,$(have-initfini-array))
-tests += tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
-endif
-tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static
+tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1 \
+ tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
+tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static \
+ tst-leaks1-static tst-array1-static tst-array5-static
ifeq (yes,$(build-shared))
tests-static += tst-tls9-static
tst-tls9-static-ENV = \
LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
endif
-ifeq (yes,$(have-initfini-array))
-tests-static += tst-array1-static tst-array5-static
-endif
tests += $(tests-static)
ifeq (yes,$(build-shared))
tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
@@ -157,8 +156,9 @@ tests += tst-audit6 tst-audit7
endif
endif
endif
-ifeq ($(cross-compiling),no)
-tests: $(objpfx)tst-leaks1-mem $(objpfx)noload-mem
+ifeq ($(run-built-tests),yes)
+tests: $(objpfx)tst-leaks1-mem $(objpfx)tst-leaks1-static-mem \
+ $(objpfx)noload-mem
endif
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
@@ -210,10 +210,8 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
tst-initordera3 tst-initordera4 \
tst-initorder2a tst-initorder2b tst-initorder2c \
tst-initorder2d \
- tst-relsort1mod1 tst-relsort1mod2
-ifeq (yes,$(have-initfini-array))
-modules-names += tst-array2dep tst-array5dep
-endif
+ tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
+ tst-array5dep
ifeq (yesyes,$(have-fpie)$(build-shared))
modules-names += tst-piemod1
tests += tst-pie1
@@ -433,8 +431,8 @@ test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
generated += $(addsuffix .so,$(strip $(modules-names)))
ifeq (yes,$(build-shared))
-ifeq ($(cross-compiling),no)
-tests: $(objpfx)tst-pathopt.out
+ifeq ($(run-built-tests),yes)
+tests: $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out
endif
endif
@@ -639,6 +637,7 @@ $(objpfx)circlemod2a.so: $(objpfx)circlemod3a.so
$(objpfx)order: $(addprefix $(objpfx),dep4.so dep3.so dep2.so dep1.so)
$(objpfx)order.out: $(objpfx)order
+ $(test-wrapper) \
$(elf-objpfx)$(rtld-installed-name) \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
$(objpfx)order > $@
@@ -705,7 +704,10 @@ $(objpfx)lateglobal.out: $(objpfx)ltglobmod1.so $(objpfx)ltglobmod2.so
$(objpfx)tst-pathopt: $(libdl)
$(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
$(objpfx)pathoptobj.so
- $(SHELL) -e $< $(common-objpfx)
+ $(SHELL) $< $(common-objpfx) '$(test-wrapper-env)'
+
+$(objpfx)tst-rtld-load-self.out: tst-rtld-load-self.sh $(objpfx)ld.so
+ $(SHELL) $^ '$(test-wrapper)' '$(test-wrapper-env)' > $@
$(objpfx)initfirst: $(libdl)
$(objpfx)initfirst.out: $(objpfx)firstobj.so
@@ -844,45 +846,37 @@ LDFLAGS-tst-execstack-needed = -Wl,-z,noexecstack
LDFLAGS-tst-execstack-prog = -Wl,-z,execstack
endif
-$(objpfx)tst-array1.out: $(objpfx)tst-array1
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array1 > $@
+$(objpfx)tst-array1.out: tst-array1.exp $(objpfx)tst-array1
+ $(built-program-cmd) > $@
cmp $@ tst-array1.exp > /dev/null
-$(objpfx)tst-array1-static.out: $(objpfx)tst-array1-static
- $(objpfx)tst-array1-static > $@
+$(objpfx)tst-array1-static.out: tst-array1.exp $(objpfx)tst-array1-static
+ $(built-program-cmd) > $@
cmp $@ tst-array1.exp > /dev/null
$(objpfx)tst-array2: $(objpfx)tst-array2dep.so
-$(objpfx)tst-array2.out: $(objpfx)tst-array2
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array2 > $@
+$(objpfx)tst-array2.out: tst-array2.exp $(objpfx)tst-array2
+ $(built-program-cmd) > $@
cmp $@ tst-array2.exp > /dev/null
-$(objpfx)tst-array3.out: $(objpfx)tst-array3
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array3 > $@
+$(objpfx)tst-array3.out: tst-array1.exp $(objpfx)tst-array3
+ $(built-program-cmd) > $@
cmp $@ tst-array1.exp > /dev/null
$(objpfx)tst-array4: $(libdl)
-$(objpfx)tst-array4.out: $(objpfx)tst-array4 $(objpfx)tst-array2dep.so
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $< > $@
+$(objpfx)tst-array4.out: tst-array4.exp $(objpfx)tst-array4 \
+ $(objpfx)tst-array2dep.so
+ $(built-program-cmd) > $@
cmp $@ tst-array4.exp > /dev/null
$(objpfx)tst-array5: $(objpfx)tst-array5dep.so
-$(objpfx)tst-array5.out: $(objpfx)tst-array5
- $(elf-objpfx)$(rtld-installed-name) \
- --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
- $(objpfx)tst-array5 > $@
+$(objpfx)tst-array5.out: tst-array5.exp $(objpfx)tst-array5
+ $(built-program-cmd) > $@
cmp $@ tst-array5.exp > /dev/null
-$(objpfx)tst-array5-static.out: $(objpfx)tst-array5-static
- $(objpfx)tst-array5-static > $@
+$(objpfx)tst-array5-static.out: tst-array5-static.exp \
+ $(objpfx)tst-array5-static
+ $(built-program-cmd) > $@
cmp $@ tst-array5-static.exp > /dev/null
CFLAGS-tst-pie1.c += $(pie-ccflag)
@@ -1027,6 +1021,7 @@ $(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so
$(objpfx)order2: $(libdl)
$(objpfx)order2.out: $(objpfx)order2 $(objpfx)order2mod1.so \
$(objpfx)order2mod2.so
+ $(test-wrapper) \
$(elf-objpfx)$(rtld-installed-name) \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
$(objpfx)order2 > $@
@@ -1038,14 +1033,19 @@ order2mod2.so-no-z-defs = yes
LDFLAGS-order2mod1.so = $(no-as-needed)
LDFLAGS-order2mod2.so = $(no-as-needed)
-tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
+tst-stackguard1-ARGS = --command "$(host-built-program-cmd) --child"
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
$(objpfx)tst-leaks1: $(libdl)
$(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@
+$(objpfx)tst-leaks1-static: $(common-objpfx)dlfcn/libdl.a
+$(objpfx)tst-leaks1-static-mem: $(objpfx)tst-leaks1-static.out
+ $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1-static.mtrace > $@
+
tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace
+tst-leaks1-static-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1-static.mtrace
$(objpfx)tst-addr1: $(libdl)
@@ -1116,6 +1116,7 @@ $(objpfx)tst-unique3.out: $(objpfx)tst-unique3lib2.so
$(objpfx)tst-unique4: $(objpfx)tst-unique4lib.so
$(objpfx)tst-initorder.out: $(objpfx)tst-initorder
+ $(test-wrapper) \
$(elf-objpfx)${rtld-installed-name} \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
$< > $@
@@ -1137,6 +1138,7 @@ object-suffixes-left := a b c d
include $(o-iterator)
$(objpfx)tst-initorder2.out: $(objpfx)tst-initorder2
+ $(test-wrapper) \
$(elf-objpfx)${rtld-installed-name} \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
$< > $@
@@ -1161,11 +1163,12 @@ $(objpfx)tst-relsort1mod2.so: $(libm)
$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
$(objpfx)tst-relsort1mod2.so
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-unused-dep.out
endif
$(objpfx)tst-unused-dep.out: $(objpfx)testobj1.so
+ $(test-wrapper-env) \
LD_TRACE_LOADED_OBJECTS=1 \
LD_DEBUG=unused \
LD_PRELOAD= \
diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c
index a7a7d9b225..397125fe60 100644
--- a/elf/chroot_canon.c
+++ b/elf/chroot_canon.c
@@ -1,6 +1,5 @@
/* Return the canonical absolute name of a given file inside chroot.
- Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
@@ -20,12 +19,12 @@
#include <string.h>
#include <unistd.h>
#include <limits.h>
-#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
+#include <eloop-threshold.h>
#include <ldconfig.h>
#ifndef PATH_MAX
@@ -127,7 +126,7 @@ chroot_canon (const char *chroot, const char *name)
char *buf = alloca (PATH_MAX);
size_t len;
- if (++num_links > MAXSYMLINKS)
+ if (++num_links > __eloop_threshold ())
{
__set_errno (ELOOP);
goto error;
diff --git a/elf/dl-close.c b/elf/dl-close.c
index 45b218787b..e6ff7e75d0 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -486,7 +486,7 @@ _dl_close_worker (struct link_map *map)
/* Speed up removing most recently added objects. */
j = cnt;
else
- for (i = 0; i < cnt; i++)
+ for (i = 0; i < cnt; i++)
if (ns_msl->r_list[i]->l_removed == 0)
{
if (i != j)
@@ -642,6 +642,10 @@ _dl_close_worker (struct link_map *map)
assert (nsid != LM_ID_BASE);
#endif
ns->_ns_loaded = imap->l_next;
+
+ /* Update the pointer to the head of the list
+ we leave for debuggers to examine. */
+ r->r_map = (void *) ns->_ns_loaded;
}
--ns->_ns_nloaded;
diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c
new file mode 100644
index 0000000000..d911548f2a
--- /dev/null
+++ b/elf/dl-hwcaps.c
@@ -0,0 +1,279 @@
+/* Hardware capability support for run-time dynamic loader.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include <elf.h>
+#include <errno.h>
+#include <libintl.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+
+#include <dl-procinfo.h>
+
+#ifdef _DL_FIRST_PLATFORM
+# define _DL_FIRST_EXTRA (_DL_FIRST_PLATFORM + _DL_PLATFORMS_COUNT)
+#else
+# define _DL_FIRST_EXTRA _DL_HWCAP_COUNT
+#endif
+
+/* Return an array of useful/necessary hardware capability names. */
+const struct r_strlenpair *
+internal_function
+_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
+ size_t *max_capstrlen)
+{
+ /* Determine how many important bits are set. */
+ uint64_t masked = GLRO(dl_hwcap) & GLRO(dl_hwcap_mask);
+ size_t cnt = platform != NULL;
+ size_t n, m;
+ size_t total;
+ struct r_strlenpair *temp;
+ struct r_strlenpair *result;
+ struct r_strlenpair *rp;
+ char *cp;
+
+ /* Count the number of bits set in the masked value. */
+ for (n = 0; (~((1ULL << n) - 1) & masked) != 0; ++n)
+ if ((masked & (1ULL << n)) != 0)
+ ++cnt;
+
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ /* The system-supplied DSO can contain a note of type 2, vendor "GNU".
+ This gives us a list of names to treat as fake hwcap bits. */
+
+ const char *dsocaps = NULL;
+ size_t dsocapslen = 0;
+ if (GLRO(dl_sysinfo_map) != NULL)
+ {
+ const ElfW(Phdr) *const phdr = GLRO(dl_sysinfo_map)->l_phdr;
+ const ElfW(Word) phnum = GLRO(dl_sysinfo_map)->l_phnum;
+ for (uint_fast16_t i = 0; i < phnum; ++i)
+ if (phdr[i].p_type == PT_NOTE)
+ {
+ const ElfW(Addr) start = (phdr[i].p_vaddr
+ + GLRO(dl_sysinfo_map)->l_addr);
+ const struct
+ {
+ ElfW(Word) vendorlen;
+ ElfW(Word) datalen;
+ ElfW(Word) type;
+ } *note = (const void *) start;
+ while ((ElfW(Addr)) (note + 1) - start < phdr[i].p_memsz)
+ {
+#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
+ if (note->type == NT_GNU_HWCAP
+ && note->vendorlen == sizeof "GNU"
+ && !memcmp ((note + 1), "GNU", sizeof "GNU")
+ && note->datalen > 2 * sizeof (ElfW(Word)) + 2)
+ {
+ const ElfW(Word) *p = ((const void *) (note + 1)
+ + ROUND (sizeof "GNU"));
+ cnt += *p++;
+ ++p; /* Skip mask word. */
+ dsocaps = (const char *) p;
+ dsocapslen = note->datalen - sizeof *p * 2;
+ break;
+ }
+ note = ((const void *) (note + 1)
+ + ROUND (note->vendorlen) + ROUND (note->datalen));
+#undef ROUND
+ }
+ if (dsocaps != NULL)
+ break;
+ }
+ }
+#endif
+
+ /* For TLS enabled builds always add 'tls'. */
+ ++cnt;
+
+ /* Create temporary data structure to generate result table. */
+ temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
+ m = 0;
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ if (dsocaps != NULL)
+ {
+ const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
+ GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
+ /* Note that we add the dsocaps to the set already chosen by the
+ LD_HWCAP_MASK environment variable (or default HWCAP_IMPORTANT).
+ So there is no way to request ignoring an OS-supplied dsocap
+ string and bit like you can ignore an OS-supplied HWCAP bit. */
+ GLRO(dl_hwcap_mask) |= (uint64_t) mask << _DL_FIRST_EXTRA;
+ size_t len;
+ for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
+ {
+ uint_fast8_t bit = *p++;
+ len = strlen (p);
+
+ /* Skip entries that are not enabled in the mask word. */
+ if (__builtin_expect (mask & ((ElfW(Word)) 1 << bit), 1))
+ {
+ temp[m].str = p;
+ temp[m].len = len;
+ ++m;
+ }
+ else
+ --cnt;
+ }
+ }
+#endif
+ for (n = 0; masked != 0; ++n)
+ if ((masked & (1ULL << n)) != 0)
+ {
+ temp[m].str = _dl_hwcap_string (n);
+ temp[m].len = strlen (temp[m].str);
+ masked ^= 1ULL << n;
+ ++m;
+ }
+ if (platform != NULL)
+ {
+ temp[m].str = platform;
+ temp[m].len = platform_len;
+ ++m;
+ }
+
+ temp[m].str = "tls";
+ temp[m].len = 3;
+ ++m;
+
+ assert (m == cnt);
+
+ /* Determine the total size of all strings together. */
+ if (cnt == 1)
+ total = temp[0].len + 1;
+ else
+ {
+ total = temp[0].len + temp[cnt - 1].len + 2;
+ if (cnt > 2)
+ {
+ total <<= 1;
+ for (n = 1; n + 1 < cnt; ++n)
+ total += temp[n].len + 1;
+ if (cnt > 3
+ && (cnt >= sizeof (size_t) * 8
+ || total + (sizeof (*result) << 3)
+ >= (1UL << (sizeof (size_t) * 8 - cnt + 3))))
+ _dl_signal_error (ENOMEM, NULL, NULL,
+ N_("cannot create capability list"));
+
+ total <<= cnt - 3;
+ }
+ }
+
+ /* The result structure: we use a very compressed way to store the
+ various combinations of capability names. */
+ *sz = 1 << cnt;
+ result = (struct r_strlenpair *) malloc (*sz * sizeof (*result) + total);
+ if (result == NULL)
+ _dl_signal_error (ENOMEM, NULL, NULL,
+ N_("cannot create capability list"));
+
+ if (cnt == 1)
+ {
+ result[0].str = (char *) (result + *sz);
+ result[0].len = temp[0].len + 1;
+ result[1].str = (char *) (result + *sz);
+ result[1].len = 0;
+ cp = __mempcpy ((char *) (result + *sz), temp[0].str, temp[0].len);
+ *cp = '/';
+ *sz = 2;
+ *max_capstrlen = result[0].len;
+
+ return result;
+ }
+
+ /* Fill in the information. This follows the following scheme
+ (indeces from TEMP for four strings):
+ entry #0: 0, 1, 2, 3 binary: 1111
+ #1: 0, 1, 3 1101
+ #2: 0, 2, 3 1011
+ #3: 0, 3 1001
+ This allows the representation of all possible combinations of
+ capability names in the string. First generate the strings. */
+ result[1].str = result[0].str = cp = (char *) (result + *sz);
+#define add(idx) \
+ cp = __mempcpy (__mempcpy (cp, temp[idx].str, temp[idx].len), "/", 1);
+ if (cnt == 2)
+ {
+ add (1);
+ add (0);
+ }
+ else
+ {
+ n = 1 << (cnt - 1);
+ do
+ {
+ n -= 2;
+
+ /* We always add the last string. */
+ add (cnt - 1);
+
+ /* Add the strings which have the bit set in N. */
+ for (m = cnt - 2; m > 0; --m)
+ if ((n & (1 << m)) != 0)
+ add (m);
+
+ /* Always add the first string. */
+ add (0);
+ }
+ while (n != 0);
+ }
+#undef add
+
+ /* Now we are ready to install the string pointers and length. */
+ for (n = 0; n < (1UL << cnt); ++n)
+ result[n].len = 0;
+ n = cnt;
+ do
+ {
+ size_t mask = 1 << --n;
+
+ rp = result;
+ for (m = 1 << cnt; m > 0; ++rp)
+ if ((--m & mask) != 0)
+ rp->len += temp[n].len + 1;
+ }
+ while (n != 0);
+
+ /* The first half of the strings all include the first string. */
+ n = (1 << cnt) - 2;
+ rp = &result[2];
+ while (n != (1UL << (cnt - 1)))
+ {
+ if ((--n & 1) != 0)
+ rp[0].str = rp[-2].str + rp[-2].len;
+ else
+ rp[0].str = rp[-1].str;
+ ++rp;
+ }
+
+ /* The second half starts right after the first part of the string of
+ the corresponding entry in the first half. */
+ do
+ {
+ rp[0].str = rp[-(1 << (cnt - 1))].str + temp[cnt - 1].len + 1;
+ ++rp;
+ }
+ while (--n != 0);
+
+ /* The maximum string length. */
+ *max_capstrlen = result[0].len;
+
+ return result;
+}
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c
index bac5779530..95c2afda06 100644
--- a/elf/dl-iteratephdr.c
+++ b/elf/dl-iteratephdr.c
@@ -1,5 +1,5 @@
/* Get loaded objects program headers.
- Copyright (C) 2001-2004, 2006-2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
@@ -39,7 +39,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
/* Make sure nobody modifies the list of loaded objects. */
__rtld_lock_lock_recursive (GL(dl_load_write_lock));
- __libc_cleanup_push (cancel_handler, 0);
+ __libc_cleanup_push (cancel_handler, NULL);
/* We have to determine the namespace of the caller since this determines
which namespace is reported. */
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 43e1269c43..a6955561f3 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1090,7 +1090,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
struct loadcmd
{
ElfW(Addr) mapstart, mapend, dataend, allocend;
- off_t mapoff;
+ ElfW(Off) mapoff;
int prot;
} loadcmds[l->l_phnum], *c;
size_t nloadcmds = 0;
@@ -1194,9 +1194,11 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
was executed directly. The setup will happen later. */
break;
+# ifdef _LIBC_REENTRANT
/* In a static binary there is no way to tell if we dynamically
loaded libpthread. */
if (GL(dl_error_catch_tsd) == &_dl_initial_error_catch_tsd)
+# endif
#endif
{
/* We have not yet loaded libpthread.
@@ -1345,7 +1347,7 @@ cannot allocate TLS data structures for initial thread");
l->l_text_end = l->l_addr + c->mapend;
if (l->l_phdr == 0
- && (ElfW(Off)) c->mapoff <= header->e_phoff
+ && c->mapoff <= header->e_phoff
&& ((size_t) (c->mapend - c->mapstart + c->mapoff)
>= header->e_phoff + header->e_phnum * sizeof (ElfW(Phdr))))
/* Found the program header in this segment. */
@@ -1578,6 +1580,10 @@ cannot enable executable stack as shared object requires");
add_name_to_object (l, ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val));
+#ifdef DL_AFTER_LOAD
+ DL_AFTER_LOAD (l);
+#endif
+
/* Now that the object is fully initialized add it to the object list. */
_dl_add_to_namespace_list (l, nsid);
@@ -1720,10 +1726,20 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
/* We successfully openened the file. Now verify it is a file
we can use. */
__set_errno (0);
- fbp->len = __libc_read (fd, fbp->buf, sizeof (fbp->buf));
+ fbp->len = 0;
+ assert (sizeof (fbp->buf) > sizeof (ElfW(Ehdr)));
+ /* Read in the header. */
+ do
+ {
+ ssize_t retlen = __libc_read (fd, fbp->buf + fbp->len,
+ sizeof (fbp->buf) - fbp->len);
+ if (retlen <= 0)
+ break;
+ fbp->len += retlen;
+ }
+ while (__builtin_expect (fbp->len < sizeof (ElfW(Ehdr)), 0));
/* This is where the ELF header is loaded. */
- assert (sizeof (fbp->buf) > sizeof (ElfW(Ehdr)));
ehdr = (ElfW(Ehdr) *) fbp->buf;
/* Now run the tests. */
@@ -2195,6 +2211,7 @@ _dl_map_object (struct link_map *loader, const char *name,
&loader->l_runpath_dirs, &realname, &fb, loader,
LA_SER_RUNPATH, &found_other_class);
+#ifdef USE_LDCONFIG
if (fd == -1
&& (__builtin_expect (! (mode & __RTLD_SECURE), 1)
|| ! INTUSE(__libc_enable_secure))
@@ -2206,22 +2223,22 @@ _dl_map_object (struct link_map *loader, const char *name,
if (cached != NULL)
{
-#ifdef SHARED
+# ifdef SHARED
// XXX Correct to unconditionally default to namespace 0?
l = (loader
?: GL(dl_ns)[LM_ID_BASE]._ns_loaded
?: &GL(dl_rtld_map));
-#else
+# else
l = loader;
-#endif
+# endif
/* If the loader has the DF_1_NODEFLIB flag set we must not
use a cache entry from any of these directories. */
if (
-#ifndef SHARED
+# ifndef SHARED
/* 'l' is always != NULL for dynamically linked objects. */
l != NULL &&
-#endif
+# endif
__builtin_expect (l->l_flags_1 & DF_1_NODEFLIB, 0))
{
const char *dirp = system_dirs;
@@ -2259,6 +2276,7 @@ _dl_map_object (struct link_map *loader, const char *name,
}
}
}
+#endif
/* Finally, try the default path. */
if (fd == -1
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index a2a699b48f..e7f7148381 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
- Copyright (C) 1995-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,7 @@
#include <sysdep-cancel.h>
#include <bits/libc-lock.h>
#include <tls.h>
+#include <atomic.h>
#include <assert.h>
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 00781afcf7..9c39a34a4b 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -1,5 +1,5 @@
/* Load a shared object at runtime, relocate it, and run its initializer.
- Copyright (C) 1996-2007, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +33,7 @@
#include <sysdep-cancel.h>
#include <tls.h>
#include <stap-probe.h>
+#include <atomic.h>
#include <dl-dst.h>
@@ -188,9 +189,11 @@ dl_open_worker (void *a)
{
const void *caller_dlopen = args->caller_dlopen;
+#ifdef SHARED
/* We have to find out from which object the caller is calling.
By default we assume this is the main application. */
call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
+#endif
struct link_map *l;
for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
@@ -653,8 +656,8 @@ no more namespaces available for dlmopen()"));
int errcode = _dl_catch_error (&objname, &errstring, &malloced,
dl_open_worker, &args);
-#ifndef MAP_COPY
- /* We must munmap() the cache file. */
+#if defined USE_LDCONFIG && !defined MAP_COPY
+ /* We must unmap the cache file. */
_dl_unload_cache ();
#endif
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index fdaa364c64..2e02a218e6 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -36,10 +36,6 @@
# define PLTREL ElfW(Rel)
#endif
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
/* The fixup functions might have need special attributes. If none
are provided define the macro as empty. */
#ifndef ARCH_FIXUP_ATTRIBUTE
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 2bb468a5fb..fd72c1b2ad 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -161,6 +161,11 @@ uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT;
#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
/* Address of the ELF headers in the vsyscall page. */
const ElfW(Ehdr) *_dl_sysinfo_dso;
+
+struct link_map *_dl_sysinfo_map;
+
+# include "get-dynamic-info.h"
+# include "setup-vdso.h"
#endif
/* During the program run we must not modify the global data of
@@ -266,6 +271,10 @@ _dl_non_dynamic_init (void)
_dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
+ /* Set up the data structures for the system-supplied DSO early,
+ so they can influence _dl_init_paths. */
+ setup_vdso (NULL, NULL);
+
/* Initialize the data structures for the search paths for shared
objects. */
_dl_init_paths (getenv ("LD_LIBRARY_PATH"));
@@ -326,23 +335,6 @@ _dl_non_dynamic_init (void)
}
}
-
-const struct r_strlenpair *
-internal_function
-_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
- size_t *max_capstrlen)
-{
- static struct r_strlenpair result;
- static char buf[1];
-
- result.str = buf; /* Does not really matter. */
- result.len = 0;
-
- *sz = 1;
- return &result;
-}
-
-
#ifdef DL_SYSINFO_IMPLEMENTATION
DL_SYSINFO_IMPLEMENTATION
#endif
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index 1e7ad22583..6480f2359c 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -1,5 +1,5 @@
/* Look up a symbol in a shared object loaded by `dlopen'.
- Copyright (C) 1999-2002,2004,2006,2007,2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
#include <assert.h>
#include <stddef.h>
#include <setjmp.h>
+#include <stdlib.h>
#include <libintl.h>
#include <dlfcn.h>
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index e2a9d935ab..65a90469c6 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -1,6 +1,5 @@
/* Operating system support for run-time dynamic linker. Generic Unix version.
- Copyright (C) 1995-1998,2000-2010,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +16,12 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We conditionalize the whole of this file rather than simply eliding it
+ from the static build, because other sysdeps/ versions of this file
+ might define things needed by a static build. */
+
+#ifdef SHARED
+
#include <assert.h>
#include <elf.h>
#include <errno.h>
@@ -39,12 +44,6 @@
#include <hp-timing.h>
#include <tls.h>
-#ifdef _DL_FIRST_PLATFORM
-# define _DL_FIRST_EXTRA (_DL_FIRST_PLATFORM + _DL_PLATFORMS_COUNT)
-#else
-# define _DL_FIRST_EXTRA _DL_HWCAP_COUNT
-#endif
-
extern char **_environ attribute_hidden;
extern char _end[] attribute_hidden;
@@ -345,250 +344,4 @@ _dl_show_auxv (void)
}
}
-
-/* Return an array of useful/necessary hardware capability names. */
-const struct r_strlenpair *
-internal_function
-_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
- size_t *max_capstrlen)
-{
- /* Determine how many important bits are set. */
- uint64_t masked = GLRO(dl_hwcap) & GLRO(dl_hwcap_mask);
- size_t cnt = platform != NULL;
- size_t n, m;
- size_t total;
- struct r_strlenpair *temp;
- struct r_strlenpair *result;
- struct r_strlenpair *rp;
- char *cp;
-
- /* Count the number of bits set in the masked value. */
- for (n = 0; (~((1ULL << n) - 1) & masked) != 0; ++n)
- if ((masked & (1ULL << n)) != 0)
- ++cnt;
-
-#if (defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO) && defined SHARED
- /* The system-supplied DSO can contain a note of type 2, vendor "GNU".
- This gives us a list of names to treat as fake hwcap bits. */
-
- const char *dsocaps = NULL;
- size_t dsocapslen = 0;
- if (GLRO(dl_sysinfo_map) != NULL)
- {
- const ElfW(Phdr) *const phdr = GLRO(dl_sysinfo_map)->l_phdr;
- const ElfW(Word) phnum = GLRO(dl_sysinfo_map)->l_phnum;
- for (uint_fast16_t i = 0; i < phnum; ++i)
- if (phdr[i].p_type == PT_NOTE)
- {
- const ElfW(Addr) start = (phdr[i].p_vaddr
- + GLRO(dl_sysinfo_map)->l_addr);
- const struct
- {
- ElfW(Word) vendorlen;
- ElfW(Word) datalen;
- ElfW(Word) type;
- } *note = (const void *) start;
- while ((ElfW(Addr)) (note + 1) - start < phdr[i].p_memsz)
- {
-#define ROUND(len) (((len) + sizeof (ElfW(Word)) - 1) & -sizeof (ElfW(Word)))
- if (note->type == NT_GNU_HWCAP
- && note->vendorlen == sizeof "GNU"
- && !memcmp ((note + 1), "GNU", sizeof "GNU")
- && note->datalen > 2 * sizeof (ElfW(Word)) + 2)
- {
- const ElfW(Word) *p = ((const void *) (note + 1)
- + ROUND (sizeof "GNU"));
- cnt += *p++;
- ++p; /* Skip mask word. */
- dsocaps = (const char *) p;
- dsocapslen = note->datalen - sizeof *p * 2;
- break;
- }
- note = ((const void *) (note + 1)
- + ROUND (note->vendorlen) + ROUND (note->datalen));
-#undef ROUND
- }
- if (dsocaps != NULL)
- break;
- }
- }
-#endif
-
- /* For TLS enabled builds always add 'tls'. */
- ++cnt;
-
- /* Create temporary data structure to generate result table. */
- temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
- m = 0;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
- if (dsocaps != NULL)
- {
- const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
- GLRO(dl_hwcap) |= (uint64_t) mask << _DL_FIRST_EXTRA;
- /* Note that we add the dsocaps to the set already chosen by the
- LD_HWCAP_MASK environment variable (or default HWCAP_IMPORTANT).
- So there is no way to request ignoring an OS-supplied dsocap
- string and bit like you can ignore an OS-supplied HWCAP bit. */
- GLRO(dl_hwcap_mask) |= (uint64_t) mask << _DL_FIRST_EXTRA;
- size_t len;
- for (const char *p = dsocaps; p < dsocaps + dsocapslen; p += len + 1)
- {
- uint_fast8_t bit = *p++;
- len = strlen (p);
-
- /* Skip entries that are not enabled in the mask word. */
- if (__builtin_expect (mask & ((ElfW(Word)) 1 << bit), 1))
- {
- temp[m].str = p;
- temp[m].len = len;
- ++m;
- }
- else
- --cnt;
- }
- }
#endif
- for (n = 0; masked != 0; ++n)
- if ((masked & (1ULL << n)) != 0)
- {
- temp[m].str = _dl_hwcap_string (n);
- temp[m].len = strlen (temp[m].str);
- masked ^= 1ULL << n;
- ++m;
- }
- if (platform != NULL)
- {
- temp[m].str = platform;
- temp[m].len = platform_len;
- ++m;
- }
-
- temp[m].str = "tls";
- temp[m].len = 3;
- ++m;
-
- assert (m == cnt);
-
- /* Determine the total size of all strings together. */
- if (cnt == 1)
- total = temp[0].len + 1;
- else
- {
- total = temp[0].len + temp[cnt - 1].len + 2;
- if (cnt > 2)
- {
- total <<= 1;
- for (n = 1; n + 1 < cnt; ++n)
- total += temp[n].len + 1;
- if (cnt > 3
- && (cnt >= sizeof (size_t) * 8
- || total + (sizeof (*result) << 3)
- >= (1UL << (sizeof (size_t) * 8 - cnt + 3))))
- _dl_signal_error (ENOMEM, NULL, NULL,
- N_("cannot create capability list"));
-
- total <<= cnt - 3;
- }
- }
-
- /* The result structure: we use a very compressed way to store the
- various combinations of capability names. */
- *sz = 1 << cnt;
- result = (struct r_strlenpair *) malloc (*sz * sizeof (*result) + total);
- if (result == NULL)
- _dl_signal_error (ENOMEM, NULL, NULL,
- N_("cannot create capability list"));
-
- if (cnt == 1)
- {
- result[0].str = (char *) (result + *sz);
- result[0].len = temp[0].len + 1;
- result[1].str = (char *) (result + *sz);
- result[1].len = 0;
- cp = __mempcpy ((char *) (result + *sz), temp[0].str, temp[0].len);
- *cp = '/';
- *sz = 2;
- *max_capstrlen = result[0].len;
-
- return result;
- }
-
- /* Fill in the information. This follows the following scheme
- (indeces from TEMP for four strings):
- entry #0: 0, 1, 2, 3 binary: 1111
- #1: 0, 1, 3 1101
- #2: 0, 2, 3 1011
- #3: 0, 3 1001
- This allows the representation of all possible combinations of
- capability names in the string. First generate the strings. */
- result[1].str = result[0].str = cp = (char *) (result + *sz);
-#define add(idx) \
- cp = __mempcpy (__mempcpy (cp, temp[idx].str, temp[idx].len), "/", 1);
- if (cnt == 2)
- {
- add (1);
- add (0);
- }
- else
- {
- n = 1 << (cnt - 1);
- do
- {
- n -= 2;
-
- /* We always add the last string. */
- add (cnt - 1);
-
- /* Add the strings which have the bit set in N. */
- for (m = cnt - 2; m > 0; --m)
- if ((n & (1 << m)) != 0)
- add (m);
-
- /* Always add the first string. */
- add (0);
- }
- while (n != 0);
- }
-#undef add
-
- /* Now we are ready to install the string pointers and length. */
- for (n = 0; n < (1UL << cnt); ++n)
- result[n].len = 0;
- n = cnt;
- do
- {
- size_t mask = 1 << --n;
-
- rp = result;
- for (m = 1 << cnt; m > 0; ++rp)
- if ((--m & mask) != 0)
- rp->len += temp[n].len + 1;
- }
- while (n != 0);
-
- /* The first half of the strings all include the first string. */
- n = (1 << cnt) - 2;
- rp = &result[2];
- while (n != (1UL << (cnt - 1)))
- {
- if ((--n & 1) != 0)
- rp[0].str = rp[-2].str + rp[-2].len;
- else
- rp[0].str = rp[-1].str;
- ++rp;
- }
-
- /* The second half starts right after the first part of the string of
- the corresponding entry in the first half. */
- do
- {
- rp[0].str = rp[-(1 << (cnt - 1))].str + temp[cnt - 1].len + 1;
- ++rp;
- }
- while (--n != 0);
-
- /* The maximum string length. */
- *max_capstrlen = result[0].len;
-
- return result;
-}
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 4138312b94..c3a3d68f93 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -464,6 +464,11 @@ _dl_allocate_tls (void *mem)
rtld_hidden_def (_dl_allocate_tls)
+#ifndef SHARED
+extern dtv_t _dl_static_dtv[];
+# define _dl_initial_dtv (&_dl_static_dtv[1])
+#endif
+
void
internal_function
_dl_deallocate_tls (void *tcb, bool dealloc_tcb)
@@ -477,9 +482,7 @@ _dl_deallocate_tls (void *tcb, bool dealloc_tcb)
free (dtv[1 + cnt].pointer.val);
/* The array starts with dtv[-1]. */
-#ifdef SHARED
if (dtv != GL(dl_initial_dtv))
-#endif
free (dtv - 1);
if (dealloc_tcb)
diff --git a/elf/dl-version.c b/elf/dl-version.c
index af7f89960d..b2ebb16512 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -28,11 +28,6 @@
#include <assert.h>
-#ifndef VERSYMIDX
-# define VERSYMIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (tag))
-#endif
-
-
#define make_string(string, rest...) \
({ \
const char *all[] = { string, ## rest }; \
diff --git a/elf/do-rel.h b/elf/do-rel.h
index 10d8f31c4e..272b7821dd 100644
--- a/elf/do-rel.h
+++ b/elf/do-rel.h
@@ -32,14 +32,6 @@
(void *) (l_addr + relative->r_offset))
#endif
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-
/* Perform the relocations in MAP on the running program image as specified
by RELTAG, SZTAG. If LAZY is nonzero, this is the first pass on PLT
relocations; they should be set up to call _dl_runtime_resolve, rather
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index 44f53b3c70..ad30d23a7f 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -42,7 +42,6 @@
int internal_function _dl_try_allocate_static_tls (struct link_map *map);
#include <elf.h>
-#include <assert.h>
#ifdef RESOLVE_MAP
/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
@@ -88,153 +87,7 @@ elf_machine_lazy_rel (struct link_map *map,
#include <dl-machine.h>
-#ifndef VERSYMIDX
-# define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-#endif
-
-
-/* Read the dynamic section at DYN and fill in INFO with indices DT_*. */
-#ifndef RESOLVE_MAP
-static
-#else
-auto
-#endif
-inline void __attribute__ ((unused, always_inline))
-elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
-{
- ElfW(Dyn) *dyn = l->l_ld;
- ElfW(Dyn) **info;
-#if __ELF_NATIVE_CLASS == 32
- typedef Elf32_Word d_tag_utype;
-#elif __ELF_NATIVE_CLASS == 64
- typedef Elf64_Xword d_tag_utype;
-#endif
-
-#ifndef RTLD_BOOTSTRAP
- if (dyn == NULL)
- return;
-#endif
-
- info = l->l_info;
-
- while (dyn->d_tag != DT_NULL)
- {
- if ((d_tag_utype) dyn->d_tag < DT_NUM)
- info[dyn->d_tag] = dyn;
- else if (dyn->d_tag >= DT_LOPROC &&
- dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
- info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
- else if ((d_tag_utype) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
- info[VERSYMIDX (dyn->d_tag)] = dyn;
- else if ((d_tag_utype) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
- info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGNUM] = dyn;
- else if ((d_tag_utype) DT_VALTAGIDX (dyn->d_tag) < DT_VALNUM)
- info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn;
- else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
- info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
- ++dyn;
- }
-
-#define DL_RO_DYN_TEMP_CNT 8
-
-#ifndef DL_RO_DYN_SECTION
- /* Don't adjust .dynamic unnecessarily. */
- if (l->l_addr != 0)
- {
- ElfW(Addr) l_addr = l->l_addr;
- int cnt = 0;
-
-# define ADJUST_DYN_INFO(tag) \
- do \
- if (info[tag] != NULL) \
- { \
- if (temp) \
- { \
- temp[cnt].d_tag = info[tag]->d_tag; \
- temp[cnt].d_un.d_ptr = info[tag]->d_un.d_ptr + l_addr; \
- info[tag] = temp + cnt++; \
- } \
- else \
- info[tag]->d_un.d_ptr += l_addr; \
- } \
- while (0)
-
- ADJUST_DYN_INFO (DT_HASH);
- ADJUST_DYN_INFO (DT_PLTGOT);
- ADJUST_DYN_INFO (DT_STRTAB);
- ADJUST_DYN_INFO (DT_SYMTAB);
-# if ! ELF_MACHINE_NO_RELA
- ADJUST_DYN_INFO (DT_RELA);
-# endif
-# if ! ELF_MACHINE_NO_REL
- ADJUST_DYN_INFO (DT_REL);
-# endif
- ADJUST_DYN_INFO (DT_JMPREL);
- ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM));
- ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM
- + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM);
-# undef ADJUST_DYN_INFO
- assert (cnt <= DL_RO_DYN_TEMP_CNT);
- }
-#endif
- if (info[DT_PLTREL] != NULL)
- {
-#if ELF_MACHINE_NO_RELA
- assert (info[DT_PLTREL]->d_un.d_val == DT_REL);
-#elif ELF_MACHINE_NO_REL
- assert (info[DT_PLTREL]->d_un.d_val == DT_RELA);
-#else
- assert (info[DT_PLTREL]->d_un.d_val == DT_REL
- || info[DT_PLTREL]->d_un.d_val == DT_RELA);
-#endif
- }
-#if ! ELF_MACHINE_NO_RELA
- if (info[DT_RELA] != NULL)
- assert (info[DT_RELAENT]->d_un.d_val == sizeof (ElfW(Rela)));
-# endif
-# if ! ELF_MACHINE_NO_REL
- if (info[DT_REL] != NULL)
- assert (info[DT_RELENT]->d_un.d_val == sizeof (ElfW(Rel)));
-#endif
-#ifdef RTLD_BOOTSTRAP
- /* Only the bind now flags are allowed. */
- assert (info[VERSYMIDX (DT_FLAGS_1)] == NULL
- || (info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val & ~DF_1_NOW) == 0);
- assert (info[DT_FLAGS] == NULL
- || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0);
- /* Flags must not be set for ld.so. */
- assert (info[DT_RUNPATH] == NULL);
- assert (info[DT_RPATH] == NULL);
-#else
- if (info[DT_FLAGS] != NULL)
- {
- /* Flags are used. Translate to the old form where available.
- Since these l_info entries are only tested for NULL pointers it
- is ok if they point to the DT_FLAGS entry. */
- l->l_flags = info[DT_FLAGS]->d_un.d_val;
-
- if (l->l_flags & DF_SYMBOLIC)
- info[DT_SYMBOLIC] = info[DT_FLAGS];
- if (l->l_flags & DF_TEXTREL)
- info[DT_TEXTREL] = info[DT_FLAGS];
- if (l->l_flags & DF_BIND_NOW)
- info[DT_BIND_NOW] = info[DT_FLAGS];
- }
- if (info[VERSYMIDX (DT_FLAGS_1)] != NULL)
- {
- l->l_flags_1 = info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val;
-
- if (l->l_flags_1 & DF_1_NOW)
- info[DT_BIND_NOW] = info[VERSYMIDX (DT_FLAGS_1)];
- }
- if (info[DT_RUNPATH] != NULL)
- /* If both RUNPATH and RPATH are given, the latter is ignored. */
- info[DT_RPATH] = NULL;
-#endif
-}
+#include "get-dynamic-info.h"
#ifdef RESOLVE_MAP
diff --git a/elf/elf.h b/elf/elf.h
index 71cfdb8181..41fc3bd4f9 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -622,6 +622,15 @@ typedef struct
#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
+#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
+#define NT_S390_TIMER 0x301 /* s390 timer register */
+#define NT_S390_TODCMP 0x302 /* s390 TOD clock comparator register */
+#define NT_S390_TODPREG 0x303 /* s390 TOD programmable register */
+#define NT_S390_CTRS 0x304 /* s390 control registers */
+#define NT_S390_PREFIX 0x305 /* s390 prefix register */
+#define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */
+#define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */
+#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */
/* Legal values for the note segment descriptor types for object files. */
@@ -2250,6 +2259,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define EF_ARM_VFP_FLOAT 0x400
#define EF_ARM_MAVERICK_FLOAT 0x800
+#define EF_ARM_ABI_FLOAT_SOFT 0x200 /* NB conflicts with EF_ARM_SOFT_FLOAT */
+#define EF_ARM_ABI_FLOAT_HARD 0x400 /* NB conflicts with EF_ARM_VFP_FLOAT */
+
/* Other constants defined in the ARM ELF spec. version B-01. */
/* NB. These conflict with values defined above. */
@@ -2734,8 +2746,23 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_MN10300_GLOB_DAT 21 /* Create GOT entry. */
#define R_MN10300_JMP_SLOT 22 /* Create PLT entry. */
#define R_MN10300_RELATIVE 23 /* Adjust by program base. */
-
-#define R_MN10300_NUM 24
+#define R_MN10300_TLS_GD 24 /* 32-bit offset for global dynamic. */
+#define R_MN10300_TLS_LD 25 /* 32-bit offset for local dynamic. */
+#define R_MN10300_TLS_LDO 26 /* Module-relative offset. */
+#define R_MN10300_TLS_GOTIE 27 /* GOT offset for static TLS block
+ offset. */
+#define R_MN10300_TLS_IE 28 /* GOT address for static TLS block
+ offset. */
+#define R_MN10300_TLS_LE 29 /* Offset relative to static TLS
+ block. */
+#define R_MN10300_TLS_DTPMOD 30 /* ID of module containing symbol. */
+#define R_MN10300_TLS_DTPOFF 31 /* Offset in module TLS block. */
+#define R_MN10300_TLS_TPOFF 32 /* Offset in static TLS block. */
+#define R_MN10300_SYM_DIFF 33 /* Adjustment for next reloc as needed
+ by linker relaxation. */
+#define R_MN10300_ALIGN 34 /* Alignment requirement for linker
+ relaxation. */
+#define R_MN10300_NUM 35
/* M32R relocs. */
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
new file mode 100644
index 0000000000..ffac75f635
--- /dev/null
+++ b/elf/get-dynamic-info.h
@@ -0,0 +1,161 @@
+/* Read the dynamic section at DYN and fill in INFO with indices DT_*.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+
+#ifndef RESOLVE_MAP
+static
+#else
+auto
+#endif
+inline void __attribute__ ((unused, always_inline))
+elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
+{
+ ElfW(Dyn) *dyn = l->l_ld;
+ ElfW(Dyn) **info;
+#if __ELF_NATIVE_CLASS == 32
+ typedef Elf32_Word d_tag_utype;
+#elif __ELF_NATIVE_CLASS == 64
+ typedef Elf64_Xword d_tag_utype;
+#endif
+
+#ifndef RTLD_BOOTSTRAP
+ if (dyn == NULL)
+ return;
+#endif
+
+ info = l->l_info;
+
+ while (dyn->d_tag != DT_NULL)
+ {
+ if ((d_tag_utype) dyn->d_tag < DT_NUM)
+ info[dyn->d_tag] = dyn;
+ else if (dyn->d_tag >= DT_LOPROC &&
+ dyn->d_tag < DT_LOPROC + DT_THISPROCNUM)
+ info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
+ else if ((d_tag_utype) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
+ info[VERSYMIDX (dyn->d_tag)] = dyn;
+ else if ((d_tag_utype) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
+ info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ + DT_VERSIONTAGNUM] = dyn;
+ else if ((d_tag_utype) DT_VALTAGIDX (dyn->d_tag) < DT_VALNUM)
+ info[DT_VALTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ + DT_VERSIONTAGNUM + DT_EXTRANUM] = dyn;
+ else if ((d_tag_utype) DT_ADDRTAGIDX (dyn->d_tag) < DT_ADDRNUM)
+ info[DT_ADDRTAGIDX (dyn->d_tag) + DT_NUM + DT_THISPROCNUM
+ + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM] = dyn;
+ ++dyn;
+ }
+
+#define DL_RO_DYN_TEMP_CNT 8
+
+#ifndef DL_RO_DYN_SECTION
+ /* Don't adjust .dynamic unnecessarily. */
+ if (l->l_addr != 0)
+ {
+ ElfW(Addr) l_addr = l->l_addr;
+ int cnt = 0;
+
+# define ADJUST_DYN_INFO(tag) \
+ do \
+ if (info[tag] != NULL) \
+ { \
+ if (temp) \
+ { \
+ temp[cnt].d_tag = info[tag]->d_tag; \
+ temp[cnt].d_un.d_ptr = info[tag]->d_un.d_ptr + l_addr; \
+ info[tag] = temp + cnt++; \
+ } \
+ else \
+ info[tag]->d_un.d_ptr += l_addr; \
+ } \
+ while (0)
+
+ ADJUST_DYN_INFO (DT_HASH);
+ ADJUST_DYN_INFO (DT_PLTGOT);
+ ADJUST_DYN_INFO (DT_STRTAB);
+ ADJUST_DYN_INFO (DT_SYMTAB);
+# if ! ELF_MACHINE_NO_RELA
+ ADJUST_DYN_INFO (DT_RELA);
+# endif
+# if ! ELF_MACHINE_NO_REL
+ ADJUST_DYN_INFO (DT_REL);
+# endif
+ ADJUST_DYN_INFO (DT_JMPREL);
+ ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM));
+ ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM
+ + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM);
+# undef ADJUST_DYN_INFO
+ assert (cnt <= DL_RO_DYN_TEMP_CNT);
+ }
+#endif
+ if (info[DT_PLTREL] != NULL)
+ {
+#if ELF_MACHINE_NO_RELA
+ assert (info[DT_PLTREL]->d_un.d_val == DT_REL);
+#elif ELF_MACHINE_NO_REL
+ assert (info[DT_PLTREL]->d_un.d_val == DT_RELA);
+#else
+ assert (info[DT_PLTREL]->d_un.d_val == DT_REL
+ || info[DT_PLTREL]->d_un.d_val == DT_RELA);
+#endif
+ }
+#if ! ELF_MACHINE_NO_RELA
+ if (info[DT_RELA] != NULL)
+ assert (info[DT_RELAENT]->d_un.d_val == sizeof (ElfW(Rela)));
+# endif
+# if ! ELF_MACHINE_NO_REL
+ if (info[DT_REL] != NULL)
+ assert (info[DT_RELENT]->d_un.d_val == sizeof (ElfW(Rel)));
+#endif
+#ifdef RTLD_BOOTSTRAP
+ /* Only the bind now flags are allowed. */
+ assert (info[VERSYMIDX (DT_FLAGS_1)] == NULL
+ || (info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val & ~DF_1_NOW) == 0);
+ assert (info[DT_FLAGS] == NULL
+ || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0);
+ /* Flags must not be set for ld.so. */
+ assert (info[DT_RUNPATH] == NULL);
+ assert (info[DT_RPATH] == NULL);
+#else
+ if (info[DT_FLAGS] != NULL)
+ {
+ /* Flags are used. Translate to the old form where available.
+ Since these l_info entries are only tested for NULL pointers it
+ is ok if they point to the DT_FLAGS entry. */
+ l->l_flags = info[DT_FLAGS]->d_un.d_val;
+
+ if (l->l_flags & DF_SYMBOLIC)
+ info[DT_SYMBOLIC] = info[DT_FLAGS];
+ if (l->l_flags & DF_TEXTREL)
+ info[DT_TEXTREL] = info[DT_FLAGS];
+ if (l->l_flags & DF_BIND_NOW)
+ info[DT_BIND_NOW] = info[DT_FLAGS];
+ }
+ if (info[VERSYMIDX (DT_FLAGS_1)] != NULL)
+ {
+ l->l_flags_1 = info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val;
+
+ if (l->l_flags_1 & DF_1_NOW)
+ info[DT_BIND_NOW] = info[VERSYMIDX (DT_FLAGS_1)];
+ }
+ if (info[DT_RUNPATH] != NULL)
+ /* If both RUNPATH and RPATH are given, the latter is ignored. */
+ info[DT_RPATH] = NULL;
+#endif
+}
diff --git a/elf/rtld.c b/elf/rtld.c
index 06c4220c03..b0126e51af 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -133,8 +133,10 @@ struct rtld_global _rtld_global =
._dl_nns = 1,
._dl_ns =
{
+#ifdef _LIBC_REENTRANT
[LM_ID_BASE] = { ._ns_unique_sym_table
= { .lock = _RTLD_LOCK_RECURSIVE_INITIALIZER } }
+#endif
}
};
/* If we would use strong_alias here the compiler would see a
@@ -252,15 +254,6 @@ RTLD_START
# error "sysdeps/MACHINE/dl-machine.h fails to define RTLD_START"
#endif
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-#ifndef ADDRIDX
-# define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
-#endif
-
/* This is the second half of _dl_start (below). It can be inlined safely
under DONT_USE_BOOTSTRAP_MAP, where it is careful not to make any GOT
references. When the tools don't permit us to avoid using a GOT entry
@@ -880,6 +873,7 @@ security_init (void)
_dl_random = NULL;
}
+#include "setup-vdso.h"
/* The library search path. */
static const char *library_path attribute_relro;
@@ -1091,7 +1085,8 @@ of this helper program; chances are you did not intend to run this program.\n\
/* Now the map for the main executable is available. */
main_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
- if (GL(dl_rtld_map).l_info[DT_SONAME] != NULL
+ if (__builtin_expect (mode, normal) == normal
+ && GL(dl_rtld_map).l_info[DT_SONAME] != NULL
&& main_map->l_info[DT_SONAME] != NULL
&& strcmp ((const char *) D_PTR (&GL(dl_rtld_map), l_info[DT_STRTAB])
+ GL(dl_rtld_map).l_info[DT_SONAME]->d_un.d_val,
@@ -1335,102 +1330,9 @@ of this helper program; chances are you did not intend to run this program.\n\
}
struct link_map **first_preload = &GL(dl_rtld_map).l_next;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
/* Set up the data structures for the system-supplied DSO early,
so they can influence _dl_init_paths. */
- if (GLRO(dl_sysinfo_dso) != NULL)
- {
- /* Do an abridged version of the work _dl_map_object_from_fd would do
- to map in the object. It's already mapped and prelinked (and
- better be, since it's read-only and so we couldn't relocate it).
- We just want our data structures to describe it as if we had just
- mapped and relocated it normally. */
- struct link_map *l = _dl_new_object ((char *) "", "", lt_library, NULL,
- 0, LM_ID_BASE);
- if (__builtin_expect (l != NULL, 1))
- {
- static ElfW(Dyn) dyn_temp[DL_RO_DYN_TEMP_CNT] attribute_relro;
-
- l->l_phdr = ((const void *) GLRO(dl_sysinfo_dso)
- + GLRO(dl_sysinfo_dso)->e_phoff);
- l->l_phnum = GLRO(dl_sysinfo_dso)->e_phnum;
- for (uint_fast16_t i = 0; i < l->l_phnum; ++i)
- {
- const ElfW(Phdr) *const ph = &l->l_phdr[i];
- if (ph->p_type == PT_DYNAMIC)
- {
- l->l_ld = (void *) ph->p_vaddr;
- l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn));
- }
- else if (ph->p_type == PT_LOAD)
- {
- if (! l->l_addr)
- l->l_addr = ph->p_vaddr;
- if (ph->p_vaddr + ph->p_memsz >= l->l_map_end)
- l->l_map_end = ph->p_vaddr + ph->p_memsz;
- if ((ph->p_flags & PF_X)
- && ph->p_vaddr + ph->p_memsz >= l->l_text_end)
- l->l_text_end = ph->p_vaddr + ph->p_memsz;
- }
- else
- /* There must be no TLS segment. */
- assert (ph->p_type != PT_TLS);
- }
- l->l_map_start = (ElfW(Addr)) GLRO(dl_sysinfo_dso);
- l->l_addr = l->l_map_start - l->l_addr;
- l->l_map_end += l->l_addr;
- l->l_text_end += l->l_addr;
- l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr);
- elf_get_dynamic_info (l, dyn_temp);
- _dl_setup_hash (l);
- l->l_relocated = 1;
-
- /* The vDSO is always used. */
- l->l_used = 1;
-
- /* Initialize l_local_scope to contain just this map. This allows
- the use of dl_lookup_symbol_x to resolve symbols within the vdso.
- So we create a single entry list pointing to l_real as its only
- element */
- l->l_local_scope[0]->r_nlist = 1;
- l->l_local_scope[0]->r_list = &l->l_real;
-
- /* Now that we have the info handy, use the DSO image's soname
- so this object can be looked up by name. Note that we do not
- set l_name here. That field gives the file name of the DSO,
- and this DSO is not associated with any file. */
- if (l->l_info[DT_SONAME] != NULL)
- {
- /* Work around a kernel problem. The kernel cannot handle
- addresses in the vsyscall DSO pages in writev() calls. */
- const char *dsoname = ((char *) D_PTR (l, l_info[DT_STRTAB])
- + l->l_info[DT_SONAME]->d_un.d_val);
- size_t len = strlen (dsoname);
- char *copy = malloc (len);
- if (copy == NULL)
- _dl_fatal_printf ("out of memory\n");
- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
- }
-
- /* Add the vDSO to the object list. */
- _dl_add_to_namespace_list (l, LM_ID_BASE);
-
- /* Rearrange the list so this DSO appears after rtld_map. */
- assert (l->l_next == NULL);
- assert (l->l_prev == main_map);
- GL(dl_rtld_map).l_next = l;
- l->l_prev = &GL(dl_rtld_map);
- first_preload = &l->l_next;
-
- /* We have a prelinked DSO preloaded by the system. */
- GLRO(dl_sysinfo_map) = l;
-# ifdef NEED_DL_SYSINFO
- if (GLRO(dl_sysinfo) == DL_SYSINFO_DEFAULT)
- GLRO(dl_sysinfo) = GLRO(dl_sysinfo_dso)->e_entry + l->l_addr;
-# endif
- }
- }
-#endif
+ setup_vdso (main_map, &first_preload);
#ifdef DL_SYSDEP_OSCHECK
DL_SYSDEP_OSCHECK (_dl_fatal_printf);
@@ -2406,7 +2308,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
_dl_debug_state ();
LIBC_PROBE (init_complete, 2, LM_ID_BASE, r);
-#ifndef MAP_COPY
+#if defined USE_LDCONFIG && !defined MAP_COPY
/* We must munmap() the cache file. */
_dl_unload_cache ();
#endif
diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h
new file mode 100644
index 0000000000..f8f348a5f2
--- /dev/null
+++ b/elf/setup-vdso.h
@@ -0,0 +1,121 @@
+/* Set up the data structures for the system-supplied DSO.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+static inline void __attribute__ ((always_inline))
+setup_vdso (struct link_map *main_map __attribute__ ((unused)),
+ struct link_map ***first_preload __attribute__ ((unused)))
+{
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ if (GLRO(dl_sysinfo_dso) == NULL)
+ return;
+
+ /* Do an abridged version of the work _dl_map_object_from_fd would do
+ to map in the object. It's already mapped and prelinked (and
+ better be, since it's read-only and so we couldn't relocate it).
+ We just want our data structures to describe it as if we had just
+ mapped and relocated it normally. */
+ struct link_map *l = _dl_new_object ((char *) "", "", lt_library, NULL,
+ 0, LM_ID_BASE);
+ if (__builtin_expect (l != NULL, 1))
+ {
+ static ElfW(Dyn) dyn_temp[DL_RO_DYN_TEMP_CNT] attribute_relro;
+
+ l->l_phdr = ((const void *) GLRO(dl_sysinfo_dso)
+ + GLRO(dl_sysinfo_dso)->e_phoff);
+ l->l_phnum = GLRO(dl_sysinfo_dso)->e_phnum;
+ for (uint_fast16_t i = 0; i < l->l_phnum; ++i)
+ {
+ const ElfW(Phdr) *const ph = &l->l_phdr[i];
+ if (ph->p_type == PT_DYNAMIC)
+ {
+ l->l_ld = (void *) ph->p_vaddr;
+ l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn));
+ }
+ else if (ph->p_type == PT_LOAD)
+ {
+ if (! l->l_addr)
+ l->l_addr = ph->p_vaddr;
+ if (ph->p_vaddr + ph->p_memsz >= l->l_map_end)
+ l->l_map_end = ph->p_vaddr + ph->p_memsz;
+ if ((ph->p_flags & PF_X)
+ && ph->p_vaddr + ph->p_memsz >= l->l_text_end)
+ l->l_text_end = ph->p_vaddr + ph->p_memsz;
+ }
+ else
+ /* There must be no TLS segment. */
+ assert (ph->p_type != PT_TLS);
+ }
+ l->l_map_start = (ElfW(Addr)) GLRO(dl_sysinfo_dso);
+ l->l_addr = l->l_map_start - l->l_addr;
+ l->l_map_end += l->l_addr;
+ l->l_text_end += l->l_addr;
+ l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr);
+ elf_get_dynamic_info (l, dyn_temp);
+ _dl_setup_hash (l);
+ l->l_relocated = 1;
+
+ /* The vDSO is always used. */
+ l->l_used = 1;
+
+ /* Initialize l_local_scope to contain just this map. This allows
+ the use of dl_lookup_symbol_x to resolve symbols within the vdso.
+ So we create a single entry list pointing to l_real as its only
+ element */
+ l->l_local_scope[0]->r_nlist = 1;
+ l->l_local_scope[0]->r_list = &l->l_real;
+
+ /* Now that we have the info handy, use the DSO image's soname
+ so this object can be looked up by name. Note that we do not
+ set l_name here. That field gives the file name of the DSO,
+ and this DSO is not associated with any file. */
+ if (l->l_info[DT_SONAME] != NULL)
+ {
+ /* Work around a kernel problem. The kernel cannot handle
+ addresses in the vsyscall DSO pages in writev() calls. */
+ const char *dsoname = ((char *) D_PTR (l, l_info[DT_STRTAB])
+ + l->l_info[DT_SONAME]->d_un.d_val);
+ size_t len = strlen (dsoname);
+ char *copy = malloc (len);
+ if (copy == NULL)
+ _dl_fatal_printf ("out of memory\n");
+ l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
+ }
+
+ /* Add the vDSO to the object list. */
+ _dl_add_to_namespace_list (l, LM_ID_BASE);
+
+# ifdef IS_IN_rtld
+ /* Rearrange the list so this DSO appears after rtld_map. */
+ assert (l->l_next == NULL);
+ assert (l->l_prev == main_map);
+ GL(dl_rtld_map).l_next = l;
+ l->l_prev = &GL(dl_rtld_map);
+ *first_preload = &l->l_next;
+# else
+ GL(dl_nns) = 1;
+# endif
+
+ /* We have a prelinked DSO preloaded by the system. */
+ GLRO(dl_sysinfo_map) = l;
+# ifdef NEED_DL_SYSINFO
+ if (GLRO(dl_sysinfo) == DL_SYSINFO_DEFAULT)
+ GLRO(dl_sysinfo) = GLRO(dl_sysinfo_dso)->e_entry + l->l_addr;
+# endif
+ }
+#endif
+}
diff --git a/elf/tst-array1.c b/elf/tst-array1.c
index 4d78db6167..ca9bdf4079 100644
--- a/elf/tst-array1.c
+++ b/elf/tst-array1.c
@@ -60,7 +60,7 @@ init_2 (void)
write (STDOUT_FILENO, "init array 2\n", 13);
}
-void (*const init_array []) (void)
+void (*init_array []) (void)
__attribute__ ((section (".init_array"), aligned (sizeof (void *)))) =
{
&init_0,
@@ -86,7 +86,7 @@ fini_2 (void)
write (STDOUT_FILENO, "fini array 2\n", 13);
}
-void (*const fini_array []) (void)
+void (*fini_array []) (void)
__attribute__ ((section (".fini_array"), aligned (sizeof (void *)))) =
{
&fini_0,
diff --git a/elf/tst-array2dep.c b/elf/tst-array2dep.c
index e1596b5b37..2812761a09 100644
--- a/elf/tst-array2dep.c
+++ b/elf/tst-array2dep.c
@@ -34,7 +34,7 @@ init_2 (void)
write (STDOUT_FILENO, "DSO init array 2\n", 17);
}
-void (*const init_array []) (void)
+void (*init_array []) (void)
__attribute__ ((section (".init_array"), aligned (sizeof (void *)))) =
{
&init_0,
@@ -60,7 +60,7 @@ fini_2 (void)
write (STDOUT_FILENO, "DSO fini array 2\n", 17);
}
-void (*const fini_array []) (void)
+void (*fini_array []) (void)
__attribute__ ((section (".fini_array"), aligned (sizeof (void *)))) =
{
&fini_0,
diff --git a/elf/tst-leaks1-static.c b/elf/tst-leaks1-static.c
new file mode 100644
index 0000000000..b956d66905
--- /dev/null
+++ b/elf/tst-leaks1-static.c
@@ -0,0 +1 @@
+#include "tst-leaks1.c"
diff --git a/elf/tst-pathopt.sh b/elf/tst-pathopt.sh
index c79b47b04d..2f8bfc689a 100755
--- a/elf/tst-pathopt.sh
+++ b/elf/tst-pathopt.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test lookup path optimization.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,8 +17,10 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
-run_program_prefix=$2
+test_wrapper_env=$2
test -e ${common_objpfx}elf/will-be-empty &&
rm -fr ${common_objpfx}elf/will-be-empty
@@ -28,6 +29,7 @@ test -d ${common_objpfx}elf/for-renamed ||
cp ${common_objpfx}elf/pathoptobj.so ${common_objpfx}elf/for-renamed/renamed.so
+${test_wrapper_env} \
LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
LC_ALL=C LD_LIBRARY_PATH=${common_objpfx}elf/will-be-empty:${common_objpfx}elf/for-renamed:${common_objpfx}.:${common_objpfx}dlfcn \
${common_objpfx}elf/ld.so ${common_objpfx}elf/tst-pathopt \
diff --git a/intl/tst-codeset.sh b/elf/tst-rtld-load-self.sh
index 1584490aeb..18723a9bad 100644..100755
--- a/intl/tst-codeset.sh
+++ b/elf/tst-rtld-load-self.sh
@@ -1,6 +1,6 @@
#! /bin/sh
-# Test of bind_textdomain_codeset.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+# Test how rtld loads itself.
+# Copyright (C) 2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
@@ -18,25 +18,32 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
-common_objpfx=$1
-objpfx=$2
+set -e
-LC_ALL=C
-export LC_ALL
+rtld=$1
+test_wrapper=$2
+test_wrapper_env=$3
+result=0
-# Generate the test data.
-msgfmt -o ${objpfx}codeset.mo.$$ tstcodeset.po || exit
-# Create the domain directories.
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
-# Populate them.
-mv -f ${objpfx}codeset.mo.$$ ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
+echo '# normal mode'
+${test_wrapper} $rtld $rtld 2>&1 && rc=0 || rc=$?
+echo "# exit status $rc"
+test $rc -le 127 || result=1
-GCONV_PATH=${common_objpfx}iconvdata
-export GCONV_PATH
-LOCPATH=${common_objpfx}localedata
-export LOCPATH
+echo '# list mode'
+${test_wrapper} $rtld --list $rtld 2>&1 && rc=0 || rc=$?
+echo "# exit status $rc"
+test $rc -eq 0 || result=1
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
-${objpfx}tst-codeset > ${objpfx}tst-codeset.out
+echo '# verify mode'
+${test_wrapper} $rtld --verify $rtld 2>&1 && rc=0 || rc=$?
+echo "# exit status $rc"
+test $rc -eq 2 || result=1
-exit $?
+echo '# trace mode'
+${test_wrapper_env} LD_TRACE_LOADED_OBJECTS=1 \
+ $rtld $rtld 2>&1 && rc=0 || rc=$?
+echo "# exit status $rc"
+test $rc -eq 0 || result=1
+
+exit $result
diff --git a/elf/tst-unique1mod1.c b/elf/tst-unique1mod1.c
index ccc74fae3e..f59029d055 100644
--- a/elf/tst-unique1mod1.c
+++ b/elf/tst-unique1mod1.c
@@ -1,12 +1,9 @@
#include <config.h>
#ifdef HAVE_ASM_UNIQUE_OBJECT
-# define S(s) _S (s)
-# define _S(s) #s
-
asm (".data;"
".globl var\n"
- ".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
+ ".type var, %gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
".previous");
diff --git a/elf/tst-unique1mod2.c b/elf/tst-unique1mod2.c
index 4f1fec0087..aa28f29ba9 100644
--- a/elf/tst-unique1mod2.c
+++ b/elf/tst-unique1mod2.c
@@ -1,12 +1,9 @@
#include <config.h>
#ifdef HAVE_ASM_UNIQUE_OBJECT
-# define S(s) _S (s)
-# define _S(s) #s
-
asm (".data;"
".globl var\n"
- ".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
+ ".type var, %gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
".previous");
diff --git a/elf/tst-unique2mod1.c b/elf/tst-unique2mod1.c
index 18b14db433..b7e491b2e5 100644
--- a/elf/tst-unique2mod1.c
+++ b/elf/tst-unique2mod1.c
@@ -1,12 +1,9 @@
#include <config.h>
#ifdef HAVE_ASM_UNIQUE_OBJECT
-# define S(s) _S (s)
-# define _S(s) #s
-
asm (".data;"
".globl var\n"
- ".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
+ ".type var, %gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
".previous");
diff --git a/elf/tst-unique2mod2.c b/elf/tst-unique2mod2.c
index 4f1fec0087..aa28f29ba9 100644
--- a/elf/tst-unique2mod2.c
+++ b/elf/tst-unique2mod2.c
@@ -1,12 +1,9 @@
#include <config.h>
#ifdef HAVE_ASM_UNIQUE_OBJECT
-# define S(s) _S (s)
-# define _S(s) #s
-
asm (".data;"
".globl var\n"
- ".type var, " S (ASM_TYPE_DIRECTIVE_PREFIX) "gnu_unique_object\n"
+ ".type var, %gnu_unique_object\n"
".size var, 4\n"
"var:.zero 4\n"
".previous");
diff --git a/grp/Makefile b/grp/Makefile
index 127310f0de..99ea3a2e68 100644
--- a/grp/Makefile
+++ b/grp/Makefile
@@ -1,5 +1,4 @@
-# Copyright (C) 1991,1992,1996-2000,2003,2004,2012
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -39,25 +38,24 @@ include ../Rules
ifeq ($(have-thread-library),yes)
-CFLAGS-getgrgid_r.c = -DUSE_NSCD=1 -fexceptions
-CFLAGS-getgrnam_r.c = -DUSE_NSCD=1 -fexceptions
+CFLAGS-getgrgid_r.c = -fexceptions
+CFLAGS-getgrnam_r.c = -fexceptions
CFLAGS-getgrent_r.c = -fexceptions
CFLAGS-getgrent.c = -fexceptions
CFLAGS-fgetgrent.c = -fexceptions
-CFLAGS-fgetgrent_r.c = -fexceptions -D_IO_MTSAFE_IO
-CFLAGS-putgrent.c = -fexceptions -D_IO_MTSAFE_IO
-CFLAGS-initgroups.c = -DUSE_NSCD=1 -fexceptions
+CFLAGS-fgetgrent_r.c = -fexceptions $(libio-mtsafe)
+CFLAGS-putgrent.c = -fexceptions $(libio-mtsafe)
+CFLAGS-initgroups.c = -fexceptions
CFLAGS-getgrgid.c = -fexceptions
endif
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
# tst_fgetgrent currently only works with shared libraries
ifeq (yes,$(build-shared))
tests: $(objpfx)tst_fgetgrent.out
$(objpfx)tst_fgetgrent.out: tst_fgetgrent.sh $(objpfx)tst_fgetgrent
- $(SHELL) -e tst_fgetgrent.sh $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name)
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
endif
diff --git a/grp/initgroups.c b/grp/initgroups.c
index 62fd1fc6de..fad30a75f0 100644
--- a/grp/initgroups.c
+++ b/grp/initgroups.c
@@ -180,7 +180,7 @@ getgrouplist (const char *user, gid_t group, gid_t *groups, int *ngroups)
return retval;
}
-static_link_warning (getgrouplist)
+nss_interface_function (getgrouplist)
/* Initialize the group set for the current user
by reading the group database and using all groups
@@ -230,4 +230,4 @@ initgroups (const char *user, gid_t group)
#endif
}
-static_link_warning (initgroups)
+nss_interface_function (initgroups)
diff --git a/grp/tst_fgetgrent.sh b/grp/tst_fgetgrent.sh
index cb80e73ded..0f21ee8e3e 100644
--- a/grp/tst_fgetgrent.sh
+++ b/grp/tst_fgetgrent.sh
@@ -1,8 +1,7 @@
#! /bin/sh
-# Copyright (C) 1999 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1999.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,25 +17,25 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
-elf_objpfx=$1; shift
-rtld_installed_name=$1; shift
+run_program_prefix=$1; shift
testout=${common_objpfx}/grp/tst_fgetgrent.out
-library_path=${common_objpfx}
result=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 0 > ${testout} || result=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 1 >> ${testout} || result=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 2 >> ${testout} || result=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}grp/tst_fgetgrent 3 >> ${testout} || result=1
exit $result
diff --git a/gshadow/Makefile b/gshadow/Makefile
index a482c5d702..2cb714fde9 100644
--- a/gshadow/Makefile
+++ b/gshadow/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -29,8 +29,8 @@ tests = tst-gshadow
CFLAGS-getsgent_r.c = -fexceptions
CFLAGS-getsgent.c = -fexceptions
CFLAGS-fgetsgent.c = -fexceptions
-CFLAGS-fgetsgent_r.c = -fexceptions -D_IO_MTSAFE_IO
-CFLAGS-putsgent.c = -fexceptions -D_IO_MTSAFE_IO
+CFLAGS-fgetsgent_r.c = -fexceptions $(libio-mtsafe)
+CFLAGS-putsgent.c = -fexceptions $(libio-mtsafe)
CFLAGS-getsgnam.c = -fexceptions
CFLAGS-getsgnam_r.c = -fexceptions
diff --git a/gshadow/getsgent.c b/gshadow/getsgent.c
index 1242deecbb..e7998e9ec3 100644
--- a/gshadow/getsgent.c
+++ b/gshadow/getsgent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2009.
@@ -26,4 +26,7 @@
#define DATABASE_NAME gshadow
#define BUFLEN 1024
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXent.c"
diff --git a/gshadow/getsgent_r.c b/gshadow/getsgent_r.c
index 7b1df5357c..546251ca76 100644
--- a/gshadow/getsgent_r.c
+++ b/gshadow/getsgent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2009.
@@ -27,4 +27,7 @@
#define BUFLEN 1024
#define NO_COMPAT_NEEDED 1
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXent_r.c"
diff --git a/gshadow/getsgnam.c b/gshadow/getsgnam.c
index 203c21076b..2ee20a1c37 100644
--- a/gshadow/getsgnam.c
+++ b/gshadow/getsgnam.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2009.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES name
#define BUFLEN 1024
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/gshadow/getsgnam_r.c b/gshadow/getsgnam_r.c
index 9e00f6e66d..a18f3df36b 100644
--- a/gshadow/getsgnam_r.c
+++ b/gshadow/getsgnam_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2009.
@@ -27,4 +27,7 @@
#define BUFLEN 1024
#define NO_COMPAT_NEEDED 1
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/hurd/lookup-retry.c b/hurd/lookup-retry.c
index 4fa2a2199c..c95ca0f64e 100644
--- a/hurd/lookup-retry.c
+++ b/hurd/lookup-retry.c
@@ -24,6 +24,7 @@
#include <fcntl.h>
#include <string.h>
#include <_itoa.h>
+#include <eloop-threshold.h>
/* Translate the error from dir_lookup into the error the user sees. */
static inline error_t
@@ -103,7 +104,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
/* Fall through. */
case FS_RETRY_NORMAL:
- if (nloops++ >= SYMLOOP_MAX)
+ if (nloops++ >= __eloop_threshold ())
{
__mach_port_deallocate (__mach_task_self (), *result);
return ELOOP;
@@ -180,7 +181,7 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
dirport = INIT_PORT_CRDIR;
if (*result != MACH_PORT_NULL)
__mach_port_deallocate (__mach_task_self (), *result);
- if (nloops++ >= SYMLOOP_MAX)
+ if (nloops++ >= __eloop_threshold ())
return ELOOP;
file_name = &retryname[1];
break;
diff --git a/iconv/Makefile b/iconv/Makefile
index 6d7791103f..4724d4f9ac 100644
--- a/iconv/Makefile
+++ b/iconv/Makefile
@@ -69,7 +69,7 @@ $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
$(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
$(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
-ifneq ($(cross-compiling),yes)
+ifeq ($(run-built-tests),yes)
xtests: test-iconvconfig
endif
diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
index a081205106..01015e8749 100644
--- a/iconv/gconv_db.c
+++ b/iconv/gconv_db.c
@@ -1,6 +1,5 @@
/* Provide access to the collection of available transformation modules.
- Copyright (C) 1997-2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -193,10 +192,13 @@ free_derivation (void *p)
}
/* Free the name strings. */
- free ((char *) deriv->steps[0].__from_name);
- free ((char *) deriv->steps[deriv->nsteps - 1].__to_name);
+ if (deriv->steps != NULL)
+ {
+ free ((char *) deriv->steps[0].__from_name);
+ free ((char *) deriv->steps[deriv->nsteps - 1].__to_name);
+ free ((struct __gconv_step *) deriv->steps);
+ }
- free ((struct __gconv_step *) deriv->steps);
free (deriv);
}
diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c
index df28e1c3a1..1a0de35217 100644
--- a/iconv/iconv_charmap.c
+++ b/iconv/iconv_charmap.c
@@ -154,8 +154,6 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap,
else
do
{
- struct stat st;
- char *addr;
int fd;
if (verbose)
@@ -176,6 +174,8 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap,
}
#ifdef _POSIX_MAPPED_FILES
+ struct stat st;
+ char *addr;
/* We have possibilities for reading the input file. First try
to mmap() it since this will provide the fastest solution. */
if (fstat (fd, &st) == 0
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index eac51ba572..2840cff9ce 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2008, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -267,7 +267,7 @@ endif # build-shared = yes
include ../Rules
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
ifeq (yes,$(build-shared))
tests: $(objpfx)iconv-test.out $(objpfx)tst-tables.out
ifneq (no,$(PERL))
@@ -299,12 +299,13 @@ $(objpfx)tst-iconv7.out: $(objpfx)gconv-modules \
$(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so)) \
$(common-objdir)/iconv/iconv_prog TESTS
- $(SHELL) -e $< $(common-objdir) > $@
+ $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@
$(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so)) \
$(objpfx)tst-table-from $(objpfx)tst-table-to
- $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ > $@
+ $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \
+ '$(run-program-prefix)' > $@
do-tests-clean common-mostlyclean: tst-tables-clean
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh
index 60be69f628..ec8f024cc9 100755
--- a/iconvdata/run-iconv-test.sh
+++ b/iconvdata/run-iconv-test.sh
@@ -1,9 +1,8 @@
#! /bin/sh -f
# Run available iconv(1) tests.
-# Copyright (C) 1998-2002, 2005, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -19,7 +18,10 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
codir=$1
+test_wrapper="$2"
# We use always the same temporary file.
temp1=$codir/iconvdata/iconv-test.xxx
@@ -38,6 +40,7 @@ LIBPATH=$codir:$codir/iconvdata
# How the start the iconv(1) program.
ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
$codir/iconv/iconv_prog'
+ICONV="$test_wrapper $ICONV"
# Which echo?
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
@@ -60,7 +63,7 @@ while read from to subset targets; do
for t in $targets; do
if test -f testdata/$from; then
echo $ac_n " test data: $from -> $t $ac_c"
- $PROG -f $from -t $t testdata/$from > $temp1 ||
+ $PROG -f $from -t $t testdata/$from < /dev/null > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
@@ -70,7 +73,7 @@ while read from to subset targets; do
echo $ac_n "/OK$ac_c"
fi
echo $ac_n " -> $from $ac_c"
- $PROG -f $t -t $to -o $temp2 $temp1 ||
+ $PROG -f $t -t $to -o $temp2 $temp1 < /dev/null ||
{ if test $? -gt 128; then exit 1; fi
echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
@@ -86,7 +89,7 @@ while read from to subset targets; do
# set. Otherwise we convert to all the TARGETS.
if test $subset = Y; then
echo $ac_n " suntzu: $from -> $t -> $to $ac_c"
- $PROG -f $from -t $t testdata/suntzus |
+ $PROG -f $from -t $t testdata/suntzus < /dev/null |
$PROG -f $t -t $to > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
echo "FAILED"; failed=1; continue; }
@@ -105,7 +108,7 @@ while read from to subset targets; do
! grep '<U....><U....>' ../localedata/charmaps/$from > /dev/null; then
echo $ac_n "test charmap: $from -> $t $ac_c"
$PROG -f ../localedata/charmaps/$from -t ../localedata/charmaps/$tc \
- testdata/$from > $temp1 ||
+ testdata/$from < /dev/null > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
@@ -116,7 +119,7 @@ while read from to subset targets; do
fi
echo $ac_n " -> $from $ac_c"
$PROG -t ../localedata/charmaps/$from -f ../localedata/charmaps/$tc \
- -o $temp2 $temp1 ||
+ -o $temp2 $temp1 < /dev/null ||
{ if test $? -gt 128; then exit 1; fi
echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
@@ -131,7 +134,7 @@ while read from to subset targets; do
if test "$subset" = N; then
echo $ac_n " suntzu: ASCII -> $to -> ASCII $ac_c"
- $PROG -f ASCII -t $to testdata/suntzus |
+ $PROG -f ASCII -t $to testdata/suntzus < /dev/null |
$PROG -f $to -t ASCII > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
echo "FAILED"; failed=1; continue; }
diff --git a/iconvdata/tst-table.sh b/iconvdata/tst-table.sh
index 05f7c6f175..5283ad5f5d 100755
--- a/iconvdata/tst-table.sh
+++ b/iconvdata/tst-table.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
#
@@ -23,8 +23,9 @@
common_objpfx=$1
objpfx=$2
-charset=$3
-charmap=$4
+run_program_prefix=$3
+charset=$4
+charmap=$5
GCONV_PATH=${common_objpfx}iconvdata
export GCONV_PATH
@@ -34,7 +35,7 @@ export LC_ALL
set -e
# Get the charmap.
-${SHELL} tst-table-charmap.sh ${charmap:-$charset} \
+./tst-table-charmap.sh ${charmap:-$charset} \
< ../localedata/charmaps/${charmap:-$charset} \
> ${objpfx}tst-${charset}.charmap.table
# When the charset is GB18030, truncate this table because for this encoding,
@@ -59,12 +60,12 @@ else
fi
# iconv in one direction.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-table-from ${charset} \
> ${objpfx}tst-${charset}.table
# iconv in the other direction.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-table-to ${charset} | sort \
> ${objpfx}tst-${charset}.inverse.table
diff --git a/iconvdata/tst-tables.sh b/iconvdata/tst-tables.sh
index b66d484d13..77d9d182c7 100755
--- a/iconvdata/tst-tables.sh
+++ b/iconvdata/tst-tables.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2000-2004,2007,2011 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
#
@@ -23,6 +23,7 @@
common_objpfx=$1
objpfx=$2
+run_program_prefix=$3
status=0
@@ -261,7 +262,8 @@ while read charset charmap; do
if test "$charset" = GB18030; then echo "This might take a while" 1>&2; fi
case ${charset} in \#*) continue;; esac
echo -n "Testing ${charset}" 1>&2
- if ${SHELL} tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}; then
+ if ./tst-table.sh ${common_objpfx} ${objpfx} "${run_program_prefix}" \
+ ${charset} ${charmap} < /dev/null; then
echo 1>&2
else
echo "failed: ./tst-table.sh ${common_objpfx} ${objpfx} ${charset} ${charmap}"
diff --git a/include/atomic.h b/include/atomic.h
index 3ccb46d9ed..bc20772f2b 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -198,8 +198,12 @@
/* Add VALUE to *MEM and return the old value of *MEM. */
-#ifndef atomic_exchange_and_add
-# define atomic_exchange_and_add(mem, value) \
+#ifndef atomic_exchange_and_add_acq
+# ifdef atomic_exchange_and_add
+# define atomic_exchange_and_add_acq(mem, value) \
+ atomic_exchange_and_add (mem, value)
+# else
+# define atomic_exchange_and_add_acq(mem, value) \
({ __typeof (*(mem)) __atg6_oldval; \
__typeof (mem) __atg6_memp = (mem); \
__typeof (*(mem)) __atg6_value = (value); \
@@ -213,8 +217,18 @@
__atg6_oldval), 0)); \
\
__atg6_oldval; })
+# endif
#endif
+#ifndef atomic_exchange_and_add_rel
+# define atomic_exchange_and_add_rel(mem, value) \
+ atomic_exchange_and_add_acq(mem, value)
+#endif
+
+#ifndef atomic_exchange_and_add
+# define atomic_exchange_and_add(mem, value) \
+ atomic_exchange_and_add_acq(mem, value)
+#endif
#ifndef catomic_exchange_and_add
# define catomic_exchange_and_add(mem, value) \
diff --git a/include/dirent.h b/include/dirent.h
index 8e4823ce73..096a9771a1 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -30,6 +30,10 @@ extern int __scandir64 (const char * __dir,
int (*__selector) (const struct dirent64 *),
int (*__cmp) (const struct dirent64 **,
const struct dirent64 **));
+extern __ssize_t __getdirentries (int __fd, char *__restrict __buf,
+ size_t __nbytes,
+ __off_t *__restrict __basep)
+ __THROW __nonnull ((2, 4));
extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
internal_function;
extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
diff --git a/include/ifunc-impl-list.h b/include/ifunc-impl-list.h
new file mode 100644
index 0000000000..36444d3766
--- /dev/null
+++ b/include/ifunc-impl-list.h
@@ -0,0 +1,56 @@
+/* Internal header file for __libc_supported_implementations.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _IFUNC_IMPL_LIST_H
+#define _IFUNC_IMPL_LIST_H 1
+
+#include <stdbool.h>
+#include <stddef.h>
+
+struct libc_ifunc_impl
+{
+ /* The name of function to be tested. */
+ const char *name;
+ /* The address of function to be tested. */
+ void (*fn) (void);
+ /* True if this implementation is usable on this machine. */
+ bool usable;
+};
+
+/* Add an IFUNC implementation, IMPL, for function FUNC, to ARRAY with
+ USABLE at index I and advance I by one. */
+#define IFUNC_IMPL_ADD(array, i, func, usable, impl) \
+ extern __typeof (func) impl attribute_hidden; \
+ (array)[i++] = (struct libc_ifunc_impl) { #impl, (void (*) (void)) impl, (usable) };
+
+/* Return the number of IFUNC implementations, N, for function FUNC if
+ string NAME matches FUNC. */
+#define IFUNC_IMPL(n, name, func, ...) \
+ if (strcmp (name, #func) == 0) \
+ { \
+ __VA_ARGS__; \
+ return n; \
+ }
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+ NAME and return the number of valid entries. */
+extern size_t __libc_ifunc_impl_list (const char *name,
+ struct libc_ifunc_impl *array,
+ size_t max);
+
+#endif /* ifunc-impl-list.h */
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index da8730d2bc..a626d593db 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -27,8 +27,6 @@
It should define for us the following symbols:
* HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
- * ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
- or leave it undefined if there is no .type directive.
* HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
* HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
@@ -252,37 +250,26 @@ for linking")
thinks it is. */
#define declare_symbol_alias(symbol, original, type, size) \
declare_symbol_alias_1 (symbol, original, type, size)
-#ifdef ASM_TYPE_DIRECTIVE_PREFIX
-# ifdef __ASSEMBLER__
-# define declare_symbol_alias_1(symbol, original, type, size) \
- strong_alias (original, symbol); \
- .type C_SYMBOL_NAME (symbol), \
- declare_symbol_alias_1_paste (ASM_TYPE_DIRECTIVE_PREFIX, type); \
- .size C_SYMBOL_NAME (symbol), size
-# define declare_symbol_alias_1_paste(a, b) \
- declare_symbol_alias_1_paste_1 (a,b)
-# define declare_symbol_alias_1_paste_1(a,b) a##b
-# else /* Not __ASSEMBLER__. */
-# define declare_symbol_alias_1(symbol, original, type, size) \
- asm (".globl " __SYMBOL_PREFIX #symbol \
- "\n\t" declare_symbol_alias_1_alias (symbol, original) \
- "\n\t.type " __SYMBOL_PREFIX #symbol ", " \
- declare_symbol_alias_1_stringify (ASM_TYPE_DIRECTIVE_PREFIX) #type \
- "\n\t.size " __SYMBOL_PREFIX #symbol ", " #size);
-# define declare_symbol_alias_1_stringify(x) \
- declare_symbol_alias_1_stringify_1 (x)
-# define declare_symbol_alias_1_stringify_1(x) #x
-# ifdef HAVE_ASM_SET_DIRECTIVE
-# define declare_symbol_alias_1_alias(symbol, original) \
- ".set " __SYMBOL_PREFIX #symbol ", " __SYMBOL_PREFIX #original
-# else
-# define declare_symbol_alias_1_alias(symbol, original) \
- __SYMBOL_PREFIX #symbol " = " __SYMBOL_PREFIX #original
-# endif /* HAVE_ASM_SET_DIRECTIVE */
-# endif /* __ASSEMBLER__ */
-#else
-# define declare_symbol_1(symbol, type, size) /* Nothing. */
-#endif
+#ifdef __ASSEMBLER__
+# define declare_symbol_alias_1(symbol, original, type, size) \
+ strong_alias (original, symbol); \
+ .type C_SYMBOL_NAME (symbol), %##type; \
+ .size C_SYMBOL_NAME (symbol), size
+#else /* Not __ASSEMBLER__. */
+# define declare_symbol_alias_1(symbol, original, type, size) \
+ asm (".globl " __SYMBOL_PREFIX #symbol \
+ "\n\t" declare_symbol_alias_1_alias (symbol, original) \
+ "\n\t.type " __SYMBOL_PREFIX #symbol ", " \
+ "%" #type \
+ "\n\t.size " __SYMBOL_PREFIX #symbol ", " #size);
+# ifdef HAVE_ASM_SET_DIRECTIVE
+# define declare_symbol_alias_1_alias(symbol, original) \
+ ".set " __SYMBOL_PREFIX #symbol ", " __SYMBOL_PREFIX #original
+# else
+# define declare_symbol_alias_1_alias(symbol, original) \
+ __SYMBOL_PREFIX #symbol " = " __SYMBOL_PREFIX #original
+# endif /* HAVE_ASM_SET_DIRECTIVE */
+#endif /* __ASSEMBLER__ */
/*
diff --git a/include/rounding-mode.h b/include/rounding-mode.h
new file mode 100644
index 0000000000..bde41e7b1e
--- /dev/null
+++ b/include/rounding-mode.h
@@ -0,0 +1,65 @@
+/* Handle floating-point rounding mode within libc.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _ROUNDING_MODE_H
+#define _ROUNDING_MODE_H 1
+
+#include <fenv.h>
+#include <stdbool.h>
+#include <stdlib.h>
+
+/* Get the architecture-specific definition of how to determine the
+ rounding mode in libc. This header must also define the FE_*
+ macros for any standard rounding modes the architecture does not
+ have in <fenv.h>, to arbitrary distinct values. */
+#include <get-rounding-mode.h>
+
+/* Return true if a number should be rounded away from zero in
+ rounding mode MODE, false otherwise. NEGATIVE is true if the
+ number is negative, false otherwise. LAST_DIGIT_ODD is true if the
+ last digit of the truncated value (last bit for binary) is odd,
+ false otherwise. HALF_BIT is true if the number is at least half
+ way from the truncated value to the next value with the
+ least-significant digit in the same place, false otherwise.
+ MORE_BITS is true if the number is not exactly equal to the
+ truncated value or the half-way value, false otherwise. */
+
+static inline bool
+round_away (bool negative, bool last_digit_odd, bool half_bit, bool more_bits,
+ int mode)
+{
+ switch (mode)
+ {
+ case FE_DOWNWARD:
+ return negative && (half_bit || more_bits);
+
+ case FE_TONEAREST:
+ return half_bit && (last_digit_odd || more_bits);
+
+ case FE_TOWARDZERO:
+ return false;
+
+ case FE_UPWARD:
+ return !negative && (half_bit || more_bits);
+
+ default:
+ abort ();
+ }
+}
+
+#endif /* rounding-mode.h */
diff --git a/include/string.h b/include/string.h
index f1077f66ed..d6d859491e 100644
--- a/include/string.h
+++ b/include/string.h
@@ -89,6 +89,7 @@ libc_hidden_proto (__strtok_r)
extern char *__strsep_g (char **__stringp, const char *__delim);
libc_hidden_proto (__strsep_g)
libc_hidden_proto (strnlen)
+libc_hidden_proto (memmem)
libc_hidden_builtin_proto (memchr)
libc_hidden_builtin_proto (memcpy)
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 0a0e4a6533..fd125ecb9c 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -10,11 +10,12 @@ extern void *__mmap64 (void *__addr, size_t __len, int __prot,
extern int __munmap (void *__addr, size_t __len);
extern int __mprotect (void *__addr, size_t __len, int __prot);
+extern int __madvise (void *__addr, size_t __len, int __advice);
+libc_hidden_proto (__madvise)
+
/* This one is Linux specific. */
extern void *__mremap (void *__addr, size_t __old_len,
size_t __new_len, int __flags, ...);
-
-libc_hidden_proto (madvise);
#endif
#endif
diff --git a/include/sys/param.h b/include/sys/param.h
new file mode 100644
index 0000000000..7a0cfb1f24
--- /dev/null
+++ b/include/sys/param.h
@@ -0,0 +1 @@
+#include <misc/sys/param.h>
diff --git a/include/sys/socket.h b/include/sys/socket.h
index e356b75b99..ec088572bd 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -132,11 +132,11 @@ extern int __listen (int __fd, int __n) attribute_hidden;
new socket's descriptor, or -1 for errors. */
extern int __libc_accept (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __addr_len)
- __THROW;
+ __THROW attribute_hidden;
libc_hidden_proto (accept)
extern int __libc_accept4 (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__restrict __addr_len, int __flags)
- __THROW;
+ __THROW attribute_hidden;
/* Return the length of a `sockaddr' structure. */
#ifdef _HAVE_SA_LEN
@@ -148,7 +148,7 @@ libc_hidden_proto (__libc_sa_len)
#endif
#ifdef SOCK_CLOEXEC
-extern int __have_sock_cloexec;
+extern int __have_sock_cloexec attribute_hidden;
/* At lot of other functionality became available at the same time as
SOCK_CLOEXEC. Avoid defining separate variables for all of them
unless it is really necessary. */
diff --git a/include/time.h b/include/time.h
index f056542a10..9be15b9739 100644
--- a/include/time.h
+++ b/include/time.h
@@ -19,7 +19,11 @@ libc_hidden_proto (localtime)
libc_hidden_proto (strftime)
libc_hidden_proto (strptime)
-librt_hidden_proto (clock_gettime)
+extern __typeof (clock_getres) __clock_getres;
+extern __typeof (clock_gettime) __clock_gettime;
+extern __typeof (clock_settime) __clock_settime;
+extern __typeof (clock_nanosleep) __clock_nanosleep;
+extern __typeof (clock_getcpuclockid) __clock_getcpuclockid;
/* Now define the internal interfaces. */
struct tm;
diff --git a/include/unistd.h b/include/unistd.h
index 7971a8a71a..a5cbc5d2fc 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -44,7 +44,7 @@ extern ssize_t __pwrite64 (int __fd, const void *__buf, size_t __n,
__off64_t __offset);
libc_hidden_proto (__pwrite64)
extern ssize_t __libc_pwrite64 (int __fd, const void *__buf, size_t __n,
- __off64_t __offset);
+ __off64_t __offset) attribute_hidden;
extern ssize_t __libc_read (int __fd, void *__buf, size_t __n);
libc_hidden_proto (__libc_read)
extern ssize_t __libc_write (int __fd, const void *__buf, size_t __n);
@@ -173,12 +173,9 @@ extern int __libc_pause (void);
/* Not cancelable variant. */
extern int __pause_nocancel (void) attribute_hidden;
-extern int __have_sock_cloexec;
-/* At lot of other functionality became available at the same time as
- SOCK_CLOEXEC. Avoid defining separate variables for all of them
- unless it is really necessary. */
-#define __have_pipe2 __have_sock_cloexec
-#define __have_dup3 __have_sock_cloexec
+extern int __have_sock_cloexec attribute_hidden;
+extern int __have_pipe2 attribute_hidden;
+extern int __have_dup3 attribute_hidden;
extern int __getlogin_r_loginuid (char *name, size_t namesize)
attribute_hidden;
diff --git a/inet/Makefile b/inet/Makefile
index 80e2d7ab2e..1af5dc70d1 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -56,11 +56,11 @@ include ../Rules
ifeq ($(have-thread-library),yes)
-CFLAGS-gethstbyad_r.c = -DUSE_NSCD=1 -fexceptions
+CFLAGS-gethstbyad_r.c = -fexceptions
CFLAGS-gethstbyad.c = -fexceptions
-CFLAGS-gethstbynm_r.c = -DUSE_NSCD=1 -fexceptions
+CFLAGS-gethstbynm_r.c = -fexceptions
CFLAGS-gethstbynm.c = -fexceptions
-CFLAGS-gethstbynm2_r.c = -DUSE_NSCD=1 -fexceptions
+CFLAGS-gethstbynm2_r.c = -fexceptions
CFLAGS-gethstbynm2.c = -fexceptions
CFLAGS-gethstent_r.c = -fexceptions
CFLAGS-gethstent.c = -fexceptions
@@ -77,8 +77,6 @@ CFLAGS-getrpcent_r.c = -fexceptions
CFLAGS-getrpcent.c = -fexceptions
CFLAGS-getservent_r.c = -fexceptions
CFLAGS-getservent.c = -fexceptions
-CFLAGS-getsrvbynm_r.c = -DUSE_NSCD=1
-CFLAGS-getsrvbypt_r.c = -DUSE_NSCD=1
CFLAGS-getprtent_r.c = -fexceptions
CFLAGS-getprtent.c = -fexceptions
CFLAGS-either_ntoh.c = -fexceptions
diff --git a/inet/getaliasent.c b/inet/getaliasent.c
index 12173db98e..b11ebd6772 100644
--- a/inet/getaliasent.c
+++ b/inet/getaliasent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,4 +22,7 @@
#define GETFUNC_NAME getaliasent
#define BUFLEN 1024
+/* There is no nscd support for the aliases file. */
+#undef USE_NSCD
+
#include "../nss/getXXent.c"
diff --git a/inet/getaliasent_r.c b/inet/getaliasent_r.c
index 702d31d0c3..56a872822e 100644
--- a/inet/getaliasent_r.c
+++ b/inet/getaliasent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ENDFUNC_NAME endaliasent
#define DATABASE_NAME aliases
+/* There is no nscd support for the aliases file. */
+#undef USE_NSCD
+
#include "../nss/getXXent_r.c"
diff --git a/inet/getaliasname.c b/inet/getaliasname.c
index e744c906d0..4d6ef74d61 100644
--- a/inet/getaliasname.c
+++ b/inet/getaliasname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES name
#define BUFLEN 1024
+/* There is no nscd support for the aliases file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getaliasname_r.c b/inet/getaliasname_r.c
index 5b21bec576..5333e75324 100644
--- a/inet/getaliasname_r.c
+++ b/inet/getaliasname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
+/* There is no nscd support for the aliases file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getnetbyad.c b/inet/getnetbyad.c
index 4d0aab4cb5..02f2c98ea8 100644
--- a/inet/getnetbyad.c
+++ b/inet/getnetbyad.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -28,4 +28,7 @@
#define BUFLEN 1024
#define NEED_H_ERRNO 1
+/* There is no nscd support for the networks file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getnetbyad_r.c b/inet/getnetbyad_r.c
index 9c1b200ede..283700236a 100644
--- a/inet/getnetbyad_r.c
+++ b/inet/getnetbyad_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -28,4 +28,7 @@
#define NEED__RES 1
#define NEED_H_ERRNO 1
+/* There is no nscd support for the networks file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getnetbynm.c b/inet/getnetbynm.c
index cf9a2d17c9..1e53c0fd1a 100644
--- a/inet/getnetbynm.c
+++ b/inet/getnetbynm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -27,4 +27,7 @@
#define BUFLEN 1024
#define NEED_H_ERRNO 1
+/* There is no nscd support for the networks file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getnetbynm_r.c b/inet/getnetbynm_r.c
index 1cf5bfac94..4aaf5e635d 100644
--- a/inet/getnetbynm_r.c
+++ b/inet/getnetbynm_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -27,4 +27,7 @@
#define NEED__RES 1
#define NEED_H_ERRNO 1
+/* There is no nscd support for the networks file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getnetent.c b/inet/getnetent.c
index 09f1158aeb..e449fa2077 100644
--- a/inet/getnetent.c
+++ b/inet/getnetent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,4 +23,7 @@
#define BUFLEN 1024
#define NEED_H_ERRNO 1
+/* There is no nscd support for the networks file. */
+#undef USE_NSCD
+
#include "../nss/getXXent.c"
diff --git a/inet/getnetent_r.c b/inet/getnetent_r.c
index e46f441b9a..ef7fb9f1d1 100644
--- a/inet/getnetent_r.c
+++ b/inet/getnetent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,4 +28,7 @@
#define NEED__RES 1
#define NEED_H_ERRNO 1
+/* There is no nscd support for the networks file. */
+#undef USE_NSCD
+
#include "../nss/getXXent_r.c"
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
index 2e280e7e6e..8e69ec7b11 100644
--- a/inet/getnetgrent_r.c
+++ b/inet/getnetgrent_r.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2002,2004,2005,2007,2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,14 +56,18 @@ setup (void **fctp, service_user **nipp)
same result every time. So we need no locking. */
no_more = __nss_netgroup_lookup (nipp, "setnetgrent", fctp);
startp = no_more ? (service_user *) -1 : *nipp;
+#ifdef PTR_MANGLE
PTR_MANGLE (startp);
+#endif
atomic_write_barrier ();
startp_initialized = true;
}
else
{
service_user *nip = startp;
+#ifdef PTR_DEMANGLE
PTR_DEMANGLE (nip);
+#endif
if (nip == (service_user *) -1)
/* No services at all. */
return 1;
@@ -168,59 +171,57 @@ __internal_setnetgrent_reuse (const char *group, struct __netgrent *datap,
return status == NSS_STATUS_SUCCESS;
}
-int internal_setnetgrent (const char *group, struct __netgrent *datap);
-libc_hidden_proto (internal_setnetgrent)
-
int
-internal_setnetgrent (const char *group, struct __netgrent *datap)
+internal_function
+__internal_setnetgrent (const char *group, struct __netgrent *datap)
{
/* Free list of all netgroup names from last run. */
free_memory (datap);
return __internal_setnetgrent_reuse (group, datap, &errno);
}
-libc_hidden_def (internal_setnetgrent)
-strong_alias (internal_setnetgrent, __internal_setnetgrent)
+libc_hidden_def (__internal_setnetgrent)
-int
-setnetgrent (const char *group)
+static int
+nscd_setnetgrent (const char *group)
{
- int result;
-
- __libc_lock_lock (lock);
-
+#ifdef USE_NSCD
if (__nss_not_use_nscd_netgroup > 0
&& ++__nss_not_use_nscd_netgroup > NSS_NSCD_RETRY)
__nss_not_use_nscd_netgroup = 0;
if (!__nss_not_use_nscd_netgroup
&& !__nss_database_custom[NSS_DBSIDX_netgroup])
- {
- result = __nscd_setnetgrent (group, &dataset);
- if (result >= 0)
- goto out;
- }
+ return __nscd_setnetgrent (group, &dataset);
+#endif
+ return -1;
+}
- result = internal_setnetgrent (group, &dataset);
+int
+setnetgrent (const char *group)
+{
+ int result;
+
+ __libc_lock_lock (lock);
+
+ result = nscd_setnetgrent (group);
+ if (result < 0)
+ result = __internal_setnetgrent (group, &dataset);
- out:
__libc_lock_unlock (lock);
return result;
}
-void internal_endnetgrent (struct __netgrent *datap);
-libc_hidden_proto (internal_endnetgrent)
-
void
-internal_endnetgrent (struct __netgrent *datap)
+internal_function
+__internal_endnetgrent (struct __netgrent *datap)
{
endnetgrent_hook (datap);
/* Now free list of all netgroup names from last run. */
free_memory (datap);
}
-libc_hidden_def (internal_endnetgrent)
-strong_alias (internal_endnetgrent, __internal_endnetgrent)
+libc_hidden_def (__internal_endnetgrent)
void
@@ -228,18 +229,12 @@ endnetgrent (void)
{
__libc_lock_lock (lock);
- internal_endnetgrent (&dataset);
+ __internal_endnetgrent (&dataset);
__libc_lock_unlock (lock);
}
-
-int internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
- struct __netgrent *datap,
- char *buffer, size_t buflen, int *errnop);
-libc_hidden_proto (internal_getnetgrent_r)
-
-
+#ifdef USE_NSCD
static enum nss_status
nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
int *errnop)
@@ -257,10 +252,11 @@ nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
return NSS_STATUS_SUCCESS;
}
-
+#endif
int
-internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
+internal_function
+__internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
struct __netgrent *datap,
char *buffer, size_t buflen, int *errnop)
{
@@ -275,9 +271,14 @@ internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
int no_more = datap->nip == NULL;
if (! no_more)
{
+#ifdef USE_NSCD
+ /* This bogus function pointer is a special marker left by
+ __nscd_setnetgrent to tell us to use the data it left
+ before considering any modules. */
if (datap->nip == (service_user *) -1l)
fct = nscd_getnetgrent;
else
+#endif
{
fct = __nss_lookup_function (datap->nip, "getnetgrent_r");
no_more = fct == NULL;
@@ -358,8 +359,7 @@ internal_getnetgrent_r (char **hostp, char **userp, char **domainp,
return status == NSS_STATUS_SUCCESS ? 1 : 0;
}
-libc_hidden_def (internal_getnetgrent_r)
-strong_alias (internal_getnetgrent_r, __internal_getnetgrent_r)
+libc_hidden_def (__internal_getnetgrent_r)
/* The real entry point. */
int
@@ -370,8 +370,8 @@ __getnetgrent_r (char **hostp, char **userp, char **domainp,
__libc_lock_lock (lock);
- status = internal_getnetgrent_r (hostp, userp, domainp, &dataset,
- buffer, buflen, &errno);
+ status = __internal_getnetgrent_r (hostp, userp, domainp, &dataset,
+ buffer, buflen, &errno);
__libc_lock_unlock (lock);
@@ -384,6 +384,7 @@ int
innetgr (const char *netgroup, const char *host, const char *user,
const char *domain)
{
+#ifdef USE_NSCD
if (__nss_not_use_nscd_netgroup > 0
&& ++__nss_not_use_nscd_netgroup > NSS_NSCD_RETRY)
__nss_not_use_nscd_netgroup = 0;
@@ -395,6 +396,7 @@ innetgr (const char *netgroup, const char *host, const char *user,
if (result >= 0)
return result;
}
+#endif
union
{
diff --git a/inet/getproto.c b/inet/getproto.c
index 3bee3d5b16..99ae01452e 100644
--- a/inet/getproto.c
+++ b/inet/getproto.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES proto
#define BUFLEN 1024
+/* There is no nscd support for the protocols file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getproto_r.c b/inet/getproto_r.c
index 0d5f31e477..e3881b8ae9 100644
--- a/inet/getproto_r.c
+++ b/inet/getproto_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_PARAMS int proto
#define ADD_VARIABLES proto
+/* There is no nscd support for the protocols file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getprtent.c b/inet/getprtent.c
index ef54c49985..2cced62c17 100644
--- a/inet/getprtent.c
+++ b/inet/getprtent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,4 +22,7 @@
#define GETFUNC_NAME getprotoent
#define BUFLEN 1024
+/* There is no nscd support for the protocols file. */
+#undef USE_NSCD
+
#include "../nss/getXXent.c"
diff --git a/inet/getprtent_r.c b/inet/getprtent_r.c
index 9bc0b16152..a3284f2651 100644
--- a/inet/getprtent_r.c
+++ b/inet/getprtent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,4 +26,7 @@
#define STAYOPEN int stayopen
#define STAYOPEN_VAR stayopen
+/* There is no nscd support for the protocols file. */
+#undef USE_NSCD
+
#include "../nss/getXXent_r.c"
diff --git a/inet/getprtname.c b/inet/getprtname.c
index ea5cb82ec0..f7ac9a78aa 100644
--- a/inet/getprtname.c
+++ b/inet/getprtname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES name
#define BUFLEN 1024
+/* There is no nscd support for the protocols file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getprtname_r.c b/inet/getprtname_r.c
index b216276824..371243e775 100644
--- a/inet/getprtname_r.c
+++ b/inet/getprtname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
+/* There is no nscd support for the protocols file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getrpcbyname.c b/inet/getrpcbyname.c
index a433bd70fa..e72d9acc9d 100644
--- a/inet/getrpcbyname.c
+++ b/inet/getrpcbyname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES name
#define BUFLEN 1024
+/* There is no nscd support for the rpc file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getrpcbyname_r.c b/inet/getrpcbyname_r.c
index 45a0d88aaf..ff8629d807 100644
--- a/inet/getrpcbyname_r.c
+++ b/inet/getrpcbyname_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
+/* There is no nscd support for the rpc file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getrpcbynumber.c b/inet/getrpcbynumber.c
index 0f0e0d96e8..0546ece2a1 100644
--- a/inet/getrpcbynumber.c
+++ b/inet/getrpcbynumber.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES number
#define BUFLEN 1024
+/* There is no nscd support for the rpc file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/inet/getrpcbynumber_r.c b/inet/getrpcbynumber_r.c
index 3109c3b208..d6e5f23212 100644
--- a/inet/getrpcbynumber_r.c
+++ b/inet/getrpcbynumber_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_PARAMS int number
#define ADD_VARIABLES number
+/* There is no nscd support for the rpc file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/inet/getrpcent.c b/inet/getrpcent.c
index 05d3a0a8f6..b58fa641cb 100644
--- a/inet/getrpcent.c
+++ b/inet/getrpcent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,4 +22,7 @@
#define GETFUNC_NAME getrpcent
#define BUFLEN 1024
+/* There is no nscd support for the rpc file. */
+#undef USE_NSCD
+
#include "../nss/getXXent.c"
diff --git a/inet/getrpcent_r.c b/inet/getrpcent_r.c
index ff2bf75849..b0c8172b0d 100644
--- a/inet/getrpcent_r.c
+++ b/inet/getrpcent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,4 +26,7 @@
#define STAYOPEN int stayopen
#define STAYOPEN_VAR stayopen
+/* There is no nscd support for the rpc file. */
+#undef USE_NSCD
+
#include "../nss/getXXent_r.c"
diff --git a/inet/netgroup.h b/inet/netgroup.h
index 2c0d1a4831..f3797a698d 100644
--- a/inet/netgroup.h
+++ b/inet/netgroup.h
@@ -1,5 +1,5 @@
/* Internal header for netgroup related functions.
- Copyright (C) 1996, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -70,10 +70,16 @@ struct __netgrent
/* The internal netgroup handling functions might be called from outside. */
extern int __internal_setnetgrent (const char *group,
- struct __netgrent *datap);
-extern void __internal_endnetgrent (struct __netgrent *datap);
+ struct __netgrent *datap)
+ internal_function;
+libc_hidden_proto (__internal_setnetgrent)
+extern void __internal_endnetgrent (struct __netgrent *datap)
+ internal_function;
+libc_hidden_proto (__internal_endnetgrent)
extern int __internal_getnetgrent_r (char **hostp, char **userp,
char **domainp, struct __netgrent *datap,
- char *buffer, size_t buflen, int *errnop);
+ char *buffer, size_t buflen, int *errnop)
+ internal_function;
+libc_hidden_proto (__internal_getnetgrent_r)
#endif /* netgroup.h */
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index 3940dc3101..c76ad16b99 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -518,6 +518,8 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
#ifdef __USE_GNU
+struct cmsghdr; /* Forward declaration. */
+
/* IPv6 packet information. */
struct in6_pktinfo
{
diff --git a/intl/Makefile b/intl/Makefile
index e95f519822..c2a169807d 100644
--- a/intl/Makefile
+++ b/intl/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2003,2005,2008,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -48,7 +48,7 @@ $(objpfx)plural.o: plural.c
include ../Rules
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
ifeq (yes,$(build-shared))
ifneq ($(strip $(MSGFMT)),:)
tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
@@ -61,25 +61,35 @@ ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-gettext
endif
endif
+
+# Multiple tests use this data. Create it once to avoid racing and
+# spurious test failures.
+codeset_mo = $(objpfx)domaindir/de_DE/LC_MESSAGES/codeset.mo
+
+$(codeset_mo): tstcodeset.po
+ $(make-target-directory)
+ msgfmt -o $@T $<
+ mv -f $@T $@
+
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \
- $(objpfx)tst-gettext.mtrace
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
+ $(common-objpfx)intl/ $(objpfx)tst-gettext.mtrace
$(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
+ $(common-objpfx)intl/
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
-$(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
-$(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
+ $(common-objpfx)intl/
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
-$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+
+$(objpfx)tst-codeset.out: $(codeset_mo)
+$(objpfx)tst-gettext3.out: $(codeset_mo)
+$(objpfx)tst-gettext5.out: $(codeset_mo)
endif
endif
@@ -96,6 +106,11 @@ CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
+LOCPATH-ENV = LOCPATH=$(common-objpfx)localedata
+tst-codeset-ENV = $(LOCPATH-ENV)
+tst-gettext3-ENV = $(LOCPATH-ENV)
+tst-gettext5-ENV = $(LOCPATH-ENV)
+
ifeq ($(have-thread-library),yes)
ifeq (yes,$(build-shared))
$(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 4e34a368be..a217fcce41 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -1,5 +1,5 @@
/* Load needed message catalogs.
- Copyright (C) 1995-2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,7 @@
# include <config.h>
#endif
+#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -835,11 +836,13 @@ _nl_load_domain (domain_file, domainbinding)
fd = -1;
use_mmap = 1;
}
+
+ assert (MAP_FAILED == (void *) -1);
#endif
/* If the data is not yet available (i.e. mmap'ed) we try to load
it manually. */
- if (data == MAP_FAILED)
+ if (data == (struct mo_file_header *) -1)
{
size_t to_read;
char *read_ptr;
diff --git a/intl/tst-gettext.sh b/intl/tst-gettext.sh
index e8fee9f3c5..a3bb0a61d7 100755
--- a/intl/tst-gettext.sh
+++ b/intl/tst-gettext.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of gettext functions.
-# Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,9 +17,12 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
-objpfx=$2
-malloc_trace=$3
+run_program_prefix=$2
+objpfx=$3
+malloc_trace=$4
LC_ALL=C
export LC_ALL
@@ -52,7 +54,7 @@ export LOCPATH
# Now run the test.
MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
exit $?
diff --git a/intl/tst-gettext2.sh b/intl/tst-gettext2.sh
index 656c2e1556..833b97986c 100644
--- a/intl/tst-gettext2.sh
+++ b/intl/tst-gettext2.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of gettext functions.
-# Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,8 +17,11 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
-objpfx=$2
+run_program_prefix=$2
+objpfx=$3
LC_ALL=C
export LC_ALL
@@ -65,7 +67,7 @@ LOCPATH=${objpfx}domaindir
export LOCPATH
# Now run the test.
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
cmp ${objpfx}tst-gettext2.out - <<EOF
String1 - Lang1: 1st string
diff --git a/intl/tst-gettext3.sh b/intl/tst-gettext3.sh
deleted file mode 100644
index 032379c060..0000000000
--- a/intl/tst-gettext3.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# Test that the gettext() results come out in the correct encoding for
-# locales that differ only in their encoding.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-#
-
-# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# The GNU C Library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, see
-# <http://www.gnu.org/licenses/>.
-
-common_objpfx=$1
-objpfx=$2
-
-LC_ALL=C
-export LC_ALL
-
-# Generate the test data.
-msgfmt -o ${objpfx}codeset.mo.$$ tstcodeset.po || exit
-# Create the domain directories.
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
-# Populate them.
-mv -f ${objpfx}codeset.mo.$$ ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
-
-GCONV_PATH=${common_objpfx}iconvdata
-export GCONV_PATH
-LOCPATH=${common_objpfx}localedata
-export LOCPATH
-
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
-${objpfx}tst-gettext3 > ${objpfx}tst-gettext3.out
-
-exit $?
diff --git a/intl/tst-gettext4.sh b/intl/tst-gettext4.sh
index ac95be1975..4067071c78 100755
--- a/intl/tst-gettext4.sh
+++ b/intl/tst-gettext4.sh
@@ -1,9 +1,8 @@
#! /bin/sh
# Test that gettext() in multithreaded applications works correctly if
# different threads operate in different locales with the same encoding.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -19,6 +18,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
objpfx=$3
diff --git a/intl/tst-gettext5.sh b/intl/tst-gettext5.sh
deleted file mode 100755
index a563b43f42..0000000000
--- a/intl/tst-gettext5.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Test that gettext() in multithreaded applications works correctly if
-# different threads operate in different locales referring to the same
-# catalog file but with different encodings.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-#
-
-# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# The GNU C Library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, see
-# <http://www.gnu.org/licenses/>.
-
-common_objpfx=$1
-run_program_prefix=$2
-objpfx=$3
-
-LC_ALL=C
-export LC_ALL
-
-# Create the domain directories.
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
-# Populate them.
-msgfmt -o ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo tstcodeset.po
-
-GCONV_PATH=${common_objpfx}iconvdata
-export GCONV_PATH
-LOCPATH=${common_objpfx}localedata
-export LOCPATH
-
-${run_program_prefix} ${objpfx}tst-gettext5 > ${objpfx}tst-gettext5.out
-
-exit $?
diff --git a/intl/tst-gettext6.sh b/intl/tst-gettext6.sh
index b83678ed05..2db0cd653a 100644
--- a/intl/tst-gettext6.sh
+++ b/intl/tst-gettext6.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test that gettext() in multithreaded applications works correctly.
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
objpfx=$3
diff --git a/intl/tst-translit.sh b/intl/tst-translit.sh
index 3091ab96bb..27cd1bf95d 100755
--- a/intl/tst-translit.sh
+++ b/intl/tst-translit.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of transliteration in gettext functions.
-# Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,8 +17,11 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
-objpfx=$2
+run_program_prefix=$2
+objpfx=$3
LC_ALL=C
export LC_ALL
@@ -35,7 +37,7 @@ export GCONV_PATH
LOCPATH=${common_objpfx}localedata
export LOCPATH
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
exit $?
diff --git a/io/Makefile b/io/Makefile
index 6e3a737851..b076e4d863 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2003,2005-2008,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1992-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -98,10 +98,9 @@ test-stat2-ARGS = Makefile . $(objpfx)test-stat2
tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)ftwtest.out
-$(objpfx)ftwtest.out: $(objpfx)ftwtest
- $(SHELL) -e ftwtest-sh $(shell cd $(common-objpfx). && pwd)/ \
- $(shell cd $(<D) && pwd)/$(<F) > $@
+$(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@
endif
diff --git a/io/fchmodat.c b/io/fchmodat.c
index 41b44dece6..d171f363b0 100644
--- a/io/fchmodat.c
+++ b/io/fchmodat.c
@@ -1,5 +1,5 @@
/* Change the protections of file relative to open directory. Stub version.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
#include <stddef.h>
#include <unistd.h>
#include <sys/types.h>
+#include <sys/stat.h>
int
fchmodat (fd, file, mode, flag)
diff --git a/io/fcntl.h b/io/fcntl.h
index c7d5e6972c..cc978f7c7b 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -27,36 +27,42 @@
/* This must be early so <bits/fcntl.h> can define types winningly. */
__BEGIN_DECLS
+/* Get __mode_t, __dev_t and __off_t .*/
+#include <bits/types.h>
+
/* Get the definitions of O_*, F_*, FD_*: all the
numbers and flag bits for `open', `fcntl', et al. */
#include <bits/fcntl.h>
-#if defined __USE_XOPEN || defined __USE_XOPEN2K
-/* The Single Unix specification says that some more types are
- available here. */
-# ifndef __mode_t_defined
+/* POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
+ Earlier POSIX standards permitted any type ending in `_t' to be defined
+ by any POSIX header, so we don't conditionalize the definitions here. */
+#ifndef __mode_t_defined
typedef __mode_t mode_t;
-# define __mode_t_defined
-# endif
+# define __mode_t_defined
+#endif
-# ifndef __off_t_defined
-# ifndef __USE_FILE_OFFSET64
+#ifndef __off_t_defined
+# ifndef __USE_FILE_OFFSET64
typedef __off_t off_t;
-# else
+# else
typedef __off64_t off_t;
-# endif
-# define __off_t_defined
# endif
+# define __off_t_defined
+#endif
+
+#if defined __USE_LARGEFILE64 && !defined __off64_t_defined
+typedef __off64_t off64_t;
+# define __off64_t_defined
+#endif
-# ifndef __pid_t_defined
+#ifndef __pid_t_defined
typedef __pid_t pid_t;
-# define __pid_t_defined
-# endif
-#endif /* X/Open */
+# define __pid_t_defined
+#endif
/* For XPG all symbols from <sys/stat.h> should also be available. */
#if defined __USE_XOPEN || defined __USE_XOPEN2K8
-# include <bits/types.h> /* For __mode_t and __dev_t. */
# define __need_timespec
# include <time.h>
# include <bits/stat.h>
@@ -200,17 +206,17 @@ extern int openat64 (int __fd, const char *__file, int __oflag, ...)
This function is a cancellation point and therefore not marked with
__THROW. */
#ifndef __USE_FILE_OFFSET64
-extern int creat (const char *__file, __mode_t __mode) __nonnull ((1));
+extern int creat (const char *__file, mode_t __mode) __nonnull ((1));
#else
# ifdef __REDIRECT
-extern int __REDIRECT (creat, (const char *__file, __mode_t __mode),
+extern int __REDIRECT (creat, (const char *__file, mode_t __mode),
creat64) __nonnull ((1));
# else
# define creat creat64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1));
+extern int creat64 (const char *__file, mode_t __mode) __nonnull ((1));
#endif
#if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
@@ -229,7 +235,7 @@ extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1));
# define F_TEST 3 /* Test a region for other processes locks. */
# ifndef __USE_FILE_OFFSET64
-extern int lockf (int __fd, int __cmd, __off_t __len);
+extern int lockf (int __fd, int __cmd, off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
@@ -238,7 +244,7 @@ extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int lockf64 (int __fd, int __cmd, __off64_t __len);
+extern int lockf64 (int __fd, int __cmd, off64_t __len);
# endif
#endif
@@ -246,7 +252,7 @@ extern int lockf64 (int __fd, int __cmd, __off64_t __len);
/* Advice the system about the expected behaviour of the application with
respect to the file associated with FD. */
# ifndef __USE_FILE_OFFSET64
-extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
+extern int posix_fadvise (int __fd, off_t __offset, off_t __len,
int __advise) __THROW;
# else
# ifdef __REDIRECT_NTH
@@ -258,7 +264,7 @@ extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
+extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len,
int __advise) __THROW;
# endif
@@ -268,7 +274,7 @@ extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
This function is a possible cancellation point and therefore not
marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
-extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
+extern int posix_fallocate (int __fd, off_t __offset, off_t __len);
# else
# ifdef __REDIRECT
extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
@@ -279,7 +285,7 @@ extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
# endif
# endif
# ifdef __USE_LARGEFILE64
-extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
+extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
# endif
#endif
diff --git a/io/ftw.c b/io/ftw.c
index ee3ba88174..7aff7d04c9 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -1,5 +1,5 @@
/* File tree walker functions.
- Copyright (C) 1996-2004, 2006-2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -542,7 +542,11 @@ fail:
while (dir.stream != NULL && (d = __readdir64 (dir.stream)) != NULL)
{
- result = process_entry (data, &dir, d->d_name, NAMLEN (d), d->d_type);
+ int d_type = DT_UNKNOWN;
+#ifdef _DIRENT_HAVE_D_TYPE
+ d_type = d->d_type;
+#endif
+ result = process_entry (data, &dir, d->d_name, NAMLEN (d), d_type);
if (result != 0)
break;
}
diff --git a/io/ftwtest-sh b/io/ftwtest-sh
index 6444ece2a2..3bbf3061ef 100644
--- a/io/ftwtest-sh
+++ b/io/ftwtest-sh
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test for nftw(3).
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
# The common objpfx, used to find libraries and the dynamic loader.
objpfx=$1
@@ -25,11 +44,9 @@ LANG=C
export LANG
# First create our scenario:
-tmp=`echo ${TMPDIR:-/tmp} | sed 's|\(.\)/*$|\1|'`
+tmp=${objpfx}io
tmpdir=$tmp/ftwtest.d
-[ -f ${objpfx}elf/ld.so ] && ldso=${objpfx}elf/ld.so
-
trap 'chmod -fR a+x $tmpdir; rm -fr $tmpdir $testout' 1 2 3 15
if test -d $tmpdir; then
@@ -52,9 +69,9 @@ ln -s $tmpdir/foo/lvl1/lvl2/lvl3/lvl4 $tmpdir/foo/lvl1/link@1
echo > $tmpdir/bar/xo
chmod a-x,a+r $tmpdir/bar
-testout=${TMPDIR:-/tmp}/ftwtest.out
+testout=$tmp/ftwtest.out
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram $tmpdir |
+$testprogram $tmpdir |
sort > $testout
cat <<EOF | cmp $testout - || exit 1
@@ -73,7 +90,7 @@ base = "$tmp/ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, leve
EOF
rm $testout
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --depth $tmpdir |
+$testprogram --depth $tmpdir |
sort > $testout
cat <<EOF | cmp $testout - || exit 1
@@ -92,7 +109,7 @@ base = "$tmp/ftwtest.d/foo/lvl1/lvl2/lvl3/", file = "file@3", flag = FTW_F, leve
EOF
rm $testout
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --phys $tmpdir |
+$testprogram --phys $tmpdir |
sort > $testout
cat <<EOF | cmp $testout - || exit 1
@@ -116,7 +133,7 @@ rm $testout
# For the next test everything must be readable.
chmod -fR a+x $tmpdir
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir $tmpdir |
+$testprogram --chdir $tmpdir |
sort > $testout
# perhaps $tmp involves some symlinks...
@@ -140,7 +157,7 @@ rm $testout
curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
cd "$tmp"
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d |
+$testprogram --chdir ftwtest.d |
sort > $testout
cd "$curwd"
@@ -162,7 +179,7 @@ rm $testout
curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
cd "$tmp"
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/. |
+$testprogram --chdir ftwtest.d/. |
sort > $testout
cd "$curwd"
@@ -184,7 +201,7 @@ rm $testout
curwd=`/bin/pwd 2>/dev/null || /usr/bin/pwd`
cd "$tmp"
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --chdir ftwtest.d/foo/lvl1/link@1 |
+$testprogram --chdir ftwtest.d/foo/lvl1/link@1 |
sort > $testout
cd "$curwd"
@@ -193,7 +210,7 @@ base = "ftwtest.d/foo/lvl1/", file = "link@1", flag = FTW_SLN, cwd = $tmpreal/ft
EOF
rm $testout
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --early-exit $tmpdir |
+$testprogram --early-exit $tmpdir |
sort > $testout
cat <<EOF | cmp $testout - || exit 1
@@ -207,7 +224,7 @@ echo > $tmpdir/foo/lvl1b/file@1b
echo > $tmpdir/foo/lvl1b/file2@1b
echo > $tmpdir/foo/lvl1b/file3@1b
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-subtree=lvl1 $tmpdir |
+$testprogram --skip-subtree=lvl1 $tmpdir |
sort > $testout
cat <<EOF | diff -u $testout - || exit 1
@@ -224,7 +241,7 @@ base = "$tmp/ftwtest.d/foo/lvl1b/", file = "file@1b", flag = FTW_F, level = 3
EOF
rm $testout
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-siblings=lvl1 $tmpdir |
+$testprogram --skip-siblings=lvl1 $tmpdir |
sort > $testout
# The filesystem is not required to put lvl1 before lvl1b.
@@ -248,7 +265,7 @@ base = "$tmp/ftwtest.d/foo/lvl1b/", file = "file@1b", flag = FTW_F, level = 3
EOF
rm $testout
-LD_LIBRARY_PATH=$objpfx $ldso $testprogram --skip-siblings=file@1b $tmpdir |
+$testprogram --skip-siblings=file@1b $tmpdir |
sort > $testout
# The filesystem is not required to put file2@1b and file3@1b after file@1b.
diff --git a/io/lockf.c b/io/lockf.c
index 42232d0764..1ee95114d7 100644
--- a/io/lockf.c
+++ b/io/lockf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,1996,1997,1998,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,9 +15,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* We need to avoid the header declaration of lockf64, because
+ the types don't match lockf and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define lockf64 __renamed_lockf64
+
+#include <fcntl.h>
+
+#undef lockf64
+
#include <sys/types.h>
#include <unistd.h>
-#include <fcntl.h>
#include <errno.h>
#include <string.h>
@@ -71,3 +79,7 @@ lockf (int fd, int cmd, off_t len)
the fcntl() function will take care of it. */
return __fcntl (fd, cmd, &fl);
}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (lockf, lockf64)
+#endif
diff --git a/io/lockf64.c b/io/lockf64.c
index 80ca151c19..60516ebaad 100644
--- a/io/lockf64.c
+++ b/io/lockf64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,96,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,9 @@
#include <errno.h>
#include <string.h>
+/* lockf.c defines lockf64 as an lias if __OFF_T_MATCHES_OFF64_T. */
+#ifndef __OFF_T_MATCHES_OFF64_T
+
/* lockf is a simplified interface to fcntl's locking facilities. */
int
@@ -76,3 +79,5 @@ lockf64 (int fd, int cmd, off64_t len64)
return __fcntl (fd, cmd, &fl);
}
+
+#endif
diff --git a/misc/lseek.c b/io/lseek.c
index 0729cb66ee..0729cb66ee 100644
--- a/misc/lseek.c
+++ b/io/lseek.c
diff --git a/io/open.c b/io/open.c
index 0916b1e010..b6911206a0 100644
--- a/io/open.c
+++ b/io/open.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,1995,1996,1997,2002,2007 Free Software Foundation, Inc.
+/* Open a file by name. Stub version.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +27,7 @@ extern char **__libc_argv attribute_hidden;
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
a third argument is the file protection. */
int
-__open (file, oflag)
+__libc_open (file, oflag)
const char *file;
int oflag;
{
@@ -49,10 +50,12 @@ __open (file, oflag)
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (__open)
-stub_warning (open)
+libc_hidden_def (__libc_open)
+weak_alias (__libc_open, __open)
+libc_hidden_weak (__open)
+weak_alias (__libc_open, open)
-weak_alias (__open, open)
+stub_warning (open)
int
diff --git a/io/openat.c b/io/openat.c
index 92a5769e96..b496539361 100644
--- a/io/openat.c
+++ b/io/openat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,13 @@
#include <stddef.h>
#include <stdio.h>
#include <sys/stat.h>
+#include <kernel-features.h>
+
+/* Some mostly-generic code (e.g. sysdeps/posix/getcwd.c) uses this variable
+ if __ASSUME_ATFCTS is not defined. */
+#ifndef __ASSUME_ATFCTS
+int __have_atfcts;
+#endif
/* Open FILE with access OFLAG. Interpret relative paths relative to
the directory associated with FD. If OFLAG includes O_CREAT, a
diff --git a/io/tst-mknodat.c b/io/tst-mknodat.c
index 9158c0dfd4..cba4dffadf 100644
--- a/io/tst-mknodat.c
+++ b/io/tst-mknodat.c
@@ -80,8 +80,8 @@ do_test (void)
}
closedir (dir);
- /* Create a new directory. */
- int e = mknodat (dir_fd, "some-sock", 0777 | S_IFSOCK, 0);
+ /* Create a new fifo. */
+ int e = mknodat (dir_fd, "some-fifo", 0777 | S_IFIFO, 0);
if (e == -1)
{
if (errno == ENOSYS)
@@ -90,19 +90,19 @@ do_test (void)
return 0;
}
- puts ("socket creation failed");
+ puts ("fifo creation failed");
return 1;
}
struct stat64 st1;
- if (fstatat64 (dir_fd, "some-sock", &st1, 0) != 0)
+ if (fstatat64 (dir_fd, "some-fifo", &st1, 0) != 0)
{
puts ("fstat64 failed");
return 1;
}
- if (!S_ISSOCK (st1.st_mode))
+ if (!S_ISFIFO (st1.st_mode))
{
- puts ("mknodat did not create a Unix domain socket");
+ puts ("mknodat did not create a fifo");
return 1;
}
@@ -124,15 +124,15 @@ do_test (void)
puts ("2nd fdopendir failed");
return 1;
}
- bool has_some_sock = false;
+ bool has_some_fifo = false;
while ((d = readdir64 (dir)) != NULL)
- if (strcmp (d->d_name, "some-sock") == 0)
+ if (strcmp (d->d_name, "some-fifo") == 0)
{
- has_some_sock = true;
+ has_some_fifo = true;
#ifdef _DIRENT_HAVE_D_TYPE
- if (d->d_type != DT_UNKNOWN && d->d_type != DT_SOCK)
+ if (d->d_type != DT_UNKNOWN && d->d_type != DT_FIFO)
{
- puts ("d_type for some-sock wrong");
+ puts ("d_type for some-fifo wrong");
return 1;
}
#endif
@@ -144,13 +144,13 @@ do_test (void)
}
closedir (dir);
- if (!has_some_sock)
+ if (!has_some_fifo)
{
- puts ("some-sock not in directory list");
+ puts ("some-fifo not in directory list");
return 1;
}
- if (unlinkat (dir_fd, "some-sock", 0) != 0)
+ if (unlinkat (dir_fd, "some-fifo", 0) != 0)
{
puts ("unlinkat failed");
return 1;
diff --git a/io/xmknod.c b/io/xmknod.c
index 44cd09a438..78bbf5a1a8 100644
--- a/io/xmknod.c
+++ b/io/xmknod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1993,1995-1997,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,12 +31,6 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev)
return -1;
}
- if (path == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
__set_errno (ENOSYS);
return -1;
}
diff --git a/libidn/ChangeLog b/libidn/ChangeLog
index 58a95b1b93..07af658b21 100644
--- a/libidn/ChangeLog
+++ b/libidn/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * configure.in: If $shared != yes, just disable the add-on entirely
+ and issue a warning.
+ * configure: Regenerated.
+
2012-03-07 Ulrich Drepper <drepper@gmail.com>
* Makefile (distribute): Remove variable.
diff --git a/libidn/configure b/libidn/configure
index c6ba2eebc0..39ed163520 100644
--- a/libidn/configure
+++ b/libidn/configure
@@ -1,8 +1,16 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
libc_add_on_canonical=
-libc_add_on_subdirs=.
-# Get this defined in config.h for main source code to test.
-$as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
+if test "$shared" = yes; then :
+ libc_add_on_subdirs=.
+
+ # Get this defined in config.h for main source code to test.
+ $as_echo "#define HAVE_LIBIDN 1" >>confdefs.h
+
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libidn add-on ignored with --disable-shared" >&5
+$as_echo "$as_me: WARNING: libidn add-on ignored with --disable-shared" >&2;}
+fi
diff --git a/libidn/configure.in b/libidn/configure.in
index 38b9ad7fac..16740ffb92 100644
--- a/libidn/configure.in
+++ b/libidn/configure.in
@@ -2,7 +2,10 @@ dnl glibc configure fragment for libidn add-on
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
libc_add_on_canonical=
-libc_add_on_subdirs=.
-# Get this defined in config.h for main source code to test.
-AC_DEFINE([HAVE_LIBIDN])
+AS_IF([test "$shared" = yes], [
+ libc_add_on_subdirs=.
+
+ # Get this defined in config.h for main source code to test.
+ AC_DEFINE([HAVE_LIBIDN])
+], [AC_MSG_WARN([libidn add-on ignored with --disable-shared])])
diff --git a/libio/Makefile b/libio/Makefile
index 02efe1b3a3..9ccd6a0c38 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2004,2006-2009,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1995-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -46,8 +46,10 @@ routines := \
\
libc_fatal fmemopen
+include ../Makeconfig
+
tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
- tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 tst-fopenloc \
+ tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \
tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \
tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
@@ -57,27 +59,30 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
tst-memstream1 tst-memstream2 \
tst-wmemstream1 tst-wmemstream2 \
bug-memstream1 bug-wmemstream1 \
- tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos bug-fclose1
+ tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos bug-fclose1 tst-fseek
+ifeq (yes,$(build-shared))
+# Add test-fopenloc only if shared library is enabled since it depends on
+# shared localedata objects.
+tests += tst-fopenloc
+endif
test-srcs = test-freopen
all: # Make this the default target; it will be defined in Rules.
-include ../Makeconfig
-
ifeq ($(versioning),yes)
routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos \
oldiofsetpos64
endif
-ifneq (,$(filter %REENTRANT, $(defines)))
+ifeq (yes,$(libc-reentrant))
routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \
iofflush_u putc_u putchar_u peekc iofread_u iofwrite_u iofgets_u \
iofputs_u
-
-CPPFLAGS += -D_IO_MTSAFE_IO
endif
+CPPFLAGS += $(libio-mtsafe)
+
# Support for exception handling.
CFLAGS-fileops.c = $(exceptions)
CFLAGS-fputc.c = $(exceptions)
@@ -153,6 +158,7 @@ bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata
tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata
+tst-fseek-ENV = LOCPATH=$(common-objpfx)localedata
generated = tst-fopenloc.mtrace tst-fopenloc.check
@@ -169,12 +175,17 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
include ../Rules
-ifeq (no,$(cross-compiling))
-tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check
+ifeq ($(run-built-tests),yes)
+tests: $(objpfx)test-freopen.out
+ifeq (yes,$(build-shared))
+# Run tst-fopenloc.check only if shared library is enabled since it
+# depends on tst-fopenloc.out.
+tests: $(objpfx)tst-fopenloc.check
+endif
endif
$(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
$(common-objpfx)libio/
$(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c
index b7733c7f88..c9b0f01722 100644
--- a/libio/filedoalloc.c
+++ b/libio/filedoalloc.c
@@ -96,7 +96,7 @@ _IO_file_doallocate (fp)
{
_IO_size_t size;
char *p;
- struct _G_stat64 st;
+ struct stat64 st;
#ifndef _LIBC
/* If _IO_cleanup_registration_needed is non-zero, we should call the
diff --git a/libio/fileops.c b/libio/fileops.c
index 7c7fef1c75..6aabadc644 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -101,7 +101,7 @@ extern struct __gconv_trans_data __libio_translit attribute_hidden;
to _IO_buf_base, though not necessarily if we have switched from
get mode to put mode. (The reason is to maintain the invariant
that _IO_read_end corresponds to the external file position.)
- _IO_write_base is non-NULL and usually equal to _IO_base_base.
+ _IO_write_base is non-NULL and usually equal to _IO_buf_base.
We also have _IO_write_end == _IO_buf_end, but only in fully buffered mode.
The un-flushed character are those between _IO_write_base and _IO_write_ptr.
@@ -635,7 +635,7 @@ libc_hidden_ver (_IO_new_file_underflow, _IO_file_underflow)
static int
mmap_remap_check (_IO_FILE *fp)
{
- struct _G_stat64 st;
+ struct stat64 st;
if (_IO_SYSSTAT (fp, &st) == 0
&& S_ISREG (st.st_mode) && st.st_size != 0
@@ -671,13 +671,8 @@ mmap_remap_check (_IO_FILE *fp)
#else
(void) __munmap (fp->_IO_buf_base,
fp->_IO_buf_end - fp->_IO_buf_base);
-# ifdef _G_MMAP64
- p = _G_MMAP64 (NULL, st.st_size, PROT_READ, MAP_SHARED,
- fp->_fileno, 0);
-# else
- p = __mmap (NULL, st.st_size, PROT_READ, MAP_SHARED,
- fp->_fileno, 0);
-# endif
+ p = __mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED,
+ fp->_fileno, 0);
if (p == MAP_FAILED)
goto punt;
#endif
@@ -704,13 +699,8 @@ mmap_remap_check (_IO_FILE *fp)
if (fp->_offset < fp->_IO_buf_end - fp->_IO_buf_base)
{
- if (
-# ifdef _G_LSEEK64
- _G_LSEEK64
-# else
- __lseek
-# endif
- (fp->_fileno, fp->_IO_buf_end - fp->_IO_buf_base, SEEK_SET)
+ if (__lseek64 (fp->_fileno, fp->_IO_buf_end - fp->_IO_buf_base,
+ SEEK_SET)
!= fp->_IO_buf_end - fp->_IO_buf_base)
fp->_flags |= _IO_ERR_SEEN;
else
@@ -763,7 +753,7 @@ decide_maybe_mmap (_IO_FILE *fp)
file descriptors are for mmap-able objects and on 32-bit
machines we don't want to map files which are too large since
this would require too much virtual memory. */
- struct _G_stat64 st;
+ struct stat64 st;
if (_IO_SYSSTAT (fp, &st) == 0
&& S_ISREG (st.st_mode) && st.st_size != 0
@@ -775,24 +765,14 @@ decide_maybe_mmap (_IO_FILE *fp)
/* Try to map the file. */
void *p;
-# ifdef _G_MMAP64
- p = _G_MMAP64 (NULL, st.st_size, PROT_READ, MAP_SHARED, fp->_fileno, 0);
-# else
- p = __mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fp->_fileno, 0);
-# endif
+ p = __mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED, fp->_fileno, 0);
if (p != MAP_FAILED)
{
/* OK, we managed to map the file. Set the buffer up and use a
special jump table with simplified underflow functions which
never tries to read anything from the file. */
- if (
-# ifdef _G_LSEEK64
- _G_LSEEK64
-# else
- __lseek
-# endif
- (fp->_fileno, st.st_size, SEEK_SET) != st.st_size)
+ if (__lseek64 (fp->_fileno, st.st_size, SEEK_SET) != st.st_size)
{
(void) __munmap (p, st.st_size);
fp->_offset = _IO_pos_BAD;
@@ -944,13 +924,8 @@ _IO_file_sync_mmap (_IO_FILE *fp)
if (_IO_in_backup (fp))
delta -= eGptr () - Gbase ();
#endif
- if (
-# ifdef _G_LSEEK64
- _G_LSEEK64
-# else
- __lseek
-# endif
- (fp->_fileno, fp->_IO_read_ptr - fp->_IO_buf_base, SEEK_SET)
+ if (__lseek64 (fp->_fileno, fp->_IO_read_ptr - fp->_IO_buf_base,
+ SEEK_SET)
!= fp->_IO_read_ptr - fp->_IO_buf_base)
{
fp->_flags |= _IO_ERR_SEEN;
@@ -978,20 +953,21 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
int must_be_exact = (fp->_IO_read_base == fp->_IO_read_end
&& fp->_IO_write_base == fp->_IO_write_ptr);
+ bool was_writing = (fp->_IO_write_ptr > fp->_IO_write_base
+ || _IO_in_put_mode (fp));
+
if (mode == 0)
dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
/* Flush unwritten characters.
(This may do an unneeded write if we seek within the buffer.
But to be able to switch to reading, we would need to set
- egptr to ptr. That can't be done in the current design,
+ egptr to pptr. That can't be done in the current design,
which assumes file_ptr() is eGptr. Anyway, since we probably
end up flushing when we close(), it doesn't make much difference.)
- FIXME: simulate mem-papped files. */
-
- if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp))
- if (_IO_switch_to_get_mode (fp))
- return EOF;
+ FIXME: simulate mem-mapped files. */
+ else if (was_writing && _IO_switch_to_get_mode (fp))
+ return EOF;
if (fp->_IO_buf_base == NULL)
{
@@ -1010,7 +986,17 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
{
case _IO_seek_cur:
/* Adjust for read-ahead (bytes is buffer). */
- offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+ if (mode != 0 || !was_writing)
+ offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+ else
+ {
+ /* _IO_read_end coincides with fp._offset, so the actual file position
+ is fp._offset - (_IO_read_end - new_write_ptr). This is fine
+ even if fp._offset is not set, since fp->_IO_read_end is then at
+ _IO_buf_base and this adjustment is for unbuffered output. */
+ offset -= fp->_IO_read_end - fp->_IO_write_ptr;
+ }
+
if (fp->_offset == _IO_pos_BAD)
{
if (mode != 0)
@@ -1038,7 +1024,7 @@ _IO_new_file_seekoff (fp, offset, dir, mode)
break;
case _IO_seek_end:
{
- struct _G_stat64 st;
+ struct stat64 st;
if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode))
{
offset += st.st_size;
@@ -1225,11 +1211,7 @@ _IO_file_seek (fp, offset, dir)
_IO_off64_t offset;
int dir;
{
-#ifdef _G_LSEEK64
- return _G_LSEEK64 (fp->_fileno, offset, dir);
-#else
- return lseek (fp->_fileno, offset, dir);
-#endif
+ return __lseek64 (fp->_fileno, offset, dir);
}
libc_hidden_def (_IO_file_seek)
@@ -1238,11 +1220,7 @@ _IO_file_stat (fp, st)
_IO_FILE *fp;
void *st;
{
-#ifdef _G_FSTAT64
- return _G_FSTAT64 (fp->_fileno, (struct _G_stat64 *) st);
-#else
- return fstat (fp->_fileno, (struct stat *) st);
-#endif
+ return __fxstat64 (_STAT_VER, fp->_fileno, (struct stat64 *) st);
}
libc_hidden_def (_IO_file_stat)
diff --git a/libio/freopen64.c b/libio/freopen64.c
index 135049ff77..e47f965e86 100644
--- a/libio/freopen64.c
+++ b/libio/freopen64.c
@@ -40,7 +40,6 @@ freopen64 (filename, mode, fp)
const char* mode;
FILE *fp;
{
-#ifdef _G_OPEN64
FILE *result;
CHECK_FILE (fp, NULL);
if (!(fp->_flags & _IO_IS_FILEBUF))
@@ -101,8 +100,4 @@ freopen64 (filename, mode, fp)
free ((char *) gfilename);
_IO_release_lock (fp);
return result;
-#else
- __set_errno (ENOSYS);
- return NULL;
-#endif
}
diff --git a/libio/fseeko.c b/libio/fseeko.c
index 7a70636e57..6d37aeaab8 100644
--- a/libio/fseeko.c
+++ b/libio/fseeko.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1996,1997,1998,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,7 @@ fseeko (fp, offset, whence)
_IO_release_lock (fp);
return result;
}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (fseeko, fseeko64)
+#endif
diff --git a/libio/fseeko64.c b/libio/fseeko64.c
index 2291f61487..70dc3703c8 100644
--- a/libio/fseeko64.c
+++ b/libio/fseeko64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1996,1997,1998,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,21 +28,21 @@
#include "libioP.h"
#include "stdio.h"
+/* fseeko.c defines this as an alias if __OFF_T_MATCHES_OFF64_T. */
+#ifndef __OFF_T_MATCHES_OFF64_T
+
int
fseeko64 (fp, offset, whence)
_IO_FILE* fp;
__off64_t offset;
int whence;
{
-#ifdef _G_LSEEK64
int result;
CHECK_FILE (fp, -1);
_IO_acquire_lock (fp);
result = _IO_fseek (fp, offset, whence);
_IO_release_lock (fp);
return result;
-#else
- __set_errno (ENOSYS);
- return -1;
-#endif
}
+
+#endif
diff --git a/libio/ftello.c b/libio/ftello.c
index 1d85bc6e4c..90522769ea 100644
--- a/libio/ftello.c
+++ b/libio/ftello.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004, 2007
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,3 +62,7 @@ ftello (fp)
return pos;
}
libc_hidden_def (ftello)
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+weak_alias (ftello, ftello64)
+#endif
diff --git a/libio/ftello64.c b/libio/ftello64.c
index 0f70c6630b..9502f2518f 100644
--- a/libio/ftello64.c
+++ b/libio/ftello64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,12 +29,12 @@
#include <libioP.h>
#include <errno.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
off64_t
ftello64 (fp)
_IO_FILE *fp;
{
-#ifdef _G_LSEEK64
_IO_off64_t pos;
CHECK_FILE (fp, -1L);
_IO_acquire_lock (fp);
@@ -55,8 +54,6 @@ ftello64 (fp)
return -1L;
}
return pos;
-#else
- __set_errno (ENOSYS);
- return -1;
-#endif
}
+
+#endif
diff --git a/libio/genops.c b/libio/genops.c
index b7dd863626..0a81a5d101 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -45,15 +45,15 @@ static int _IO_list_all_stamp;
static _IO_FILE *run_fp;
+#ifdef _IO_MTSAFE_IO
static void
flush_cleanup (void *not_used)
{
if (run_fp != NULL)
_IO_funlockfile (run_fp);
-#ifdef _IO_MTSAFE_IO
_IO_lock_unlock (list_all_lock);
-#endif
}
+#endif
void
_IO_un_link (fp)
@@ -952,6 +952,7 @@ _IO_unbuffer_write (void)
/* Iff stream is un-orientated, it wasn't used. */
&& fp->_mode != 0)
{
+#ifdef _IO_MTSAFE_IO
int cnt;
#define MAXTRIES 2
for (cnt = 0; cnt < MAXTRIES; ++cnt)
@@ -961,6 +962,7 @@ _IO_unbuffer_write (void)
/* Give the other thread time to finish up its use of the
stream. */
__sched_yield ();
+#endif
if (! dealloc_buffers && !(fp->_flags & _IO_USER_BUF))
{
@@ -974,8 +976,10 @@ _IO_unbuffer_write (void)
_IO_SETBUF (fp, NULL, 0);
+#ifdef _IO_MTSAFE_IO
if (cnt < MAXTRIES && fp->_lock != NULL)
_IO_lock_unlock (*fp->_lock);
+#endif
}
/* Make sure that never again the wide char functions can be
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index 4338b5097a..a1d6bb693a 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +24,17 @@
This exception applies to code released by its copyright holders
in files containing the exception. */
+/* We need to avoid the header declarations of these, because
+ the types don't match _IO_fgetpos and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define _IO_new_fgetpos64 __renamed__IO_new_fgetpos64
+#define _IO_fgetpos64 __renamed__IO_fgetpos64
+
#include "libioP.h"
+
+#undef _IO_new_fgetpos64
+#undef _IO_fgetpos64
+
#include <errno.h>
#include <stdlib.h>
#include <shlib-compat.h>
@@ -78,3 +87,10 @@ _IO_new_fgetpos (fp, posp)
strong_alias (_IO_new_fgetpos, __new_fgetpos)
versioned_symbol (libc, _IO_new_fgetpos, _IO_fgetpos, GLIBC_2_2);
versioned_symbol (libc, __new_fgetpos, fgetpos, GLIBC_2_2);
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (_IO_new_fgetpos, _IO_new_fgetpos64)
+strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
+versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
+versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
+#endif
diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c
index 0cb141b143..0d0a2aa26b 100644
--- a/libio/iofgetpos64.c
+++ b/libio/iofgetpos64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995-2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,13 +28,13 @@
#include <errno.h>
#include <shlib-compat.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
int
_IO_new_fgetpos64 (fp, posp)
_IO_FILE *fp;
_IO_fpos64_t *posp;
{
-#ifdef _G_LSEEK64
_IO_off64_t pos;
int result = 0;
CHECK_FILE (fp, EOF);
@@ -66,12 +65,10 @@ _IO_new_fgetpos64 (fp, posp)
}
_IO_release_lock (fp);
return result;
-#else
- __set_errno (ENOSYS);
- return EOF;
-#endif
}
strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
+
+#endif
diff --git a/libio/iofopen.c b/libio/iofopen.c
index 8edd32ebd6..a7e69e4f5e 100644
--- a/libio/iofopen.c
+++ b/libio/iofopen.c
@@ -25,6 +25,7 @@
in files containing the exception. */
#include "libioP.h"
+#include <fcntl.h>
#include <stdlib.h>
#include <stddef.h>
#ifdef _LIBC
@@ -106,4 +107,9 @@ _IO_new_fopen (filename, mode)
strong_alias (_IO_new_fopen, __new_fopen)
versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1);
versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);
+
+# if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (_IO_new_fopen, _IO_fopen64)
+weak_alias (_IO_new_fopen, fopen64)
+# endif
#endif
diff --git a/libio/iofopen64.c b/libio/iofopen64.c
index 1b1a4877d6..159d04ee67 100644
--- a/libio/iofopen64.c
+++ b/libio/iofopen64.c
@@ -25,21 +25,22 @@
in files containing the exception. */
#include "libioP.h"
+#include <fcntl.h>
#include <stdlib.h>
+/* iofopen.c defines _IO_fopen64/fopen64 as aliases if O_LARGEFILE==0. */
+#if !defined _LIBC || (defined O_LARGEFILE && O_LARGEFILE != 0)
+
_IO_FILE *
_IO_fopen64 (filename, mode)
const char *filename;
const char *mode;
{
-#ifdef _G_OPEN64
return __fopen_internal (filename, mode, 0);
-#else
- __set_errno (ENOSYS);
- return NULL;
-#endif
}
#ifdef weak_alias
weak_alias (_IO_fopen64, fopen64)
#endif
+
+#endif
diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c
index 19bea3b08f..5e8d444d2e 100644
--- a/libio/iofsetpos.c
+++ b/libio/iofsetpos.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +24,17 @@
This exception applies to code released by its copyright holders
in files containing the exception. */
+/* We need to avoid the header declarations of these, because
+ the types don't match _IO_fsetpos and then the compiler will
+ complain about the mismatch when we do the alias below. */
+#define _IO_new_fsetpos64 __renamed__IO_new_fsetpos64
+#define _IO_fsetpos64 __renamed__IO_fsetpos64
+
#include <libioP.h>
+
+#undef _IO_new_fsetpos64
+#undef _IO_fsetpos64
+
#include <errno.h>
#include <shlib-compat.h>
@@ -63,3 +72,10 @@ _IO_new_fsetpos (fp, posp)
strong_alias (_IO_new_fsetpos, __new_fsetpos)
versioned_symbol (libc, _IO_new_fsetpos, _IO_fsetpos, GLIBC_2_2);
versioned_symbol (libc, __new_fsetpos, fsetpos, GLIBC_2_2);
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (_IO_new_fsetpos, _IO_new_fsetpos64)
+strong_alias (_IO_new_fsetpos64, __new_fsetpos64)
+versioned_symbol (libc, __new_fsetpos64, fsetpos64, GLIBC_2_2);
+versioned_symbol (libc, _IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2_2);
+#endif
diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c
index 9835c127c1..f751255a66 100644
--- a/libio/iofsetpos64.c
+++ b/libio/iofsetpos64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,12 +28,13 @@
#include <errno.h>
#include <shlib-compat.h>
+#ifndef __OFF_T_MATCHES_OFF64_T
+
int
_IO_new_fsetpos64 (fp, posp)
_IO_FILE *fp;
const _IO_fpos64_t *posp;
{
-#ifdef _G_LSEEK64
int result;
CHECK_FILE (fp, EOF);
_IO_acquire_lock (fp);
@@ -59,12 +59,10 @@ _IO_new_fsetpos64 (fp, posp)
}
_IO_release_lock (fp);
return result;
-#else
- __set_errno (ENOSYS);
- return EOF;
-#endif
}
strong_alias (_IO_new_fsetpos64, __new_fsetpos64)
versioned_symbol (libc, __new_fsetpos64, fsetpos64, GLIBC_2_2);
versioned_symbol (libc, _IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2_2);
+
+#endif
diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c
index 405b65f1e1..bf4b0f776a 100644
--- a/libio/iogetdelim.c
+++ b/libio/iogetdelim.c
@@ -29,6 +29,7 @@
#include "libioP.h"
#include <string.h>
#include <errno.h>
+#include <limits.h>
/* Read up to (and including) a TERMINATOR from FP into *LINEPTR
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
@@ -89,7 +90,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
t = (char *) memchr ((void *) fp->_IO_read_ptr, delimiter, len);
if (t != NULL)
len = (t - fp->_IO_read_ptr) + 1;
- if (__builtin_expect (cur_len + len + 1 < 0, 0))
+ if (__builtin_expect (len >= SSIZE_MAX - cur_len, 0))
{
__set_errno (EOVERFLOW);
result = -1;
diff --git a/libio/iogetline.c b/libio/iogetline.c
index f097f80023..bdb35b30fb 100644
--- a/libio/iogetline.c
+++ b/libio/iogetline.c
@@ -27,8 +27,6 @@
#include "libioP.h"
#include <string.h>
-#if defined _LIBC || !_G_HAVE_IO_GETLINE_INFO
-
_IO_size_t
_IO_getline (fp, buf, n, delim, extract_delim)
_IO_FILE *fp;
@@ -117,5 +115,3 @@ _IO_getline_info (fp, buf, n, delim, extract_delim, eof)
return ptr - buf;
}
libc_hidden_def (_IO_getline_info)
-
-#endif /* Defined _LIBC || !_G_HAVE_IO_GETLINE_INFO */
diff --git a/libio/iogetwline.c b/libio/iogetwline.c
index 598ece1730..63b7da6720 100644
--- a/libio/iogetwline.c
+++ b/libio/iogetwline.c
@@ -32,8 +32,6 @@
# define wmemcpy __wmemcpy
#endif
-#if defined _LIBC || !_G_HAVE_IO_GETLINE_INFO
-
_IO_size_t
_IO_getwline (fp, buf, n, delim, extract_delim)
_IO_FILE *fp;
@@ -122,5 +120,3 @@ _IO_getwline_info (fp, buf, n, delim, extract_delim, eof)
}
return ptr - buf;
}
-
-#endif /* Defined _LIBC || !_G_HAVE_IO_GETLINE_INFO */
diff --git a/libio/iopopen.c b/libio/iopopen.c
index 4f67e8ccad..7163958047 100644
--- a/libio/iopopen.c
+++ b/libio/iopopen.c
@@ -29,7 +29,6 @@
# define _POSIX_SOURCE
#endif
#include "libioP.h"
-#if _IO_HAVE_SYS_WAIT
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
@@ -51,8 +50,6 @@
extern _IO_pid_t _IO_fork (void) __THROW;
#endif
-#endif /* _IO_HAVE_SYS_WAIT */
-
#ifndef _IO_dup2
#ifdef _LIBC
#define _IO_dup2 __dup2
@@ -114,7 +111,6 @@ _IO_new_proc_open (fp, command, mode)
const char *command;
const char *mode;
{
-#if _IO_HAVE_SYS_WAIT
int read_or_write;
int parent_end, child_end;
int pipe_fds[2];
@@ -273,9 +269,6 @@ _IO_new_proc_open (fp, command, mode)
_IO_mask_flags (fp, read_or_write, _IO_NO_READS|_IO_NO_WRITES);
return fp;
-#else /* !_IO_HAVE_SYS_WAIT */
- return NULL;
-#endif
}
_IO_FILE *
@@ -317,7 +310,6 @@ _IO_new_proc_close (fp)
_IO_FILE *fp;
{
/* This is not name-space clean. FIXME! */
-#if _IO_HAVE_SYS_WAIT
int wstatus;
_IO_proc_file **ptr = &proc_file_chain;
_IO_pid_t wait_pid;
@@ -356,9 +348,6 @@ _IO_new_proc_close (fp)
if (wait_pid == -1)
return -1;
return wstatus;
-#else /* !_IO_HAVE_SYS_WAIT */
- return -1;
-#endif
}
static const struct _IO_jump_t _IO_proc_jumps = {
diff --git a/libio/libio.h b/libio/libio.h
index bbfdd9d325..94e4a0bf78 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -31,40 +31,33 @@
#include <_G_config.h>
/* ALL of these should be defined in _G_config.h */
-#define _IO_pos_t _G_fpos_t /* obsolete */
#define _IO_fpos_t _G_fpos_t
#define _IO_fpos64_t _G_fpos64_t
-#define _IO_size_t _G_size_t
-#define _IO_ssize_t _G_ssize_t
-#define _IO_off_t _G_off_t
-#define _IO_off64_t _G_off64_t
-#define _IO_pid_t _G_pid_t
-#define _IO_uid_t _G_uid_t
+#define _IO_size_t size_t
+#define _IO_ssize_t __ssize_t
+#define _IO_off_t __off_t
+#define _IO_off64_t __off64_t
+#define _IO_pid_t __pid_t
+#define _IO_uid_t __uid_t
#define _IO_iconv_t _G_iconv_t
-#define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT
#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
#define _IO_BUFSIZ _G_BUFSIZ
#define _IO_va_list _G_va_list
-#define _IO_wint_t _G_wint_t
+#define _IO_wint_t wint_t
-#ifdef _G_NEED_STDARG_H
/* This define avoids name pollution if we're using GNU stdarg.h */
-# define __need___va_list
-# include <stdarg.h>
-# ifdef __GNUC_VA_LIST
-# undef _IO_va_list
-# define _IO_va_list __gnuc_va_list
-# endif /* __GNUC_VA_LIST */
-#endif
+#define __need___va_list
+#include <stdarg.h>
+#ifdef __GNUC_VA_LIST
+# undef _IO_va_list
+# define _IO_va_list __gnuc_va_list
+#endif /* __GNUC_VA_LIST */
#ifndef __P
# include <sys/cdefs.h>
#endif /*!__P*/
#define _IO_UNIFIED_JUMPTABLES 1
-#ifndef _G_HAVE_PRINTF_FP
-# define _IO_USE_DTOA 1
-#endif
#ifndef EOF
# define EOF (-1)
diff --git a/libio/libioP.h b/libio/libioP.h
index 486c670b51..a2800524ec 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -109,34 +109,18 @@ extern "C" {
# define _IO_vtable_offset(THIS) 0
#endif
#define _IO_WIDE_JUMPS_FUNC(THIS) _IO_WIDE_JUMPS(THIS)
-#ifdef _G_USING_THUNKS
-# define JUMP_FIELD(TYPE, NAME) TYPE NAME
-# define JUMP0(FUNC, THIS) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS)
-# define JUMP1(FUNC, THIS, X1) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1)
-# define JUMP2(FUNC, THIS, X1, X2) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1, X2)
-# define JUMP3(FUNC, THIS, X1,X2,X3) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1,X2, X3)
-# define JUMP_INIT(NAME, VALUE) VALUE
-# define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0), JUMP_INIT (dummy2, 0)
-
-# define WJUMP0(FUNC, THIS) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS)
-# define WJUMP1(FUNC, THIS, X1) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1)
-# define WJUMP2(FUNC, THIS, X1, X2) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1, X2)
-# define WJUMP3(FUNC, THIS, X1,X2,X3) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1,X2, X3)
-#else
-/* These macros will change when we re-implement vtables to use "thunks"! */
-# define JUMP_FIELD(TYPE, NAME) struct { short delta1, delta2; TYPE pfn; } NAME
-# define JUMP0(FUNC, THIS) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS)
-# define JUMP1(FUNC, THIS, X1) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1)
-# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1, X2)
-# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1,X2,X3)
-# define JUMP_INIT(NAME, VALUE) {0, 0, VALUE}
-# define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0)
-
-# define WJUMP0(FUNC, THIS) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS)
-# define WJUMP1(FUNC, THIS, X1) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1)
-# define WJUMP2(FUNC, THIS, X1, X2) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1, X2)
-# define WJUMP3(FUNC, THIS, X1,X2,X3) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1,X2,X3)
-#endif
+#define JUMP_FIELD(TYPE, NAME) TYPE NAME
+#define JUMP0(FUNC, THIS) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS)
+#define JUMP1(FUNC, THIS, X1) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1)
+#define JUMP2(FUNC, THIS, X1, X2) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1, X2)
+#define JUMP3(FUNC, THIS, X1,X2,X3) (_IO_JUMPS_FUNC(THIS)->FUNC) (THIS, X1,X2, X3)
+#define JUMP_INIT(NAME, VALUE) VALUE
+#define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0), JUMP_INIT (dummy2, 0)
+
+#define WJUMP0(FUNC, THIS) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS)
+#define WJUMP1(FUNC, THIS, X1) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1)
+#define WJUMP2(FUNC, THIS, X1, X2) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1, X2)
+#define WJUMP3(FUNC, THIS, X1,X2,X3) (_IO_WIDE_JUMPS_FUNC(THIS)->FUNC) (THIS, X1,X2, X3)
/* The 'finish' function does any final cleaning up of an _IO_FILE object.
It does not delete (free) it, but does everything else to finalize it.
@@ -298,10 +282,8 @@ typedef void (*_IO_imbue_t) (_IO_FILE *, void *);
struct _IO_jump_t
{
- JUMP_FIELD(_G_size_t, __dummy);
-#ifdef _G_USING_THUNKS
- JUMP_FIELD(_G_size_t, __dummy2);
-#endif
+ JUMP_FIELD(size_t, __dummy);
+ JUMP_FIELD(size_t, __dummy2);
JUMP_FIELD(_IO_finish_t, __finish);
JUMP_FIELD(_IO_overflow_t, __overflow);
JUMP_FIELD(_IO_underflow_t, __underflow);
@@ -862,30 +844,6 @@ extern int _IO_vscanf (const char *, _IO_va_list) __THROW;
# endif
#endif
-/* VTABLE_LABEL defines NAME as of the CLASS class.
- CNLENGTH is strlen(#CLASS). */
-#ifdef __GNUC__
-# if _G_VTABLE_LABEL_HAS_LENGTH
-# define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
- extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CNLENGTH #CLASS);
-# else
-# define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
- extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CLASS);
-# endif
-#endif /* __GNUC__ */
-
-#if !defined(builtinbuf_vtable) && defined(__cplusplus)
-# ifdef __GNUC__
-VTABLE_LABEL(builtinbuf_vtable, builtinbuf, 10)
-# else
-# if _G_VTABLE_LABEL_HAS_LENGTH
-# define builtinbuf_vtable _G_VTABLE_LABEL_PREFIX_ID##10builtinbuf
-# else
-# define builtinbuf_vtable _G_VTABLE_LABEL_PREFIX_ID##builtinbuf
-# endif
-# endif
-#endif /* !defined(builtinbuf_vtable) && defined(__cplusplus) */
-
#define _IO_va_start(args, last) va_start(args, last)
extern struct _IO_fake_stdiobuf _IO_stdin_buf, _IO_stdout_buf, _IO_stderr_buf;
@@ -933,3 +891,17 @@ _IO_acquire_lock_clear_flags2_fct (_IO_FILE **p)
if ((fp->_flags & _IO_USER_LOCK) == 0)
_IO_funlockfile (fp);
}
+
+#if !defined _IO_MTSAFE_IO && !defined NOT_IN_libc
+# define _IO_acquire_lock(_fp) \
+ do { \
+ _IO_FILE *_IO_acquire_lock_file = NULL
+# define _IO_acquire_lock_clear_flags2(_fp) \
+ do { \
+ _IO_FILE *_IO_acquire_lock_file = (_fp)
+# define _IO_release_lock(_fp) \
+ if (_IO_acquire_lock_file != NULL) \
+ _IO_acquire_lock_file->_flags2 &= ~(_IO_FLAGS2_FORTIFY \
+ | _IO_FLAGS2_SCANF_STD); \
+ } while (0)
+#endif
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index c68ca6a76f..aa4e3f5f91 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -76,7 +76,7 @@ extern int errno;
to _IO_buf_base, though not necessarily if we have switched from
get mode to put mode. (The reason is to maintain the invariant
that _IO_read_end corresponds to the external file position.)
- _IO_write_base is non-NULL and usually equal to _IO_base_base.
+ _IO_write_base is non-NULL and usually equal to _IO_buf_base.
We also have _IO_write_end == _IO_buf_end, but only in fully buffered mode.
The un-flushed character are those between _IO_write_base and _IO_write_ptr.
@@ -492,10 +492,10 @@ _IO_old_file_seekoff (fp, offset, dir, mode)
/* Flush unwritten characters.
(This may do an unneeded write if we seek within the buffer.
But to be able to switch to reading, we would need to set
- egptr to ptr. That can't be done in the current design,
+ egptr to pptr. That can't be done in the current design,
which assumes file_ptr() is eGptr. Anyway, since we probably
end up flushing when we close(), it doesn't make much difference.)
- FIXME: simulate mem-papped files. */
+ FIXME: simulate mem-mapped files. */
if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp))
if (_IO_switch_to_get_mode (fp))
@@ -530,7 +530,7 @@ _IO_old_file_seekoff (fp, offset, dir, mode)
break;
case _IO_seek_end:
{
- struct _G_stat64 st;
+ struct stat64 st;
if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode))
{
offset += st.st_size;
diff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c
index c5a35e7917..bef8bc45ea 100644
--- a/libio/oldiofgetpos64.c
+++ b/libio/oldiofgetpos64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +36,6 @@ _IO_old_fgetpos64 (fp, posp)
_IO_FILE *fp;
_IO_fpos64_t *posp;
{
-#ifdef _G_LSEEK64
_IO_off64_t pos;
CHECK_FILE (fp, EOF);
_IO_acquire_lock (fp);
@@ -57,10 +55,6 @@ _IO_old_fgetpos64 (fp, posp)
}
posp->__pos = pos;
return 0;
-#else
- __set_errno (ENOSYS);
- return EOF;
-#endif
}
#ifdef weak_alias
diff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c
index 039318aed1..23cb693d3a 100644
--- a/libio/oldiofsetpos64.c
+++ b/libio/oldiofsetpos64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +36,6 @@ _IO_old_fsetpos64 (fp, posp)
_IO_FILE *fp;
const _IO_fpos64_t *posp;
{
-#ifdef _G_LSEEK64
int result;
CHECK_FILE (fp, EOF);
_IO_acquire_lock (fp);
@@ -56,10 +54,6 @@ _IO_old_fsetpos64 (fp, posp)
result = 0;
_IO_release_lock (fp);
return result;
-#else
- __set_errno (ENOSYS);
- return EOF;
-#endif
}
#ifdef weak_alias
diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c
index e14961ad8e..4965a732bf 100644
--- a/libio/oldiopopen.c
+++ b/libio/oldiopopen.c
@@ -30,7 +30,6 @@
# define _POSIX_SOURCE
#endif
#include "libioP.h"
-#if _IO_HAVE_SYS_WAIT
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
@@ -49,8 +48,6 @@
extern _IO_pid_t _IO_fork (void) __THROW;
#endif
-#endif /* _IO_HAVE_SYS_WAIT */
-
#include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
@@ -123,7 +120,6 @@ _IO_old_proc_open (fp, command, mode)
const char *command;
const char *mode;
{
-#if _IO_HAVE_SYS_WAIT
volatile int read_or_write;
volatile int parent_end, child_end;
int pipe_fds[2];
@@ -194,9 +190,6 @@ _IO_old_proc_open (fp, command, mode)
_IO_mask_flags (fp, read_or_write, _IO_NO_READS|_IO_NO_WRITES);
return fp;
-#else /* !_IO_HAVE_SYS_WAIT */
- return NULL;
-#endif
}
_IO_FILE *
@@ -240,7 +233,6 @@ _IO_old_proc_close (fp)
_IO_FILE *fp;
{
/* This is not name-space clean. FIXME! */
-#if _IO_HAVE_SYS_WAIT
int wstatus;
_IO_proc_file **ptr = &old_proc_file_chain;
_IO_pid_t wait_pid;
@@ -279,9 +271,6 @@ _IO_old_proc_close (fp)
if (wait_pid == -1)
return -1;
return wstatus;
-#else /* !_IO_HAVE_SYS_WAIT */
- return -1;
-#endif
}
const struct _IO_jump_t _IO_old_proc_jumps = {
diff --git a/libio/test-freopen.sh b/libio/test-freopen.sh
index 07b4cf68dd..9ee453087b 100755
--- a/libio/test-freopen.sh
+++ b/libio/test-freopen.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of freopen.
-# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
objpfx=$3
diff --git a/libio/tst-fseek.c b/libio/tst-fseek.c
new file mode 100644
index 0000000000..457a087785
--- /dev/null
+++ b/libio/tst-fseek.c
@@ -0,0 +1,173 @@
+/* Verify that fseek/ftell combination works for wide chars.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <errno.h>
+#include <wchar.h>
+#include <unistd.h>
+#include <string.h>
+
+/* Defined in test-skeleton.c. */
+static int create_temp_file (const char *base, char **filename);
+
+
+static int
+do_seek_end (FILE *fp)
+{
+ long save;
+
+ if (fputws (L"abc\n", fp) == -1)
+ {
+ printf ("do_seek_end: fputws: %s\n", strerror (errno));
+ return 1;
+ }
+
+ save = ftell (fp);
+ rewind (fp);
+
+ if (fseek (fp, 0, SEEK_END) == -1)
+ {
+ printf ("do_seek_end: fseek: %s\n", strerror (errno));
+ return 1;
+ }
+
+ if (save != ftell (fp))
+ {
+ printf ("save = %ld, ftell = %ld\n", save, ftell (fp));
+ return 1;
+ }
+
+ return 0;
+}
+
+int
+do_seek_set (FILE *fp)
+{
+ long save1, save2;
+
+ if (fputws (L"ã‚…ã†\n", fp) == -1)
+ {
+ printf ("seek_set: fputws(1): %s\n", strerror (errno));
+ return 1;
+ }
+
+ save1 = ftell (fp);
+
+ if (fputws (L"ã‚…ã†\n", fp) == -1)
+ {
+ printf ("seek_set: fputws(2): %s\n", strerror (errno));
+ return 1;
+ }
+
+ save2 = ftell (fp);
+
+ if (fputws (L"ã‚…ã†\n", fp) == -1)
+ {
+ printf ("seek_set: fputws(3): %s\n", strerror (errno));
+ return 1;
+ }
+
+ if (fseek (fp, save1, SEEK_SET) == -1)
+ {
+ printf ("seek_set: fseek(1): %s\n", strerror (errno));
+ return 1;
+ }
+
+ if (save1 != ftell (fp))
+ {
+ printf ("save1 = %ld, ftell = %ld\n", save1, ftell (fp));
+ return 1;
+ }
+
+ if (fseek (fp, save2, SEEK_SET) == -1)
+ {
+ printf ("seek_set: fseek(2): %s\n", strerror (errno));
+ return 1;
+ }
+
+ if (save2 != ftell (fp))
+ {
+ printf ("save2 = %ld, ftell = %ld\n", save2, ftell (fp));
+ return 1;
+ }
+
+ return 0;
+}
+
+static int
+do_test (void)
+{
+ if (setlocale (LC_ALL, "ja_JP.UTF-8") == NULL)
+ {
+ printf ("Cannot set ja_JP.UTF-8 locale.\n");
+ exit (1);
+ }
+
+ /* Retain messages in English. */
+ if (setlocale (LC_MESSAGES, "en_US.ISO-8859-1") == NULL)
+ {
+ printf ("Cannot set LC_MESSAGES to en_US.ISO-8859-1 locale.\n");
+ exit (1);
+ }
+
+ int ret = 0;
+ char *filename;
+ int fd = create_temp_file ("tst-fseek.out", &filename);
+
+ if (fd == -1)
+ return 1;
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ {
+ printf ("seek_set: fopen: %s\n", strerror (errno));
+ close (fd);
+ return 1;
+ }
+
+ if (do_seek_set (fp))
+ {
+ printf ("SEEK_SET test failed\n");
+ ret = 1;
+ }
+
+ /* Reopen the file. */
+ fclose (fp);
+ fp = fopen (filename, "w+");
+ if (fp == NULL)
+ {
+ printf ("seek_end: fopen: %s\n", strerror (errno));
+ return 1;
+ }
+
+ if (do_seek_end (fp))
+ {
+ printf ("SEEK_END test failed\n");
+ ret = 1;
+ }
+
+ fclose (fp);
+
+ return ret;
+}
+
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 3f628bfd1b..44b1236c01 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -545,6 +545,57 @@ _IO_wfile_sync (fp)
}
libc_hidden_def (_IO_wfile_sync)
+/* Adjust the internal buffer pointers to reflect the state in the external
+ buffer. The content between fp->_IO_read_base and fp->_IO_read_ptr is
+ assumed to be converted and available in the range
+ fp->_wide_data->_IO_read_base and fp->_wide_data->_IO_read_end.
+
+ Returns 0 on success and -1 on error with the _IO_ERR_SEEN flag set. */
+static inline int
+adjust_wide_data (_IO_FILE *fp, bool do_convert)
+{
+ struct _IO_codecvt *cv = fp->_codecvt;
+
+ int clen = (*cv->__codecvt_do_encoding) (cv);
+
+ /* Take the easy way out for constant length encodings if we don't need to
+ convert. */
+ if (!do_convert && clen > 0)
+ {
+ fp->_wide_data->_IO_read_end += ((fp->_IO_read_ptr - fp->_IO_read_base)
+ / clen);
+ goto done;
+ }
+
+ enum __codecvt_result status;
+ const char *read_stop = (const char *) fp->_IO_read_base;
+ do
+ {
+
+ fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;
+ status = (*cv->__codecvt_do_in) (cv, &fp->_wide_data->_IO_state,
+ fp->_IO_read_base, fp->_IO_read_ptr,
+ &read_stop,
+ fp->_wide_data->_IO_read_base,
+ fp->_wide_data->_IO_buf_end,
+ &fp->_wide_data->_IO_read_end);
+
+ /* Should we return EILSEQ? */
+ if (__builtin_expect (status == __codecvt_error, 0))
+ {
+ fp->_flags |= _IO_ERR_SEEN;
+ return -1;
+ }
+ }
+ while (__builtin_expect (status == __codecvt_partial, 0));
+
+done:
+ /* Now seek to _IO_read_end to behave as if we have read it all in. */
+ fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
+
+ return 0;
+}
+
_IO_off64_t
_IO_wfile_seekoff (fp, offset, dir, mode)
_IO_FILE *fp;
@@ -562,6 +613,10 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
&& (fp->_wide_data->_IO_write_base
== fp->_wide_data->_IO_write_ptr));
+ bool was_writing = ((fp->_wide_data->_IO_write_ptr
+ > fp->_wide_data->_IO_write_base)
+ || _IO_in_put_mode (fp));
+
if (mode == 0)
{
/* XXX For wide stream with backup store it is not very
@@ -589,15 +644,12 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
/* Flush unwritten characters.
(This may do an unneeded write if we seek within the buffer.
But to be able to switch to reading, we would need to set
- egptr to ptr. That can't be done in the current design,
+ egptr to pptr. That can't be done in the current design,
which assumes file_ptr() is eGptr. Anyway, since we probably
end up flushing when we close(), it doesn't make much difference.)
FIXME: simulate mem-mapped files. */
-
- if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base
- || _IO_in_put_mode (fp))
- if (_IO_switch_to_wget_mode (fp))
- return WEOF;
+ else if (was_writing && _IO_switch_to_wget_mode (fp))
+ return WEOF;
if (fp->_wide_data->_IO_buf_base == NULL)
{
@@ -628,29 +680,104 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
cv = fp->_codecvt;
clen = (*cv->__codecvt_do_encoding) (cv);
- if (clen > 0)
+ if (mode != 0 || !was_writing)
{
- offset -= (fp->_wide_data->_IO_read_end
- - fp->_wide_data->_IO_read_ptr) * clen;
- /* Adjust by readahead in external buffer. */
- offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+ if (clen > 0)
+ {
+ offset -= (fp->_wide_data->_IO_read_end
+ - fp->_wide_data->_IO_read_ptr) * clen;
+ /* Adjust by readahead in external buffer. */
+ offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+ }
+ else
+ {
+ int nread;
+
+ flushed:
+ delta = (fp->_wide_data->_IO_read_ptr
+ - fp->_wide_data->_IO_read_base);
+ fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
+ nread = (*cv->__codecvt_do_length) (cv,
+ &fp->_wide_data->_IO_state,
+ fp->_IO_read_base,
+ fp->_IO_read_end, delta);
+ fp->_IO_read_ptr = fp->_IO_read_base + nread;
+ fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;
+ offset -= fp->_IO_read_end - fp->_IO_read_base - nread;
+ }
}
else
{
- int nread;
+ char *new_write_ptr = fp->_IO_write_ptr;
- delta = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_base;
- fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
- nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state,
- fp->_IO_read_base,
- fp->_IO_read_end, delta);
- fp->_IO_read_ptr = fp->_IO_read_base + nread;
- fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;
- offset -= fp->_IO_read_end - fp->_IO_read_base - nread;
+ if (clen > 0)
+ offset += (fp->_wide_data->_IO_write_ptr
+ - fp->_wide_data->_IO_write_base) / clen;
+ else
+ {
+ enum __codecvt_result status;
+ delta = (fp->_wide_data->_IO_write_ptr
+ - fp->_wide_data->_IO_write_base);
+ const wchar_t *write_base = fp->_wide_data->_IO_write_base;
+
+ /* FIXME: This actually ends up in two iterations of conversion,
+ one here and the next when the buffer actually gets flushed.
+ It may be possible to optimize this in future so that
+ wdo_write identifies already converted content and does not
+ redo it. In any case, this is much better than having to
+ flush buffers for every ftell. */
+ do
+ {
+ /* Ugh, no point trying to avoid the flush. Just do it
+ and go back to how it was with the read mode. */
+ if (delta > 0 && new_write_ptr == fp->_IO_buf_end)
+ {
+ if (_IO_switch_to_wget_mode (fp))
+ return WEOF;
+ goto flushed;
+ }
+
+ const wchar_t *new_wbase = fp->_wide_data->_IO_write_base;
+ fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
+ status = (*cv->__codecvt_do_out) (cv,
+ &fp->_wide_data->_IO_state,
+ write_base,
+ write_base + delta,
+ &new_wbase,
+ new_write_ptr,
+ fp->_IO_buf_end,
+ &new_write_ptr);
+
+ delta -= new_wbase - write_base;
+
+ /* If there was an error, then return WEOF.
+ TODO: set buffer state. */
+ if (__builtin_expect (status == __codecvt_error, 0))
+ return WEOF;
+ }
+ while (delta > 0);
+ }
+
+ /* _IO_read_end coincides with fp._offset, so the actual file position
+ is fp._offset - (_IO_read_end - new_write_ptr). This is fine
+ even if fp._offset is not set, since fp->_IO_read_end is then at
+ _IO_buf_base and this adjustment is for unbuffered output. */
+ offset -= fp->_IO_read_end - new_write_ptr;
}
if (fp->_offset == _IO_pos_BAD)
- goto dumb;
+ {
+ if (mode != 0)
+ goto dumb;
+ else
+ {
+ result = _IO_SYSSEEK (fp, 0, dir);
+ if (result == EOF)
+ return result;
+ fp->_offset = result;
+ }
+ }
+
/* Make offset absolute, assuming current pointer is file_ptr(). */
offset += fp->_offset;
@@ -660,7 +787,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
break;
case _IO_seek_end:
{
- struct _G_stat64 st;
+ struct stat64 st;
if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode))
{
offset += st.st_size;
@@ -693,6 +820,10 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
fp->_wide_data->_IO_buf_base);
_IO_wsetp (fp, fp->_wide_data->_IO_buf_base,
fp->_wide_data->_IO_buf_base);
+
+ if (adjust_wide_data (fp, false))
+ goto dumb;
+
_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
goto resync;
}
@@ -733,6 +864,10 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
_IO_wsetg (fp, fp->_wide_data->_IO_buf_base,
fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
_IO_wsetp (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
+
+ if (adjust_wide_data (fp, true))
+ goto dumb;
+
fp->_offset = result + count;
_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
return offset;
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 248b0092a5..3e775ed446 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,64 @@
+2012-10-23 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile [$(cross-compiling) = no]: Change condition to
+ [$(run-built-tests) = yes].
+
+2012-10-22 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * tst-fmon.sh: Redirect test program stdin in loop from /dev/null.
+ * tst-numeric.sh: Likewise.
+ * tst-rpmatch.sh: Likewise.
+
+2012-10-19 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * tst-wctype.sh (run_program_prefix): Remove variable.
+ (tst_wctype): New variable. Use it directly to run test program
+ instead of passing test program name as argument.
+
+2012-10-19 Florian Pritz <bluewind@xinu.at>
+
+ [BZ #13758]
+ * locales/de_AT (LC_TIME): Change month name from "FebruAr" to
+ "Februar".
+
+2012-10-19 Pravin Satpute <psatpute@redhat.com>
+
+ [BZ #14694]
+ * locales/mr_IN: Fix Wednesday in DAY and August, September and
+ October in ABMON and MON.
+
+2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ * gen-locale.sh: Add "set -e".
+ * sort-test.sh: Likewise.
+ * tst-ctype.sh: Likewise.
+ * tst-fmon.sh: Likewise.
+ * tst-langinfo.sh: Likewise.
+ * tst-locale.sh: Likewise.
+ * tst-mbswcs.sh: Likewise.
+ * tst-numeric.sh: Likewise.
+ * tst-rpmatch.sh: Likewise.
+ * tst-trans.sh: Likewise.
+ * tst-wctype.sh: Likewise.
+ * Makefile: Do not specify -e option when running testsuite
+ shell scripts.
+
+ * sort-test.sh: Add copyright header.
+
+2012-09-05 Jeff Law <law@redhat.com>
+
+ [BZ#14510]
+ * locales/es_DO: Fix LC_NUMERIC decimal_point and thousands_sep.
+ * locales/es_GT: Likewise.
+ * locales/es_HN: Likewise.
+ * locales/es_MX: Likewise.
+ * locales/es_NI: Likewise.
+ * locales/es_PA: Likewise.
+ * locales/es_PR: Likewise.
+ * locales/es_SV: Likewise.
+
2012-06-20 Petr Baudis <pasky@ucw.cz>
* locales/mag_IN: Fix comment character.
diff --git a/localedata/Makefile b/localedata/Makefile
index 0873a5524f..d1b277ef31 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -1,5 +1,4 @@
-# Copyright (C) 1996-2003,2005,2007-2009,2011,2012
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -60,7 +59,7 @@ generated-dirs := $(ld-test-names) tt_TT de_DE.437 \
# Get $(inst_i18ndir) defined.
include ../Makeconfig
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \
tst_iswctype tst_iswdigit tst_iswgraph \
tst_iswlower tst_iswprint tst_iswpunct \
@@ -114,7 +113,7 @@ CFLAGS-tst-mbswcs5.c = -Wno-format
CFLAGS-tst-trans.c = -Wno-format
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
# We have to generate locales
LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
en_US.ISO-8859-1 ja_JP.EUC-JP da_DK.ISO-8859-1 \
@@ -134,7 +133,7 @@ generated-dirs += $(LOCALES)
$(addprefix $(objpfx),$(CTYPE_FILES)): %: \
gen-locale.sh $(common-objpfx)locale/localedef Makefile \
$(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
- @$(SHELL) -e gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
+ @$(SHELL) gen-locale.sh $(common-objpfx) '$(built-program-cmd)' $@
$(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \
$(addprefix $(objpfx),$(CTYPE_FILES))
@@ -146,45 +145,45 @@ tests: $(objpfx)sort-test.out $(objpfx)tst-fmon.out $(objpfx)tst-locale.out \
$(objpfx)sort-test.out: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
$(test-input-data) $(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(test-input) \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(test-input) \
> $@
$(objpfx)tst-fmon.out: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-fmon.data \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' tst-fmon.data \
> $@
$(objpfx)tst-numeric.out: tst-numeric.sh $(objpfx)tst-numeric tst-numeric.data \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' tst-numeric.data \
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' tst-numeric.data \
> $@
$(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
$(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@
$(objpfx)tst-rpmatch.out: tst-rpmatch.sh $(objpfx)tst-rpmatch \
$(objpfx)tst-fmon.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)' > $@
$(objpfx)tst-trans.out: tst-trans.sh $(objpfx)tst-trans \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)'
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
$(objpfx)tst-mbswcs.out: tst-mbswcs.sh $(objpfx)tst-mbswcs1 \
$(objpfx)tst-mbswcs2 $(objpfx)tst-mbswcs3 \
$(objpfx)tst-mbswcs4 $(objpfx)tst-mbswcs5 \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)'
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
$(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)tst-wctype.out: tst-wctype.sh $(objpfx)tst-wctype \
$(objpfx)sort-test.out tst-wctype.input \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
$(objpfx)sort-test.out \
$(addprefix $(objpfx),$(CTYPE_FILES))
- $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)tst-digits.out: $(objpfx)tst-locale.out
$(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
endif
diff --git a/localedata/gen-locale.sh b/localedata/gen-locale.sh
index 89a9e06ee7..6dfa7caca9 100644
--- a/localedata/gen-locale.sh
+++ b/localedata/gen-locale.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Generate test locale files.
-# Copyright (C) 2000,01,02 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx="$1"; shift
localedef="$1"; shift
locfile="$1"; shift
diff --git a/localedata/locales/de_AT b/localedata/locales/de_AT
index e566eedf3f..c36913bd9a 100644
--- a/localedata/locales/de_AT
+++ b/localedata/locales/de_AT
@@ -100,7 +100,7 @@ abmon "<U004A><U00E4><U006E>";"<U0046><U0065><U0062>";/
"<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
"<U004E><U006F><U0076>";"<U0044><U0065><U007A>"
mon "<U004A><U00E4><U006E><U006E><U0065><U0072>";/
- "<U0046><U0065><U0062><U0072><U0075><U0041><U0072>";/
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072>";/
"<U004D><U00E4><U0072><U007A>";/
"<U0041><U0070><U0072><U0069><U006C>";/
"<U004D><U0061><U0069>";/
diff --git a/localedata/locales/es_DO b/localedata/locales/es_DO
index 7cf54cf3a9..4753ecfdd7 100644
--- a/localedata/locales/es_DO
+++ b/localedata/locales/es_DO
@@ -78,7 +78,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002C>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_GT b/localedata/locales/es_GT
index 49d369f74f..0889d44c48 100644
--- a/localedata/locales/es_GT
+++ b/localedata/locales/es_GT
@@ -77,7 +77,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002C>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_HN b/localedata/locales/es_HN
index a809188463..febab6bbea 100644
--- a/localedata/locales/es_HN
+++ b/localedata/locales/es_HN
@@ -78,7 +78,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002C>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_MX b/localedata/locales/es_MX
index 7a1cccc96b..a201f0bbb8 100644
--- a/localedata/locales/es_MX
+++ b/localedata/locales/es_MX
@@ -78,7 +78,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U2009>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_NI b/localedata/locales/es_NI
index 7371532079..384ebaa07d 100644
--- a/localedata/locales/es_NI
+++ b/localedata/locales/es_NI
@@ -69,7 +69,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002C>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_PA b/localedata/locales/es_PA
index ae5cd3a4fd..7f22166f3e 100644
--- a/localedata/locales/es_PA
+++ b/localedata/locales/es_PA
@@ -78,7 +78,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002c>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_PR b/localedata/locales/es_PR
index b15ca45222..93d7d21c25 100644
--- a/localedata/locales/es_PR
+++ b/localedata/locales/es_PR
@@ -69,7 +69,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002C>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_SV b/localedata/locales/es_SV
index d99b6cff62..fa5e5805ce 100644
--- a/localedata/locales/es_SV
+++ b/localedata/locales/es_SV
@@ -78,7 +78,9 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-copy "es_ES"
+decimal_point "<U002E>"
+thousands_sep "<U002C>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/mr_IN b/localedata/locales/mr_IN
index 54fe3118f8..dc93845a1a 100644
--- a/localedata/locales/mr_IN
+++ b/localedata/locales/mr_IN
@@ -1,8 +1,7 @@
comment_char %
escape_char /
% Marathi language locale for India.
-% Contributed by Kentaroh Noji <knoji@jp.ibm.com> and
-% Tetsuji Orita <orita@jp.ibm.com>.
+% Contributed by Kentaroh Noji and Tetsuji Orita <orita@jp.ibm.com>.
LC_IDENTIFICATION
title "Marathi language locale for India"
@@ -109,7 +108,7 @@ abday "<U0930><U0935><U093F>";"<U0938><U094B><U092E>";/
day "<U0930><U0935><U093F><U0935><U093E><U0930>";/
"<U0938><U094B><U092E><U0935><U093E><U0930>";/
"<U092E><U0902><U0917><U0933><U0935><U093E><U0930>";/
- "<U092E><U0902><U0917><U0933><U0935><U093E><U0930>";/
+ "<U092C><U0941><U0927><U0935><U093E><U0930>";/
"<U0917><U0941><U0930><U0941><U0935><U093E><U0930>";/
"<U0936><U0941><U0915><U094D><U0930><U0935><U093E><U0930>";/
"<U0936><U0928><U093F><U0935><U093E><U0930>"
@@ -122,9 +121,9 @@ abmon "<U091C><U093E><U0928><U0947><U0935><U093E><U0930><U0940>";/
"<U092E><U0947>";/
"<U091C><U0942><U0928>";/
"<U091C><U0941><U0932><U0948>";/
- "<U0913><U0917><U0938><U094D><U091F>";/
- "<U0938><U0947><U092A><U094D><U091F><U0947><U0902><U092C><U0930>";/
- "<U0913><U0915><U094D><U091F><U094B><U092C><U0930>";/
+ "<U0911><U0917><U0938><U094D><U091F>";/
+ "<U0938><U092A><U094D><U091F><U0947><U0902><U092C><U0930>";/
+ "<U0911><U0915><U094D><U091F><U094B><U092C><U0930>";/
"<U0928><U094B><U0935><U094D><U0939><U0947><U0902><U092C><U0930>";/
"<U0921><U093F><U0938><U0947><U0902><U092C><U0930>"
%
@@ -136,9 +135,9 @@ mon "<U091C><U093E><U0928><U0947><U0935><U093E><U0930><U0940>";/
"<U092E><U0947>";/
"<U091C><U0942><U0928>";/
"<U091C><U0941><U0932><U0948>";/
- "<U0913><U0917><U0938><U094D><U091F>";/
- "<U0938><U0947><U092A><U094D><U091F><U0947><U0902><U092C><U0930>";/
- "<U0913><U0915><U094D><U091F><U094B><U092C><U0930>";/
+ "<U0911><U0917><U0938><U094D><U091F>";/
+ "<U0938><U092A><U094D><U091F><U0947><U0902><U092C><U0930>";/
+ "<U0911><U0915><U094D><U091F><U094B><U092C><U0930>";/
"<U0928><U094B><U0935><U094D><U0939><U0947><U0902><U092C><U0930>";/
"<U0921><U093F><U0938><U0947><U0902><U092C><U0930>"
%
diff --git a/localedata/sort-test.sh b/localedata/sort-test.sh
index 67de72eef3..8f8be8f67b 100644
--- a/localedata/sort-test.sh
+++ b/localedata/sort-test.sh
@@ -1,4 +1,23 @@
#! /bin/sh
+# Test collation using xfrm-test.
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
run_program_prefix=$1; shift
diff --git a/localedata/tst-ctype.sh b/localedata/tst-ctype.sh
index 61f8cae62b..16420a89b4 100755
--- a/localedata/tst-ctype.sh
+++ b/localedata/tst-ctype.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the implementation of the isxxx() and toxxx() functions.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
tst_ctype=$1; shift
status=0
diff --git a/localedata/tst-fmon.sh b/localedata/tst-fmon.sh
index be6f128725..52d32d0a9b 100755
--- a/localedata/tst-fmon.sh
+++ b/localedata/tst-fmon.sh
@@ -1,9 +1,8 @@
#! /bin/sh
# Testing the implementation of strfmon(3).
-# Copyright (C) 1996-1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -19,6 +18,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
datafile=$3
@@ -47,7 +48,7 @@ while IFS=" " read locale format value expect; do
LOCPATH=${common_objpfx}localedata \
GCONV_PATH=${common_objpfx}/iconvdata \
${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
- "$locale" "$format" "$value" "$expect" ||
+ "$locale" "$format" "$value" "$expect" < /dev/null ||
errcode=$?
fi
done < $datafile
diff --git a/localedata/tst-langinfo.sh b/localedata/tst-langinfo.sh
index 567361c233..04771cb02d 100755
--- a/localedata/tst-langinfo.sh
+++ b/localedata/tst-langinfo.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test nl_langinfo.
-# Copyright (C) 2000, 2001, 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
diff --git a/localedata/tst-locale.sh b/localedata/tst-locale.sh
index 96c26a750c..96eddc1187 100755
--- a/localedata/tst-locale.sh
+++ b/localedata/tst-locale.sh
@@ -1,9 +1,8 @@
#! /bin/sh
# Testing the implementation of localedata.
-# Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger, <aj@arthur.rhein-neckar.de>, 1998.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -19,6 +18,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
localedef=$1; shift
diff --git a/localedata/tst-mbswcs.sh b/localedata/tst-mbswcs.sh
index 30667890cd..5a067ec0da 100755
--- a/localedata/tst-mbswcs.sh
+++ b/localedata/tst-mbswcs.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the implementation of the mb*towc*() and wc*tomb*() functions.
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
run_program_prefix=$1; shift
diff --git a/localedata/tst-numeric.sh b/localedata/tst-numeric.sh
index b78fc94830..70ddc405d6 100644
--- a/localedata/tst-numeric.sh
+++ b/localedata/tst-numeric.sh
@@ -1,9 +1,8 @@
#! /bin/sh
# Testing the implementation of LC_NUMERIC and snprintf(3).
-# Copyright (C) 1996, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -19,6 +18,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
datafile=$3
@@ -32,7 +33,7 @@ while IFS=" " read locale format value expect; do
if LOCPATH=${common_objpfx}localedata \
GCONV_PATH=${common_objpfx}/iconvdata \
${run_program_prefix} ${common_objpfx}localedata/tst-numeric \
- "$locale" "$format" "$value" "$expect"
+ "$locale" "$format" "$value" "$expect" < /dev/null
then
echo "Locale: \"${locale}\" Format: \"${format}\"" \
"Value: \"${value}\" Expect: \"${expect}\" passed"
diff --git a/localedata/tst-rpmatch.sh b/localedata/tst-rpmatch.sh
index d8c79f7b00..8788879271 100755
--- a/localedata/tst-rpmatch.sh
+++ b/localedata/tst-rpmatch.sh
@@ -1,6 +1,6 @@
#! /bin/sh -f
#
-# Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library and contains tests for
# the rpmatch(3)-implementation.
# contributed by Jochen Hein <jochen.hein@delphi.central.de>
@@ -18,6 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
tst_rpmatch=$2
@@ -26,7 +28,7 @@ while IFS=\& read locale string result dummy; do
if [ "$locale" != "#" ]; then
LOCPATH=${common_objpfx}localedata \
GCONV_PATH=${common_objpfx}/iconvdata \
- ${tst_rpmatch} $locale $string $result \
+ ${tst_rpmatch} $locale $string $result < /dev/null \
|| { echo "$locale $string $result FAILED"; exit 1; }
fi
done <<EOF
diff --git a/localedata/tst-trans.sh b/localedata/tst-trans.sh
index 5155a35852..e90b653ed1 100755
--- a/localedata/tst-trans.sh
+++ b/localedata/tst-trans.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test character mapping definitions.
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
diff --git a/localedata/tst-wctype.sh b/localedata/tst-wctype.sh
index 3c657815d4..8cb34b8570 100755
--- a/localedata/tst-wctype.sh
+++ b/localedata/tst-wctype.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test locale-define character classes.
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,13 +17,14 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
-run_program_prefix=$2
+tst_wctype=$2
# Run the test program.
LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
-LC_ALL=ja_JP.EUC-JP ${run_program_prefix} \
- ${common_objpfx}localedata/tst-wctype < tst-wctype.input \
+LC_ALL=ja_JP.EUC-JP ${tst_wctype} < tst-wctype.input \
> ${common_objpfx}localedata/tst-wctype.out
exit $?
diff --git a/malloc/Makefile b/malloc/Makefile
index 5d6d716a78..1e0281f9fa 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -1,5 +1,4 @@
-# Copyright (C) 1991-2003, 2005, 2006, 2007, 2009, 2011, 2012
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +25,7 @@ all:
dist-headers := malloc.h
headers := $(dist-headers) obstack.h mcheck.h
tests := mallocbug tst-malloc tst-valloc tst-calloc tst-obstack \
- tst-mallocstate tst-mcheck tst-mallocfork tst-trim1
+ tst-mallocstate tst-mcheck tst-mallocfork tst-trim1 tst-malloc-usable
test-srcs = tst-mtrace
routines = malloc morecore mcheck mtrace obstack
@@ -105,17 +104,18 @@ $(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
lib: $(objpfx)libmcheck.a
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
ifeq (yes,$(build-shared))
ifneq ($(PERL),no)
tests: $(objpfx)tst-mtrace.out
$(objpfx)tst-mtrace.out: tst-mtrace.sh $(objpfx)tst-mtrace
- $(SHELL) -e $< $(common-objpfx)
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
endif
endif
tst-mcheck-ENV = MALLOC_CHECK_=3
+tst-malloc-usable-ENV = MALLOC_CHECK_=3
CPPFLAGS-malloc.c += -DPER_THREAD
# Uncomment this for test releases. For public releases it is too expensive.
diff --git a/malloc/arena.c b/malloc/arena.c
index 33c4ff37a7..eb9180eb97 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -1,6 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012
- Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -20,6 +19,9 @@
#include <stdbool.h>
+/* Get the implementation for check_may_shrink_heap. */
+#include <malloc-sysdep.h>
+
/* Compile-time constants. */
#define HEAP_MIN_SIZE (32*1024)
@@ -120,14 +122,14 @@ int __malloc_initialized = -1;
if(ptr) \
(void)mutex_lock(&ptr->mutex); \
else \
- ptr = arena_get2(ptr, (size)); \
+ ptr = arena_get2(ptr, (size), NULL); \
} while(0)
#else
# define arena_lock(ptr, size) do { \
if(ptr && !mutex_trylock(&ptr->mutex)) { \
THREAD_STAT(++(ptr->stat_lock_direct)); \
} else \
- ptr = arena_get2(ptr, (size)); \
+ ptr = arena_get2(ptr, (size), NULL); \
} while(0)
#endif
@@ -141,6 +143,8 @@ int __malloc_initialized = -1;
/**************************************************************************/
+#ifndef NO_THREADS
+
/* atfork support. */
static __malloc_ptr_t (*save_malloc_hook) (size_t __size,
@@ -276,7 +280,7 @@ ptmalloc_unlock_all (void)
(void)mutex_unlock(&list_lock);
}
-#ifdef __linux__
+# ifdef __linux__
/* In NPTL, unlocking a mutex in the child process after a
fork() is currently unsafe, whereas re-initializing it is safe and
@@ -311,11 +315,13 @@ ptmalloc_unlock_all2 (void)
atfork_recursive_cntr = 0;
}
-#else
+# else
-#define ptmalloc_unlock_all2 ptmalloc_unlock_all
+# define ptmalloc_unlock_all2 ptmalloc_unlock_all
-#endif
+# endif
+
+#endif /* !NO_THREADS */
/* Initialization routine. */
#include <string.h>
@@ -618,9 +624,9 @@ shrink_heap(heap_info *h, long diff)
new_size = (long)h->size - diff;
if(new_size < (long)sizeof(*h))
return -1;
- /* Try to re-map the extra heap space freshly to save memory, and
- make it inaccessible. */
- if (__builtin_expect (__libc_enable_secure, 0))
+ /* Try to re-map the extra heap space freshly to save memory, and make it
+ inaccessible. See malloc-sysdep.h to know when this is true. */
+ if (__builtin_expect (check_may_shrink_heap (), 0))
{
if((char *)MMAP((char *)h + new_size, diff, PROT_NONE,
MAP_FIXED) == (char *) MAP_FAILED)
@@ -628,7 +634,7 @@ shrink_heap(heap_info *h, long diff)
h->mprotect_size = new_size;
}
else
- madvise ((char *)h + new_size, diff, MADV_DONTNEED);
+ __madvise ((char *)h + new_size, diff, MADV_DONTNEED);
/*fprintf(stderr, "shrink %p %08lx\n", h, new_size);*/
h->size = new_size;
@@ -652,15 +658,19 @@ heap_trim(heap_info *heap, size_t pad)
unsigned long pagesz = GLRO(dl_pagesize);
mchunkptr top_chunk = top(ar_ptr), p, bck, fwd;
heap_info *prev_heap;
- long new_size, top_size, extra;
+ long new_size, top_size, extra, prev_size, misalign;
/* Can this heap go away completely? */
while(top_chunk == chunk_at_offset(heap, sizeof(*heap))) {
prev_heap = heap->prev;
- p = chunk_at_offset(prev_heap, prev_heap->size - (MINSIZE-2*SIZE_SZ));
+ prev_size = prev_heap->size - (MINSIZE-2*SIZE_SZ);
+ p = chunk_at_offset(prev_heap, prev_size);
+ /* fencepost must be properly aligned. */
+ misalign = ((long) p) & MALLOC_ALIGN_MASK;
+ p = chunk_at_offset(prev_heap, prev_size - misalign);
assert(p->size == (0|PREV_INUSE)); /* must be fencepost */
p = prev_chunk(p);
- new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ);
+ new_size = chunksize(p) + (MINSIZE-2*SIZE_SZ) + misalign;
assert(new_size>0 && new_size<(long)(2*MINSIZE));
if(!prev_inuse(p))
new_size += p->prev_size;
@@ -778,9 +788,11 @@ get_free_list (void)
return result;
}
-
+/* Lock and return an arena that can be reused for memory allocation.
+ Avoid AVOID_ARENA as we have already failed to allocate memory in
+ it and it is currently locked. */
static mstate
-reused_arena (void)
+reused_arena (mstate avoid_arena)
{
mstate result;
static mstate next_to_use;
@@ -797,6 +809,11 @@ reused_arena (void)
}
while (result != next_to_use);
+ /* Avoid AVOID_ARENA as we have already failed to allocate memory
+ in that arena and it is currently locked. */
+ if (result == avoid_arena)
+ result = result->next;
+
/* No arena available. Wait for the next in line. */
(void)mutex_lock(&result->mutex);
@@ -811,7 +828,7 @@ reused_arena (void)
static mstate
internal_function
-arena_get2(mstate a_tsd, size_t size)
+arena_get2(mstate a_tsd, size_t size, mstate avoid_arena)
{
mstate a;
@@ -856,7 +873,7 @@ arena_get2(mstate a_tsd, size_t size)
catomic_decrement (&narenas);
}
else
- a = reused_arena ();
+ a = reused_arena (avoid_arena);
}
#else
if(!a_tsd)
@@ -907,6 +924,27 @@ arena_get2(mstate a_tsd, size_t size)
return a;
}
+/* If we don't have the main arena, then maybe the failure is due to running
+ out of mmapped areas, so we can try allocating on the main arena.
+ Otherwise, it is likely that sbrk() has failed and there is still a chance
+ to mmap(), so try one of the other arenas. */
+static mstate
+arena_get_retry (mstate ar_ptr, size_t bytes)
+{
+ if(ar_ptr != &main_arena) {
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = &main_arena;
+ (void)mutex_lock(&ar_ptr->mutex);
+ } else {
+ /* Grab ar_ptr->next prior to releasing its lock. */
+ mstate prev = ar_ptr->next ? ar_ptr : 0;
+ (void)mutex_unlock(&ar_ptr->mutex);
+ ar_ptr = arena_get2(prev, bytes, ar_ptr);
+ }
+
+ return ar_ptr;
+}
+
#ifdef PER_THREAD
static void __attribute__ ((section ("__libc_thread_freeres_fn")))
arena_thread_freeres (void)
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 8a34c78488..b38dffbdf6 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001-2009, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -89,6 +89,35 @@ __malloc_check_init()
#define MAGICBYTE(p) ( ( ((size_t)p >> 3) ^ ((size_t)p >> 11)) & 0xFF )
+/* Visualize the chunk as being partitioned into blocks of 256 bytes from the
+ highest address of the chunk, downwards. The beginning of each block tells
+ us the size of the previous block, up to the actual size of the requested
+ memory. Our magic byte is right at the end of the requested size, so we
+ must reach it with this iteration, otherwise we have witnessed a memory
+ corruption. */
+static size_t
+malloc_check_get_size(mchunkptr p)
+{
+ size_t size;
+ unsigned char c;
+ unsigned char magic = MAGICBYTE(p);
+
+ assert(using_malloc_checking == 1);
+
+ for (size = chunksize(p) - 1 + (chunk_is_mmapped(p) ? 0 : SIZE_SZ);
+ (c = ((unsigned char*)p)[size]) != magic;
+ size -= c) {
+ if(c<=0 || size<(c+2*SIZE_SZ)) {
+ malloc_printerr(check_action, "malloc_check_get_size: memory corruption",
+ chunk2mem(p));
+ return 0;
+ }
+ }
+
+ /* chunk2mem size. */
+ return size - 2*SIZE_SZ;
+}
+
/* Instrument a chunk with overrun detector byte(s) and convert it
into a user pointer with requested size sz. */
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 28039b4720..3f0b6b1cd4 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
@@ -1075,9 +1075,10 @@ static void* realloc_check(void* oldmem, size_t bytes,
const void *caller);
static void* memalign_check(size_t alignment, size_t bytes,
const void *caller);
-/* These routines are never needed in this configuration. */
+#ifndef NO_THREADS
static void* malloc_atfork(size_t sz, const void *caller);
static void free_atfork(void* mem, const void *caller);
+#endif
/* ------------- Optional versions of memcopy ---------------- */
@@ -2857,21 +2858,10 @@ __libc_malloc(size_t bytes)
return 0;
victim = _int_malloc(ar_ptr, bytes);
if(!victim) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry(ar_ptr, bytes);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
victim = _int_malloc(ar_ptr, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
- (void)mutex_unlock(&main_arena.mutex);
- if(ar_ptr) {
- victim = _int_malloc(ar_ptr, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
} else
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3035,22 +3025,10 @@ __libc_memalign(size_t alignment, size_t bytes)
return 0;
p = _int_memalign(ar_ptr, alignment, bytes);
if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry (ar_ptr, bytes);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
p = _int_memalign(ar_ptr, alignment, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- mstate prev = ar_ptr->next ? ar_ptr : 0;
- (void)mutex_unlock(&ar_ptr->mutex);
- ar_ptr = arena_get2(prev, bytes);
- if(ar_ptr) {
- p = _int_memalign(ar_ptr, alignment, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
} else
(void)mutex_unlock(&ar_ptr->mutex);
@@ -3083,23 +3061,14 @@ __libc_valloc(size_t bytes)
if(!ar_ptr)
return 0;
p = _int_valloc(ar_ptr, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry (ar_ptr, bytes);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
p = _int_memalign(ar_ptr, pagesz, bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0, bytes);
- if(ar_ptr) {
- p = _int_memalign(ar_ptr, pagesz, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
- }
+ } else
+ (void)mutex_unlock (&ar_ptr->mutex);
assert(!p || chunk_is_mmapped(mem2chunk(p)) ||
ar_ptr == arena_for_chunk(mem2chunk(p)));
@@ -3127,24 +3096,14 @@ __libc_pvalloc(size_t bytes)
arena_get(ar_ptr, bytes + 2*pagesz + MINSIZE);
p = _int_pvalloc(ar_ptr, bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
if(!p) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(ar_ptr != &main_arena) {
- ar_ptr = &main_arena;
- (void)mutex_lock(&ar_ptr->mutex);
+ ar_ptr = arena_get_retry (ar_ptr, bytes + 2*pagesz + MINSIZE);
+ if (__builtin_expect(ar_ptr != NULL, 1)) {
p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
(void)mutex_unlock(&ar_ptr->mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- ar_ptr = arena_get2(ar_ptr->next ? ar_ptr : 0,
- bytes + 2*pagesz + MINSIZE);
- if(ar_ptr) {
- p = _int_memalign(ar_ptr, pagesz, rounded_bytes);
- (void)mutex_unlock(&ar_ptr->mutex);
- }
}
- }
+ } else
+ (void)mutex_unlock(&ar_ptr->mutex);
assert(!p || chunk_is_mmapped(mem2chunk(p)) ||
ar_ptr == arena_for_chunk(mem2chunk(p)));
@@ -3209,30 +3168,19 @@ __libc_calloc(size_t n, size_t elem_size)
#endif
mem = _int_malloc(av, sz);
- /* Only clearing follows, so we can unlock early. */
- (void)mutex_unlock(&av->mutex);
assert(!mem || chunk_is_mmapped(mem2chunk(mem)) ||
av == arena_for_chunk(mem2chunk(mem)));
if (mem == 0) {
- /* Maybe the failure is due to running out of mmapped areas. */
- if(av != &main_arena) {
- (void)mutex_lock(&main_arena.mutex);
- mem = _int_malloc(&main_arena, sz);
- (void)mutex_unlock(&main_arena.mutex);
- } else {
- /* ... or sbrk() has failed and there is still a chance to mmap() */
- (void)mutex_lock(&main_arena.mutex);
- av = arena_get2(av->next ? av : 0, sz);
- (void)mutex_unlock(&main_arena.mutex);
- if(av) {
- mem = _int_malloc(av, sz);
- (void)mutex_unlock(&av->mutex);
- }
+ av = arena_get_retry (av, sz);
+ if (__builtin_expect(av != NULL, 1)) {
+ mem = _int_malloc(av, sz);
+ (void)mutex_unlock(&av->mutex);
}
if (mem == 0) return 0;
- }
+ } else
+ (void)mutex_unlock(&av->mutex);
p = mem2chunk(mem);
/* Two optional cases in which clearing not necessary */
@@ -4502,7 +4450,7 @@ static int mtrim(mstate av, size_t pad)
content. */
memset (paligned_mem, 0x89, size & ~psm1);
#endif
- madvise (paligned_mem, size & ~psm1, MADV_DONTNEED);
+ __madvise (paligned_mem, size & ~psm1, MADV_DONTNEED);
result = 1;
}
@@ -4551,6 +4499,9 @@ musable(void* mem)
mchunkptr p;
if (mem != 0) {
p = mem2chunk(mem);
+
+ if (__builtin_expect(using_malloc_checking == 1, 0))
+ return malloc_check_get_size(p);
if (chunk_is_mmapped(p))
return chunksize(p) - 2*SIZE_SZ;
else if (inuse(p))
@@ -4754,13 +4705,15 @@ int __libc_mallopt(int param_number, int value)
if((unsigned long)value > HEAP_MAX_SIZE/2)
res = 0;
else
- mp_.mmap_threshold = value;
- mp_.no_dyn_threshold = 1;
+ {
+ mp_.mmap_threshold = value;
+ mp_.no_dyn_threshold = 1;
+ }
break;
case M_MMAP_MAX:
- mp_.n_mmaps_max = value;
- mp_.no_dyn_threshold = 1;
+ mp_.n_mmaps_max = value;
+ mp_.no_dyn_threshold = 1;
break;
case M_CHECK_ACTION:
@@ -4946,8 +4899,7 @@ malloc_printerr(int action, const char *str, void *ptr)
while (cp > buf)
*--cp = '0';
- __libc_message (action & 2,
- "*** glibc detected *** %s: %s: 0x%s ***\n",
+ __libc_message (action & 2, "*** Error in `%s': %s: 0x%s ***\n",
__libc_argv[0] ?: "<unknown>", str, cp);
}
else if (action & 2)
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
index 9d8a414676..c5addc55af 100644
--- a/malloc/mcheck.c
+++ b/malloc/mcheck.c
@@ -1,6 +1,5 @@
/* Standard debugging hooks for `malloc'.
- Copyright (C) 1990-1997,1999,2000-2002,2007,2010,2012
- Free Software Foundation, Inc.
+ Copyright (C) 1990-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written May 1989 by Mike Haertel.
@@ -122,7 +121,7 @@ checkhdr (const struct hdr *hdr)
void
mcheck_check_all (void)
{
- /* Walk through all the active blocks and test whether they were tempered
+ /* Walk through all the active blocks and test whether they were tampered
with. */
struct hdr *runp = root;
diff --git a/malloc/memusage.c b/malloc/memusage.c
index d26c4beb0c..8e2b6834df 100644
--- a/malloc/memusage.c
+++ b/malloc/memusage.c
@@ -1,5 +1,5 @@
/* Profile heap and stack memory usage of running program.
- Copyright (C) 1998-2002, 2004-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -564,7 +564,7 @@ free (void *ptr)
}
-/* `mmap' replacement. We do not have to keep track of the sizesince
+/* `mmap' replacement. We do not have to keep track of the size since
`munmap' will get it as a parameter. */
void *
mmap (void *start, size_t len, int prot, int flags, int fd, off_t offset)
@@ -616,7 +616,7 @@ mmap (void *start, size_t len, int prot, int flags, int fd, off_t offset)
}
-/* `mmap' replacement. We do not have to keep track of the sizesince
+/* `mmap64' replacement. We do not have to keep track of the size since
`munmap' will get it as a parameter. */
void *
mmap64 (void *start, size_t len, int prot, int flags, int fd, off64_t offset)
@@ -668,7 +668,7 @@ mmap64 (void *start, size_t len, int prot, int flags, int fd, off64_t offset)
}
-/* `mmap' replacement. We do not have to keep track of the sizesince
+/* `mremap' replacement. We do not have to keep track of the size since
`munmap' will get it as a parameter. */
void *
mremap (void *start, size_t old_len, size_t len, int flags, ...)
diff --git a/malloc/tst-malloc-usable.c b/malloc/tst-malloc-usable.c
new file mode 100644
index 0000000000..18decd852c
--- /dev/null
+++ b/malloc/tst-malloc-usable.c
@@ -0,0 +1,49 @@
+/* Ensure that malloc_usable_size returns the request size with
+ MALLOC_CHECK_ exported to a positive value.
+
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <malloc.h>
+#include <string.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+ size_t usable_size;
+ void *p = malloc (7);
+ if (!p)
+ {
+ printf ("memory allocation failed\n");
+ return 1;
+ }
+
+ usable_size = malloc_usable_size (p);
+ if (usable_size != 7)
+ {
+ printf ("malloc_usable_size: expected 7 but got %zu\n", usable_size);
+ return 1;
+ }
+
+ memset (p, 0, usable_size);
+ free (p);
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/tst-mtrace.sh b/malloc/tst-mtrace.sh
index 9ed9518db1..d81e550a27 100755
--- a/malloc/tst-mtrace.sh
+++ b/malloc/tst-mtrace.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the mtrace function.
-# Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,14 +17,17 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
+run_program_prefix=$1; shift
status=0
trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
+${run_program_prefix} \
${common_objpfx}malloc/tst-mtrace || status=1
if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
diff --git a/manual/arith.texi b/manual/arith.texi
index 572808c893..3f4e56a6e8 100644
--- a/manual/arith.texi
+++ b/manual/arith.texi
@@ -1966,10 +1966,10 @@ negated imaginary part. In other words, @samp{conj(a + bi) = a + -bi}.
These functions return the argument of the complex number @var{z}.
The argument of a complex number is the angle in the complex plane
between the positive real axis and a line passing through zero and the
-number. This angle is measured in the usual fashion and ranges from @math{0}
-to @math{2@pi{}}.
+number. This angle is measured in the usual fashion and ranges from
+@math{-@pi{}} to @math{@pi{}}.
-@code{carg} has a branch cut along the positive real axis.
+@code{carg} has a branch cut along the negative real axis.
@end deftypefun
@comment complex.h
diff --git a/manual/contrib.texi b/manual/contrib.texi
index e28e2f2519..3052fc11aa 100644
--- a/manual/contrib.texi
+++ b/manual/contrib.texi
@@ -223,8 +223,9 @@ Carlos O'Donell for his maintainership of the HPPA architecture and
maintaining @theglibc{} web pages.
@item
-Alexandra Oliva for adding TLS descriptors for LD and GD on x86 and
-x86-64.
+Alexandre Oliva for adding TLS descriptors for LD and GD on x86 and
+x86-64, for the am33 port, for completing the MIPS n64/n32/o32 multilib
+port, and for various fixes.
@item
Paul Pluzhnikov for various fixes.
diff --git a/manual/examples/inetcli.c b/manual/examples/inetcli.c
index afd4a91a6a..cd981b1c64 100644
--- a/manual/examples/inetcli.c
+++ b/manual/examples/inetcli.c
@@ -26,7 +26,7 @@
#define PORT 5555
#define MESSAGE "Yow!!! Are we having fun yet?!?"
-#define SERVERHOST "mescaline.gnu.org"
+#define SERVERHOST "www.gnu.org"
void
write_to_server (int filedes)
diff --git a/manual/install.texi b/manual/install.texi
index 5aca058653..4802e699fe 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -224,7 +224,25 @@ important to use this same @code{CC} value when running
run on the build system as part of compiling the library. You may need to
set @code{AR} to cross-compiling versions of @code{ar}
if the native tools are not configured to work with
-object files for the target you configured for.
+object files for the target you configured for. When cross-compiling
+@theglibc{}, it may be tested using @samp{make check
+test-wrapper="@var{srcdir}/scripts/cross-test-ssh.sh @var{hostname}"},
+where @var{srcdir} is the absolute directory name for the main source
+directory and @var{hostname} is the host name of a system that can run
+the newly built binaries of @theglibc{}. The source and build
+directories must be visible at the same locations on both the build
+system and @var{hostname}.
+
+In general, when testing @theglibc{}, @samp{test-wrapper} may be set
+to the name and arguments of any program to run newly built binaries.
+This program must preserve the arguments to the binary being run, its
+working directory, all environment variables set as part of testing
+and the standard input, output and error file descriptors. If
+@samp{@var{test-wrapper} env} will not work to run a program with
+environment variables set, then @samp{test-wrapper-env} must be set to
+a program that runs a newly built program with environment variable
+assignments in effect, those assignments being specified as
+@samp{@var{var}=@var{value}} before the name of the program to be run.
@node Running make install
diff --git a/manual/memory.texi b/manual/memory.texi
index 35fed23c7f..5b14aa69b9 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -16,8 +16,8 @@ and allocation of real memory.
@menu
* Memory Concepts:: An introduction to concepts and terminology.
* Memory Allocation:: Allocating storage for your program data
-* Locking Pages:: Preventing page faults
* Resizing the Data Segment:: @code{brk}, @code{sbrk}
+* Locking Pages:: Preventing page faults
@end menu
Memory mapped I/O is not discussed in this chapter. @xref{Memory-mapped I/O}.
@@ -706,7 +706,10 @@ to zero disables all use of @code{mmap}.
If non-zero, memory blocks are filled with values depending on some
low order bits of this parameter when they are allocated (except when
allocated by @code{calloc}) and freed. This can be used to debug the
-use of uninitialized or freed heap memory.
+use of uninitialized or freed heap memory. Note that this option does not
+guarantee that the freed block will have any specific values. It only
+guarantees that the content the block had before it was freed will be
+overwritten.
@end table
@end deftypefun
diff --git a/manual/message.texi b/manual/message.texi
index f65123c9f8..6f51918673 100644
--- a/manual/message.texi
+++ b/manual/message.texi
@@ -699,7 +699,6 @@ Now we can start building the program (assume the message catalog source
file is named @file{hello.msg} and the program source file @file{hello.c}):
@smallexample
-@cartouche
% gencat -H msgnrs.h -o hello.cat hello.msg
% cat msgnrs.h
#define MainSet 0x1 /* hello.msg:4 */
@@ -711,7 +710,6 @@ de
% ./hello
Hallo, Welt!
%
-@end cartouche
@end smallexample
The call of the @code{gencat} program creates the missing header file
diff --git a/manual/platform.texi b/manual/platform.texi
index 02b5c554ab..e387ff4cc9 100644
--- a/manual/platform.texi
+++ b/manual/platform.texi
@@ -26,3 +26,11 @@ different from the processor frequency. More information is available in
without requiring assistance from the operating system, so it is very
efficient.
@end deftypefun
+
+@deftypefun {uint64_t} __ppc_get_timebase_freq (void)
+Read the current frequency at which the Time Base Register is updated.
+
+This frequency is not related to the processor clock or the bus clock.
+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
diff --git a/manual/socket.texi b/manual/socket.texi
index a08ac4c675..b12c591311 100644
--- a/manual/socket.texi
+++ b/manual/socket.texi
@@ -809,7 +809,7 @@ numeric host addresses as sequences of up to eight numbers separated by
colons, as in @samp{5f03:1200:836f:c100::1}.
Each computer also has one or more @dfn{host names}, which are strings
-of words separated by periods, as in @samp{mescaline.gnu.org}.
+of words separated by periods, as in @samp{www.gnu.org}.
Programs that let the user specify a host typically accept both numeric
addresses and host names. To open a connection a program needs a
diff --git a/manual/stdio.texi b/manual/stdio.texi
index c58ca22b2d..be769a538f 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -2341,6 +2341,8 @@ The @code{snprintf} function is similar to @code{sprintf}, except that
the @var{size} argument specifies the maximum number of characters to
produce. The trailing null character is counted towards this limit, so
you should allocate at least @var{size} characters for the string @var{s}.
+If @var{size} is zero, nothing, not even the null byte, shall be written and
+@var{s} may be a null pointer.
The return value is the number of characters which would be generated
for the given input, excluding the trailing null. If this value is
diff --git a/manual/syslog.texi b/manual/syslog.texi
index b978e557dd..15f5e42bdc 100644
--- a/manual/syslog.texi
+++ b/manual/syslog.texi
@@ -379,7 +379,7 @@ default default facility is @code{LOG_USER}. The default for all the
connection options in @var{options} is as if those bits were off.
@code{syslog} leaves the Syslog connection open.
-If the @file{dev/log} socket is not open and connected, @code{syslog}
+If the @file{/dev/log} socket is not open and connected, @code{syslog}
opens and connects it, the same as @code{openlog} with the
@code{LOG_NDELAY} option would.
@@ -422,7 +422,7 @@ The symbols referred to in this section are declared in the file
@deftypefun void closelog (void)
@code{closelog} closes the current Syslog connection, if there is one.
-This includes closing the @file{dev/log} socket, if it is open.
+This includes closing the @file{/dev/log} socket, if it is open.
@code{closelog} also sets the identification string for Syslog messages
back to the default, if @code{openlog} was called with a non-NULL argument
to @var{ident}. The default identification string is the program name
diff --git a/math/Makefile b/math/Makefile
index 60e3899014..9e17695dd3 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -58,7 +58,7 @@ libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
s_catan s_casin s_ccos s_csin s_ctan s_ctanh s_cacos \
s_casinh s_cacosh s_catanh s_csqrt s_cpow s_cproj s_clog10 \
s_fma s_lrint s_llrint s_lround s_llround e_exp10 w_log2 \
- s_isinf_ns $(calls:s_%=m_%)
+ s_isinf_ns $(calls:s_%=m_%) x2y2m1
include ../Makeconfig
@@ -126,6 +126,9 @@ CFLAGS-test-float.c = -fno-inline -ffloat-store -fno-builtin -frounding-math
CFLAGS-test-double.c = -fno-inline -ffloat-store -fno-builtin -frounding-math
CFLAGS-test-ldouble.c = -fno-inline -ffloat-store -fno-builtin -frounding-math
CFLAGS-test-tgmath.c = -fno-builtin
+# The following testcase uses very long lines (>3 million), so it may take a
+# while to compile it. See: http://llvm.org/bugs/show_bug.cgi?id=14106 and
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402
CFLAGS-test-tgmath2.c = -fno-builtin
CFLAGS-test-tgmath-ret.c = -fno-builtin
CFLAGS-test-powl.c = -fno-builtin
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl
index 03b2352541..642fc98214 100755
--- a/math/gen-libm-test.pl
+++ b/math/gen-libm-test.pl
@@ -320,7 +320,9 @@ sub parse_args {
}
# Special handling for some macros:
$cline .= " (\"$str\", ";
- if ($args[0] =~ /fpclassify|isnormal|isfinite|signbit/) {
+ if ($args[0] =~ /fpclassify|isnormal|isfinite|isinf|isnan|signbit
+ |isgreater|isgreaterequal|isless|islessequal
+ |islessgreater|isunordered/x) {
$c_call = "$args[0] (";
} else {
$c_call = " FUNC($args[0]) (";
diff --git a/math/libm-test.inc b/math/libm-test.inc
index c2fb50cec2..9c773927cb 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -40,13 +40,13 @@
/* This testsuite has currently tests for:
acos, acosh, asin, asinh, atan, atan2, atanh,
cbrt, ceil, copysign, cos, cosh, erf, erfc, exp, exp10, exp2, expm1,
- fabs, fdim, floor, fma, fmax, fmin, fmod, fpclassify,
+ fabs, fdim, finite, floor, fma, fmax, fmin, fmod, fpclassify,
frexp, gamma, hypot,
ilogb, isfinite, isinf, isnan, isnormal,
isless, islessequal, isgreater, isgreaterequal, islessgreater, isunordered,
j0, j1, jn,
ldexp, lgamma, log, log10, log1p, log2, logb,
- modf, nearbyint, nextafter,
+ modf, nearbyint, nextafter, nexttoward,
pow, remainder, remquo, rint, lrint, llrint,
round, lround, llround,
scalb, scalbn, scalbln, signbit, sin, sincos, sinh, sqrt, tan, tanh, tgamma, trunc,
@@ -54,10 +54,14 @@
and for the following complex math functions:
cabs, cacos, cacosh, carg, casin, casinh, catan, catanh,
- ccos, ccosh, cexp, clog, cpow, cproj, csin, csinh, csqrt, ctan, ctanh.
+ ccos, ccosh, cexp, cimag, clog, clog10, conj, cpow, cproj, creal,
+ csin, csinh, csqrt, ctan, ctanh.
- At the moment the following functions aren't tested:
- drem, nan
+ At the moment the following functions and macros aren't tested:
+ drem (alias for remainder),
+ lgamma_r,
+ nan,
+ pow10 (alias for exp10).
Parameter handling is primitive in the moment:
--verbose=[0..3] for different levels of output:
@@ -83,8 +87,9 @@
aren't checked at the moment.
NaN values: There exist signalling and quiet NaNs. This implementation
- only uses quiet NaN as parameter but does not differenciate
- between the two kinds of NaNs as result.
+ only uses quiet NaN as parameter but does not differentiate
+ between the two kinds of NaNs as result. Where the sign of a NaN is
+ significant, this is not tested.
Inline functions: Inlining functions should give an improvement in
speed - but not in precission. The inlined functions return
@@ -127,6 +132,7 @@
#include <stdio.h>
#include <string.h>
#include <argp.h>
+#include <tininess.h>
/* Allow platforms without all rounding modes to test properly,
assuming they provide an __FE_UNDEFINED in <bits/fenv.h> which
@@ -182,6 +188,11 @@
#else
# define UNDERFLOW_EXCEPTION_LDOUBLE_IBM 0
#endif
+/* Values underflowing on architectures detecting tininess before
+ rounding, but not on those detecting tininess after rounding. */
+#define UNDERFLOW_EXCEPTION_BEFORE_ROUNDING (TININESS_AFTER_ROUNDING \
+ ? 0 \
+ : UNDERFLOW_EXCEPTION)
/* Various constants (we must supply them precalculated for accuracy). */
#define M_PI_6l .52359877559829887307710723054658383L
@@ -214,6 +225,7 @@ static int ignore_max_ulp; /* Should we ignore max_ulp? */
static FLOAT minus_zero, plus_zero;
static FLOAT plus_infty, minus_infty, nan_value, max_value, min_value;
+static FLOAT min_subnorm_value;
static FLOAT max_error, real_max_error, imag_max_error;
@@ -1285,6 +1297,9 @@ atan2_test (void)
TEST_ff_f (atan2, 1.390625L, 0.9296875L, 0.981498387184244311516296577615519772L);
TEST_ff_f (atan2, -0.00756827042671106339L, -.001792735857538728036L, -1.80338464113663849327153994379639112L);
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+ TEST_ff_f (atan2, 0x1.00000000000001p0L, 0x1.00000000000001p0L, M_PI_4l);
+#endif
END (atan2);
}
@@ -2484,6 +2499,77 @@ clog_test (void)
TEST_c_c (clog, 0x1p-8192L, 1.0L, 4.202628928890116882828347271652190753248e-4933L, 1.570796326794896619231321691639751442099L, UNDERFLOW_EXCEPTION);
#endif
+ TEST_c_c (clog, 0x1.000566p0L, 0x1.234p-10L, 8.298731898331237038231468223024422855654e-5L, 1.110938609507128729312743251313024793990e-3L);
+ TEST_c_c (clog, 0x1.000566p0L, 0x1.234p-100L, 8.237022655933121125560939513260027133767e-5L, 8.974094312218060110948251664314290484113e-31L);
+#ifndef TEST_FLOAT
+ TEST_c_c (clog, -0x1.0000000123456p0L, 0x1.2345678p-30L, 2.649094282537168795982991778475646793277e-10L, 3.141592652530155111500161671113150737892L);
+ TEST_c_c (clog, -0x1.0000000123456p0L, 0x1.2345678p-1000L, 2.649094276923003995420209214900915462737e-10L, 3.141592653589793238462643383279502884197L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+ TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-60L, 9.868649107778739757272772275265050767867e-19L, 9.868649106423871142816660980898339912137e-19L);
+ TEST_c_c (clog, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 9.868649107778739752403260515979017248596e-19L, 1.061846605795612822522063052130030717368e-301L);
+#endif
+
+ TEST_c_c (clog, 0x0.ffffffp0L, 0x0.ffffffp-100L, -5.960464655174753498633255797994360530379e-8L, 7.888609052210118054117285652827862296732e-31L);
+#ifndef TEST_FLOAT
+ TEST_c_c (clog, 0x0.fffffffffffff8p0L, 0x0.fffffffffffff8p-1000L, -1.110223024625156602053389888482372171810e-16L, 9.332636185032188789900895447238171696171e-302L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+ TEST_c_c (clog, 0x0.ffffffffffffffffp0L, 0x0.ffffffffffffffffp-15000L, -5.421010862427522170184200798202494495630e-20L, 3.548665303440282824232502561095699343814e-4516L);
+#endif
+
+ TEST_c_c (clog, 0x1a6p-10L, 0x3a5p-10L, -1.4305135209763571252847059962654228661815e-06L, 1.1460277178115757370775644871674016684074L);
+ TEST_c_c (clog, 0xf2p-10L, 0x3e3p-10L, 6.1988446308070710970664736815277450078106e-06L, 1.3322126499153926210226335249558203898460L);
+ TEST_c_c (clog, 0x4d4ep-15L, 0x6605p-15L, -1.6298145321400412054744424587143483169412e-08L, 0.9223574537155056772124552172295398141249L);
+ TEST_c_c (clog, 0x2818p-15L, 0x798fp-15L, 1.5366822245016167178749091974664853785194e-08L, 1.2522014929038946066987318471922169174157L);
+ TEST_c_c (clog, 0x9b57bp-20L, 0xcb7b4p-20L, -3.9563019528687610863490232935890272740908e-11L, 0.9187593477446338910857133065497364950682L);
+ TEST_c_c (clog, 0x2731p-20L, 0xfffd0p-20L, 4.4110493034041283943115971658295280288115e-11L, 1.5612279663766352262688735061954290528838L);
+ TEST_c_c (clog, 0x2ede88p-23L, 0x771c3fp-23L, -4.4764192352906350039050902870893173560494e-13L, 1.1959106857549200806818600493552847793381L);
+ TEST_c_c (clog, 0x11682p-23L, 0x7ffed1p-23L, 1.1723955140027907954461000991619077811832e-12L, 1.5622968405332756349813737986164832897108L);
+ TEST_c_c (clog, 0xa1f2c1p-24L, 0xc643aep-24L, -1.0480505352462576151523512837107080269981e-13L, 0.8858771987699967480545613322309315260313L);
+ TEST_c_c (clog, 0x659feap-24L, 0xeaf6f9p-24L, 3.7303493627403868207597214252239749960738e-14L, 1.1625816408046866464773042283673653469061L);
+#ifndef TEST_FLOAT
+ TEST_c_c (clog, 0x4447d7175p-35L, 0x6c445e00ap-35L, -1.4823076576950255933915367361099865652625e-20L, 1.0081311552703893116404606212158840190615L);
+ TEST_c_c (clog, 0x2dd46725bp-35L, 0x7783a1284p-35L, 4.4469229730850767799109418892826021157328e-20L, 1.2046235979300843056806465045930070146351L);
+ TEST_c_c (clog, 0x164c74eea876p-45L, 0x16f393482f77p-45L, -3.0292258760486853327810377824479932031744e-26L, 0.7998237934177411746093524982030330293980L);
+ TEST_c_c (clog, 0xfe961079616p-45L, 0x1bc37e09e6d1p-45L, 5.3718272201930019901317065495843842735179e-26L, 1.0503831592447830576186444373011142397404L);
+ TEST_c_c (clog, 0xa4722f19346cp-51L, 0x7f9631c5e7f07p-51L, -6.2122796286154679676173624516405339768606e-30L, 1.4904138780720095276446375492434049214172L);
+ TEST_c_c (clog, 0x10673dd0f2481p-51L, 0x7ef1d17cefbd2p-51L, 3.2047474274603604594851472963586149973093e-29L, 1.4422922682185099608731642353544207976604L);
+ TEST_c_c (clog, 0x8ecbf810c4ae6p-52L, 0xd479468b09a37p-52L, -9.7375017988218644730510244778042114638107e-30L, 0.9790637929494922564724108399524154766631L);
+ TEST_c_c (clog, 0x5b06b680ea2ccp-52L, 0xef452b965da9fp-52L, 8.3076914081087805757422664530653247447136e-30L, 1.2072712126771536614482822173033535043206L);
+ TEST_c_c (clog, 0x659b70ab7971bp-53L, 0x1f5d111e08abecp-53L, -2.5083311595699359750201056724289010648701e-30L, 1.3710185432462268491534742969536240564640L);
+ TEST_c_c (clog, 0x15cfbd1990d1ffp-53L, 0x176a3973e09a9ap-53L, 1.0168910106364605304135563536838075568606e-30L, 0.8208373755522359859870890246475340086663L);
+ TEST_c_c (clog, 0x1367a310575591p-54L, 0x3cfcc0a0541f60p-54L, 5.0844550531823026520677817684239496041087e-32L, 1.2627468605458094918919206628466016525397L);
+ TEST_c_c (clog, 0x55cb6d0c83af5p-55L, 0x7fe33c0c7c4e90p-55L, -5.2000108498455368032511404449795741611813e-32L, 1.5288921536982513453421343495466824420259L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+ TEST_c_c (clog, 0x298c62cb546588a7p-63L, 0x7911b1dfcc4ecdaep-63L, -1.1931267660846218205882675852805793644095e-36L, 1.2402109774337032400594953899784058127412L);
+ TEST_c_c (clog, 0x4d9c37e2b5cb4533p-63L, 0x65c98be2385a042ep-63L, 6.4064442119814669184296141278612389400075e-37L, 0.9193591364645830864185131402313014890145L);
+ TEST_c_c (clog, 0x602fd5037c4792efp-64L, 0xed3e2086dcca80b8p-64L, -2.3362950222592964220878638677292132852104e-37L, 1.1856121127236268105413184264288408265852L);
+ TEST_c_c (clog, 0x6b10b4f3520217b6p-64L, 0xe8893cbb449253a1p-64L, 2.4244570985709679851855191080208817099132e-37L, 1.1393074519572050614551047548718495655972L);
+ TEST_c_c (clog, 0x81b7efa81fc35ad1p-65L, 0x1ef4b835f1c79d812p-65L, -9.9182335850630508484862145328126979066934e-39L, 1.3146479888794807046338799047003947008804L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+ TEST_c_c (clog, 0x3f96469050f650869c2p-75L, 0x6f16b2c9c8b05988335p-75L, -1.0509738482436128031927971874674370984602e-45L, 1.0509191467640012308402149909370784281448L);
+ TEST_c_c (clog, 0x3157fc1d73233e580c8p-75L, 0x761b52ccd435d7c7f5fp-75L, 1.3487497719126364307640897239165442763573e-43L, 1.1750493008528425228929764149024375035382L);
+ TEST_c_c (clog, 0x155f8afc4c48685bf63610p-85L, 0x17d0cf2652cdbeb1294e19p-85L, -4.7775669192897997174762089350332738583822e-50L, 0.8393953487996880419413728440067635213372L);
+ TEST_c_c (clog, 0x13836d58a13448d750b4b9p-85L, 0x195ca7bc3ab4f9161edbe6p-85L, 2.8398125044729578740243199963484494962411e-50L, 0.9149964976334130461795060758257083099706L);
+ TEST_c_c (clog, 0x1df515eb171a808b9e400266p-95L, 0x7c71eb0cd4688dfe98581c77p-95L, -3.5048022044913950094635368750889659723004e-57L, 1.3345633256521815205858155673950177421079L);
+ TEST_c_c (clog, 0xe33f66c9542ca25cc43c867p-95L, 0x7f35a68ebd3704a43c465864p-95L, 4.1101771307217268747345114262406964584250e-56L, 1.4596065864518742494094402406719567059585L);
+ TEST_c_c (clog, 0x6771f22c64ed551b857c128b4cp-105L, 0x1f570e7a13cc3cf2f44fd793ea1p-105L, -1.4281333889622737316199756373421183559948e-62L, 1.3673546561165378090903506783353927980633L);
+ TEST_c_c (clog, 0x15d8ab6ed05ca514086ac3a1e84p-105L, 0x1761e480aa094c0b10b34b09ce9p-105L, 1.0027319539522347477331743836657426754857e-62L, 0.8193464073721167323313606647411269414759L);
+ TEST_c_c (clog, 0x187190c1a334497bdbde5a95f48p-106L, 0x3b25f08062d0a095c4cfbbc338dp-106L, -1.7471844652198029695350765775994001163767e-63L, 1.1789110097072986038243729592318526094314L);
+ TEST_c_c (clog, 0x6241ef0da53f539f02fad67dabp-106L, 0x3fb46641182f7efd9caa769dac0p-106L, 4.3299788920664682288477984749202524623248e-63L, 1.4746938237585656250866370987773473745867L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+ TEST_c_c (clog, 0x3e1d0a105ac4ebeacd9c6952d34cp-112L, 0xf859b3d1b06d005dcbb5516d5479p-112L, -1.1683999374665377365054966073875064467108e-66L, 1.3257197596350832748781065387304444940172L);
+ TEST_c_c (clog, 0x47017a2e36807acb1e5214b209dep-112L, 0xf5f4a550c9d75e3bb1839d865f0dp-112L, 1.5077923002544367932999503838191154621839e-65L, 1.2897445708311412721399861948957141824914L);
+ TEST_c_c (clog, 0x148f818cb7a9258fca942ade2a0cap-113L, 0x18854a34780b8333ec53310ad7001p-113L, -7.1865869169568789348552370692485515571497e-67L, 0.8730167479365994646287897223471819363668L);
+ TEST_c_c (clog, 0xfd95243681c055c2632286921092p-113L, 0x1bccabcd29ca2152860ec29e34ef7p-113L, 6.6255694866654064502633121109394710807528e-66L, 1.0526409614996288387567810726095850312049L);
+ TEST_c_c (clog, 0xdb85c467ee2aadd5f425fe0f4b8dp-114L, 0x3e83162a0f95f1dcbf97dddf410eap-114L, 4.6017338806965821566734340588575402712716e-67L, 1.3547418904611758959096647942223384691728L);
+ TEST_c_c (clog, 0x1415bcaf2105940d49a636e98ae59p-115L, 0x7e6a150adfcd1b0921d44b31f40f4p-115L, 2.5993421227864195179698176012564317527271e-67L, 1.4132318089683022770487383611430906982461L);
+#endif
+
END (clog, complex);
}
@@ -2633,6 +2719,77 @@ clog10_test (void)
TEST_c_c (clog10, 0x1p-8191L, 1.0L, 7.300714213215805914467117112656302312931e-4933L, 6.821881769209206737428918127156778851051e-1L, UNDERFLOW_EXCEPTION);
#endif
+ TEST_c_c (clog10, 0x1.000566p0L, 0x1.234p-10L, 3.604093470239754109961125085078190708674e-5L, 4.824745078422174667425851670822596859720e-4L);
+ TEST_c_c (clog10, 0x1.000566p0L, 0x1.234p-100L, 3.577293486783822178310971763308187385546e-5L, 3.897399639875661463735636919790792140598e-31L);
+#ifndef TEST_FLOAT
+ TEST_c_c (clog10, -0x1.0000000123456p0L, 0x1.2345678p-30L, 1.150487028947346337782682105935961875822e-10L, 1.364376353381646356131680448946397884147L);
+ TEST_c_c (clog10, -0x1.0000000123456p0L, 0x1.2345678p-1000L, 1.150487026509145544402795327729455391948e-10L, 1.364376353841841347485783625431355770210L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+ TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-60L, 4.285899851347756188767674032946882584784e-19L, 4.285899850759344225805480528847018395861e-19L);
+ TEST_c_c (clog10, 0x1.00000000000000123456789abcp0L, 0x1.23456789p-1000L, 4.285899851347756186652871946325962330640e-19L, 4.611541215247321502041995872887317363241e-302L);
+#endif
+
+ TEST_c_c (clog10, 0x0.ffffffp0L, 0x0.ffffffp-100L, -2.588596909321764128428416045209904492216e-8L, 3.425979381266895667295625489912064603415e-31L);
+#ifndef TEST_FLOAT
+ TEST_c_c (clog10, 0x0.fffffffffffff8p0L, 0x0.fffffffffffff8p-1000L, -4.821637332766435821255375046554377090472e-17L, 4.053112396770095089737411317782466262176e-302L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
+ TEST_c_c (clog10, 0x0.ffffffffffffffffp0L, 0x0.ffffffffffffffffp-15000L, -2.354315103889861110220423157644627849164e-20L, 1.541165759405643564697852372112893034397e-4516L);
+#endif
+
+ TEST_c_c (clog10, 0x1a6p-10L, 0x3a5p-10L, -6.2126412844802358329771948751248003038444e-07L, 0.4977135139537443711784513409096950995985L);
+ TEST_c_c (clog10, 0xf2p-10L, 0x3e3p-10L, 2.6921240173351112953324592659528481616879e-06L, 0.5785726025799636431142862788413361783862L);
+ TEST_c_c (clog10, 0x4d4ep-15L, 0x6605p-15L, -7.0781945783414996953799915941870192015212e-09L, 0.4005747524909781155537088181659175147564L);
+ TEST_c_c (clog10, 0x2818p-15L, 0x798fp-15L, 6.6737261053986614395049481326819059203910e-09L, 0.5438241985991753781478398141908629586460L);
+ TEST_c_c (clog10, 0x9b57bp-20L, 0xcb7b4p-20L, -1.7182001068739620267773842120965071561416e-11L, 0.3990121149225253562859800593935899629087L);
+ TEST_c_c (clog10, 0x2731p-20L, 0xfffd0p-20L, 1.9156943718715958194239364991329064049438e-11L, 0.6780326907904082601285090019969008967595L);
+ TEST_c_c (clog10, 0x2ede88p-23L, 0x771c3fp-23L, -1.9440841725722970687903291200493082253766e-13L, 0.5193774116724956222518530053006822210323L);
+ TEST_c_c (clog10, 0x11682p-23L, 0x7ffed1p-23L, 5.0916490233953865181284669870035717560498e-13L, 0.6784968969384861816694467029319146542069L);
+ TEST_c_c (clog10, 0xa1f2c1p-24L, 0xc643aep-24L, -4.5516256421319921959681423447271490869664e-14L, 0.3847315790697197749315054516562206543710L);
+ TEST_c_c (clog10, 0x659feap-24L, 0xeaf6f9p-24L, 1.6200701438094619117335617123525612051457e-14L, 0.5049027913635038013499728086604870749732L);
+#ifndef TEST_FLOAT
+ TEST_c_c (clog10, 0x4447d7175p-35L, 0x6c445e00ap-35L, -6.4375803621988389731799033530075237868110e-21L, 0.4378257977686804492768642780897650927167L);
+ TEST_c_c (clog10, 0x2dd46725bp-35L, 0x7783a1284p-35L, 1.9312741086596516918394613098872836703188e-20L, 0.5231613813514771042838490538484014771862L);
+ TEST_c_c (clog10, 0x164c74eea876p-45L, 0x16f393482f77p-45L, -1.3155760824064879362415202279780039150764e-26L, 0.3473590599762514228227328130640352044313L);
+ TEST_c_c (clog10, 0xfe961079616p-45L, 0x1bc37e09e6d1p-45L, 2.3329549194675052736016290082882121135546e-26L, 0.4561756099441139182878993697611751382976L);
+ TEST_c_c (clog10, 0xa4722f19346cp-51L, 0x7f9631c5e7f07p-51L, -2.6979587627476803379953050733225113494503e-30L, 0.6472785229986997177606324374555347813105L);
+ TEST_c_c (clog10, 0x10673dd0f2481p-51L, 0x7ef1d17cefbd2p-51L, 1.3918041236396763648388478552321724382899e-29L, 0.6263795733790237053262025311642907438291L);
+ TEST_c_c (clog10, 0x8ecbf810c4ae6p-52L, 0xd479468b09a37p-52L, -4.2289432987513243393180377141513840878196e-30L, 0.4252020027092323591068799049905597805296L);
+ TEST_c_c (clog10, 0x5b06b680ea2ccp-52L, 0xef452b965da9fp-52L, 3.6079845358966994996207055940336690133424e-30L, 0.5243112258263349992771652393178033846555L);
+ TEST_c_c (clog10, 0x659b70ab7971bp-53L, 0x1f5d111e08abecp-53L, -1.0893543813872082317104059174982092534059e-30L, 0.5954257879188711495921161433751775633232L);
+ TEST_c_c (clog10, 0x15cfbd1990d1ffp-53L, 0x176a3973e09a9ap-53L, 4.4163015461643576961232672330852798804976e-31L, 0.3564851427422832755956993418877523303529L);
+ TEST_c_c (clog10, 0x1367a310575591p-54L, 0x3cfcc0a0541f60p-54L, 2.2081507730821788480616336165447731164865e-32L, 0.5484039935757001196548030312819898864760L);
+ TEST_c_c (clog10, 0x55cb6d0c83af5p-55L, 0x7fe33c0c7c4e90p-55L, -2.2583360179249556400630343805573865814771e-32L, 0.6639894257763289307423302343317622430835L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
+ TEST_c_c (clog10, 0x298c62cb546588a7p-63L, 0x7911b1dfcc4ecdaep-63L, -5.1816837072162316773907242302011632570857e-37L, 0.5386167838952956925896424154370364458140L);
+ TEST_c_c (clog10, 0x4d9c37e2b5cb4533p-63L, 0x65c98be2385a042ep-63L, 2.7822833698845776001753149807484078521508e-37L, 0.3992725998539071066769046272515417679815L);
+ TEST_c_c (clog10, 0x602fd5037c4792efp-64L, 0xed3e2086dcca80b8p-64L, -1.0146400362652473358437501879334790111898e-37L, 0.5149047982335273098246594109614460842099L);
+ TEST_c_c (clog10, 0x6b10b4f3520217b6p-64L, 0xe8893cbb449253a1p-64L, 1.0529283395205396881397407610630442563938e-37L, 0.4947949395762683446121140513971996916447L);
+ TEST_c_c (clog10, 0x81b7efa81fc35ad1p-65L, 0x1ef4b835f1c79d812p-65L, -4.3074341162203896332989394770760901408798e-39L, 0.5709443672155660428417571212549720987784L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+ TEST_c_c (clog10, 0x3f96469050f650869c2p-75L, 0x6f16b2c9c8b05988335p-75L, -4.5643214291682663316715446865040356750881e-46L, 0.4564083863660793840592614609053162690362L);
+ TEST_c_c (clog10, 0x3157fc1d73233e580c8p-75L, 0x761b52ccd435d7c7f5fp-75L, 5.8575458340992751256451490143468457830297e-44L, 0.5103174273246635294300470585396890237265L);
+ TEST_c_c (clog10, 0x155f8afc4c48685bf63610p-85L, 0x17d0cf2652cdbeb1294e19p-85L, -2.0748709499710785084693619097712106753591e-50L, 0.3645447681189598740620098186365764884771L);
+ TEST_c_c (clog10, 0x13836d58a13448d750b4b9p-85L, 0x195ca7bc3ab4f9161edbe6p-85L, 1.2333149003324592532859843519619084433953e-50L, 0.3973779298829931059309198145608711073016L);
+ TEST_c_c (clog10, 0x1df515eb171a808b9e400266p-95L, 0x7c71eb0cd4688dfe98581c77p-95L, -1.5221162575729652613635150540947625639689e-57L, 0.5795934880811949230121092882659698986043L);
+ TEST_c_c (clog10, 0xe33f66c9542ca25cc43c867p-95L, 0x7f35a68ebd3704a43c465864p-95L, 1.7850272475173865337808494725293124613817e-56L, 0.6338990862456906754888183278564382516852L);
+ TEST_c_c (clog10, 0x6771f22c64ed551b857c128b4cp-105L, 0x1f570e7a13cc3cf2f44fd793ea1p-105L, -6.2023045024810589256360494043570293518879e-63L, 0.5938345819561308555003145899438513900776L);
+ TEST_c_c (clog10, 0x15d8ab6ed05ca514086ac3a1e84p-105L, 0x1761e480aa094c0b10b34b09ce9p-105L, 4.3548095442952115860848857519953610343042e-63L, 0.3558376234889641500775150477035448866763L);
+ TEST_c_c (clog10, 0x187190c1a334497bdbde5a95f48p-106L, 0x3b25f08062d0a095c4cfbbc338dp-106L, -7.5879257211204444302994221436282805900756e-64L, 0.5119945461708707332160859198685423099187L);
+ TEST_c_c (clog10, 0x6241ef0da53f539f02fad67dabp-106L, 0x3fb46641182f7efd9caa769dac0p-106L, 1.8804859395820231849002915747252695375405e-63L, 0.6404513901551516189871978418046651877394L);
+#endif
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
+ TEST_c_c (clog10, 0x3e1d0a105ac4ebeacd9c6952d34cp-112L, 0xf859b3d1b06d005dcbb5516d5479p-112L, -5.0742964549782184008668435276046798273476e-67L, 0.5757527761596220360985719127090110408283L);
+ TEST_c_c (clog10, 0x47017a2e36807acb1e5214b209dep-112L, 0xf5f4a550c9d75e3bb1839d865f0dp-112L, 6.5482587585671294601662599808612773010057e-66L, 0.5601289501766423782280643144987875760229L);
+ TEST_c_c (clog10, 0x148f818cb7a9258fca942ade2a0cap-113L, 0x18854a34780b8333ec53310ad7001p-113L, -3.1210950417524756037077807411854181477733e-67L, 0.3791463562379872585396164879981280044658L);
+ TEST_c_c (clog10, 0xfd95243681c055c2632286921092p-113L, 0x1bccabcd29ca2152860ec29e34ef7p-113L, 2.8774482675253468630312378575186855052697e-66L, 0.4571561610046221605554903008571429975493L);
+ TEST_c_c (clog10, 0xdb85c467ee2aadd5f425fe0f4b8dp-114L, 0x3e83162a0f95f1dcbf97dddf410eap-114L, 1.9985076315737626043096596036300177494613e-67L, 0.5883569274304683249184005177865521205198L);
+ TEST_c_c (clog10, 0x1415bcaf2105940d49a636e98ae59p-115L, 0x7e6a150adfcd1b0921d44b31f40f4p-115L, 1.1288799405048268615023706955013387413519e-67L, 0.6137587762850841972073301550420510507903L);
+#endif
+
END (clog10, complex);
}
@@ -2730,6 +2887,13 @@ cos_test (void)
TEST_f_f (cos, 0x1p16383L, 0.9210843909921906206874509522505756251609L);
#endif
+ TEST_f_f (cos, 0x1p+120, -9.25879022854837867303861764107414946730833e-01L);
+ TEST_f_f (cos, 0x1p+127, 7.81914638714960072263910298466369236613162e-01L);
+ TEST_f_f (cos, 0x1.fffff8p+127, 9.98819362551949040703862043664101081064641e-01L);
+ TEST_f_f (cos, 0x1.fffffep+127, 8.53021039830304158051791467692161107353094e-01L);
+ TEST_f_f (cos, 0x1p+50, 8.68095904660550604334592502063501320395739e-01L);
+ TEST_f_f (cos, 0x1p+28, -1.65568979490578758865468278195361551113358e-01L);
+
END (cos);
}
@@ -4257,6 +4421,23 @@ fdim_test (void)
static void
+finite_test (void)
+{
+ START (finite);
+
+ TEST_f_b (finite, 0, 1);
+ TEST_f_b (finite, minus_zero, 1);
+ TEST_f_b (finite, 10, 1);
+ TEST_f_b (finite, min_subnorm_value, 1);
+ TEST_f_b (finite, plus_infty, 0);
+ TEST_f_b (finite, minus_infty, 0);
+ TEST_f_b (finite, nan_value, 0);
+
+ END (finite);
+}
+
+
+static void
floor_test (void)
{
START (floor);
@@ -4397,6 +4578,45 @@ fma_test (void)
TEST_fff_f (fma, minus_infty, minus_infty, plus_infty, plus_infty);
TEST_fff_f (fma, plus_infty, minus_infty, minus_infty, minus_infty);
+ TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, minus_zero, plus_zero);
+
+ TEST_fff_f (fma, 1.0, 1.0, -1.0, plus_zero);
+ TEST_fff_f (fma, 1.0, -1.0, 1.0, plus_zero);
+ TEST_fff_f (fma, -1.0, 1.0, 1.0, plus_zero);
+ TEST_fff_f (fma, -1.0, -1.0, -1.0, plus_zero);
+
+ TEST_fff_f (fma, min_value, min_value, plus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, min_value, minus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, plus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, minus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, plus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, minus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, plus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, minus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+
#if defined (TEST_FLOAT) && FLT_MANT_DIG == 24
TEST_fff_f (fma, 0x1.7ff8p+13, 0x1.000002p+0, 0x1.ffffp-24, 0x1.7ff802p+13);
TEST_fff_f (fma, 0x1.fffp+0, 0x1.00001p+0, -0x1.fffp+0, 0x1.fffp-20);
@@ -4405,6 +4625,14 @@ fma_test (void)
TEST_fff_f (fma, 0x1.fffffep+127, 0x1.001p+0, -0x1.fffffep+127, 0x1.fffffep+115);
TEST_fff_f (fma, -0x1.fffffep+127, 0x1.fffffep+0, 0x1.fffffep+127, -0x1.fffffap+127);
TEST_fff_f (fma, 0x1.fffffep+127, 2.0, -0x1.fffffep+127, 0x1.fffffep+127);
+ TEST_fff_f (fma, 0x1.4p-126, 0x1.000004p-1, 0x1p-128, 0x1.c00004p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-126, 0x1.000004p-1, -0x1p-128, -0x1.c00004p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffff8p-126, 0x1.000002p-1, 0x1p-149, 0x1p-126, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.fffff8p-126, 0x1.000002p-1, -0x1p-149, -0x1p-126, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-149, 0x1p-1, 0x0.fffffep-126, 0x1p-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1p-1, -0x0.fffffep-126, -0x1p-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-149, 0x1.1p-1, 0x0.fffffep-126, 0x1p-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1.1p-1, -0x0.fffffep-126, -0x1p-126, UNDERFLOW_EXCEPTION);
#endif
#if defined (TEST_DOUBLE) && DBL_MANT_DIG == 53
TEST_fff_f (fma, 0x1.7fp+13, 0x1.0000000000001p+0, 0x1.ffep-48, 0x1.7f00000000001p+13);
@@ -4424,10 +4652,17 @@ fma_test (void)
TEST_fff_f (fma, 0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022, 0x0.0000010000003p-1022, UNDERFLOW_EXCEPTION);
TEST_fff_f (fma, 0x1.4p-967, -0x1p-106, -0x0.000001p-1022, -0x0.0000010000002p-1022, UNDERFLOW_EXCEPTION);
TEST_fff_f (fma, -0x1.19cab66d73e17p-959, 0x1.c7108a8c5ff51p-107, -0x0.80b0ad65d9b64p-1022, -0x0.80b0ad65d9d59p-1022, UNDERFLOW_EXCEPTION);
- /* Sometimes the FE_UNDERFLOW is not set, so be prepared. See Bug 14152. */
- TEST_fff_f (fma, -0x1.d2eaed6e8e9d3p-979, -0x1.4e066c62ac9ddp-63, -0x0.9245e6b003454p-1022, -0x0.9245c09c5fb5dp-1022, UNDERFLOW_EXCEPTION_OK);
+ TEST_fff_f (fma, -0x1.d2eaed6e8e9d3p-979, -0x1.4e066c62ac9ddp-63, -0x0.9245e6b003454p-1022, -0x0.9245c09c5fb5dp-1022, UNDERFLOW_EXCEPTION);
TEST_fff_f (fma, 0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022, -0x0.b22757123bbe9p-1022, UNDERFLOW_EXCEPTION);
TEST_fff_f (fma, -0x1.fffffffffffffp-711, 0x1.fffffffffffffp-275, 0x1.fffffe00007ffp-983, 0x1.7ffffe00007ffp-983);
+ TEST_fff_f (fma, 0x1.4p-1022, 0x1.0000000000002p-1, 0x1p-1024, 0x1.c000000000002p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-1022, 0x1.0000000000002p-1, -0x1p-1024, -0x1.c000000000002p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x1p-1074, 0x1p-1022, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, -0x1p-1074, -0x1p-1022, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-1074, 0x1p-1, 0x0.fffffffffffffp-1022, 0x1p-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1p-1, -0x0.fffffffffffffp-1022, -0x1p-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-1074, 0x1.1p-1, 0x0.fffffffffffffp-1022, 0x1p-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1.1p-1, -0x0.fffffffffffffp-1022, -0x1p-1022, UNDERFLOW_EXCEPTION);
#endif
#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 64
TEST_fff_f (fma, -0x8.03fcp+3696L, 0xf.fffffffffffffffp-6140L, 0x8.3ffffffffffffffp-2450L, -0x8.01ecp-2440L);
@@ -4435,8 +4670,15 @@ fma_test (void)
TEST_fff_f (fma, 0xc.7fc000003ffffffp-1194L, 0x8.1e0003fffffffffp+15327L, -0x8.fffep+14072L, 0xc.ae9f164020effffp+14136L);
TEST_fff_f (fma, -0x8.0001fc000000003p+1798L, 0xcp-2230L, 0x8.f7e000000000007p-468L, -0xc.0002f9ffee10404p-429L);
TEST_fff_f (fma, 0xc.0000000000007ffp+10130L, -0x8.000000000000001p+4430L, 0xc.07000000001ffffp+14513L, -0xb.fffffffffffd7e4p+14563L);
- /* Bug 14152: underflow exception may be missing. */
- TEST_fff_f (fma, 0xb.ffffp-4777L, 0x8.000000fffffffffp-11612L, -0x0.3800fff8p-16385L, 0x5.c7fe80c7ffeffffp-16385L, UNDERFLOW_EXCEPTION_OK);
+ TEST_fff_f (fma, 0xb.ffffp-4777L, 0x8.000000fffffffffp-11612L, -0x0.3800fff8p-16385L, 0x5.c7fe80c7ffeffffp-16385L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000004p-1L, 0x1p-16384L, 0x1.c000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000004p-1L, -0x1p-16384L, -0x1.c000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, 0x1p-16445L, 0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, -0x1p-16445L, -0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1p-1L, 0x0.fffffffffffffffep-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1p-1L, -0x0.fffffffffffffffep-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1.1p-1L, 0x0.fffffffffffffffep-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1.1p-1L, -0x0.fffffffffffffffep-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION);
#endif
#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 113
TEST_fff_f (fma, 0x1.bb2de33e02ccbbfa6e245a7c1f71p-2584L, -0x1.6b500daf0580d987f1bc0cadfcddp-13777L, 0x1.613cd91d9fed34b33820e5ab9d8dp-16378L, -0x1.3a79fb50eb9ce887cffa0f09bd9fp-16360L);
@@ -4452,6 +4694,14 @@ fma_test (void)
TEST_fff_f (fma, 0x1.00000000000007ffffffffffffffp-9045L, -0x1.ffffffffffff80000001ffffffffp+4773L, -0x1.f8p-4316L, -0x1.00000000000f88000000fffffdffp-4271L);
TEST_fff_f (fma, 0x1.4e922764c90701d4a2f21d01893dp-8683L, -0x1.955a12e2d7c9447c27fa022fc865p+212L, -0x1.e9634462eaef96528b90b6944578p-8521L, -0x1.08e1783184a371943d3598e10865p-8470L);
TEST_fff_f (fma, 0x1.801181509c03bdbef10d6165588cp-15131L, 0x1.ad86f8e57d3d40bfa8007780af63p-368L, -0x1.6e9df0dab1c9f1d7a6043c390741p-15507L, 0x1.417c9b2b15e2ad57dc9e0e920844p-15498L);
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, 0x1p-16384L, 0x1.c000000000000000000000000002p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, -0x1p-16384L, -0x1.c000000000000000000000000002p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, 0x1p-16494L, 0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, -0x1p-16494L, -0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1.1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1.1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION);
#endif
END (fma);
@@ -4459,6 +4709,297 @@ fma_test (void)
static void
+fma_test_towardzero (void)
+{
+ int save_round_mode;
+ START (fma_towardzero);
+
+ save_round_mode = fegetround ();
+
+ if (!fesetround (FE_TOWARDZERO))
+ {
+ TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, minus_zero, plus_zero);
+
+ TEST_fff_f (fma, 1.0, 1.0, -1.0, plus_zero);
+ TEST_fff_f (fma, 1.0, -1.0, 1.0, plus_zero);
+ TEST_fff_f (fma, -1.0, 1.0, 1.0, plus_zero);
+ TEST_fff_f (fma, -1.0, -1.0, -1.0, plus_zero);
+
+ TEST_fff_f (fma, min_value, min_value, plus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, min_value, minus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, plus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, minus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, plus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, minus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, plus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, minus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+
+#if defined (TEST_FLOAT) && FLT_MANT_DIG == 24
+ TEST_fff_f (fma, 0x1.4p-126, 0x1.000004p-1, 0x1p-128, 0x1.c00004p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-126, 0x1.000004p-1, -0x1p-128, -0x1.c00004p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffff8p-126, 0x1.000002p-1, 0x1p-149, 0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.fffff8p-126, 0x1.000002p-1, -0x1p-149, -0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-149, 0x1p-1, 0x0.fffffep-126, 0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1p-1, -0x0.fffffep-126, -0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-149, 0x1.1p-1, 0x0.fffffep-126, 0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1.1p-1, -0x0.fffffep-126, -0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+#endif
+#if defined (TEST_DOUBLE) && DBL_MANT_DIG == 53
+ TEST_fff_f (fma, 0x1.4p-1022, 0x1.0000000000002p-1, 0x1p-1024, 0x1.c000000000002p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-1022, 0x1.0000000000002p-1, -0x1p-1024, -0x1.c000000000002p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x1p-1074, 0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, -0x1p-1074, -0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-1074, 0x1p-1, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1p-1, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-1074, 0x1.1p-1, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1.1p-1, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 64
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000004p-1L, 0x1p-16384L, 0x1.c000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000004p-1L, -0x1p-16384L, -0x1.c000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, 0x1p-16445L, 0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, -0x1p-16445L, -0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1p-1L, 0x0.fffffffffffffffep-16382L, 0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1p-1L, -0x0.fffffffffffffffep-16382L, -0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1.1p-1L, 0x0.fffffffffffffffep-16382L, 0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1.1p-1L, -0x0.fffffffffffffffep-16382L, -0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 113
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, 0x1p-16384L, 0x1.c000000000000000000000000002p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, -0x1p-16384L, -0x1.c000000000000000000000000002p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, 0x1p-16494L, 0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, -0x1p-16494L, -0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1.1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1.1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+#endif
+ }
+
+ fesetround (save_round_mode);
+
+ END (fma_towardzero);
+}
+
+
+static void
+fma_test_downward (void)
+{
+ int save_round_mode;
+ START (fma_downward);
+
+ save_round_mode = fegetround ();
+
+ if (!fesetround (FE_DOWNWARD))
+ {
+ TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, minus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, plus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, plus_zero, minus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, plus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, plus_zero, minus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, plus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, minus_zero, minus_zero);
+
+ TEST_fff_f (fma, 1.0, 1.0, -1.0, minus_zero);
+ TEST_fff_f (fma, 1.0, -1.0, 1.0, minus_zero);
+ TEST_fff_f (fma, -1.0, 1.0, 1.0, minus_zero);
+ TEST_fff_f (fma, -1.0, -1.0, -1.0, minus_zero);
+
+ TEST_fff_f (fma, min_value, min_value, plus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, min_value, minus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, plus_zero, -min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, minus_zero, -min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, plus_zero, -min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, minus_zero, -min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, plus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, minus_zero, plus_zero, UNDERFLOW_EXCEPTION);
+
+#if defined (TEST_FLOAT) && FLT_MANT_DIG == 24
+ TEST_fff_f (fma, 0x1.4p-126, 0x1.000004p-1, 0x1p-128, 0x1.c00004p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-126, 0x1.000004p-1, -0x1p-128, -0x1.c00008p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffff8p-126, 0x1.000002p-1, 0x1p-149, 0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.fffff8p-126, 0x1.000002p-1, -0x1p-149, -0x1p-126, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-149, 0x1p-1, 0x0.fffffep-126, 0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1p-1, -0x0.fffffep-126, -0x1p-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-149, 0x1.1p-1, 0x0.fffffep-126, 0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1.1p-1, -0x0.fffffep-126, -0x1p-126, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+#endif
+#if defined (TEST_DOUBLE) && DBL_MANT_DIG == 53
+ TEST_fff_f (fma, 0x1.4p-1022, 0x1.0000000000002p-1, 0x1p-1024, 0x1.c000000000002p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-1022, 0x1.0000000000002p-1, -0x1p-1024, -0x1.c000000000004p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x1p-1074, 0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, -0x1p-1074, -0x1p-1022, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-1074, 0x1p-1, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1p-1, -0x0.fffffffffffffp-1022, -0x1p-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-1074, 0x1.1p-1, 0x0.fffffffffffffp-1022, 0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1.1p-1, -0x0.fffffffffffffp-1022, -0x1p-1022, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 64
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000004p-1L, 0x1p-16384L, 0x1.c000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000004p-1L, -0x1p-16384L, -0x1.c000000000000008p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, 0x1p-16445L, 0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, -0x1p-16445L, -0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1p-1L, 0x0.fffffffffffffffep-16382L, 0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1p-1L, -0x0.fffffffffffffffep-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1.1p-1L, 0x0.fffffffffffffffep-16382L, 0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1.1p-1L, -0x0.fffffffffffffffep-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 113
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, 0x1p-16384L, 0x1.c000000000000000000000000002p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, -0x1p-16384L, -0x1.c000000000000000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, 0x1p-16494L, 0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, -0x1p-16494L, -0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1.1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1.1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+#endif
+ }
+
+ fesetround (save_round_mode);
+
+ END (fma_downward);
+}
+
+
+static void
+fma_test_upward (void)
+{
+ int save_round_mode;
+ START (fma_upward);
+
+ save_round_mode = fegetround ();
+
+ if (!fesetround (FE_UPWARD))
+ {
+ TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, minus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, plus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, 1.0, minus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, plus_zero, minus_zero, minus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, plus_zero, plus_zero);
+ TEST_fff_f (fma, -1.0, minus_zero, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, 1.0, minus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, plus_zero, -1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, 1.0, minus_zero, minus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, plus_zero, plus_zero);
+ TEST_fff_f (fma, minus_zero, -1.0, minus_zero, plus_zero);
+
+ TEST_fff_f (fma, 1.0, 1.0, -1.0, plus_zero);
+ TEST_fff_f (fma, 1.0, -1.0, 1.0, plus_zero);
+ TEST_fff_f (fma, -1.0, 1.0, 1.0, plus_zero);
+ TEST_fff_f (fma, -1.0, -1.0, -1.0, plus_zero);
+
+ TEST_fff_f (fma, min_value, min_value, plus_zero, min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, min_value, minus_zero, min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, plus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, min_value, -min_value, minus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, plus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, min_value, minus_zero, minus_zero, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, plus_zero, min_subnorm_value, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -min_value, -min_value, minus_zero, min_subnorm_value, UNDERFLOW_EXCEPTION);
+
+#if defined (TEST_FLOAT) && FLT_MANT_DIG == 24
+ TEST_fff_f (fma, 0x1.4p-126, 0x1.000004p-1, 0x1p-128, 0x1.c00008p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-126, 0x1.000004p-1, -0x1p-128, -0x1.c00004p-127, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffff8p-126, 0x1.000002p-1, 0x1p-149, 0x1p-126, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.fffff8p-126, 0x1.000002p-1, -0x1p-149, -0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-149, 0x1p-1, 0x0.fffffep-126, 0x1p-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-149, 0x1p-1, -0x0.fffffep-126, -0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-149, 0x1.1p-1, 0x0.fffffep-126, 0x1p-126, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1p-149, 0x1.1p-1, -0x0.fffffep-126, -0x0.fffffep-126, UNDERFLOW_EXCEPTION);
+#endif
+#if defined (TEST_DOUBLE) && DBL_MANT_DIG == 53
+ TEST_fff_f (fma, 0x1.4p-1022, 0x1.0000000000002p-1, 0x1p-1024, 0x1.c000000000004p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-1022, 0x1.0000000000002p-1, -0x1p-1024, -0x1.c000000000002p-1023, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, 0x1p-1074, 0x1p-1022, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.ffffffffffffcp-1022, 0x1.0000000000001p-1, -0x1p-1074, -0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-1074, 0x1p-1, 0x0.fffffffffffffp-1022, 0x1p-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-1074, 0x1p-1, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-1074, 0x1.1p-1, 0x0.fffffffffffffp-1022, 0x1p-1022, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1p-1074, 0x1.1p-1, -0x0.fffffffffffffp-1022, -0x0.fffffffffffffp-1022, UNDERFLOW_EXCEPTION);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 64
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000004p-1L, 0x1p-16384L, 0x1.c000000000000008p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000004p-1L, -0x1p-16384L, -0x1.c000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, 0x1p-16445L, 0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.fffffffffffffff8p-16382L, 0x1.0000000000000002p-1L, -0x1p-16445L, -0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1p-1L, 0x0.fffffffffffffffep-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1p-1L, -0x0.fffffffffffffffep-16382L, -0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16445L, 0x1.1p-1L, 0x0.fffffffffffffffep-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1p-16445L, 0x1.1p-1L, -0x0.fffffffffffffffep-16382L, -0x0.fffffffffffffffep-16382L, UNDERFLOW_EXCEPTION);
+#endif
+#if defined (TEST_LDOUBLE) && LDBL_MANT_DIG == 113
+ TEST_fff_f (fma, 0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, 0x1p-16384L, 0x1.c000000000000000000000000004p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1.4p-16382L, 0x1.0000000000000000000000000002p-1L, -0x1p-16384L, -0x1.c000000000000000000000000002p-16383L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, 0x1p-16494L, 0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1.fffffffffffffffffffffffffffcp-16382L, 0x1.0000000000000000000000000001p-1L, -0x1p-16494L, -0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+ TEST_fff_f (fma, 0x1p-16494L, 0x1.1p-1L, 0x0.ffffffffffffffffffffffffffffp-16382L, 0x1p-16382L, UNDERFLOW_EXCEPTION_BEFORE_ROUNDING);
+ TEST_fff_f (fma, -0x1p-16494L, 0x1.1p-1L, -0x0.ffffffffffffffffffffffffffffp-16382L, -0x0.ffffffffffffffffffffffffffffp-16382L, UNDERFLOW_EXCEPTION);
+#endif
+ }
+
+ fesetround (save_round_mode);
+
+ END (fma_upward);
+}
+
+
+static void
fmax_test (void)
{
START (fmax);
@@ -4600,6 +5141,7 @@ fpclassify_test (void)
TEST_f_i (fpclassify, plus_zero, FP_ZERO);
TEST_f_i (fpclassify, minus_zero, FP_ZERO);
TEST_f_i (fpclassify, 1000, FP_NORMAL);
+ TEST_f_i (fpclassify, min_subnorm_value, FP_SUBNORMAL);
END (fpclassify);
}
@@ -4635,7 +5177,6 @@ gamma_test (void)
if (errno == ENOSYS)
/* Function not implemented. */
return;
- feclearexcept (FE_ALL_EXCEPT);
START (gamma);
@@ -4749,6 +5290,7 @@ isfinite_test (void)
TEST_f_b (isfinite, 0, 1);
TEST_f_b (isfinite, minus_zero, 1);
TEST_f_b (isfinite, 10, 1);
+ TEST_f_b (isfinite, min_subnorm_value, 1);
TEST_f_b (isfinite, plus_infty, 0);
TEST_f_b (isfinite, minus_infty, 0);
TEST_f_b (isfinite, nan_value, 0);
@@ -4757,6 +5299,163 @@ isfinite_test (void)
}
static void
+isgreater_test (void)
+{
+ START (isgreater);
+
+ TEST_ff_i (isgreater, minus_zero, minus_zero, 0);
+ TEST_ff_i (isgreater, minus_zero, plus_zero, 0);
+ TEST_ff_i (isgreater, minus_zero, (FLOAT) 1, 0);
+ TEST_ff_i (isgreater, minus_zero, nan_value, 0);
+ TEST_ff_i (isgreater, plus_zero, minus_zero, 0);
+ TEST_ff_i (isgreater, plus_zero, plus_zero, 0);
+ TEST_ff_i (isgreater, plus_zero, (FLOAT) 1, 0);
+ TEST_ff_i (isgreater, plus_zero, nan_value, 0);
+ TEST_ff_i (isgreater, (FLOAT) 1, minus_zero, 1);
+ TEST_ff_i (isgreater, (FLOAT) 1, plus_zero, 1);
+ TEST_ff_i (isgreater, (FLOAT) 1, (FLOAT) 1, 0);
+ TEST_ff_i (isgreater, (FLOAT) 1, nan_value, 0);
+ TEST_ff_i (isgreater, nan_value, minus_zero, 0);
+ TEST_ff_i (isgreater, nan_value, plus_zero, 0);
+ TEST_ff_i (isgreater, nan_value, (FLOAT) 1, 0);
+ TEST_ff_i (isgreater, nan_value, nan_value, 0);
+
+ END (isgreater);
+}
+
+static void
+isgreaterequal_test (void)
+{
+ START (isgreaterequal);
+
+ TEST_ff_i (isgreaterequal, minus_zero, minus_zero, 1);
+ TEST_ff_i (isgreaterequal, minus_zero, plus_zero, 1);
+ TEST_ff_i (isgreaterequal, minus_zero, (FLOAT) 1, 0);
+ TEST_ff_i (isgreaterequal, minus_zero, nan_value, 0);
+ TEST_ff_i (isgreaterequal, plus_zero, minus_zero, 1);
+ TEST_ff_i (isgreaterequal, plus_zero, plus_zero, 1);
+ TEST_ff_i (isgreaterequal, plus_zero, (FLOAT) 1, 0);
+ TEST_ff_i (isgreaterequal, plus_zero, nan_value, 0);
+ TEST_ff_i (isgreaterequal, (FLOAT) 1, minus_zero, 1);
+ TEST_ff_i (isgreaterequal, (FLOAT) 1, plus_zero, 1);
+ TEST_ff_i (isgreaterequal, (FLOAT) 1, (FLOAT) 1, 1);
+ TEST_ff_i (isgreaterequal, (FLOAT) 1, nan_value, 0);
+ TEST_ff_i (isgreaterequal, nan_value, minus_zero, 0);
+ TEST_ff_i (isgreaterequal, nan_value, plus_zero, 0);
+ TEST_ff_i (isgreaterequal, nan_value, (FLOAT) 1, 0);
+ TEST_ff_i (isgreaterequal, nan_value, nan_value, 0);
+
+ END (isgreaterequal);
+}
+
+static void
+isinf_test (void)
+{
+ START (isinf);
+
+ TEST_f_b (isinf, 0, 0);
+ TEST_f_b (isinf, minus_zero, 0);
+ TEST_f_b (isinf, 10, 0);
+ TEST_f_b (isinf, min_subnorm_value, 0);
+ TEST_f_b (isinf, plus_infty, 1);
+ TEST_f_b (isinf, minus_infty, 1);
+ TEST_f_b (isinf, nan_value, 0);
+
+ END (isinf);
+}
+
+static void
+isless_test (void)
+{
+ START (isless);
+
+ TEST_ff_i (isless, minus_zero, minus_zero, 0);
+ TEST_ff_i (isless, minus_zero, plus_zero, 0);
+ TEST_ff_i (isless, minus_zero, (FLOAT) 1, 1);
+ TEST_ff_i (isless, minus_zero, nan_value, 0);
+ TEST_ff_i (isless, plus_zero, minus_zero, 0);
+ TEST_ff_i (isless, plus_zero, plus_zero, 0);
+ TEST_ff_i (isless, plus_zero, (FLOAT) 1, 1);
+ TEST_ff_i (isless, plus_zero, nan_value, 0);
+ TEST_ff_i (isless, (FLOAT) 1, minus_zero, 0);
+ TEST_ff_i (isless, (FLOAT) 1, plus_zero, 0);
+ TEST_ff_i (isless, (FLOAT) 1, (FLOAT) 1, 0);
+ TEST_ff_i (isless, (FLOAT) 1, nan_value, 0);
+ TEST_ff_i (isless, nan_value, minus_zero, 0);
+ TEST_ff_i (isless, nan_value, plus_zero, 0);
+ TEST_ff_i (isless, nan_value, (FLOAT) 1, 0);
+ TEST_ff_i (isless, nan_value, nan_value, 0);
+
+ END (isless);
+}
+
+static void
+islessequal_test (void)
+{
+ START (islessequal);
+
+ TEST_ff_i (islessequal, minus_zero, minus_zero, 1);
+ TEST_ff_i (islessequal, minus_zero, plus_zero, 1);
+ TEST_ff_i (islessequal, minus_zero, (FLOAT) 1, 1);
+ TEST_ff_i (islessequal, minus_zero, nan_value, 0);
+ TEST_ff_i (islessequal, plus_zero, minus_zero, 1);
+ TEST_ff_i (islessequal, plus_zero, plus_zero, 1);
+ TEST_ff_i (islessequal, plus_zero, (FLOAT) 1, 1);
+ TEST_ff_i (islessequal, plus_zero, nan_value, 0);
+ TEST_ff_i (islessequal, (FLOAT) 1, minus_zero, 0);
+ TEST_ff_i (islessequal, (FLOAT) 1, plus_zero, 0);
+ TEST_ff_i (islessequal, (FLOAT) 1, (FLOAT) 1, 1);
+ TEST_ff_i (islessequal, (FLOAT) 1, nan_value, 0);
+ TEST_ff_i (islessequal, nan_value, minus_zero, 0);
+ TEST_ff_i (islessequal, nan_value, plus_zero, 0);
+ TEST_ff_i (islessequal, nan_value, (FLOAT) 1, 0);
+ TEST_ff_i (islessequal, nan_value, nan_value, 0);
+
+ END (islessequal);
+}
+
+static void
+islessgreater_test (void)
+{
+ START (islessgreater);
+
+ TEST_ff_i (islessgreater, minus_zero, minus_zero, 0);
+ TEST_ff_i (islessgreater, minus_zero, plus_zero, 0);
+ TEST_ff_i (islessgreater, minus_zero, (FLOAT) 1, 1);
+ TEST_ff_i (islessgreater, minus_zero, nan_value, 0);
+ TEST_ff_i (islessgreater, plus_zero, minus_zero, 0);
+ TEST_ff_i (islessgreater, plus_zero, plus_zero, 0);
+ TEST_ff_i (islessgreater, plus_zero, (FLOAT) 1, 1);
+ TEST_ff_i (islessgreater, plus_zero, nan_value, 0);
+ TEST_ff_i (islessgreater, (FLOAT) 1, minus_zero, 1);
+ TEST_ff_i (islessgreater, (FLOAT) 1, plus_zero, 1);
+ TEST_ff_i (islessgreater, (FLOAT) 1, (FLOAT) 1, 0);
+ TEST_ff_i (islessgreater, (FLOAT) 1, nan_value, 0);
+ TEST_ff_i (islessgreater, nan_value, minus_zero, 0);
+ TEST_ff_i (islessgreater, nan_value, plus_zero, 0);
+ TEST_ff_i (islessgreater, nan_value, (FLOAT) 1, 0);
+ TEST_ff_i (islessgreater, nan_value, nan_value, 0);
+
+ END (islessgreater);
+}
+
+static void
+isnan_test (void)
+{
+ START (isnan);
+
+ TEST_f_b (isnan, 0, 0);
+ TEST_f_b (isnan, minus_zero, 0);
+ TEST_f_b (isnan, 10, 0);
+ TEST_f_b (isnan, min_subnorm_value, 0);
+ TEST_f_b (isnan, plus_infty, 0);
+ TEST_f_b (isnan, minus_infty, 0);
+ TEST_f_b (isnan, nan_value, 1);
+
+ END (isnan);
+}
+
+static void
isnormal_test (void)
{
START (isnormal);
@@ -4764,6 +5463,7 @@ isnormal_test (void)
TEST_f_b (isnormal, 0, 0);
TEST_f_b (isnormal, minus_zero, 0);
TEST_f_b (isnormal, 10, 1);
+ TEST_f_b (isnormal, min_subnorm_value, 0);
TEST_f_b (isnormal, plus_infty, 0);
TEST_f_b (isnormal, minus_infty, 0);
TEST_f_b (isnormal, nan_value, 0);
@@ -4772,6 +5472,31 @@ isnormal_test (void)
}
static void
+isunordered_test (void)
+{
+ START (isunordered);
+
+ TEST_ff_i (isunordered, minus_zero, minus_zero, 0);
+ TEST_ff_i (isunordered, minus_zero, plus_zero, 0);
+ TEST_ff_i (isunordered, minus_zero, (FLOAT) 1, 0);
+ TEST_ff_i (isunordered, minus_zero, nan_value, 1);
+ TEST_ff_i (isunordered, plus_zero, minus_zero, 0);
+ TEST_ff_i (isunordered, plus_zero, plus_zero, 0);
+ TEST_ff_i (isunordered, plus_zero, (FLOAT) 1, 0);
+ TEST_ff_i (isunordered, plus_zero, nan_value, 1);
+ TEST_ff_i (isunordered, (FLOAT) 1, minus_zero, 0);
+ TEST_ff_i (isunordered, (FLOAT) 1, plus_zero, 0);
+ TEST_ff_i (isunordered, (FLOAT) 1, (FLOAT) 1, 0);
+ TEST_ff_i (isunordered, (FLOAT) 1, nan_value, 1);
+ TEST_ff_i (isunordered, nan_value, minus_zero, 1);
+ TEST_ff_i (isunordered, nan_value, plus_zero, 1);
+ TEST_ff_i (isunordered, nan_value, (FLOAT) 1, 1);
+ TEST_ff_i (isunordered, nan_value, nan_value, 1);
+
+ END (isunordered);
+}
+
+static void
j0_test (void)
{
FLOAT s, c;
@@ -4967,7 +5692,6 @@ lgamma_test (void)
if (errno == ENOSYS)
/* Function not implemented. */
return;
- feclearexcept (FE_ALL_EXCEPT);
START (lgamma);
@@ -8157,6 +8881,13 @@ sin_test (void)
TEST_f_f (sin, 0x1p16383L, 0.3893629985894208126948115852610595405563L);
#endif
+ TEST_f_f (sin, 0x1p+120, 3.77820109360752022655548470056922991960587e-01L);
+ TEST_f_f (sin, 0x1p+127, 6.23385512955870240370428801097126489001833e-01L);
+ TEST_f_f (sin, 0x1.fffff8p+127, 4.85786063130487339701113680434728152037092e-02L);
+ TEST_f_f (sin, 0x1.fffffep+127, -5.21876523333658540551505357019806722935726e-01L);
+ TEST_f_f (sin, 0x1p+50, 4.96396515208940840876821859865411368093356e-01L);
+ TEST_f_f (sin, 0x1p+28, -9.86198211836975655703110310527108292055548e-01L);
+
END (sin);
}
@@ -8340,6 +9071,13 @@ sincos_test (void)
TEST_extra (sincos, 0x1p16383L, 0.3893629985894208126948115852610595405563L, 0.9210843909921906206874509522505756251609L);
#endif
+ TEST_extra (sincos, 0x1p+120, 3.77820109360752022655548470056922991960587e-01L, -9.25879022854837867303861764107414946730833e-01L);
+ TEST_extra (sincos, 0x1p+127, 6.23385512955870240370428801097126489001833e-01L, 7.81914638714960072263910298466369236613162e-01L);
+ TEST_extra (sincos, 0x1.fffff8p+127, 4.85786063130487339701113680434728152037092e-02L, 9.98819362551949040703862043664101081064641e-01L);
+ TEST_extra (sincos, 0x1.fffffep+127, -5.21876523333658540551505357019806722935726e-01L, 8.53021039830304158051791467692161107353094e-01L);
+ TEST_extra (sincos, 0x1p+50, 4.96396515208940840876821859865411368093356e-01L, 8.68095904660550604334592502063501320395739e-01L);
+ TEST_extra (sincos, 0x1p+28, -9.86198211836975655703110310527108292055548e-01L, -1.65568979490578758865468278195361551113358e-01L);
+
END (sincos);
}
@@ -8768,7 +9506,6 @@ tgamma_test (void)
if (errno == ENOSYS)
/* Function not implemented. */
return;
- feclearexcept (FE_ALL_EXCEPT);
START (tgamma);
@@ -9097,6 +9834,12 @@ initialize (void)
LDBL_MAX, DBL_MAX, FLT_MAX);
min_value = CHOOSE (LDBL_MIN, DBL_MIN, FLT_MIN,
LDBL_MIN, DBL_MIN, FLT_MIN);
+ min_subnorm_value = CHOOSE (__LDBL_DENORM_MIN__,
+ __DBL_DENORM_MIN__,
+ __FLT_DENORM_MIN__,
+ __LDBL_DENORM_MIN__,
+ __DBL_DENORM_MIN__,
+ __FLT_DENORM_MIN__);
(void) &plus_zero;
(void) &nan_value;
@@ -9105,6 +9848,7 @@ initialize (void)
(void) &minus_infty;
(void) &max_value;
(void) &min_value;
+ (void) &min_subnorm_value;
/* Clear all exceptions. From now on we must not get random exceptions. */
feclearexcept (FE_ALL_EXCEPT);
@@ -9242,8 +9986,11 @@ main (int argc, char **argv)
/* Keep the tests a wee bit ordered (according to ISO C99). */
/* Classification macros: */
+ finite_test ();
fpclassify_test ();
isfinite_test ();
+ isinf_test ();
+ isnan_test ();
isnormal_test ();
signbit_test ();
@@ -9376,6 +10123,17 @@ main (int argc, char **argv)
/* Multiply and add: */
fma_test ();
+ fma_test_towardzero ();
+ fma_test_downward ();
+ fma_test_upward ();
+
+ /* Comparison macros: */
+ isgreater_test ();
+ isgreaterequal_test ();
+ isless_test ();
+ islessequal_test ();
+ islessgreater_test ();
+ isunordered_test ();
/* Complex functions: */
cabs_test ();
diff --git a/math/s_ccosh.c b/math/s_ccosh.c
index 44c9944466..91477ee2d0 100644
--- a/math/s_ccosh.c
+++ b/math/s_ccosh.c
@@ -39,7 +39,15 @@ __ccosh (__complex__ double x)
const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
double sinix, cosix;
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (fabs (__real__ x) > t)
{
@@ -92,7 +100,15 @@ __ccosh (__complex__ double x)
/* Imaginary part is finite. */
double sinix, cosix;
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysign (HUGE_VAL, cosix);
__imag__ retval = (__copysign (HUGE_VAL, sinix)
diff --git a/math/s_ccoshf.c b/math/s_ccoshf.c
index d6f811049e..9ca57b25b9 100644
--- a/math/s_ccoshf.c
+++ b/math/s_ccoshf.c
@@ -39,7 +39,15 @@ __ccoshf (__complex__ float x)
const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
float sinix, cosix;
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
if (fabsf (__real__ x) > t)
{
@@ -92,7 +100,15 @@ __ccoshf (__complex__ float x)
/* Imaginary part is finite. */
float sinix, cosix;
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
__real__ retval = __copysignf (HUGE_VALF, cosix);
__imag__ retval = (__copysignf (HUGE_VALF, sinix)
diff --git a/math/s_ccoshl.c b/math/s_ccoshl.c
index 77a9ae3869..1d561b4e3f 100644
--- a/math/s_ccoshl.c
+++ b/math/s_ccoshl.c
@@ -39,7 +39,15 @@ __ccoshl (__complex__ long double x)
const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
long double sinix, cosix;
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (fabsl (__real__ x) > t)
{
@@ -92,7 +100,15 @@ __ccoshl (__complex__ long double x)
/* Imaginary part is finite. */
long double sinix, cosix;
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysignl (HUGE_VALL, cosix);
__imag__ retval = (__copysignl (HUGE_VALL, sinix)
diff --git a/math/s_cexp.c b/math/s_cexp.c
index 1d7a5a2c40..d0a95ba79c 100644
--- a/math/s_cexp.c
+++ b/math/s_cexp.c
@@ -39,7 +39,15 @@ __cexp (__complex__ double x)
const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
double sinix, cosix;
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (__real__ x > t)
{
@@ -95,7 +103,15 @@ __cexp (__complex__ double x)
{
double sinix, cosix;
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysign (value, cosix);
__imag__ retval = __copysign (value, sinix);
diff --git a/math/s_cexpf.c b/math/s_cexpf.c
index 4aa9765818..41fcea51db 100644
--- a/math/s_cexpf.c
+++ b/math/s_cexpf.c
@@ -39,7 +39,15 @@ __cexpf (__complex__ float x)
const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
float sinix, cosix;
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
if (__real__ x > t)
{
@@ -95,7 +103,15 @@ __cexpf (__complex__ float x)
{
float sinix, cosix;
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
__real__ retval = __copysignf (value, cosix);
__imag__ retval = __copysignf (value, sinix);
diff --git a/math/s_cexpl.c b/math/s_cexpl.c
index 256824924f..d67cc5e5eb 100644
--- a/math/s_cexpl.c
+++ b/math/s_cexpl.c
@@ -39,7 +39,15 @@ __cexpl (__complex__ long double x)
const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
long double sinix, cosix;
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (__real__ x > t)
{
@@ -95,7 +103,15 @@ __cexpl (__complex__ long double x)
{
long double sinix, cosix;
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysignl (value, cosix);
__imag__ retval = __copysignl (value, sinix);
diff --git a/math/s_clog.c b/math/s_clog.c
index e28aa5157d..79b1f375d7 100644
--- a/math/s_clog.c
+++ b/math/s_clog.c
@@ -78,6 +78,26 @@ __clog (__complex__ double x)
else
__real__ result = __log1p (absy2) / 2.0;
}
+ else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
+ {
+ double d2m1 = (absx - 1.0) * (absx + 1.0);
+ if (absy >= DBL_EPSILON)
+ d2m1 += absy * absy;
+ __real__ result = __log1p (d2m1) / 2.0;
+ }
+ else if (absx < 1.0
+ && absx >= 0.75
+ && absy < DBL_EPSILON / 2.0
+ && scale == 0)
+ {
+ double d2m1 = (absx - 1.0) * (absx + 1.0);
+ __real__ result = __log1p (d2m1) / 2.0;
+ }
+ else if (absx < 1.0 && (absx >= 0.75 || absy >= 0.5) && scale == 0)
+ {
+ double d2m1 = __x2y2m1 (absx, absy);
+ __real__ result = __log1p (d2m1) / 2.0;
+ }
else
{
double d = __ieee754_hypot (absx, absy);
diff --git a/math/s_clog10.c b/math/s_clog10.c
index b733b048b9..4ccb5bcaa9 100644
--- a/math/s_clog10.c
+++ b/math/s_clog10.c
@@ -81,6 +81,26 @@ __clog10 (__complex__ double x)
else
__real__ result = __log1p (absy2) * (M_LOG10E / 2.0);
}
+ else if (absx > 1.0 && absx < 2.0 && absy < 1.0 && scale == 0)
+ {
+ double d2m1 = (absx - 1.0) * (absx + 1.0);
+ if (absy >= DBL_EPSILON)
+ d2m1 += absy * absy;
+ __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
+ }
+ else if (absx < 1.0
+ && absx >= 0.75
+ && absy < DBL_EPSILON / 2.0
+ && scale == 0)
+ {
+ double d2m1 = (absx - 1.0) * (absx + 1.0);
+ __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
+ }
+ else if (absx < 1.0 && (absx >= 0.75 || absy >= 0.5) && scale == 0)
+ {
+ double d2m1 = __x2y2m1 (absx, absy);
+ __real__ result = __log1p (d2m1) * (M_LOG10E / 2.0);
+ }
else
{
double d = __ieee754_hypot (absx, absy);
diff --git a/math/s_clog10f.c b/math/s_clog10f.c
index eb1b895aec..1789f1aedb 100644
--- a/math/s_clog10f.c
+++ b/math/s_clog10f.c
@@ -83,6 +83,26 @@ __clog10f (__complex__ float x)
else
__real__ result = __log1pf (absy2) * ((float) M_LOG10E / 2.0f);
}
+ else if (absx > 1.0f && absx < 2.0f && absy < 1.0f && scale == 0)
+ {
+ float d2m1 = (absx - 1.0f) * (absx + 1.0f);
+ if (absy >= FLT_EPSILON)
+ d2m1 += absy * absy;
+ __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f);
+ }
+ else if (absx < 1.0f
+ && absx >= 0.75f
+ && absy < FLT_EPSILON / 2.0f
+ && scale == 0)
+ {
+ float d2m1 = (absx - 1.0f) * (absx + 1.0f);
+ __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f);
+ }
+ else if (absx < 1.0f && (absx >= 0.75f || absy >= 0.5f) && scale == 0)
+ {
+ float d2m1 = __x2y2m1f (absx, absy);
+ __real__ result = __log1pf (d2m1) * ((float) M_LOG10E / 2.0f);
+ }
else
{
float d = __ieee754_hypotf (absx, absy);
diff --git a/math/s_clog10l.c b/math/s_clog10l.c
index 2a380f6f3b..958f74abdb 100644
--- a/math/s_clog10l.c
+++ b/math/s_clog10l.c
@@ -22,6 +22,13 @@
#include <math_private.h>
#include <float.h>
+/* To avoid spurious underflows, use this definition to treat IBM long
+ double as approximating an IEEE-style format. */
+#if LDBL_MANT_DIG == 106
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 0x1p-106L
+#endif
+
/* log_10 (2). */
#define M_LOG10_2l 0.3010299956639811952137388947244930267682L
@@ -75,6 +82,26 @@ __clog10l (__complex__ long double x)
else
__real__ result = __log1pl (absy2) * (M_LOG10El / 2.0L);
}
+ else if (absx > 1.0L && absx < 2.0L && absy < 1.0L && scale == 0)
+ {
+ long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
+ if (absy >= LDBL_EPSILON)
+ d2m1 += absy * absy;
+ __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L);
+ }
+ else if (absx < 1.0L
+ && absx >= 0.75L
+ && absy < LDBL_EPSILON / 2.0L
+ && scale == 0)
+ {
+ long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
+ __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L);
+ }
+ else if (absx < 1.0L && (absx >= 0.75L || absy >= 0.5L) && scale == 0)
+ {
+ long double d2m1 = __x2y2m1l (absx, absy);
+ __real__ result = __log1pl (d2m1) * (M_LOG10El / 2.0L);
+ }
else
{
long double d = __ieee754_hypotl (absx, absy);
diff --git a/math/s_clogf.c b/math/s_clogf.c
index 088730cfd2..2b9038b411 100644
--- a/math/s_clogf.c
+++ b/math/s_clogf.c
@@ -78,6 +78,26 @@ __clogf (__complex__ float x)
else
__real__ result = __log1pf (absy2) / 2.0f;
}
+ else if (absx > 1.0f && absx < 2.0f && absy < 1.0f && scale == 0)
+ {
+ float d2m1 = (absx - 1.0f) * (absx + 1.0f);
+ if (absy >= FLT_EPSILON)
+ d2m1 += absy * absy;
+ __real__ result = __log1pf (d2m1) / 2.0f;
+ }
+ else if (absx < 1.0f
+ && absx >= 0.75f
+ && absy < FLT_EPSILON / 2.0f
+ && scale == 0)
+ {
+ float d2m1 = (absx - 1.0f) * (absx + 1.0f);
+ __real__ result = __log1pf (d2m1) / 2.0f;
+ }
+ else if (absx < 1.0f && (absx >= 0.75f || absy >= 0.5f) && scale == 0)
+ {
+ float d2m1 = __x2y2m1f (absx, absy);
+ __real__ result = __log1pf (d2m1) / 2.0f;
+ }
else
{
float d = __ieee754_hypotf (absx, absy);
diff --git a/math/s_clogl.c b/math/s_clogl.c
index d98a3c02c1..af3ed99714 100644
--- a/math/s_clogl.c
+++ b/math/s_clogl.c
@@ -22,6 +22,13 @@
#include <math_private.h>
#include <float.h>
+/* To avoid spurious underflows, use this definition to treat IBM long
+ double as approximating an IEEE-style format. */
+#if LDBL_MANT_DIG == 106
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 0x1p-106L
+#endif
+
__complex__ long double
__clogl (__complex__ long double x)
{
@@ -71,6 +78,26 @@ __clogl (__complex__ long double x)
else
__real__ result = __log1pl (absy2) / 2.0L;
}
+ else if (absx > 1.0L && absx < 2.0L && absy < 1.0L && scale == 0)
+ {
+ long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
+ if (absy >= LDBL_EPSILON)
+ d2m1 += absy * absy;
+ __real__ result = __log1pl (d2m1) / 2.0L;
+ }
+ else if (absx < 1.0L
+ && absx >= 0.75L
+ && absy < LDBL_EPSILON / 2.0L
+ && scale == 0)
+ {
+ long double d2m1 = (absx - 1.0L) * (absx + 1.0L);
+ __real__ result = __log1pl (d2m1) / 2.0L;
+ }
+ else if (absx < 1.0L && (absx >= 0.75L || absy >= 0.5L) && scale == 0)
+ {
+ long double d2m1 = __x2y2m1l (absx, absy);
+ __real__ result = __log1pl (d2m1) / 2.0L;
+ }
else
{
long double d = __ieee754_hypotl (absx, absy);
diff --git a/math/s_csin.c b/math/s_csin.c
index 602c14e537..725989c9c7 100644
--- a/math/s_csin.c
+++ b/math/s_csin.c
@@ -42,7 +42,15 @@ __csin (__complex__ double x)
const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
double sinix, cosix;
- __sincos (__real__ x, &sinix, &cosix);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__real__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __real__ x;
+ cosix = 1.0;
+ }
if (fabs (__imag__ x) > t)
{
@@ -115,7 +123,15 @@ __csin (__complex__ double x)
/* Real part is finite. */
double sinix, cosix;
- __sincos (__real__ x, &sinix, &cosix);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__real__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __real__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysign (HUGE_VAL, sinix);
__imag__ retval = __copysign (HUGE_VAL, cosix);
diff --git a/math/s_csinf.c b/math/s_csinf.c
index c1d6a4f28e..d53f943fa7 100644
--- a/math/s_csinf.c
+++ b/math/s_csinf.c
@@ -42,7 +42,15 @@ __csinf (__complex__ float x)
const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
float sinix, cosix;
- __sincosf (__real__ x, &sinix, &cosix);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__real__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __real__ x;
+ cosix = 1.0f;
+ }
if (fabsf (__imag__ x) > t)
{
@@ -115,7 +123,15 @@ __csinf (__complex__ float x)
/* Real part is finite. */
float sinix, cosix;
- __sincosf (__real__ x, &sinix, &cosix);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__real__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __real__ x;
+ cosix = 1.0f;
+ }
__real__ retval = __copysignf (HUGE_VALF, sinix);
__imag__ retval = __copysignf (HUGE_VALF, cosix);
diff --git a/math/s_csinh.c b/math/s_csinh.c
index 56bb256239..20edbd13f0 100644
--- a/math/s_csinh.c
+++ b/math/s_csinh.c
@@ -42,7 +42,15 @@ __csinh (__complex__ double x)
const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2);
double sinix, cosix;
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (fabs (__real__ x) > t)
{
@@ -109,7 +117,15 @@ __csinh (__complex__ double x)
/* Imaginary part is finite. */
double sinix, cosix;
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysign (HUGE_VAL, cosix);
__imag__ retval = __copysign (HUGE_VAL, sinix);
diff --git a/math/s_csinhf.c b/math/s_csinhf.c
index ba85e79b8a..4b019a0ed8 100644
--- a/math/s_csinhf.c
+++ b/math/s_csinhf.c
@@ -42,7 +42,15 @@ __csinhf (__complex__ float x)
const int t = (int) ((FLT_MAX_EXP - 1) * M_LN2);
float sinix, cosix;
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
if (fabsf (__real__ x) > t)
{
@@ -109,7 +117,15 @@ __csinhf (__complex__ float x)
/* Imaginary part is finite. */
float sinix, cosix;
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
__real__ retval = __copysignf (HUGE_VALF, cosix);
__imag__ retval = __copysignf (HUGE_VALF, sinix);
diff --git a/math/s_csinhl.c b/math/s_csinhl.c
index e482e3a62e..d9a928a401 100644
--- a/math/s_csinhl.c
+++ b/math/s_csinhl.c
@@ -42,7 +42,15 @@ __csinhl (__complex__ long double x)
const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
long double sinix, cosix;
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (fabsl (__real__ x) > t)
{
@@ -109,7 +117,15 @@ __csinhl (__complex__ long double x)
/* Imaginary part is finite. */
long double sinix, cosix;
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysignl (HUGE_VALL, cosix);
__imag__ retval = __copysignl (HUGE_VALL, sinix);
diff --git a/math/s_csinl.c b/math/s_csinl.c
index ff43256e54..9812bddd5c 100644
--- a/math/s_csinl.c
+++ b/math/s_csinl.c
@@ -42,7 +42,15 @@ __csinl (__complex__ long double x)
const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l);
long double sinix, cosix;
- __sincosl (__real__ x, &sinix, &cosix);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__real__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __real__ x;
+ cosix = 1.0;
+ }
if (fabsl (__imag__ x) > t)
{
@@ -115,7 +123,15 @@ __csinl (__complex__ long double x)
/* Real part is finite. */
long double sinix, cosix;
- __sincosl (__real__ x, &sinix, &cosix);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__real__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __real__ x;
+ cosix = 1.0;
+ }
__real__ retval = __copysignl (HUGE_VALL, sinix);
__imag__ retval = __copysignl (HUGE_VALL, cosix);
diff --git a/math/s_ctan.c b/math/s_ctan.c
index 89c0fef91e..fdba847447 100644
--- a/math/s_ctan.c
+++ b/math/s_ctan.c
@@ -53,11 +53,20 @@ __ctan (__complex__ double x)
double sinrx, cosrx;
double den;
const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2 / 2);
+ int rcls = fpclassify (__real__ x);
/* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
= (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
- __sincos (__real__ x, &sinrx, &cosrx);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__real__ x, &sinrx, &cosrx);
+ }
+ else
+ {
+ sinrx = __real__ x;
+ cosrx = 1.0;
+ }
if (fabs (__imag__ x) > t)
{
diff --git a/math/s_ctanf.c b/math/s_ctanf.c
index 2559f83f84..fd2b797882 100644
--- a/math/s_ctanf.c
+++ b/math/s_ctanf.c
@@ -57,7 +57,15 @@ __ctanf (__complex__ float x)
/* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
= (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
- __sincosf (__real__ x, &sinrx, &cosrx);
+ if (__builtin_expect (fpclassify(__real__ x) != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__real__ x, &sinrx, &cosrx);
+ }
+ else
+ {
+ sinrx = __real__ x;
+ cosrx = 1.0f;
+ }
if (fabsf (__imag__ x) > t)
{
diff --git a/math/s_ctanh.c b/math/s_ctanh.c
index d288b7d168..fee1910551 100644
--- a/math/s_ctanh.c
+++ b/math/s_ctanh.c
@@ -53,11 +53,20 @@ __ctanh (__complex__ double x)
double sinix, cosix;
double den;
const int t = (int) ((DBL_MAX_EXP - 1) * M_LN2 / 2);
+ int icls = fpclassify (__imag__ x);
/* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
= (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2). */
- __sincos (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincos (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (fabs (__real__ x) > t)
{
diff --git a/math/s_ctanhf.c b/math/s_ctanhf.c
index ca36a83bfb..862845f8c2 100644
--- a/math/s_ctanhf.c
+++ b/math/s_ctanhf.c
@@ -57,7 +57,15 @@ __ctanhf (__complex__ float x)
/* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
= (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2). */
- __sincosf (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (fpclassify(__imag__ x) != FP_SUBNORMAL, 1))
+ {
+ __sincosf (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0f;
+ }
if (fabsf (__real__ x) > t)
{
diff --git a/math/s_ctanhl.c b/math/s_ctanhl.c
index dbf1612707..c4fc1d3d04 100644
--- a/math/s_ctanhl.c
+++ b/math/s_ctanhl.c
@@ -53,11 +53,20 @@ __ctanhl (__complex__ long double x)
long double sinix, cosix;
long double den;
const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
+ int icls = fpclassify (__imag__ x);
/* tanh(x+iy) = (sinh(2x) + i*sin(2y))/(cosh(2x) + cos(2y))
= (sinh(x)*cosh(x) + i*sin(y)*cos(y))/(sinh(x)^2 + cos(y)^2). */
- __sincosl (__imag__ x, &sinix, &cosix);
+ if (__builtin_expect (icls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__imag__ x, &sinix, &cosix);
+ }
+ else
+ {
+ sinix = __imag__ x;
+ cosix = 1.0;
+ }
if (fabsl (__real__ x) > t)
{
diff --git a/math/s_ctanl.c b/math/s_ctanl.c
index 4fe26119c8..0affe93211 100644
--- a/math/s_ctanl.c
+++ b/math/s_ctanl.c
@@ -53,11 +53,20 @@ __ctanl (__complex__ long double x)
long double sinrx, cosrx;
long double den;
const int t = (int) ((LDBL_MAX_EXP - 1) * M_LN2l / 2);
+ int rcls = fpclassify (__real__ x);
/* tan(x+iy) = (sin(2x) + i*sinh(2y))/(cos(2x) + cosh(2y))
= (sin(x)*cos(x) + i*sinh(y)*cosh(y)/(cos(x)^2 + sinh(y)^2). */
- __sincosl (__real__ x, &sinrx, &cosrx);
+ if (__builtin_expect (rcls != FP_SUBNORMAL, 1))
+ {
+ __sincosl (__real__ x, &sinrx, &cosrx);
+ }
+ else
+ {
+ sinrx = __real__ x;
+ cosrx = 1.0;
+ }
if (fabsl (__imag__ x) > t)
{
diff --git a/misc/Makefile b/misc/Makefile
index d1c0a02e17..4cb7f24e6c 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -25,7 +25,8 @@ headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
ttyent.h paths.h sys/reboot.h \
- sys/mman.h sys/param.h fstab.h mntent.h search.h err.h error.h \
+ sys/mman.h sys/param.h bits/param.h \
+ fstab.h mntent.h search.h err.h error.h \
sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
sys/select.h ustat.h sys/ustat.h bits/ustat.h sys/sysinfo.h \
regexp.h bits/select.h bits/mman.h sys/xattr.h \
@@ -64,7 +65,7 @@ routines := brk sbrk sstk ioctl \
getloadavg getclktck \
fgetxattr flistxattr fremovexattr fsetxattr getxattr \
listxattr lgetxattr llistxattr lremovexattr lsetxattr \
- removexattr setxattr getauxval
+ removexattr setxattr getauxval ifunc-impl-list
generated := tst-error1.mtrace tst-error1-mem
@@ -76,7 +77,7 @@ gpl2lgpl := error.c error.h
tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-error1-mem
endif
@@ -95,7 +96,6 @@ CFLAGS-getsysstats.c = -fexceptions
CFLAGS-getusershell.c = -fexceptions
CFLAGS-err.c = -fexceptions
CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
-CFLAGS-mntent_r.c = -D_IO_MTSAFE_IO
include ../Rules
diff --git a/misc/Versions b/misc/Versions
index 7f525eaf5e..64632f0bfa 100644
--- a/misc/Versions
+++ b/misc/Versions
@@ -149,4 +149,8 @@ libc {
GLIBC_2.16 {
__getauxval; getauxval;
}
+ GLIBC_PRIVATE {
+ __madvise;
+ __libc_ifunc_impl_list;
+ }
}
diff --git a/misc/ifunc-impl-list.c b/misc/ifunc-impl-list.c
new file mode 100644
index 0000000000..c4b460d43e
--- /dev/null
+++ b/misc/ifunc-impl-list.c
@@ -0,0 +1,32 @@
+/* Enumerate available IFUNC implementations of a function. Stub version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <ifunc-impl-list.h>
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+ NAME supported on target machine and return the number of valid
+ entries. */
+
+size_t
+__libc_ifunc_impl_list
+ (const char *name __attribute__ ((unused)),
+ struct libc_ifunc_impl *array __attribute__ ((unused)),
+ size_t max __attribute__ ((unused)))
+{
+ return 0;
+}
diff --git a/misc/madvise.c b/misc/madvise.c
index 8f1c873c06..4e9681a521 100644
--- a/misc/madvise.c
+++ b/misc/madvise.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1994,1995,1996,1997,2000,2007 Free Software Foundation, Inc.
+/* Advise system about intentions for a memory region. Stub version.
+ Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,11 +24,13 @@
for the region starting at ADDR and extending LEN bytes. */
int
-madvise (__ptr_t addr, size_t len, int advice)
+__madvise (void *addr, size_t len, int advice)
{
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (madvise)
+libc_hidden_def (__madvise)
+weak_alias (__madvise, madvise)
+
stub_warning (madvise)
#include <stub-tag.h>
diff --git a/misc/mkostemp.c b/misc/mkostemp.c
index b78554bd01..2c5b272537 100644
--- a/misc/mkostemp.c
+++ b/misc/mkostemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,3 +33,7 @@ mkostemp (template, flags)
{
return __gen_tempname (template, 0, flags, __GT_FILE);
}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkostemp, mkostemp64)
+#endif
diff --git a/misc/mkostemp64.c b/misc/mkostemp64.c
index b7a803a932..104e6d98ad 100644
--- a/misc/mkostemp64.c
+++ b/misc/mkostemp64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* If O_LARGEFILE is zero, mkostemp.c defines mkostemp64 as an alias. */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique.
@@ -30,3 +33,5 @@ mkostemp64 (template, flags)
{
return __gen_tempname (template, 0, flags | O_LARGEFILE, __GT_FILE);
}
+
+#endif
diff --git a/misc/mkostemps.c b/misc/mkostemps.c
index 64dd477fdf..aca487dca8 100644
--- a/misc/mkostemps.c
+++ b/misc/mkostemps.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,3 +41,7 @@ mkostemps (template, suffixlen, flags)
return __gen_tempname (template, suffixlen, flags, __GT_FILE);
}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkostemps, mkostemps64)
+#endif
diff --git a/misc/mkostemps64.c b/misc/mkostemps64.c
index 17cbdaf1ad..88d1460f34 100644
--- a/misc/mkostemps64.c
+++ b/misc/mkostemps64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* If O_LARGEFILE is zero, mkostemps.c defines mkostemps64 as an alias. */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
/* Generate a unique temporary file name from TEMPLATE. The last six
characters before a suffix of length SUFFIXLEN of TEMPLATE must be
"XXXXXX"; they are replaced with a string that makes the filename
@@ -38,3 +41,5 @@ mkostemps64 (template, suffixlen, flags)
return __gen_tempname (template, suffixlen, flags | O_LARGEFILE, __GT_FILE);
}
+
+#endif
diff --git a/misc/mkstemp.c b/misc/mkstemp.c
index c03516bb7b..c10bdd9af0 100644
--- a/misc/mkstemp.c
+++ b/misc/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,3 +32,7 @@ mkstemp (template)
{
return __gen_tempname (template, 0, 0, __GT_FILE);
}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkstemp, mkstemp64)
+#endif
diff --git a/misc/mkstemp64.c b/misc/mkstemp64.c
index ba4a6e28f5..3667c4b95f 100644
--- a/misc/mkstemp64.c
+++ b/misc/mkstemp64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* If O_LARGEFILE is zero, mkstemp.c defines mkstemp64 as an alias. */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";
they are replaced with a string that makes the filename unique.
@@ -29,3 +32,5 @@ mkstemp64 (template)
{
return __gen_tempname (template, 0, O_LARGEFILE, __GT_FILE);
}
+
+#endif
diff --git a/misc/mkstemps.c b/misc/mkstemps.c
index 26205dc1bb..79418c58df 100644
--- a/misc/mkstemps.c
+++ b/misc/mkstemps.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,3 +40,7 @@ mkstemps (template, suffixlen)
return __gen_tempname (template, suffixlen, 0, __GT_FILE);
}
+
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (mkstemps, mkstemps64)
+#endif
diff --git a/misc/mkstemps64.c b/misc/mkstemps64.c
index b4af7ca407..8393a516d1 100644
--- a/misc/mkstemps64.c
+++ b/misc/mkstemps64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@
#include <stdio.h>
#include <stdlib.h>
+/* If O_LARGEFILE is zero, mkstemps.c defines mkstemps64 as an alias. */
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+
/* Generate a unique temporary file name from TEMPLATE. The last six
characters before a suffix of length SUFFIXLEN of TEMPLATE must be
"XXXXXX"; they are replaced with a string that makes the filename
@@ -37,3 +40,5 @@ mkstemps64 (template, suffixlen)
return __gen_tempname (template, suffixlen, O_LARGEFILE, __GT_FILE);
}
+
+#endif
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index b94147efe8..fb6c959d90 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -320,7 +320,7 @@
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics, unless -fgnu89-inline is used. */
-#if !defined __cplusplus || __GNUC_PREREQ (4,3)
+#if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
# define __extern_always_inline \
@@ -329,6 +329,13 @@
# define __extern_inline extern __inline
# define __extern_always_inline extern __always_inline
# endif
+#elif defined __GNUC__ /* C++ and GCC <4.3. */
+# define __extern_inline extern __inline
+# define __extern_always_inline \
+ extern __always_inline
+#else /* Not GCC. */
+# define __extern_inline /* Ignore */
+# define __extern_always_inline /* Ignore */
#endif
/* GCC 4.3 and above allow passing all anonymous arguments of an
diff --git a/misc/sys/param.h b/misc/sys/param.h
new file mode 100644
index 0000000000..0eafd680da
--- /dev/null
+++ b/misc/sys/param.h
@@ -0,0 +1,101 @@
+/* Compatibility header for old-style Unix parameters and limits.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PARAM_H
+#define _SYS_PARAM_H 1
+
+#define __need_NULL
+#include <stddef.h>
+
+#include <sys/types.h>
+#include <limits.h>
+#include <endian.h> /* Define BYTE_ORDER et al. */
+#include <signal.h> /* Define NSIG. */
+
+/* This file defines some things in system-specific ways. */
+#include <bits/param.h>
+
+
+/* BSD names for some <limits.h> values. */
+
+#define NBBY CHAR_BIT
+
+#if !defined NGROUPS && defined NGROUPS_MAX
+# define NGROUPS NGROUPS_MAX
+#endif
+#if !defined MAXSYMLINKS && defined SYMLOOP_MAX
+# define MAXSYMLINKS SYMLOOP_MAX
+#endif
+#if !defined CANBSIZ && defined MAX_CANON
+# define CANBSIZ MAX_CANON
+#endif
+#if !defined MAXPATHLEN && defined PATH_MAX
+# define MAXPATHLEN PATH_MAX
+#endif
+#if !defined NOFILE && defined OPEN_MAX
+# define NOFILE OPEN_MAX
+#endif
+#ifndef NCARGS
+# ifdef ARG_MAX
+# define NCARGS ARG_MAX
+# else
+/* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to
+ compare against some fixed limit. */
+# define NCARGS INT_MAX
+# endif
+#endif
+
+
+/* Magical constants. */
+#ifndef NOGROUP
+# define NOGROUP 65535 /* Marker for empty group set member. */
+#endif
+#ifndef NODEV
+# define NODEV ((dev_t) -1) /* Non-existent device. */
+#endif
+
+
+/* Unit of `st_blocks'. */
+#define DEV_BSIZE 512
+
+
+/* Bit map related macros. */
+#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
+#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
+#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
+#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
+
+/* Macros for counting and rounding. */
+#ifndef howmany
+# define howmany(x, y) (((x) + ((y) - 1)) / (y))
+#endif
+#ifdef __GNUC__
+# define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \
+ ? (((x) + (y) - 1) & ~((y) - 1)) \
+ : ((((x) + ((y) - 1)) / (y)) * (y)))
+#else
+# define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
+#endif
+#define powerof2(x) ((((x) - 1) & (x)) == 0)
+
+/* Macros for min/max. */
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
+
+#endif /* sys/param.h */
diff --git a/nis/yp_xdr.c b/nis/yp_xdr.c
index 76e0f2f216..418850643d 100644
--- a/nis/yp_xdr.c
+++ b/nis/yp_xdr.c
@@ -49,21 +49,21 @@ libnsl_hidden_def (xdr_ypxfrstat)
bool_t
xdr_domainname (XDR *xdrs, domainname *objp)
{
- return xdr_string (xdrs, objp, ~0);
+ return xdr_string (xdrs, objp, YPMAXDOMAIN);
}
libnsl_hidden_def (xdr_domainname)
bool_t
xdr_mapname (XDR *xdrs, mapname *objp)
{
- return xdr_string (xdrs, objp, ~0);
+ return xdr_string (xdrs, objp, YPMAXMAP);
}
libnsl_hidden_def (xdr_mapname)
bool_t
xdr_peername (XDR *xdrs, peername *objp)
{
- return xdr_string (xdrs, objp, ~0);
+ return xdr_string (xdrs, objp, YPMAXPEER);
}
libnsl_hidden_def (xdr_peername)
@@ -71,7 +71,7 @@ bool_t
xdr_keydat (XDR *xdrs, keydat *objp)
{
return xdr_bytes (xdrs, (char **) &objp->keydat_val,
- (u_int *) &objp->keydat_len, ~0);
+ (u_int *) &objp->keydat_len, YPMAXRECORD);
}
libnsl_hidden_def (xdr_keydat)
@@ -79,7 +79,7 @@ bool_t
xdr_valdat (XDR *xdrs, valdat *objp)
{
return xdr_bytes (xdrs, (char **) &objp->valdat_val,
- (u_int *) &objp->valdat_len, ~0);
+ (u_int *) &objp->valdat_len, YPMAXRECORD);
}
libnsl_hidden_def (xdr_valdat)
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 6969fd256d..1c0595be4a 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,361 @@
+2012-10-30 Aurelien Jarno <aurelien@aurel32.net>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
+
+2012-10-28 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
+ Define when we have v9 instructions available.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
+ file.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
+ file.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
+ to libpthread-routines.
+
+2012-10-25 Roland McGrath <roland@hack.frob.com>
+
+ * tst-cond-except.c (TEST_FUNCTION): New macro.
+
+2012-10-25 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
+ run tst-tls6.sh.
+ * tst-tls6.sh: Use /bin/bash not /bin/sh.
+
+2012-10-25 Roland McGrath <roland@hack.frob.com>
+
+ * tst-basic2.c (do_test): Return RESULT, not always zero.
+
+ * tst-cond25.c: Include <stdint.h>
+ (waiter): Add casts to uintptr_t between casting integer<->pointer.
+ (timed_waiter): Likewise.
+ (do_test_wait): Likewise.
+ * tst-cond-except.c (thr): Likewise.
+ (do_test): Use prototype definition.
+
+2012-10-24 Joseph Myers <joseph@codesourcery.com>
+ Jim Blandy <jimb@codesourcery.com>
+
+ * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
+ tst-tls6.sh.
+ * tst-tls6.sh (test_wrapper_env): New variable. Use it to run
+ programs with LD_PRELOAD set.
+
+2012-10-24 Roland McGrath <roland@hack.frob.com>
+
+ * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
+ ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
+ ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
+ ($(objpfx)tst-rwlock14): Likewise.
+
+2012-10-24 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile (tests): Remove tst-oddstacklimit.
+ (test-srcs): New variable.
+ (tst-oddstacklimit-ENV): Remove.
+ [$(run-built-tests) = yes] (tests): Depend on
+ $(objpfx)tst-oddstacklimit.out.
+ [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
+ target.
+ * tst-oddstacklimit.c: Do not include "tst-basic1.c". Use
+ setrlimit before executing tst-basic1 test passed to --command.
+
+2012-10-23 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile [$(cross-compiling) = no]: Change condition to
+ [$(run-built-tests) = yes].
+
+2012-10-23 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
+ (tst-exec4-ARGS): Likewise.
+ (tst-stackguard1-ARGS): Likewise.
+
+2012-10-21 Jim Blandy <jimb@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
+ tst-cancel-wrappers.sh.
+ * tst-cancel-wrappers.sh: Use nm program given as first argument,
+ not hardcoded "nm".
+
+2012-10-17 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * tst-cond25.c (do_test_wait): Don't check for return value from
+ pthread_cancel.
+
+2012-10-16 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #14652]
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__condvar_tw_cleanup): Adjust the mutex data structure if it
+ was locked by FUTEX_WAIT_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
+ (__condvar_w_cleanup): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+ (__condvar_cleanup2): Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+ (__condvar_cleanup1): Likewise.
+
+2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
+ defined __EXCEPTIONS) && defined __USE_GNU]
+ (pthread_cleanup_push_defer_np): Fix formatting.
+
+2012-10-10 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #14652]
+ * Makefile (tests): New test case tst-cond25.
+ (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__condvar_tw_cleanup): Lock mutex only if we don't already
+ own it.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+ (__condvar_w_cleanup): Likewise.
+ * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+ (__condvar_cleanup2): Lock mutex only if we don't already
+ own it.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+ (__condvar_cleanup1): Likewise.
+ * tst-cond25.c: New test case.
+
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/pthread/configure: Regenerated.
+ * sysdeps/x86_64/configure: Regenerated.
+
+2012-10-05 David S. Miller <davem@davemloft.net>
+
+ [BZ #14568]
+ * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
+ (DB_THREAD_SELF): Use constants for the register offsets. Correct
+ the case of a 64-bit debugger with a 32-bit inferior.
+
+2012-10-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14557]
+ * Makefile (tests-static): Add tst-cancel24-static,
+ tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
+ tst-sem11-static and tst-sem12-static.
+ (tests): Likewise.
+ (LDLIBS-tst-cancel24-static): New macro.
+ * tst-cancel24-static.cc: New file.
+ * tst-cond8-static.c: Likewise.
+ * tst-mutex8-static.c: Likewise.
+ * tst-mutexpi8-static.c: Likewise.
+ * tst-sem11-static.c: Likewise.
+ * tst-sem12-static.c: Likewise.
+
+2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #14417]
+ * Makefile (tests): New test case tst-cond24.
+ (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait): Unlock mutex before going back to
+ wait in PI case.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+ (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
+ return from futex_wait.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait): Unlock mutex before going back to
+ wait in PI case. Set requeue_pi flag only if wait returned 0.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+ (__pthread_cond_wait): Likewise. Revert handling of EAGAIN
+ return from futex_wait.
+ * tst-cond24.c: New test case.
+
+2012-10-04 Roland McGrath <roland@hack.frob.com>
+
+ * pthread_create.c (start_thread): Use __madvise, not madvise.
+
+2012-10-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/tls.h: Update copyright years.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * pthread_create.c (start_thread): Fix clone flag name in
+ comment to CLONE_CHILD_CLEARTID.
+ * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
+
+2012-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ [BZ #14477]
+ * Makefile (tests): Add tst-cond-except.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait): Mark instructions where %ebx is
+ incremented in PI case.
+ (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
+ for the marked PI case instructions.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+ (__pthread_cond_wait): Mark instructions where %ebx is
+ incremented in PI case.
+ (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
+ for the marked PI case instructions.
+ * tst-cond-except.c: New test case.
+
+2012-09-24 Dmitry V. Levin <ldv@altlinux.org>
+
+ * tst-tls6.sh: Add "set -e".
+ * Makefile: Do not specify -e option when running testsuite
+ shell scripts.
+
+ * tst-tls6.sh: Add copyright header.
+
+2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
+ to uint64_t for 64-bit store.
+ (THREAD_SETMEM_NC): Likewise.
+
+2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
+ 64-bit store.
+ (THREAD_SETMEM_NC): Likewise.
+
+2012-09-14 Jeff Law <law@redhat.com>
+
+ [BZ #14583]
+ * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
+
+2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14576]
+ * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
+ Removed.
+
+2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
+ (LDLIBS-tst-cancel24): This.
+
+2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14545]
+ * Makefile (tests-static): Add tst-cancel21-static.
+ (tests): Likewise.
+ * tst-cancel21-static.c: New file.
+
+2012-09-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
+ [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
+ [__NR_clock_getres]: Make code unconditional.
+ (pthread_getcpuclockid): Remove code left unreachable by removal
+ of conditionals.
+
+2012-08-31 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14532]
+ * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
+ atomic_compare_and_exchange_bool_rel.
+ * tst-sem14.c: New file.
+ * Makefile (tests): Add tst-sem14.
+
+2012-08-15 Roland McGrath <roland@hack.frob.com>
+
+ * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
+ of -D_IO_MTSAFE_IO.
+ (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
+ * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
+
+2012-08-16 Joseph Myers <joseph@codesourcery.com>
+
+ * pthread_cond_timedwait.c (__pthread_cond_timedwait)
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ * pthread_condattr_setclock.c (pthread_condattr_setclock)
+ [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
+ [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
+ code unconditional.
+ [!__NR-timer_create]: Remove conditional code.
+ (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
+ code unconditional.
+ [!__NR_timer_delete]: Remove conditional code.
+ (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/timer_getoverr.c
+ [__NR_timer_getoverrun]: Make code unconditional.
+ [!__NR_timer_getoverrun]: Remove conditional code.
+ (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
+ Make code unconditional.
+ [!__NR_timer_gettime]: Remove conditional code.
+ (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
+ Make code unconditional.
+ [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
+ Make code unconditional.
+ [!__NR_timer_settime]: Remove conditional code.
+ (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
+ conditional code.
+
+2012-08-15 Tom de Vries <vries@codesourcery.com>
+ Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
+ (__libc_lock_trylock): Allow pre-existing definitions.
+
+2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * pthread_spin_lock.c: New file.
+ * pthread_spin_trylock.c: New file.
+
+2012-08-08 Joseph Myers <joseph@codesourcery.com>
+
+ * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
+ code unconditional.
+ (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
+ * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
+ unconditional.
+ (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
+ * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
+ Make code unconditional.
+ (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
+ __NR_tgkill]: Make code unconditional.
+ (raise) [__ASSUME_TGKILL]: Likewise.
+ (raise) [!__ASSUME_TGKILL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
+ [__ASSUME_TGKILL]: Make code unconditional.
+ (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
+ * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
+ __NR_tgkill]: Make code unconditional.
+ (raise) [__ASSUME_TGKILL]: Likewise.
+ (raise) [!__ASSUME_TGKILL]: Remove conditional code.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/pthread/createthread.c (create_thread)
+ [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
+
+2012-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
+ code unconditional.
+ (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
+
2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
* tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
diff --git a/nptl/Makefile b/nptl/Makefile
index ef8e874cd8..9d777734a6 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2008,2009,2010,2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -206,7 +206,8 @@ tests = tst-typesizes \
tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
- tst-cond20 tst-cond21 tst-cond22 tst-cond23 \
+ tst-cond20 tst-cond21 tst-cond22 tst-cond23 tst-cond24 tst-cond25 \
+ tst-cond-except \
tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \
tst-robust6 tst-robust7 tst-robust8 tst-robust9 \
tst-robustpi1 tst-robustpi2 tst-robustpi3 tst-robustpi4 tst-robustpi5 \
@@ -217,7 +218,7 @@ tests = tst-typesizes \
tst-once1 tst-once2 tst-once3 tst-once4 \
tst-key1 tst-key2 tst-key3 tst-key4 \
tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \
- tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 tst-sem13 \
+ tst-sem8 tst-sem9 tst-sem10 tst-sem11 tst-sem12 tst-sem13 tst-sem14 \
tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
tst-align tst-align2 tst-align3 \
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
@@ -256,24 +257,22 @@ tests = tst-typesizes \
tst-context1 \
tst-sched1 \
tst-backtrace1 \
- tst-oddstacklimit \
tst-abstime \
tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
tst-getpid1 tst-getpid2 tst-getpid3 \
tst-initializers1 $(patsubst %,tst-initializers1-%,c89 gnu89 c99 gnu99)
xtests = tst-setuid1 tst-setuid1-static tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
+test-srcs = tst-oddstacklimit
# Files which must not be linked with libpthread.
tests-nolibpthread = tst-unload
-# This sets the stack resource limit to 1023kb, which is not a multiple
-# of the page size since every architecture's page size is > 1k.
-tst-oddstacklimit-ENV = ; ulimit -s 1023;
-
gen-as-const-headers = pthread-errnos.sym
LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst
+LDFLAGS-tst-cond24 = -lrt
+LDFLAGS-tst-cond25 = -lrt
include ../Makeconfig
@@ -341,15 +340,20 @@ extra-objs += $(crti-objs) $(crtn-objs)
extra-objs += pt-crti.o
endif
-CFLAGS-flockfile.c = -D_IO_MTSAFE_IO
-CFLAGS-ftrylockfile.c = -D_IO_MTSAFE_IO
-CFLAGS-funlockfile.c = -D_IO_MTSAFE_IO
+CFLAGS-flockfile.c = $(libio-mtsafe)
+CFLAGS-ftrylockfile.c = $(libio-mtsafe)
+CFLAGS-funlockfile.c = $(libio-mtsafe)
link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
$(common-objpfx)libc.a
-tests-static += tst-locale1 tst-locale2 tst-stackguard1-static
-tests += tst-stackguard1-static
+tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \
+ tst-cancel21-static tst-cancel24-static tst-cond8-static \
+ tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
+ tst-sem12-static
+tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \
+ tst-cond8-static tst-mutex8-static tst-mutexpi8-static \
+ tst-sem11-static tst-sem12-static
xtests-static += tst-setuid1-static
# These tests are linked with libc before libpthread
@@ -431,7 +435,7 @@ CFLAGS-tst-initializers1-c99.c = $(CFLAGS-tst-initializers1-<)
CFLAGS-tst-initializers1-gnu89.c = $(CFLAGS-tst-initializers1-<)
CFLAGS-tst-initializers1-gnu99.c = $(CFLAGS-tst-initializers1-<)
-tst-cancel7-ARGS = --command "$(built-program-cmd)"
+tst-cancel7-ARGS = --command "exec $(host-built-program-cmd)"
tst-cancelx7-ARGS = $(tst-cancel7-ARGS)
tst-umask1-ARGS = $(objpfx)tst-umask1.temp
@@ -440,7 +444,7 @@ LDFLAGS-tst-atfork2 = -rdynamic
tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace
$(objpfx)tst-atfork2mod.so: $(shared-thread-library)
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-stack3-mem
endif
tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace
@@ -464,15 +468,15 @@ LDFLAGS-tst-tls5 = $(no-as-needed)
LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so
ifeq ($(build-shared),yes)
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-tls6.out
endif
$(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \
$(objpfx)tst-tls5moda.so $(objpfx)tst-tls5modb.so \
$(objpfx)tst-tls5modc.so $(objpfx)tst-tls5modd.so \
$(objpfx)tst-tls5mode.so $(objpfx)tst-tls5modf.so
- $(SHELL) -e tst-tls6.sh $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name)
+ $(BASH) $< $(common-objpfx) $(elf-objpfx) \
+ $(rtld-installed-name) '$(test-wrapper-env)'
endif
$(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
@@ -480,33 +484,21 @@ $(objpfx)tst-dlsym1: $(libdl) $(shared-thread-library)
$(objpfx)tst-fini1: $(shared-thread-library) $(objpfx)tst-fini1mod.so
ifeq (yes,$(build-shared))
-$(objpfx)tst-cond11: $(common-objpfx)rt/librt.so
-$(objpfx)tst-cond19: $(common-objpfx)rt/librt.so
-$(objpfx)tst-sem5: $(common-objpfx)rt/librt.so
-$(objpfx)tst-cancel17: $(common-objpfx)rt/librt.so
-$(objpfx)tst-cancelx17: $(common-objpfx)rt/librt.so
-$(objpfx)tst-cancel18: $(common-objpfx)rt/librt.so
-$(objpfx)tst-cancelx18: $(common-objpfx)rt/librt.so
-$(objpfx)tst-clock2: $(common-objpfx)rt/librt.so
-$(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.so
+librt = $(common-objpfx)rt/librt.so
+else
+librt = $(common-objpfx)rt/librt.a
+endif
+
+$(objpfx)tst-cancel17: $(librt)
+$(objpfx)tst-cancelx17: $(librt)
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
$(shared-thread-library)
-else
-$(objpfx)tst-cond11: $(common-objpfx)rt/librt.a
-$(objpfx)tst-cond19: $(common-objpfx)rt/librt.a
-$(objpfx)tst-sem5: $(common-objpfx)rt/librt.a
-$(objpfx)tst-cancel17: $(common-objpfx)rt/librt.a
-$(objpfx)tst-cancelx17: $(common-objpfx)rt/librt.a
-$(objpfx)tst-cancel18: $(common-objpfx)rt/librt.a
-$(objpfx)tst-cancelx18: $(common-objpfx)rt/librt.a
-$(objpfx)tst-clock2: $(common-objpfx)rt/librt.a
-$(objpfx)tst-rwlock14: $(common-objpfx)rt/librt.a
-endif
-LDFLAGS-tst-cancel24 = $(no-as-needed) -lstdc++
+LDLIBS-tst-cancel24 = $(no-as-needed) -lstdc++
+LDLIBS-tst-cancel24-static = $(LDLIBS-tst-cancel24)
extra-B-pthread.so = -B$(common-objpfx)nptl/
$(objpfx)libpthread.so: $(addprefix $(objpfx),$(crti-objs) $(crtn-objs))
@@ -574,18 +566,19 @@ generated += banner.h
LDFLAGS-pthread.so += -e __nptl_main
endif
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
ifeq (yes,$(build-shared))
tests: $(objpfx)tst-cancel-wrappers.out
$(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh
- $(SHELL) $< $(common-objpfx)libc_pic.a \
+ $(SHELL) $< '$(NM)' \
+ $(common-objpfx)libc_pic.a \
$(common-objpfx)libc.a \
$(objpfx)libpthread_pic.a \
$(objpfx)libpthread.a > $@
endif
endif
-tst-exec4-ARGS = $(built-program-cmd)
+tst-exec4-ARGS = $(host-built-program-cmd)
$(objpfx)tst-execstack: $(libdl)
$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
@@ -593,9 +586,16 @@ LDFLAGS-tst-execstack = -Wl,-z,noexecstack
$(objpfx)tst-fini1mod.so: $(shared-thread-library)
-tst-stackguard1-ARGS = --command "$(built-program-cmd) --child"
+tst-stackguard1-ARGS = --command "$(host-built-program-cmd) --child"
tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
+ifeq ($(run-built-tests),yes)
+tests: $(objpfx)tst-oddstacklimit.out
+
+$(objpfx)tst-oddstacklimit.out: $(objpfx)tst-oddstacklimit $(objpfx)tst-basic1
+ $(run-program-prefix) $< --command '$(host-built-program-cmd)' > $@
+endif
+
# The tests here better do not run in parallel
ifneq ($(filter %tests,$(MAKECMDGOALS)),)
.NOTPARALLEL:
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 79c4531c32..799dbe3d08 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -1037,18 +1037,8 @@ setxid_signal_thread (struct xid_command *cmdp, struct pthread *t)
int val;
INTERNAL_SYSCALL_DECL (err);
-#if __ASSUME_TGKILL
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
t->tid, SIGSETXID);
-#else
-# ifdef __NR_tgkill
- val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
- t->tid, SIGSETXID);
- if (INTERNAL_SYSCALL_ERROR_P (val, err)
- && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
-# endif
- val = INTERNAL_SYSCALL (tkill, err, 2, t->tid, SIGSETXID);
-#endif
/* If this failed, it must have had not started yet or else exited. */
if (!INTERNAL_SYSCALL_ERROR_P (val, err))
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 5216ce1f5a..6a18dbe1b5 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -172,24 +172,18 @@ __nptl_set_robust (struct pthread *self)
static void
sigcancel_handler (int sig, siginfo_t *si, void *ctx)
{
-#ifdef __ASSUME_CORRECT_SI_PID
/* Determine the process ID. It might be negative if the thread is
in the middle of a fork() call. */
pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
if (__builtin_expect (pid < 0, 0))
pid = -pid;
-#endif
/* Safety check. It would be possible to call this function for
other signals and send a signal from another process. This is not
correct and might even be a security problem. Try to catch as
many incorrect invocations as possible. */
if (sig != SIGCANCEL
-#ifdef __ASSUME_CORRECT_SI_PID
- /* Kernels before 2.5.75 stored the thread ID and not the process
- ID in si_pid so we skip this test. */
|| si->si_pid != pid
-#endif
|| si->si_code != SI_TKILL)
return;
@@ -235,24 +229,18 @@ struct xid_command *__xidcmd attribute_hidden;
static void
sighandler_setxid (int sig, siginfo_t *si, void *ctx)
{
-#ifdef __ASSUME_CORRECT_SI_PID
/* Determine the process ID. It might be negative if the thread is
in the middle of a fork() call. */
pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
if (__builtin_expect (pid < 0, 0))
pid = -pid;
-#endif
/* Safety check. It would be possible to call this function for
other signals and send a signal from another process. This is not
correct and might even be a security problem. Try to catch as
many incorrect invocations as possible. */
if (sig != SIGSETXID
-#ifdef __ASSUME_CORRECT_SI_PID
- /* Kernels before 2.5.75 stored the thread ID and not the process
- ID in si_pid so we skip this test. */
|| si->si_pid != pid
-#endif
|| si->si_code != SI_TKILL)
return;
diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c
index 1bfca63581..cf6e48b414 100644
--- a/nptl/pthread_cancel.c
+++ b/nptl/pthread_cancel.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -75,20 +75,9 @@ pthread_cancel (th)
a signal handler. But this is no allowed, pthread_cancel
is not guaranteed to be async-safe. */
int val;
-#if __ASSUME_TGKILL
val = INTERNAL_SYSCALL (tgkill, err, 3,
THREAD_GETMEM (THREAD_SELF, pid), pd->tid,
SIGCANCEL);
-#else
-# ifdef __NR_tgkill
- val = INTERNAL_SYSCALL (tgkill, err, 3,
- THREAD_GETMEM (THREAD_SELF, pid), pd->tid,
- SIGCANCEL);
- if (INTERNAL_SYSCALL_ERROR_P (val, err)
- && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
-# endif
- val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, SIGCANCEL);
-#endif
if (INTERNAL_SYSCALL_ERROR_P (val, err))
result = INTERNAL_SYSCALL_ERRNO (val, err);
diff --git a/nptl/pthread_cond_timedwait.c b/nptl/pthread_cond_timedwait.c
index 9605cd74cc..51a34ba4f2 100644
--- a/nptl/pthread_cond_timedwait.c
+++ b/nptl/pthread_cond_timedwait.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004,2007,2010,2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003.
@@ -113,23 +113,9 @@ __pthread_cond_timedwait (cond, mutex, abstime)
(cond->__data.__nwaiters
& ((1 << COND_NWAITERS_SHIFT) - 1)),
&rt);
-# ifndef __ASSUME_POSIX_TIMERS
- if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (ret, err), 0))
- {
- struct timeval tv;
- (void) gettimeofday (&tv, NULL);
-
- /* Convert the absolute timeout value to a relative timeout. */
- rt.tv_sec = abstime->tv_sec - tv.tv_sec;
- rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
- }
- else
-# endif
- {
- /* Convert the absolute timeout value to a relative timeout. */
- rt.tv_sec = abstime->tv_sec - rt.tv_sec;
- rt.tv_nsec = abstime->tv_nsec - rt.tv_nsec;
- }
+ /* Convert the absolute timeout value to a relative timeout. */
+ rt.tv_sec = abstime->tv_sec - rt.tv_sec;
+ rt.tv_nsec = abstime->tv_nsec - rt.tv_nsec;
#else
/* Get the current time. So far we support only one clock. */
struct timeval tv;
diff --git a/nptl/pthread_condattr_setclock.c b/nptl/pthread_condattr_setclock.c
index a3030e227a..8b05dc84e9 100644
--- a/nptl/pthread_condattr_setclock.c
+++ b/nptl/pthread_condattr_setclock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -30,32 +30,8 @@ pthread_condattr_setclock (attr, clock_id)
pthread_condattr_t *attr;
clockid_t clock_id;
{
- /* Only a few clocks are allowed. CLOCK_REALTIME is always allowed.
- CLOCK_MONOTONIC only if the kernel has the necessary support. */
- if (clock_id == CLOCK_MONOTONIC)
- {
-#ifndef __ASSUME_POSIX_TIMERS
-# ifdef __NR_clock_getres
- /* Check whether the clock is available. */
- static int avail;
-
- if (avail == 0)
- {
- struct timespec ts;
-
- INTERNAL_SYSCALL_DECL (err);
- int val;
- val = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC, &ts);
- avail = INTERNAL_SYSCALL_ERROR_P (val, err) ? -1 : 1;
- }
-
- if (avail < 0)
-# endif
- /* Not available. */
- return EINVAL;
-#endif
- }
- else if (clock_id != CLOCK_REALTIME)
+ /* Only a few clocks are allowed. */
+ if (clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_REALTIME)
/* If more clocks are allowed some day the storing of the clock ID
in the pthread_cond_t structure needs to be adjusted. */
return EINVAL;
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 97d83256a4..197dfa7855 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -399,7 +399,7 @@ start_thread (void *arg)
#endif
assert (freesize < pd->stackblock_size);
if (freesize > PTHREAD_STACK_MIN)
- madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
+ __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
/* If the thread is detached free the TCB. */
if (IS_DETACHED (pd))
@@ -420,7 +420,7 @@ start_thread (void *arg)
/* We cannot call '_exit' here. '_exit' will terminate the process.
The 'exit' implementation in the kernel will signal when the
- process is really dead since 'clone' got passed the CLONE_CLEARTID
+ process is really dead since 'clone' got passed the CLONE_CHILD_CLEARTID
flag. The 'tid' field in the TCB will be set to zero.
The exit code is zero since in case all threads exit by calling
diff --git a/nptl/pthread_spin_lock.c b/nptl/pthread_spin_lock.c
new file mode 100644
index 0000000000..91733fb7f1
--- /dev/null
+++ b/nptl/pthread_spin_lock.c
@@ -0,0 +1,69 @@
+/* pthread_spin_lock -- lock a spin lock. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <atomic.h>
+#include "pthreadP.h"
+
+/* A machine-specific version can define SPIN_LOCK_READS_BETWEEN_CMPXCHG
+ to the number of plain reads that it's optimal to spin on between uses
+ of atomic_compare_and_exchange_val_acq. If spinning forever is optimal
+ then use -1. If no plain reads here would ever be optimal, use 0. */
+#ifndef SPIN_LOCK_READS_BETWEEN_CMPXCHG
+# warning machine-dependent file should define SPIN_LOCK_READS_BETWEEN_CMPXCHG
+# define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
+#endif
+
+int
+pthread_spin_lock (pthread_spinlock_t *lock)
+{
+ /* atomic_exchange usually takes less instructions than
+ atomic_compare_and_exchange. On the other hand,
+ atomic_compare_and_exchange potentially generates less bus traffic
+ when the lock is locked.
+ We assume that the first try mostly will be successful, and we use
+ atomic_exchange. For the subsequent tries we use
+ atomic_compare_and_exchange. */
+ if (atomic_exchange_acq (lock, 1) == 0)
+ return 0;
+
+ do
+ {
+ /* The lock is contended and we need to wait. Going straight back
+ to cmpxchg is not a good idea on many targets as that will force
+ expensive memory synchronizations among processors and penalize other
+ running threads.
+ On the other hand, we do want to update memory state on the local core
+ once in a while to avoid spinning indefinitely until some event that
+ will happen to update local memory as a side-effect. */
+ if (SPIN_LOCK_READS_BETWEEN_CMPXCHG >= 0)
+ {
+ int wait = SPIN_LOCK_READS_BETWEEN_CMPXCHG;
+
+ while (*lock != 0 && wait > 0)
+ --wait;
+ }
+ else
+ {
+ while (*lock != 0)
+ ;
+ }
+ }
+ while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0);
+
+ return 0;
+}
diff --git a/ports/sysdeps/arm/nptl/pthread_spin_trylock.c b/nptl/pthread_spin_trylock.c
index 7d3118071e..db9372cb58 100644
--- a/ports/sysdeps/arm/nptl/pthread_spin_trylock.c
+++ b/nptl/pthread_spin_trylock.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* pthread_spin_trylock -- trylock a spin lock. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -12,7 +13,7 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
+ License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#include <errno.h>
@@ -22,5 +23,5 @@
int
pthread_spin_trylock (pthread_spinlock_t *lock)
{
- return atomic_compare_and_exchange_val_acq (lock, 1, 0) ? EBUSY : 0;
+ return atomic_exchange_acq (lock, 1) ? EBUSY : 0;
}
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index ab42708320..eb1ca312f9 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/i386 version.
- Copyright (C) 2002-2007, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -343,7 +343,7 @@ union user_desc_init
\
asm volatile ("movl %%eax,%%gs:%P1\n\t" \
"movl %%edx,%%gs:%P2" : \
- : "A" (value), \
+ : "A" ((uint64_t) (value)), \
"i" (offsetof (struct pthread, member)), \
"i" (offsetof (struct pthread, member) + 4)); \
}})
@@ -370,7 +370,7 @@ union user_desc_init
\
asm volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \
"movl %%edx,%%gs:4+%P1(,%2,8)" : \
- : "A" (value), \
+ : "A" ((uint64_t) (value)), \
"i" (offsetof (struct pthread, member)), \
"r" (idx)); \
}})
diff --git a/nptl/sysdeps/pthread/bits/libc-lockP.h b/nptl/sysdeps/pthread/bits/libc-lockP.h
index 0ebac917d7..0e9268c3bf 100644
--- a/nptl/sysdeps/pthread/bits/libc-lockP.h
+++ b/nptl/sysdeps/pthread/bits/libc-lockP.h
@@ -146,18 +146,6 @@ typedef pthread_key_t __libc_key_t;
__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0)
#endif
-#define __rtld_lock_init_recursive(NAME) \
- do { \
- if (__pthread_mutex_init != NULL) \
- { \
- pthread_mutexattr_t __attr; \
- __pthread_mutexattr_init (&__attr); \
- __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \
- __pthread_mutex_init (&(NAME).mutex, &__attr); \
- __pthread_mutexattr_destroy (&__attr); \
- } \
- } while (0)
-
/* Finalize the named lock variable, which must be locked. It cannot be
used again until __libc_lock_init is called again on it. This must be
called on a lock variable before the containing storage is reused. */
@@ -176,9 +164,12 @@ typedef pthread_key_t __libc_key_t;
/* Lock the named lock variable. */
#if !defined NOT_IN_libc || defined IS_IN_libpthread
-# define __libc_lock_lock(NAME) \
+# ifndef __libc_lock_lock
+# define __libc_lock_lock(NAME) \
({ lll_lock (NAME, LLL_PRIVATE); 0; })
+# endif
#else
+# undef __libc_lock_lock
# define __libc_lock_lock(NAME) \
__libc_maybe_call (__pthread_mutex_lock, (&(NAME)), 0)
#endif
@@ -189,9 +180,12 @@ typedef pthread_key_t __libc_key_t;
/* Try to lock the named lock variable. */
#if !defined NOT_IN_libc || defined IS_IN_libpthread
-# define __libc_lock_trylock(NAME) \
+# ifndef __libc_lock_trylock
+# define __libc_lock_trylock(NAME) \
lll_trylock (NAME)
+# endif
#else
+# undef __libc_lock_trylock
# define __libc_lock_trylock(NAME) \
__libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
#endif
diff --git a/nptl/sysdeps/pthread/configure b/nptl/sysdeps/pthread/configure
index 221ce9bbb1..7962ed6fcf 100644
--- a/nptl/sysdeps/pthread/configure
+++ b/nptl/sysdeps/pthread/configure
@@ -1,123 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
if test "x$libc_cv_gcc___thread" != xyes; then
diff --git a/nptl/sysdeps/pthread/createthread.c b/nptl/sysdeps/pthread/createthread.c
index 3ead825354..e8e10dcf73 100644
--- a/nptl/sysdeps/pthread/createthread.c
+++ b/nptl/sysdeps/pthread/createthread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2008, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -109,13 +109,9 @@ do_clone (struct pthread *pd, const struct pthread_attr *attr,
send it the cancellation signal. */
INTERNAL_SYSCALL_DECL (err2);
err_out:
-#if __ASSUME_TGKILL
(void) INTERNAL_SYSCALL (tgkill, err2, 3,
THREAD_GETMEM (THREAD_SELF, pid),
pd->tid, SIGCANCEL);
-#else
- (void) INTERNAL_SYSCALL (tkill, err2, 2, pd->tid, SIGCANCEL);
-#endif
/* We do not free the stack here because the canceled thread
itself will do this. */
@@ -179,18 +175,11 @@ create_thread (struct pthread *pd, const struct pthread_attr *attr,
sys_exit() in the location pointed to by the seventh parameter
to CLONE.
- CLONE_DETACHED
- No signal is generated if the thread exists and it is
- automatically reaped.
-
The termination signal is chosen to be zero which means no signal
is sent. */
int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL
| CLONE_SETTLS | CLONE_PARENT_SETTID
| CLONE_CHILD_CLEARTID | CLONE_SYSVSEM
-#if __ASSUME_NO_CLONE_DETACHED == 0
- | CLONE_DETACHED
-#endif
| 0);
if (__builtin_expect (THREAD_GETMEM (THREAD_SELF, report_events), 0))
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index 246c1a0cd5..139be05ba8 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -694,7 +694,7 @@ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
void *__cancel_arg = (arg); \
int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \
- if (__glibc_unlikely (__not_first_call)) \
+ if (__glibc_unlikely (__not_first_call)) \
{ \
__cancel_routine (__cancel_arg); \
__pthread_unwind_next (&__cancel_buf); \
@@ -731,7 +731,7 @@ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
/* Function used in the macros. */
struct __jmp_buf_tag;
-extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
+extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
/* Mutex handling. */
diff --git a/nptl/sysdeps/sparc/tls.h b/nptl/sysdeps/sparc/tls.h
index 61cb09f294..cfc9d96c67 100644
--- a/nptl/sysdeps/sparc/tls.h
+++ b/nptl/sysdeps/sparc/tls.h
@@ -117,9 +117,9 @@ register struct pthread *__thread_self __asm__("%g7");
#define THREAD_SELF __thread_self
/* Magic for libthread_db to know how to do THREAD_SELF. */
-# define DB_THREAD_SELF_INCLUDE <sys/ucontext.h>
# define DB_THREAD_SELF \
- REGISTER (32, 32, REG_G7 * 4, 0) REGISTER (64, 64, REG_G7 * 8, 0)
+ REGISTER (32, 32, 10 * 4, 0) \
+ REGISTER (64, __WORDSIZE, (6 * 8) + (__WORDSIZE==64?0:4), 0)
/* Access to data in the thread descriptor is easy. */
#define THREAD_GETMEM(descr, member) \
diff --git a/nptl/sysdeps/unix/sysv/linux/Makefile b/nptl/sysdeps/unix/sysv/linux/Makefile
index 64a3f4f0d0..d24a9bc7a2 100644
--- a/nptl/sysdeps/unix/sysv/linux/Makefile
+++ b/nptl/sysdeps/unix/sysv/linux/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -29,7 +29,7 @@ gen-as-const-headers += lowlevelcond.sym lowlevelrwlock.sym \
endif
ifeq ($(subdir),posix)
-CFLAGS-fork.c = -D_IO_MTSAFE_IO
+CFLAGS-fork.c = $(libio-mtsafe)
CFLAGS-getpid.o = -fomit-frame-pointer
CFLAGS-getpid.os = -fomit-frame-pointer
endif
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index 8170ab321b..6011f69f12 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -122,10 +122,6 @@ __pthread_cond_timedwait:
leal 4(%esp), %ecx
movl $__NR_clock_gettime, %eax
ENTER_KERNEL
-# ifndef __ASSUME_POSIX_TIMERS
- cmpl $-ENOSYS, %eax
- je 19f
-# endif
movl %edx, %ebx
/* Compute relative timeout. */
@@ -204,9 +200,11 @@ __pthread_cond_timedwait:
42: leal (%ebp), %esi
movl 28(%esp), %edx
addl $cond_futex, %ebx
+.Ladd_cond_futex_pi:
movl $SYS_futex, %eax
ENTER_KERNEL
subl $cond_futex, %ebx
+.Lsub_cond_futex_pi:
movl %eax, %esi
/* Set the pi-requeued flag only if the kernel has returned 0. The
kernel does not hold the mutex on ETIMEDOUT or any other error. */
@@ -214,8 +212,23 @@ __pthread_cond_timedwait:
sete 24(%esp)
je 41f
- /* Normal and PI futexes dont mix. Use normal futex functions only
- if the kernel does not support the PI futex functions. */
+ /* When a futex syscall with FUTEX_WAIT_REQUEUE_PI returns
+ successfully, it has already locked the mutex for us and the
+ pi_flag (24(%esp)) is set to denote that fact. However, if another
+ thread changed the futex value before we entered the wait, the
+ syscall may return an EAGAIN and the mutex is not locked. We go
+ ahead with a success anyway since later we look at the pi_flag to
+ decide if we got the mutex or not. The sequence numbers then make
+ sure that only one of the threads actually wake up. We retry using
+ normal FUTEX_WAIT only if the kernel returned ENOSYS, since normal
+ and PI futexes don't mix.
+
+ Note that we don't check for EAGAIN specifically; we assume that the
+ only other error the futex function could return is EAGAIN (barring
+ the ETIMEOUT of course, for the timeout case in futex) since
+ anything else would mean an error in our function. It is too
+ expensive to do that check for every call (which is quite common in
+ case of a large number of threads), so it has been skipped. */
cmpl $-ENOSYS, %eax
jne 41f
xorl %ecx, %ecx
@@ -275,9 +288,24 @@ __pthread_cond_timedwait:
jne 9f
15: cmpl $-ETIMEDOUT, %esi
- jne 8b
+ je 28f
+
+ /* We need to go back to futex_wait. If we're using requeue_pi, then
+ release the mutex we had acquired and go back. */
+ movl 24(%esp), %edx
+ test %edx, %edx
+ jz 8b
+
+ /* Adjust the mutex values first and then unlock it. The unlock
+ should always succeed or else the kernel did not lock the mutex
+ correctly. */
+ movl dep_mutex(%ebx), %eax
+ call __pthread_mutex_cond_lock_adjust
+ xorl %edx, %edx
+ call __pthread_mutex_unlock_usercnt
+ jmp 8b
- addl $1, wakeup_seq(%ebx)
+28: addl $1, wakeup_seq(%ebx)
adcl $0, wakeup_seq+4(%ebx)
addl $1, cond_futex(%ebx)
movl $ETIMEDOUT, %esi
@@ -482,30 +510,6 @@ __pthread_cond_timedwait:
call __lll_unlock_wake
jmp 11b
-#if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
- /* clock_gettime not available. */
-19: leal 4(%esp), %ebx
- xorl %ecx, %ecx
- movl $__NR_gettimeofday, %eax
- ENTER_KERNEL
- movl %edx, %ebx
-
- /* Compute relative timeout. */
- movl 8(%esp), %eax
- movl $1000, %edx
- mul %edx /* Milli seconds to nano seconds. */
- movl (%ebp), %ecx
- movl 4(%ebp), %edx
- subl 4(%esp), %ecx
- subl %eax, %edx
- jns 20f
- addl $1000000000, %edx
- subl $1, %ecx
-20: testl %ecx, %ecx
- movl $-ETIMEDOUT, %esi
- js 6b
- jmp 21b
-#endif
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
GLIBC_2_3_2)
@@ -645,10 +649,27 @@ __condvar_tw_cleanup:
movl $0x7fffffff, %edx
ENTER_KERNEL
+ /* Lock the mutex only if we don't own it already. This only happens
+ in case of PI mutexes, if we got cancelled after a successful
+ return of the futex syscall and before disabling async
+ cancellation. */
5: movl 24+FRAME_SIZE(%esp), %eax
- call __pthread_mutex_cond_lock
-
- movl %esi, (%esp)
+ movl MUTEX_KIND(%eax), %ebx
+ andl $(ROBUST_BIT|PI_BIT), %ebx
+ cmpl $PI_BIT, %ebx
+ jne 8f
+
+ movl (%eax), %ebx
+ andl $TID_MASK, %ebx
+ cmpl %ebx, %gs:TID
+ jne 8f
+ /* We managed to get the lock. Fix it up before returning. */
+ call __pthread_mutex_cond_lock_adjust
+ jmp 9f
+
+8: call __pthread_mutex_cond_lock
+
+9: movl %esi, (%esp)
.LcallUR:
call _Unwind_Resume
hlt
@@ -666,7 +687,15 @@ __condvar_tw_cleanup:
.uleb128 .Lcstend-.Lcstbegin
.Lcstbegin:
.long .LcleanupSTART-.LSTARTCODE
- .long .Ladd_cond_futex-.LcleanupSTART
+ .long .Ladd_cond_futex_pi-.LcleanupSTART
+ .long __condvar_tw_cleanup-.LSTARTCODE
+ .uleb128 0
+ .long .Ladd_cond_futex_pi-.LSTARTCODE
+ .long .Lsub_cond_futex_pi-.Ladd_cond_futex_pi
+ .long __condvar_tw_cleanup2-.LSTARTCODE
+ .uleb128 0
+ .long .Lsub_cond_futex_pi-.LSTARTCODE
+ .long .Ladd_cond_futex-.Lsub_cond_futex_pi
.long __condvar_tw_cleanup-.LSTARTCODE
.uleb128 0
.long .Ladd_cond_futex-.LSTARTCODE
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index 2ae7af2613..b418be3c41 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -136,25 +136,37 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 18f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
movl %ebp, %edx
xorl %esi, %esi
addl $cond_futex, %ebx
+.Ladd_cond_futex_pi:
movl $SYS_futex, %eax
ENTER_KERNEL
subl $cond_futex, %ebx
+.Lsub_cond_futex_pi:
/* Set the pi-requeued flag only if the kernel has returned 0. The
kernel does not hold the mutex on error. */
cmpl $0, %eax
sete 16(%esp)
je 19f
- cmpl $-EAGAIN, %eax
- je 91f
-
- /* Normal and PI futexes dont mix. Use normal futex functions only
- if the kernel does not support the PI futex functions. */
+ /* When a futex syscall with FUTEX_WAIT_REQUEUE_PI returns
+ successfully, it has already locked the mutex for us and the
+ pi_flag (16(%esp)) is set to denote that fact. However, if another
+ thread changed the futex value before we entered the wait, the
+ syscall may return an EAGAIN and the mutex is not locked. We go
+ ahead with a success anyway since later we look at the pi_flag to
+ decide if we got the mutex or not. The sequence numbers then make
+ sure that only one of the threads actually wake up. We retry using
+ normal FUTEX_WAIT only if the kernel returned ENOSYS, since normal
+ and PI futexes don't mix.
+
+ Note that we don't check for EAGAIN specifically; we assume that the
+ only other error the futex function could return is EAGAIN since
+ anything else would mean an error in our function. It is too
+ expensive to do that check for every call (which is quite common in
+ case of a large number of threads), so it has been skipped. */
cmpl $-ENOSYS, %eax
jne 19f
xorl %ecx, %ecx
@@ -204,12 +216,12 @@ __pthread_cond_wait:
cmpl 8(%esp), %edx
jne 7f
cmpl 4(%esp), %edi
- je 8b
+ je 22f
7: cmpl %ecx, %edx
jne 9f
cmp %eax, %edi
- je 8b
+ je 22f
9: addl $1, woken_seq(%ebx)
adcl $0, woken_seq+4(%ebx)
@@ -285,6 +297,22 @@ __pthread_cond_wait:
jmp 20b
cfi_adjust_cfa_offset(-FRAME_SIZE);
+
+ /* We need to go back to futex_wait. If we're using requeue_pi, then
+ release the mutex we had acquired and go back. */
+22: movl 16(%esp), %edx
+ test %edx, %edx
+ jz 8b
+
+ /* Adjust the mutex values first and then unlock it. The unlock
+ should always succeed or else the kernel did not lock the mutex
+ correctly. */
+ movl dep_mutex(%ebx), %eax
+ call __pthread_mutex_cond_lock_adjust
+ xorl %edx, %edx
+ call __pthread_mutex_unlock_usercnt
+ jmp 8b
+
/* Initial locking failed. */
1:
#if cond_lock == 0
@@ -398,77 +426,6 @@ __pthread_cond_wait:
call __lll_unlock_wake
jmp 11b
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
-
- /* Get internal lock. */
- movl $1, %edx
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %edx, (%ebx)
-#else
- cmpxchgl %edx, cond_lock(%ebx)
-#endif
- jz 92f
-
-#if cond_lock == 0
- movl %ebx, %edx
-#else
- leal cond_lock(%ebx), %edx
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_lock_wait
-
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- addl $1, cond_futex(%ebx)
- movl cond_futex(%ebx), %ebp
-
- /* Unlock. */
- LOCK
-#if cond_lock == 0
- subl $1, (%ebx)
-#else
- subl $1, cond_lock(%ebx)
-#endif
- je 93f
-#if cond_lock == 0
- movl %ebx, %eax
-#else
- leal cond_lock(%ebx), %eax
-#endif
-#if (LLL_SHARED-LLL_PRIVATE) > 255
- xorl %ecx, %ecx
-#endif
- cmpl $-1, dep_mutex(%ebx)
- setne %cl
- subl $1, %ecx
- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
-#if LLL_PRIVATE != 0
- addl $LLL_PRIVATE, %ecx
-#endif
- call __lll_unlock_wake
-
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorl %ecx, %ecx
- movl dep_mutex(%ebx), %edi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -609,10 +566,27 @@ __condvar_w_cleanup:
movl $0x7fffffff, %edx
ENTER_KERNEL
+ /* Lock the mutex only if we don't own it already. This only happens
+ in case of PI mutexes, if we got cancelled after a successful
+ return of the futex syscall and before disabling async
+ cancellation. */
5: movl 24+FRAME_SIZE(%esp), %eax
- call __pthread_mutex_cond_lock
-
- movl %esi, (%esp)
+ movl MUTEX_KIND(%eax), %ebx
+ andl $(ROBUST_BIT|PI_BIT), %ebx
+ cmpl $PI_BIT, %ebx
+ jne 8f
+
+ movl (%eax), %ebx
+ andl $TID_MASK, %ebx
+ cmpl %ebx, %gs:TID
+ jne 8f
+ /* We managed to get the lock. Fix it up before returning. */
+ call __pthread_mutex_cond_lock_adjust
+ jmp 9f
+
+8: call __pthread_mutex_cond_lock
+
+9: movl %esi, (%esp)
.LcallUR:
call _Unwind_Resume
hlt
@@ -630,7 +604,15 @@ __condvar_w_cleanup:
.uleb128 .Lcstend-.Lcstbegin
.Lcstbegin:
.long .LcleanupSTART-.LSTARTCODE
- .long .Ladd_cond_futex-.LcleanupSTART
+ .long .Ladd_cond_futex_pi-.LcleanupSTART
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
+ .long .Ladd_cond_futex_pi-.LSTARTCODE
+ .long .Lsub_cond_futex_pi-.Ladd_cond_futex_pi
+ .long __condvar_w_cleanup2-.LSTARTCODE
+ .uleb128 0
+ .long .Lsub_cond_futex_pi-.LSTARTCODE
+ .long .Ladd_cond_futex-.Lsub_cond_futex_pi
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
.long .Ladd_cond_futex-.LSTARTCODE
@@ -641,10 +623,6 @@ __condvar_w_cleanup:
.long .LcleanupEND-.Lsub_cond_futex
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
- .long .LcleanupSTART2-.LSTARTCODE
- .long .LcleanupEND2-.LcleanupSTART2
- .long __condvar_w_cleanup-.LSTARTCODE
- .uleb128 0
.long .LcallUR-.LSTARTCODE
.long .LENDCODE-.LcallUR
.long 0
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index 3d805ff433..7b576ca00b 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -544,7 +544,7 @@ LLL_STUB_UNWIND_INFO_END
#define lll_islocked(futex) \
(futex != LLL_LOCK_INITIALIZER)
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards.
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
index 234e04234c..406c290d71 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
@@ -288,7 +288,7 @@ extern int __lll_robust_timedlock_wait
1 - taken by one user
>1 - taken by more users */
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
index 4e3d7bd49a..52ab53f0a9 100644
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
@@ -28,6 +28,7 @@ clear_once_control (void *arg)
{
pthread_once_t *once_control = (pthread_once_t *) arg;
+ __asm __volatile (__lll_rel_instr);
*once_control = 0;
lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
}
@@ -47,15 +48,15 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
oldval = *once_control;
if ((oldval & 2) == 0)
*once_control = newval;
- Do this atomically.
+ Do this atomically with an acquire barrier.
*/
newval = __fork_generation | 1;
- __asm __volatile ("1: lwarx %0,0,%3\n"
+ __asm __volatile ("1: lwarx %0,0,%3" MUTEX_HINT_ACQ "\n"
" andi. %1,%0,2\n"
" bne 2f\n"
" stwcx. %4,0,%3\n"
" bne 1b\n"
- "2: isync"
+ "2: " __lll_acq_instr
: "=&r" (oldval), "=&r" (tmp), "=m" (*once_control)
: "r" (once_control), "r" (newval), "m" (*once_control)
: "cr0");
@@ -87,8 +88,18 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
pthread_cleanup_pop (0);
- /* Add one to *once_control to take the bottom 2 bits from 01 to 10. */
- atomic_increment (once_control);
+ /* Add one to *once_control to take the bottom 2 bits from 01 to 10.
+ A release barrier is needed to ensure memory written by init_routine
+ is seen in other threads before *once_control changes. */
+ int tmp;
+ __asm __volatile (__lll_rel_instr "\n"
+ "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n"
+ " addi %0,%0,1\n"
+ " stwcx. %0,0,%2\n"
+ " bne- 1b"
+ : "=&b" (tmp), "=m" (*once_control)
+ : "r" (once_control), "m" (*once_control)
+ : "cr0");
/* Wake up all other threads. */
lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
diff --git a/nptl/sysdeps/unix/sysv/linux/pt-raise.c b/nptl/sysdeps/unix/sysv/linux/pt-raise.c
index 39ba5d3097..71face45ac 100644
--- a/nptl/sysdeps/unix/sysv/linux/pt-raise.c
+++ b/nptl/sysdeps/unix/sysv/linux/pt-raise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -27,25 +27,13 @@ int
raise (sig)
int sig;
{
-#if __ASSUME_TGKILL || defined __NR_tgkill
/* raise is an async-safe function. It could be called while the
fork function temporarily invalidated the PID field. Adjust for
that. */
pid_t pid = THREAD_GETMEM (THREAD_SELF, pid);
if (__builtin_expect (pid < 0, 0))
pid = -pid;
-#endif
-#if __ASSUME_TGKILL
return INLINE_SYSCALL (tgkill, 3, pid, THREAD_GETMEM (THREAD_SELF, tid),
sig);
-#else
-# ifdef __NR_tgkill
- int res = INLINE_SYSCALL (tgkill, 3, pid, THREAD_GETMEM (THREAD_SELF, tid),
- sig);
- if (res != -1 || errno != ENOSYS)
- return res;
-# endif
- return INLINE_SYSCALL (tkill, 2, THREAD_GETMEM (THREAD_SELF, tid), sig);
-#endif
}
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym b/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym
index 46fbd0de74..0ac51dba98 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym
+++ b/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym
@@ -6,3 +6,4 @@ MUTEX_KIND offsetof (pthread_mutex_t, __data.__kind)
ROBUST_BIT PTHREAD_MUTEX_ROBUST_NORMAL_NP
PI_BIT PTHREAD_MUTEX_PRIO_INHERIT_NP
PS_BIT PTHREAD_MUTEX_PSHARED_BIT
+TID_MASK FUTEX_TID_MASK
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c b/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
index 909f4686c6..368f2c4605 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
+++ b/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
@@ -1,5 +1,5 @@
/* pthread_getcpuclockid -- Get POSIX clockid_t for a pthread_t. Linux version
- Copyright (C) 2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,13 +24,6 @@
#include <kernel-posix-cpu-timers.h>
-#if !(__ASSUME_POSIX_CPU_TIMERS > 0)
-int __libc_missing_posix_cpu_timers attribute_hidden;
-#endif
-#if !(__ASSUME_POSIX_TIMERS > 0)
-int __libc_missing_posix_timers attribute_hidden;
-#endif
-
int
pthread_getcpuclockid (threadid, clockid)
pthread_t threadid;
@@ -43,68 +36,10 @@ pthread_getcpuclockid (threadid, clockid)
/* Not a valid thread handle. */
return ESRCH;
-#ifdef __NR_clock_getres
- /* The clockid_t value is a simple computation from the TID.
- But we do a clock_getres call to validate it if we aren't
- yet sure we have the kernel support. */
+ /* The clockid_t value is a simple computation from the TID. */
const clockid_t tidclock = MAKE_THREAD_CPUCLOCK (pd->tid, CPUCLOCK_SCHED);
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
-# if !(__ASSUME_POSIX_TIMERS > 0)
- if (__libc_missing_posix_timers && !__libc_missing_posix_cpu_timers)
- __libc_missing_posix_cpu_timers = 1;
-# endif
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_getres, err, 2, tidclock, NULL);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
-# endif
- {
- *clockid = tidclock;
- return 0;
- }
-
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
-# if !(__ASSUME_POSIX_TIMERS > 0)
- if (INTERNAL_SYSCALL_ERRNO (r, err) == ENOSYS)
- {
- /* The kernel doesn't support these calls at all. */
- __libc_missing_posix_timers = 1;
- __libc_missing_posix_cpu_timers = 1;
- }
- else
-# endif
- if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
- {
- /* The kernel doesn't support these clocks at all. */
- __libc_missing_posix_cpu_timers = 1;
- }
- else
- return INTERNAL_SYSCALL_ERRNO (r, err);
- }
-# endif
-#endif
-
-#ifdef CLOCK_THREAD_CPUTIME_ID
- /* We need to store the thread ID in the CLOCKID variable together
- with a number identifying the clock. We reserve the low 3 bits
- for the clock ID and the rest for the thread ID. This is
- problematic if the thread ID is too large. But 29 bits should be
- fine.
-
- If some day more clock IDs are needed the ID part can be
- enlarged. The IDs are entirely internal. */
- if (pd->tid >= 1 << (8 * sizeof (*clockid) - CLOCK_IDFIELD_SIZE))
- return ERANGE;
-
- /* Store the number. */
- *clockid = CLOCK_THREAD_CPUTIME_ID | (pd->tid << CLOCK_IDFIELD_SIZE);
-
+ *clockid = tidclock;
return 0;
-#else
- /* We don't have a timer for that. */
- return ENOENT;
-#endif
}
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
index b2a14228eb..6804bf283f 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
+++ b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -58,18 +58,8 @@ __pthread_kill (threadid, signo)
fork, it would have to happen in a signal handler. But this is
no allowed, pthread_kill is not guaranteed to be async-safe. */
int val;
-#if __ASSUME_TGKILL
val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
tid, signo);
-#else
-# ifdef __NR_tgkill
- val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
- tid, signo);
- if (INTERNAL_SYSCALL_ERROR_P (val, err)
- && INTERNAL_SYSCALL_ERRNO (val, err) == ENOSYS)
-# endif
- val = INTERNAL_SYSCALL (tkill, err, 2, tid, signo);
-#endif
return (INTERNAL_SYSCALL_ERROR_P (val, err)
? INTERNAL_SYSCALL_ERRNO (val, err) : 0);
diff --git a/nptl/sysdeps/unix/sysv/linux/raise.c b/nptl/sysdeps/unix/sysv/linux/raise.c
index 066427899a..268ab46d3f 100644
--- a/nptl/sysdeps/unix/sysv/linux/raise.c
+++ b/nptl/sysdeps/unix/sysv/linux/raise.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -29,9 +29,7 @@ raise (sig)
int sig;
{
struct pthread *pd = THREAD_SELF;
-#if __ASSUME_TGKILL || defined __NR_tgkill
pid_t pid = THREAD_GETMEM (pd, pid);
-#endif
pid_t selftid = THREAD_GETMEM (pd, tid);
if (selftid == 0)
{
@@ -44,31 +42,18 @@ raise (sig)
#endif
THREAD_SETMEM (pd, tid, selftid);
-#if __ASSUME_TGKILL || defined __NR_tgkill
/* We do not set the PID field in the TID here since we might be
called from a signal handler while the thread executes fork. */
pid = selftid;
-#endif
}
-#if __ASSUME_TGKILL || defined __NR_tgkill
else
/* raise is an async-safe function. It could be called while the
fork/vfork function temporarily invalidated the PID field. Adjust for
that. */
if (__builtin_expect (pid <= 0, 0))
pid = (pid & INT_MAX) == 0 ? selftid : -pid;
-#endif
-#if __ASSUME_TGKILL
return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
-#else
-# ifdef __NR_tgkill
- int res = INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
- if (res != -1 || errno != ENOSYS)
- return res;
-# endif
- return INLINE_SYSCALL (tkill, 2, selftid, sig);
-#endif
}
libc_hidden_def (raise)
weak_alias (raise, gsignal)
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index eeb7a72e26..97092823df 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -329,7 +329,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/nptl/sysdeps/unix/sysv/linux/sem_post.c b/nptl/sysdeps/unix/sysv/linux/sem_post.c
index 56f27e977e..67e8cc5429 100644
--- a/nptl/sysdeps/unix/sysv/linux/sem_post.c
+++ b/nptl/sysdeps/unix/sysv/linux/sem_post.c
@@ -1,5 +1,5 @@
/* sem_post -- post to a POSIX semaphore. Generic futex-using version.
- Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -40,7 +40,7 @@ __new_sem_post (sem_t *sem)
return -1;
}
}
- while (atomic_compare_and_exchange_bool_acq (&isem->value, cur + 1, cur));
+ while (atomic_compare_and_exchange_bool_rel (&isem->value, cur + 1, cur));
atomic_full_barrier ();
if (isem->nwaiters > 0)
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
index f3ef3883a8..cfd8d0ceca 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
@@ -389,7 +389,7 @@ extern int __lll_unlock_wake (int *__futex, int private) attribute_hidden;
#define lll_islocked(futex) \
(futex != LLL_LOCK_INITIALIZER)
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
index 0937d6c237..a0ccacc8e3 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
@@ -158,10 +158,6 @@ __pthread_cond_timedwait:
mov.w .L__NR_clock_gettime, r3
trapa #0x12
SYSCALL_INST_PAD
-# ifndef __ASSUME_POSIX_TIMERS
- cmp/eq #-ENOSYS, r0
- bt 19f
-# endif
/* Compute relative timeout. */
mov.l @r13, r2
@@ -172,24 +168,6 @@ __pthread_cond_timedwait:
.L__NR_clock_gettime:
.word __NR_clock_gettime
-# ifndef __ASSUME_POSIX_TIMERS
-19:
- mov r15, r4
- add #16, r4
- mov #0, r5
- mov #__NR_gettimeofday, r3
- trapa #0x12
- SYSCALL_INST_PAD
-
- /* Compute relative timeout. */
- mov.l @(20,r15), r0
- mov.w .L1k, r1
- dmulu.l r0, r1 /* Micro seconds to nano seconds. */
- mov.l @r13, r2
- mov.l @(4,r13), r3
- mov.l @(16,r15), r0
- sts macl, r1
-#endif
0:
#else
mov r15, r4
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
index 73c3327c0b..e0495622a3 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
@@ -50,6 +50,11 @@
#define LLL_PRIVATE 0
#define LLL_SHARED FUTEX_PRIVATE_FLAG
+#ifndef __sparc32_atomic_do_lock
+/* Delay in spinlock loop. */
+extern void __cpu_relax(void);
+#define BUSY_WAIT_NOP __cpu_relax()
+#endif
#if !defined NOT_IN_libc || defined IS_IN_rtld
/* In libc.so or ld.so all futexes are private. */
@@ -268,7 +273,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile
new file mode 100644
index 0000000000..f7acc019aa
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile
@@ -0,0 +1 @@
+libpthread-routines += cpu_relax
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S
new file mode 100644
index 0000000000..4ac4d14486
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S
@@ -0,0 +1 @@
+#include <sparc64/cpu_relax.S>
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
index 774b267efb..656d2e09c5 100644
--- a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile
@@ -1,3 +1,5 @@
+libpthread-routines += cpu_relax
+
ifeq ($(subdir),nptl)
CFLAGS-pause.c += -fexceptions
CFLAGS-sigsuspend.c += -fexceptions
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S
new file mode 100644
index 0000000000..9e64c50804
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S
@@ -0,0 +1,67 @@
+/* CPU strand yielding for busy loops.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ Contributed by David S. Miller (davem@davemloft.net)
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+ .text
+__cpu_relax_generic:
+ rd %ccr, %g0
+ rd %ccr, %g0
+ rd %ccr, %g0
+ retl
+ nop
+ .size __cpu_relax_generic,.-__cpu_relax_generic
+
+__cpu_relax_pause:
+ wr %g0, 128, %asr27
+ retl
+ nop
+ .size __cpu_relax_pause,.-__cpu_relax_pause
+
+ENTRY(__cpu_relax)
+ .type __cpu_relax, @gnu_indirect_function
+# ifdef SHARED
+ SETUP_PIC_REG_LEAF(o3, o5)
+# endif
+ set HWCAP_SPARC_PAUSE, %o1
+ andcc %o0, %o1, %g0
+ be 1f
+ nop
+# ifdef SHARED
+ sethi %gdop_hix22(__cpu_relax_pause), %o1
+ xor %o1, %gdop_lox10(__cpu_relax_pause), %o1
+# else
+ set __cpu_relax_pause, %o1
+# endif
+ ba 10f
+ nop
+1:
+# ifdef SHARED
+ sethi %gdop_hix22(__cpu_relax_generic), %o1
+ xor %o1, %gdop_lox10(__cpu_relax_generic), %o1
+# else
+ set __cpu_relax_generic, %o1
+# endif
+10:
+# ifdef SHARED
+ add %o3, %o1, %o1
+# endif
+ retl
+ mov %o1, %o0
+END(__cpu_relax)
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c
index 8d365eb9a4..c2865fb4f3 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_create.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_create.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003,2004, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -30,21 +30,9 @@
#include "kernel-posix-cpu-timers.h"
-#ifdef __NR_timer_create
-# ifndef __ASSUME_POSIX_TIMERS
-static int compat_timer_create (clockid_t clock_id, struct sigevent *evp,
- timer_t *timerid);
-# define timer_create static compat_timer_create
-# include <nptl/sysdeps/pthread/timer_create.c>
-# undef timer_create
-
-/* Nonzero if the system calls are not available. */
-int __no_posix_timers attribute_hidden;
-# endif
-
-# ifdef timer_create_alias
-# define timer_create timer_create_alias
-# endif
+#ifdef timer_create_alias
+# define timer_create timer_create_alias
+#endif
int
@@ -53,190 +41,140 @@ timer_create (clock_id, evp, timerid)
struct sigevent *evp;
timer_t *timerid;
{
-# undef timer_create
-# ifndef __ASSUME_POSIX_TIMERS
- if (__no_posix_timers >= 0)
-# endif
- {
- clockid_t syscall_clockid = (clock_id == CLOCK_PROCESS_CPUTIME_ID
- ? MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED)
- : clock_id == CLOCK_THREAD_CPUTIME_ID
- ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED)
- : clock_id);
-
- /* If the user wants notification via a thread we need to handle
- this special. */
- if (evp == NULL
- || __builtin_expect (evp->sigev_notify != SIGEV_THREAD, 1))
- {
- struct sigevent local_evp;
-
- /* We avoid allocating too much memory by basically
- using struct timer as a derived class with the
- first two elements being in the superclass. We only
- need these two elements here. */
- struct timer *newp = (struct timer *) malloc (offsetof (struct timer,
- thrfunc));
- if (newp == NULL)
- /* No more memory. */
+#undef timer_create
+ {
+ clockid_t syscall_clockid = (clock_id == CLOCK_PROCESS_CPUTIME_ID
+ ? MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED)
+ : clock_id == CLOCK_THREAD_CPUTIME_ID
+ ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED)
+ : clock_id);
+
+ /* If the user wants notification via a thread we need to handle
+ this special. */
+ if (evp == NULL
+ || __builtin_expect (evp->sigev_notify != SIGEV_THREAD, 1))
+ {
+ struct sigevent local_evp;
+
+ /* We avoid allocating too much memory by basically
+ using struct timer as a derived class with the
+ first two elements being in the superclass. We only
+ need these two elements here. */
+ struct timer *newp = (struct timer *) malloc (offsetof (struct timer,
+ thrfunc));
+ if (newp == NULL)
+ /* No more memory. */
+ return -1;
+
+ if (evp == NULL)
+ {
+ /* The kernel has to pass up the timer ID which is a
+ userlevel object. Therefore we cannot leave it up to
+ the kernel to determine it. */
+ local_evp.sigev_notify = SIGEV_SIGNAL;
+ local_evp.sigev_signo = SIGALRM;
+ local_evp.sigev_value.sival_ptr = newp;
+
+ evp = &local_evp;
+ }
+
+ kernel_timer_t ktimerid;
+ int retval = INLINE_SYSCALL (timer_create, 3, syscall_clockid, evp,
+ &ktimerid);
+
+ if (retval != -1)
+ {
+ newp->sigev_notify = (evp != NULL
+ ? evp->sigev_notify : SIGEV_SIGNAL);
+ newp->ktimerid = ktimerid;
+
+ *timerid = (timer_t) newp;
+ }
+ else
+ {
+ /* Cannot allocate the timer, fail. */
+ free (newp);
+ retval = -1;
+ }
+
+ return retval;
+ }
+ else
+ {
+ /* Create the helper thread. */
+ pthread_once (&__helper_once, __start_helper_thread);
+ if (__helper_tid == 0)
+ {
+ /* No resources to start the helper thread. */
+ __set_errno (EAGAIN);
return -1;
-
- if (evp == NULL)
- {
- /* The kernel has to pass up the timer ID which is a
- userlevel object. Therefore we cannot leave it up to
- the kernel to determine it. */
- local_evp.sigev_notify = SIGEV_SIGNAL;
- local_evp.sigev_signo = SIGALRM;
- local_evp.sigev_value.sival_ptr = newp;
-
- evp = &local_evp;
- }
-
- kernel_timer_t ktimerid;
- int retval = INLINE_SYSCALL (timer_create, 3, syscall_clockid, evp,
- &ktimerid);
-
-# ifndef __ASSUME_POSIX_TIMERS
- if (retval != -1 || errno != ENOSYS)
-# endif
- {
-# ifndef __ASSUME_POSIX_TIMERS
- __no_posix_timers = 1;
-# endif
-
- if (retval != -1)
- {
- newp->sigev_notify = (evp != NULL
- ? evp->sigev_notify : SIGEV_SIGNAL);
- newp->ktimerid = ktimerid;
-
- *timerid = (timer_t) newp;
- }
- else
- {
- /* Cannot allocate the timer, fail. */
- free (newp);
- retval = -1;
- }
-
- return retval;
- }
-
- free (newp);
-
-# ifndef __ASSUME_POSIX_TIMERS
- /* When we come here the syscall does not exist. Make sure we
- do not try to use it again. */
- __no_posix_timers = -1;
-# endif
- }
- else
- {
-# ifndef __ASSUME_POSIX_TIMERS
- /* Make sure we have the necessary kernel support. */
- if (__no_posix_timers == 0)
- {
- INTERNAL_SYSCALL_DECL (err);
- struct timespec ts;
- int res;
- res = INTERNAL_SYSCALL (clock_getres, err, 2,
- CLOCK_REALTIME, &ts);
- __no_posix_timers = (INTERNAL_SYSCALL_ERROR_P (res, err)
- ? -1 : 1);
- }
-
- if (__no_posix_timers > 0)
-# endif
- {
- /* Create the helper thread. */
- pthread_once (&__helper_once, __start_helper_thread);
- if (__helper_tid == 0)
- {
- /* No resources to start the helper thread. */
- __set_errno (EAGAIN);
- return -1;
- }
-
- struct timer *newp;
- newp = (struct timer *) malloc (sizeof (struct timer));
- if (newp == NULL)
- return -1;
-
- /* Copy the thread parameters the user provided. */
- newp->sival = evp->sigev_value;
- newp->thrfunc = evp->sigev_notify_function;
- newp->sigev_notify = SIGEV_THREAD;
-
- /* We cannot simply copy the thread attributes since the
- implementation might keep internal information for
- each instance. */
- (void) pthread_attr_init (&newp->attr);
- if (evp->sigev_notify_attributes != NULL)
- {
- struct pthread_attr *nattr;
- struct pthread_attr *oattr;
-
- nattr = (struct pthread_attr *) &newp->attr;
- oattr = (struct pthread_attr *) evp->sigev_notify_attributes;
-
- nattr->schedparam = oattr->schedparam;
- nattr->schedpolicy = oattr->schedpolicy;
- nattr->flags = oattr->flags;
- nattr->guardsize = oattr->guardsize;
- nattr->stackaddr = oattr->stackaddr;
- nattr->stacksize = oattr->stacksize;
- }
-
- /* In any case set the detach flag. */
- (void) pthread_attr_setdetachstate (&newp->attr,
- PTHREAD_CREATE_DETACHED);
-
- /* Create the event structure for the kernel timer. */
- struct sigevent sev =
- { .sigev_value.sival_ptr = newp,
- .sigev_signo = SIGTIMER,
- .sigev_notify = SIGEV_SIGNAL | SIGEV_THREAD_ID,
- ._sigev_un = { ._pad = { [0] = __helper_tid } } };
-
- /* Create the timer. */
- INTERNAL_SYSCALL_DECL (err);
- int res;
- res = INTERNAL_SYSCALL (timer_create, err, 3,
- syscall_clockid, &sev, &newp->ktimerid);
- if (! INTERNAL_SYSCALL_ERROR_P (res, err))
- {
- /* Add to the queue of active timers with thread
- delivery. */
- pthread_mutex_lock (&__active_timer_sigev_thread_lock);
- newp->next = __active_timer_sigev_thread;
- __active_timer_sigev_thread = newp;
- pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
-
- *timerid = (timer_t) newp;
- return 0;
- }
-
- /* Free the resources. */
- free (newp);
-
- __set_errno (INTERNAL_SYSCALL_ERRNO (res, err));
-
- return -1;
- }
- }
- }
-
-# ifndef __ASSUME_POSIX_TIMERS
- /* Compatibility code. */
- return compat_timer_create (clock_id, evp, timerid);
-# endif
+ }
+
+ struct timer *newp;
+ newp = (struct timer *) malloc (sizeof (struct timer));
+ if (newp == NULL)
+ return -1;
+
+ /* Copy the thread parameters the user provided. */
+ newp->sival = evp->sigev_value;
+ newp->thrfunc = evp->sigev_notify_function;
+ newp->sigev_notify = SIGEV_THREAD;
+
+ /* We cannot simply copy the thread attributes since the
+ implementation might keep internal information for
+ each instance. */
+ (void) pthread_attr_init (&newp->attr);
+ if (evp->sigev_notify_attributes != NULL)
+ {
+ struct pthread_attr *nattr;
+ struct pthread_attr *oattr;
+
+ nattr = (struct pthread_attr *) &newp->attr;
+ oattr = (struct pthread_attr *) evp->sigev_notify_attributes;
+
+ nattr->schedparam = oattr->schedparam;
+ nattr->schedpolicy = oattr->schedpolicy;
+ nattr->flags = oattr->flags;
+ nattr->guardsize = oattr->guardsize;
+ nattr->stackaddr = oattr->stackaddr;
+ nattr->stacksize = oattr->stacksize;
+ }
+
+ /* In any case set the detach flag. */
+ (void) pthread_attr_setdetachstate (&newp->attr,
+ PTHREAD_CREATE_DETACHED);
+
+ /* Create the event structure for the kernel timer. */
+ struct sigevent sev =
+ { .sigev_value.sival_ptr = newp,
+ .sigev_signo = SIGTIMER,
+ .sigev_notify = SIGEV_SIGNAL | SIGEV_THREAD_ID,
+ ._sigev_un = { ._pad = { [0] = __helper_tid } } };
+
+ /* Create the timer. */
+ INTERNAL_SYSCALL_DECL (err);
+ int res;
+ res = INTERNAL_SYSCALL (timer_create, err, 3,
+ syscall_clockid, &sev, &newp->ktimerid);
+ if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+ {
+ /* Add to the queue of active timers with thread
+ delivery. */
+ pthread_mutex_lock (&__active_timer_sigev_thread_lock);
+ newp->next = __active_timer_sigev_thread;
+ __active_timer_sigev_thread = newp;
+ pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
+
+ *timerid = (timer_t) newp;
+ return 0;
+ }
+
+ /* Free the resources. */
+ free (newp);
+
+ __set_errno (INTERNAL_SYSCALL_ERRNO (res, err));
+
+ return -1;
+ }
+ }
}
-#else
-# ifdef timer_create_alias
-# define timer_create timer_create_alias
-# endif
-/* The new system calls are not available. Use the userlevel
- implementation. */
-# include <nptl/sysdeps/pthread/timer_create.c>
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_delete.c b/nptl/sysdeps/unix/sysv/linux/timer_delete.c
index 98f68e9c2c..598be8343e 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_delete.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_delete.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -24,91 +24,51 @@
#include "kernel-posix-timers.h"
-#ifdef __NR_timer_delete
-# ifndef __ASSUME_POSIX_TIMERS
-static int compat_timer_delete (timer_t timerid);
-# define timer_delete static compat_timer_delete
-# include <nptl/sysdeps/pthread/timer_delete.c>
-# undef timer_delete
-# endif
-
-# ifdef timer_delete_alias
-# define timer_delete timer_delete_alias
-# endif
+#ifdef timer_delete_alias
+# define timer_delete timer_delete_alias
+#endif
int
timer_delete (timerid)
timer_t timerid;
{
-# undef timer_delete
-# ifndef __ASSUME_POSIX_TIMERS
- if (__no_posix_timers >= 0)
-# endif
- {
- struct timer *kt = (struct timer *) timerid;
+#undef timer_delete
+ struct timer *kt = (struct timer *) timerid;
- /* Delete the kernel timer object. */
- int res = INLINE_SYSCALL (timer_delete, 1, kt->ktimerid);
+ /* Delete the kernel timer object. */
+ int res = INLINE_SYSCALL (timer_delete, 1, kt->ktimerid);
- if (res == 0)
+ if (res == 0)
+ {
+ if (kt->sigev_notify == SIGEV_THREAD)
{
- if (kt->sigev_notify == SIGEV_THREAD)
+ /* Remove the timer from the list. */
+ pthread_mutex_lock (&__active_timer_sigev_thread_lock);
+ if (__active_timer_sigev_thread == kt)
+ __active_timer_sigev_thread = kt->next;
+ else
{
- /* Remove the timer from the list. */
- pthread_mutex_lock (&__active_timer_sigev_thread_lock);
- if (__active_timer_sigev_thread == kt)
- __active_timer_sigev_thread = kt->next;
- else
- {
- struct timer *prevp = __active_timer_sigev_thread;
- while (prevp->next != NULL)
- if (prevp->next == kt)
- {
- prevp->next = kt->next;
- break;
- }
- else
- prevp = prevp->next;
- }
- pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
+ struct timer *prevp = __active_timer_sigev_thread;
+ while (prevp->next != NULL)
+ if (prevp->next == kt)
+ {
+ prevp->next = kt->next;
+ break;
+ }
+ else
+ prevp = prevp->next;
}
-
-# ifndef __ASSUME_POSIX_TIMERS
- /* We know the syscall support is available. */
- __no_posix_timers = 1;
-# endif
-
- /* Free the memory. */
- (void) free (kt);
-
- return 0;
+ pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
}
- /* The kernel timer is not known or something else bad happened.
- Return the error. */
-# ifndef __ASSUME_POSIX_TIMERS
- if (errno != ENOSYS)
- {
- __no_posix_timers = 1;
-# endif
- return -1;
-# ifndef __ASSUME_POSIX_TIMERS
- }
+ /* Free the memory. */
+ (void) free (kt);
- __no_posix_timers = -1;
-# endif
+ return 0;
}
-# ifndef __ASSUME_POSIX_TIMERS
- return compat_timer_delete (timerid);
-# endif
+ /* The kernel timer is not known or something else bad happened.
+ Return the error. */
+ return -1;
}
-#else
-# ifdef timer_delete_alias
-# define timer_delete timer_delete_alias
-# endif
-/* The new system calls are not available. Use the userlevel
- implementation. */
-# include <nptl/sysdeps/pthread/timer_delete.c>
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c b/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c
index a873091225..6d48d4c14d 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -23,58 +23,20 @@
#include "kernel-posix-timers.h"
-#ifdef __NR_timer_getoverrun
-# ifndef __ASSUME_POSIX_TIMERS
-static int compat_timer_getoverrun (timer_t timerid);
-# define timer_getoverrun static compat_timer_getoverrun
-# include <nptl/sysdeps/pthread/timer_getoverr.c>
-# undef timer_getoverrun
-# endif
-
-# ifdef timer_getoverrun_alias
-# define timer_getoverrun timer_getoverrun_alias
-# endif
+#ifdef timer_getoverrun_alias
+# define timer_getoverrun timer_getoverrun_alias
+#endif
int
timer_getoverrun (timerid)
timer_t timerid;
{
-# undef timer_getoverrun
-# ifndef __ASSUME_POSIX_TIMERS
- if (__no_posix_timers >= 0)
-# endif
- {
- struct timer *kt = (struct timer *) timerid;
-
- /* Get the information from the kernel. */
- int res = INLINE_SYSCALL (timer_getoverrun, 1, kt->ktimerid);
+#undef timer_getoverrun
+ struct timer *kt = (struct timer *) timerid;
-# ifndef __ASSUME_POSIX_TIMERS
- if (res != -1 || errno != ENOSYS)
- {
- /* We know the syscall support is available. */
- __no_posix_timers = 1;
-# endif
- return res;
-# ifndef __ASSUME_POSIX_TIMERS
- }
-# endif
+ /* Get the information from the kernel. */
+ int res = INLINE_SYSCALL (timer_getoverrun, 1, kt->ktimerid);
-# ifndef __ASSUME_POSIX_TIMERS
- __no_posix_timers = -1;
-# endif
- }
-
-# ifndef __ASSUME_POSIX_TIMERS
- return compat_timer_getoverrun (timerid);
-# endif
+ return res;
}
-#else
-# ifdef timer_getoverrun_alias
-# define timer_getoverrun timer_getoverrun_alias
-# endif
-/* The new system calls are not available. Use the userlevel
- implementation. */
-# include <nptl/sysdeps/pthread/timer_getoverr.c>
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_gettime.c b/nptl/sysdeps/unix/sysv/linux/timer_gettime.c
index 1efe2cc91a..6d9933a99c 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_gettime.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_gettime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -24,17 +24,9 @@
#include "kernel-posix-timers.h"
-#ifdef __NR_timer_gettime
-# ifndef __ASSUME_POSIX_TIMERS
-static int compat_timer_gettime (timer_t timerid, struct itimerspec *value);
-# define timer_gettime static compat_timer_gettime
-# include <nptl/sysdeps/pthread/timer_gettime.c>
-# undef timer_gettime
-# endif
-
-# ifdef timer_gettime_alias
-# define timer_gettime timer_gettime_alias
-# endif
+#ifdef timer_gettime_alias
+# define timer_gettime timer_gettime_alias
+#endif
int
@@ -42,41 +34,11 @@ timer_gettime (timerid, value)
timer_t timerid;
struct itimerspec *value;
{
-# undef timer_gettime
-# ifndef __ASSUME_POSIX_TIMERS
- if (__no_posix_timers >= 0)
-# endif
- {
- struct timer *kt = (struct timer *) timerid;
-
- /* Delete the kernel timer object. */
- int res = INLINE_SYSCALL (timer_gettime, 2, kt->ktimerid, value);
+#undef timer_gettime
+ struct timer *kt = (struct timer *) timerid;
-# ifndef __ASSUME_POSIX_TIMERS
- if (res != -1 || errno != ENOSYS)
- {
- /* We know the syscall support is available. */
- __no_posix_timers = 1;
-# endif
- return res;
-# ifndef __ASSUME_POSIX_TIMERS
- }
-# endif
+ /* Delete the kernel timer object. */
+ int res = INLINE_SYSCALL (timer_gettime, 2, kt->ktimerid, value);
-# ifndef __ASSUME_POSIX_TIMERS
- __no_posix_timers = -1;
-# endif
- }
-
-# ifndef __ASSUME_POSIX_TIMERS
- return compat_timer_gettime (timerid, value);
-# endif
+ return res;
}
-#else
-# ifdef timer_gettime_alias
-# define timer_gettime timer_gettime_alias
-# endif
-/* The new system calls are not available. Use the userlevel
- implementation. */
-# include <nptl/sysdeps/pthread/timer_gettime.c>
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/nptl/sysdeps/unix/sysv/linux/timer_routines.c
index aea3c8f511..b7e36bb59a 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_routines.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2007, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -39,7 +39,6 @@ struct thread_start_data
};
-#ifdef __NR_timer_create
/* Helper thread to call the user-provided function. */
static void *
timer_sigev_thread (void *arg)
@@ -196,8 +195,3 @@ __start_helper_thread (void)
be created. */
pthread_atfork (NULL, NULL, reset_helper_control);
}
-#endif
-
-#ifndef __ASSUME_POSIX_TIMERS
-# include <nptl/sysdeps/pthread/timer_routines.c>
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_settime.c b/nptl/sysdeps/unix/sysv/linux/timer_settime.c
index 14846967de..5b522ec750 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_settime.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_settime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -24,19 +24,9 @@
#include "kernel-posix-timers.h"
-#ifdef __NR_timer_settime
-# ifndef __ASSUME_POSIX_TIMERS
-static int compat_timer_settime (timer_t timerid, int flags,
- const struct itimerspec *value,
- struct itimerspec *ovalue);
-# define timer_settime static compat_timer_settime
-# include <nptl/sysdeps/pthread/timer_settime.c>
-# undef timer_settime
-# endif
-
-# ifdef timer_settime_alias
-# define timer_settime timer_settime_alias
-# endif
+#ifdef timer_settime_alias
+# define timer_settime timer_settime_alias
+#endif
int
@@ -46,42 +36,12 @@ timer_settime (timerid, flags, value, ovalue)
const struct itimerspec *value;
struct itimerspec *ovalue;
{
-# undef timer_settime
-# ifndef __ASSUME_POSIX_TIMERS
- if (__no_posix_timers >= 0)
-# endif
- {
- struct timer *kt = (struct timer *) timerid;
-
- /* Delete the kernel timer object. */
- int res = INLINE_SYSCALL (timer_settime, 4, kt->ktimerid, flags,
- value, ovalue);
+#undef timer_settime
+ struct timer *kt = (struct timer *) timerid;
-# ifndef __ASSUME_POSIX_TIMERS
- if (res != -1 || errno != ENOSYS)
- {
- /* We know the syscall support is available. */
- __no_posix_timers = 1;
-# endif
- return res;
-# ifndef __ASSUME_POSIX_TIMERS
- }
-# endif
+ /* Delete the kernel timer object. */
+ int res = INLINE_SYSCALL (timer_settime, 4, kt->ktimerid, flags,
+ value, ovalue);
-# ifndef __ASSUME_POSIX_TIMERS
- __no_posix_timers = -1;
-# endif
- }
-
-# ifndef __ASSUME_POSIX_TIMERS
- return compat_timer_settime (timerid, flags, value, ovalue);
-# endif
+ return res;
}
-#else
-# ifdef timer_settime_alias
-# define timer_settime timer_settime_alias
-# endif
-/* The new system calls are not available. Use the userlevel
- implementation. */
-# include <nptl/sysdeps/pthread/timer_settime.c>
-#endif
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index 3686970f08..5a80ddd8ee 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -560,7 +560,7 @@ LLL_STUB_UNWIND_INFO_END
(futex != LLL_LOCK_INITIALIZER)
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards.
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index 50e1ffd551..15e451a51c 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -103,7 +103,7 @@ __pthread_cond_timedwait:
mov %RSI_LP, dep_mutex(%rdi)
22:
- xorl %r15d, %r15d
+ xorb %r15b, %r15b
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef PIC
@@ -190,18 +190,39 @@ __pthread_cond_timedwait:
movl $SYS_futex, %eax
syscall
- movl $1, %r15d
+ cmpl $0, %eax
+ sete %r15b
+
#ifdef __ASSUME_REQUEUE_PI
jmp 62f
#else
- cmpq $-4095, %rax
- jnae 62f
+ je 62f
+
+ /* When a futex syscall with FUTEX_WAIT_REQUEUE_PI returns
+ successfully, it has already locked the mutex for us and the
+ pi_flag (%r15b) is set to denote that fact. However, if another
+ thread changed the futex value before we entered the wait, the
+ syscall may return an EAGAIN and the mutex is not locked. We go
+ ahead with a success anyway since later we look at the pi_flag to
+ decide if we got the mutex or not. The sequence numbers then make
+ sure that only one of the threads actually wake up. We retry using
+ normal FUTEX_WAIT only if the kernel returned ENOSYS, since normal
+ and PI futexes don't mix.
+
+ Note that we don't check for EAGAIN specifically; we assume that the
+ only other error the futex function could return is EAGAIN (barring
+ the ETIMEOUT of course, for the timeout case in futex) since
+ anything else would mean an error in our function. It is too
+ expensive to do that check for every call (which is quite common in
+ case of a large number of threads), so it has been skipped. */
+ cmpl $-ENOSYS, %eax
+ jne 62f
subq $cond_futex, %rdi
#endif
61: movl $(FUTEX_WAIT_BITSET|FUTEX_PRIVATE_FLAG), %esi
-60: xorl %r15d, %r15d
+60: xorb %r15b, %r15b
xorl %eax, %eax
/* The following only works like this because we only support
two clocks, represented using a single bit. */
@@ -248,7 +269,23 @@ __pthread_cond_timedwait:
ja 39f
45: cmpq $-ETIMEDOUT, %r14
- jne 38b
+ je 99f
+
+ /* We need to go back to futex_wait. If we're using requeue_pi, then
+ release the mutex we had acquired and go back. */
+ test %r15b, %r15b
+ jz 38b
+
+ /* Adjust the mutex values first and then unlock it. The unlock
+ should always succeed or else the kernel did not lock the
+ mutex correctly. */
+ movq %r8, %rdi
+ callq __pthread_mutex_cond_lock_adjust
+ xorl %esi, %esi
+ callq __pthread_mutex_unlock_usercnt
+ /* Reload cond_var. */
+ movq 8(%rsp), %rdi
+ jmp 38b
99: incq wakeup_seq(%rdi)
incl cond_futex(%rdi)
@@ -298,7 +335,7 @@ __pthread_cond_timedwait:
/* If requeue_pi is used the kernel performs the locking of the
mutex. */
41: movq 16(%rsp), %rdi
- testl %r15d, %r15d
+ testb %r15b, %r15b
jnz 64f
callq __pthread_mutex_cond_lock
@@ -457,10 +494,6 @@ __pthread_cond_timedwait:
movl $__NR_clock_gettime, %eax
syscall
# endif
-# ifndef __ASSUME_POSIX_TIMERS
- cmpq $-ENOSYS, %rax
- je 19f
-# endif
/* Compute relative timeout. */
movq (%r13), %rcx
@@ -604,32 +637,6 @@ __pthread_cond_timedwait:
subq $cond_lock, %rdi
# endif
jmp 6b
-
-# if defined __NR_clock_gettime && !defined __ASSUME_POSIX_TIMERS
- /* clock_gettime not available. */
-19: leaq 32(%rsp), %rdi
- xorl %esi, %esi
- /* This call works because we directly jump to a system call entry
- which preserves all the registers. */
- call JUMPTARGET(__gettimeofday)
-
- /* Compute relative timeout. */
- movq 40(%rsp), %rax
- movl $1000, %edx
- mul %rdx /* Milli seconds to nano seconds. */
- movq (%r13), %rcx
- movq 8(%r13), %rdx
- subq 32(%rsp), %rcx
- subq %rax, %rdx
- jns 20f
- addq $1000000000, %rdx
- decq %rcx
-20: testq %rcx, %rcx
- movq 8(%rsp), %rdi
- movq $-ETIMEDOUT, %r14
- js 6b
- jmp 21b
-# endif
#endif
.size __pthread_cond_timedwait, .-__pthread_cond_timedwait
versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait,
@@ -764,10 +771,27 @@ __condvar_cleanup2:
movl $SYS_futex, %eax
syscall
+ /* Lock the mutex only if we don't own it already. This only happens
+ in case of PI mutexes, if we got cancelled after a successful
+ return of the futex syscall and before disabling async
+ cancellation. */
5: movq 16(%rsp), %rdi
- callq __pthread_mutex_cond_lock
+ movl MUTEX_KIND(%rdi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ jne 7f
+
+ movl (%rdi), %eax
+ andl $TID_MASK, %eax
+ cmpl %eax, %fs:TID
+ jne 7f
+ /* We managed to get the lock. Fix it up before returning. */
+ callq __pthread_mutex_cond_lock_adjust
+ jmp 8f
+
+7: callq __pthread_mutex_cond_lock
- movq 24(%rsp), %rdi
+8: movq 24(%rsp), %rdi
movq FRAME_SIZE(%rsp), %r15
movq FRAME_SIZE+8(%rsp), %r14
movq FRAME_SIZE+16(%rsp), %r13
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index 61948523a6..2c6b515d83 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -136,19 +136,36 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 61f
-90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
movl $SYS_futex, %eax
syscall
- movl $1, %r8d
- cmpq $-EAGAIN, %rax
- je 91f
+ cmpl $0, %eax
+ sete %r8b
+
#ifdef __ASSUME_REQUEUE_PI
jmp 62f
#else
- cmpq $-4095, %rax
- jnae 62f
+ je 62f
+
+ /* When a futex syscall with FUTEX_WAIT_REQUEUE_PI returns
+ successfully, it has already locked the mutex for us and the
+ pi_flag (%r8b) is set to denote that fact. However, if another
+ thread changed the futex value before we entered the wait, the
+ syscall may return an EAGAIN and the mutex is not locked. We go
+ ahead with a success anyway since later we look at the pi_flag to
+ decide if we got the mutex or not. The sequence numbers then make
+ sure that only one of the threads actually wake up. We retry using
+ normal FUTEX_WAIT only if the kernel returned ENOSYS, since normal
+ and PI futexes don't mix.
+
+ Note that we don't check for EAGAIN specifically; we assume that the
+ only other error the futex function could return is EAGAIN since
+ anything else would mean an error in our function. It is too
+ expensive to do that check for every call (which is quite common in
+ case of a large number of threads), so it has been skipped. */
+ cmpl $-ENOSYS, %eax
+ jne 62f
# ifndef __ASSUME_PRIVATE_FUTEX
movl $FUTEX_WAIT, %esi
@@ -161,7 +178,7 @@ __pthread_cond_wait:
#else
orl %fs:PRIVATE_FUTEX, %esi
#endif
-60: xorl %r8d, %r8d
+60: xorb %r8b, %r8b
movl $SYS_futex, %eax
syscall
@@ -191,10 +208,10 @@ __pthread_cond_wait:
jne 16f
cmpq 24(%rsp), %r9
- jbe 8b
+ jbe 19f
cmpq %rax, %r9
- jna 8b
+ jna 19f
incq woken_seq(%rdi)
@@ -236,7 +253,7 @@ __pthread_cond_wait:
/* If requeue_pi is used the kernel performs the locking of the
mutex. */
11: movq 16(%rsp), %rdi
- testl %r8d, %r8d
+ testb %r8b, %r8b
jnz 18f
callq __pthread_mutex_cond_lock
@@ -253,6 +270,23 @@ __pthread_cond_wait:
xorl %eax, %eax
jmp 14b
+ /* We need to go back to futex_wait. If we're using requeue_pi, then
+ release the mutex we had acquired and go back. */
+19: testb %r8b, %r8b
+ jz 8b
+
+ /* Adjust the mutex values first and then unlock it. The unlock
+ should always succeed or else the kernel did not lock the mutex
+ correctly. */
+ movq 16(%rsp), %rdi
+ callq __pthread_mutex_cond_lock_adjust
+ movq %rdi, %r8
+ xorl %esi, %esi
+ callq __pthread_mutex_unlock_usercnt
+ /* Reload cond_var. */
+ movq 8(%rsp), %rdi
+ jmp 8b
+
/* Initial locking failed. */
1:
#if cond_lock != 0
@@ -331,69 +365,6 @@ __pthread_cond_wait:
13: movq %r10, %rax
jmp 14b
-91:
-.LcleanupSTART2:
- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
- call it again. */
- movq 8(%rsp), %rdi
-
- /* Get internal lock. */
- movl $1, %esi
- xorl %eax, %eax
- LOCK
-#if cond_lock == 0
- cmpxchgl %esi, (%rdi)
-#else
- cmpxchgl %esi, cond_lock(%rdi)
-#endif
- jz 92f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- callq __lll_lock_wait
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-92:
- /* Increment the cond_futex value again, so it can be used as a new
- expected value. */
- incl cond_futex(%rdi)
- movl cond_futex(%rdi), %edx
-
- /* Release internal lock. */
- LOCK
-#if cond_lock == 0
- decl (%rdi)
-#else
- decl cond_lock(%rdi)
-#endif
- jz 93f
-
-#if cond_lock != 0
- addq $cond_lock, %rdi
-#endif
- LP_OP(cmp) $-1, dep_mutex-cond_lock(%rdi)
- movl $LLL_PRIVATE, %eax
- movl $LLL_SHARED, %esi
- cmovne %eax, %esi
- /* The call preserves %rdx. */
- callq __lll_unlock_wake
-#if cond_lock != 0
- subq $cond_lock, %rdi
-#endif
-93:
- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
- xorq %r10, %r10
- mov dep_mutex(%rdi), %R8_LP
- leaq cond_futex(%rdi), %rdi
- jmp 90b
-.LcleanupEND2:
-
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -524,10 +495,28 @@ __condvar_cleanup1:
movl $SYS_futex, %eax
syscall
+ /* Lock the mutex only if we don't own it already. This only happens
+ in case of PI mutexes, if we got cancelled after a successful
+ return of the futex syscall and before disabling async
+ cancellation. */
5: movq 16(%rsp), %rdi
- callq __pthread_mutex_cond_lock
+ movl MUTEX_KIND(%rdi), %eax
+ andl $(ROBUST_BIT|PI_BIT), %eax
+ cmpl $PI_BIT, %eax
+ jne 7f
+
+ movl (%rdi), %eax
+ andl $TID_MASK, %eax
+ cmpl %eax, %fs:TID
+ jne 7f
+ /* We managed to get the lock. Fix it up before returning. */
+ callq __pthread_mutex_cond_lock_adjust
+ jmp 8f
+
- movq 24(%rsp), %rdi
+7: callq __pthread_mutex_cond_lock
+
+8: movq 24(%rsp), %rdi
.LcallUR:
call _Unwind_Resume@PLT
hlt
@@ -547,10 +536,6 @@ __condvar_cleanup1:
.uleb128 .LcleanupEND-.LcleanupSTART
.uleb128 __condvar_cleanup1-.LSTARTCODE
.uleb128 0
- .uleb128 .LcleanupSTART2-.LSTARTCODE
- .uleb128 .LcleanupEND2-.LcleanupSTART2
- .uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
.uleb128 .LcallUR-.LSTARTCODE
.uleb128 .LENDCODE-.LcallUR
.uleb128 0
diff --git a/nptl/sysdeps/x86_64/configure b/nptl/sysdeps/x86_64/configure
index ee047153c9..8e5bcacafd 100644
--- a/nptl/sysdeps/x86_64/configure
+++ b/nptl/sysdeps/x86_64/configure
@@ -1,85 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index f838916058..b651d1cfa8 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -256,7 +256,7 @@ typedef struct
abort (); \
\
asm volatile ("movq %q0,%%fs:%P1" : \
- : IMM_MODE ((uint64_t) value), \
+ : IMM_MODE ((uint64_t) (value)), \
"i" (offsetof (struct pthread, member))); \
}})
@@ -281,7 +281,7 @@ typedef struct
abort (); \
\
asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \
- : IMM_MODE ((uint64_t) value), \
+ : IMM_MODE ((uint64_t) (value)), \
"i" (offsetof (struct pthread, member[0])), \
"r" (idx)); \
}})
diff --git a/nptl/tst-basic2.c b/nptl/tst-basic2.c
index 58ed6ac53b..0d3cc06da3 100644
--- a/nptl/tst-basic2.c
+++ b/nptl/tst-basic2.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -112,7 +112,7 @@ do_test (void)
result = 1;
}
- return 0;
+ return result;
}
diff --git a/nptl/tst-cancel-wrappers.sh b/nptl/tst-cancel-wrappers.sh
index dad2a674e1..b16ab2fe9e 100644
--- a/nptl/tst-cancel-wrappers.sh
+++ b/nptl/tst-cancel-wrappers.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test whether all cancelable functions are cancelable.
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -18,8 +18,9 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+NM="$1"; shift
while [ $# -gt 0 ]; do
- ( nm -P $1; echo 'end[end]:' ) | gawk ' BEGIN {
+ ( $NM -P $1; echo 'end[end]:' ) | gawk ' BEGIN {
C["accept"]=1
C["close"]=1
C["connect"]=1
diff --git a/nptl/tst-cancel21-static.c b/nptl/tst-cancel21-static.c
new file mode 100644
index 0000000000..2a01061ea8
--- /dev/null
+++ b/nptl/tst-cancel21-static.c
@@ -0,0 +1 @@
+#include "tst-cancel21.c"
diff --git a/nptl/tst-cancel24-static.cc b/nptl/tst-cancel24-static.cc
new file mode 100644
index 0000000000..3f97de5d5a
--- /dev/null
+++ b/nptl/tst-cancel24-static.cc
@@ -0,0 +1 @@
+#include "tst-cancel24.cc"
diff --git a/nptl/tst-cond-except.c b/nptl/tst-cond-except.c
new file mode 100644
index 0000000000..c294a41b2e
--- /dev/null
+++ b/nptl/tst-cond-except.c
@@ -0,0 +1,110 @@
+/* Verify that exception table for pthread_cond_wait is correct.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+
+pthread_mutex_t mutex;
+pthread_cond_t cond;
+
+#define CHECK_RETURN_VAL_OR_FAIL(ret,str) \
+ ({ if ((ret) != 0) \
+ { \
+ printf ("%s failed: %s\n", (str), strerror (ret)); \
+ ret = 1; \
+ goto out; \
+ } \
+ })
+
+
+void
+clean (void *arg)
+{
+ puts ("clean: Unlocking mutex...");
+ pthread_mutex_unlock ((pthread_mutex_t *) arg);
+ puts ("clean: Mutex unlocked...");
+}
+
+void *
+thr (void *arg)
+{
+ int ret = 0;
+ pthread_mutexattr_t mutexAttr;
+ ret = pthread_mutexattr_init (&mutexAttr);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutexattr_init");
+
+ ret = pthread_mutexattr_setprotocol (&mutexAttr, PTHREAD_PRIO_INHERIT);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutexattr_setprotocol");
+
+ ret = pthread_mutex_init (&mutex, &mutexAttr);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutex_init");
+
+ ret = pthread_cond_init (&cond, 0);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cond_init");
+
+ puts ("th: Init done, entering wait...");
+
+ pthread_cleanup_push (clean, (void *) &mutex);
+ ret = pthread_mutex_lock (&mutex);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutex_lock");
+ while (1)
+ {
+ ret = pthread_cond_wait (&cond, &mutex);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cond_wait");
+ }
+ pthread_cleanup_pop (1);
+
+out:
+ return (void *) (uintptr_t) ret;
+}
+
+int
+do_test (void)
+{
+ pthread_t thread;
+ int ret = 0;
+ void *thr_ret = 0;
+ ret = pthread_create (&thread, 0, thr, &thr_ret);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_create");
+
+ puts ("main: Thread created, waiting a bit...");
+ sleep (2);
+
+ puts ("main: Cancelling thread...");
+ ret = pthread_cancel (thread);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cancel");
+
+ puts ("main: Joining th...");
+ ret = pthread_join (thread, NULL);
+ CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_join");
+
+ if (thr_ret != NULL)
+ return 1;
+
+ puts ("main: Joined thread, done!");
+
+out:
+ return ret;
+}
+
+#define TEST_FUNCTION do_test ()
+#define TIMEOUT 5
+#include "../test-skeleton.c"
diff --git a/nptl/tst-cond24.c b/nptl/tst-cond24.c
new file mode 100644
index 0000000000..2eb2df1a3f
--- /dev/null
+++ b/nptl/tst-cond24.c
@@ -0,0 +1,249 @@
+/* Verify that condition variables synchronized by PI mutexes don't hang.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <time.h>
+
+#define THREADS_NUM 5
+#define MAXITER 50000
+
+static pthread_mutex_t mutex;
+static pthread_mutexattr_t mutex_attr;
+static pthread_cond_t cond;
+static pthread_t threads[THREADS_NUM];
+static int pending = 0;
+
+typedef void * (*threadfunc) (void *);
+
+void *
+thread_fun_timed (void *arg)
+{
+ int *ret = arg;
+ int rv, i;
+
+ printf ("Started thread_fun_timed[%d]\n", *ret);
+
+ for (i = 0; i < MAXITER / THREADS_NUM; i++)
+ {
+ rv = pthread_mutex_lock (&mutex);
+ if (rv)
+ {
+ printf ("pthread_mutex_lock: %s(%d)\n", strerror (rv), rv);
+ *ret = 1;
+ goto out;
+ }
+
+ while (!pending)
+ {
+ struct timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_sec += 20;
+ rv = pthread_cond_timedwait (&cond, &mutex, &ts);
+
+ /* There should be no timeout either. */
+ if (rv)
+ {
+ printf ("pthread_cond_wait: %s(%d)\n", strerror (rv), rv);
+ *ret = 1;
+ goto out;
+ }
+ }
+
+ pending--;
+
+ rv = pthread_mutex_unlock (&mutex);
+ if (rv)
+ {
+ printf ("pthread_mutex_unlock: %s(%d)\n", strerror (rv), rv);
+ *ret = 1;
+ goto out;
+ }
+ }
+
+ *ret = 0;
+
+out:
+ return ret;
+}
+
+void *
+thread_fun (void *arg)
+{
+ int *ret = arg;
+ int rv, i;
+
+ printf ("Started thread_fun[%d]\n", *ret);
+
+ for (i = 0; i < MAXITER / THREADS_NUM; i++)
+ {
+ rv = pthread_mutex_lock (&mutex);
+ if (rv)
+ {
+ printf ("pthread_mutex_lock: %s(%d)\n", strerror (rv), rv);
+ *ret = 1;
+ goto out;
+ }
+
+ while (!pending)
+ {
+ rv = pthread_cond_wait (&cond, &mutex);
+
+ if (rv)
+ {
+ printf ("pthread_cond_wait: %s(%d)\n", strerror (rv), rv);
+ *ret = 1;
+ goto out;
+ }
+ }
+
+ pending--;
+
+ rv = pthread_mutex_unlock (&mutex);
+ if (rv)
+ {
+ printf ("pthread_mutex_unlock: %s(%d)\n", strerror (rv), rv);
+ *ret = 1;
+ goto out;
+ }
+ }
+
+ *ret = 0;
+
+out:
+ return ret;
+}
+
+static int
+do_test_wait (threadfunc f)
+{
+ int i;
+ int rv;
+ int counter = 0;
+ int retval[THREADS_NUM];
+
+ puts ("Starting test");
+
+ rv = pthread_mutexattr_init (&mutex_attr);
+ if (rv)
+ {
+ printf ("pthread_mutexattr_init: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+
+ rv = pthread_mutexattr_setprotocol (&mutex_attr, PTHREAD_PRIO_INHERIT);
+ if (rv)
+ {
+ printf ("pthread_mutexattr_setprotocol: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+
+ rv = pthread_mutex_init (&mutex, &mutex_attr);
+ if (rv)
+ {
+ printf ("pthread_mutex_init: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+
+ rv = pthread_cond_init (&cond, NULL);
+ if (rv)
+ {
+ printf ("pthread_cond_init: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+
+ for (i = 0; i < THREADS_NUM; i++)
+ {
+ retval[i] = i;
+ rv = pthread_create (&threads[i], NULL, f, &retval[i]);
+ if (rv)
+ {
+ printf ("pthread_create: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+ }
+
+ for (; counter < MAXITER; counter++)
+ {
+ rv = pthread_mutex_lock (&mutex);
+ if (rv)
+ {
+ printf ("pthread_mutex_lock: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+
+ if (!(counter % 100))
+ printf ("counter: %d\n", counter);
+ pending += 1;
+
+ rv = pthread_cond_signal (&cond);
+ if (rv)
+ {
+ printf ("pthread_cond_signal: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+
+ rv = pthread_mutex_unlock (&mutex);
+ if (rv)
+ {
+ printf ("pthread_mutex_unlock: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+ }
+
+ for (i = 0; i < THREADS_NUM; i++)
+ {
+ void *ret;
+ rv = pthread_join (threads[i], &ret);
+ if (rv)
+ {
+ printf ("pthread_join: %s(%d)\n", strerror (rv), rv);
+ return 1;
+ }
+ if (ret && *(int *)ret)
+ {
+ printf ("Thread %d returned with an error\n", i);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static int
+do_test (void)
+{
+ puts ("Testing pthread_cond_wait");
+ int ret = do_test_wait (thread_fun);
+ if (ret)
+ return ret;
+
+ puts ("Testing pthread_cond_timedwait");
+ return do_test_wait (thread_fun_timed);
+}
+
+#define TIMEOUT 10
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/nptl/tst-cond25.c b/nptl/tst-cond25.c
new file mode 100644
index 0000000000..cdc129d5f3
--- /dev/null
+++ b/nptl/tst-cond25.c
@@ -0,0 +1,281 @@
+/* Verify that condition variables synchronized by PI mutexes don't hang on
+ on cancellation.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <time.h>
+
+#define NUM 5
+#define ITERS 10000
+#define COUNT 100
+
+typedef void *(*thr_func) (void *);
+
+pthread_mutex_t mutex;
+pthread_cond_t cond;
+
+void cleanup (void *u)
+{
+ /* pthread_cond_wait should always return with the mutex locked. */
+ if (pthread_mutex_unlock (&mutex))
+ abort ();
+}
+
+void *
+signaller (void *u)
+{
+ int i, ret = 0;
+ void *tret = NULL;
+
+ for (i = 0; i < ITERS; i++)
+ {
+ if ((ret = pthread_mutex_lock (&mutex)) != 0)
+ {
+ tret = (void *)1;
+ printf ("signaller:mutex_lock failed: %s\n", strerror (ret));
+ goto out;
+ }
+ if ((ret = pthread_cond_signal (&cond)) != 0)
+ {
+ tret = (void *)1;
+ printf ("signaller:signal failed: %s\n", strerror (ret));
+ goto unlock_out;
+ }
+ if ((ret = pthread_mutex_unlock (&mutex)) != 0)
+ {
+ tret = (void *)1;
+ printf ("signaller:mutex_unlock failed: %s\n", strerror (ret));
+ goto out;
+ }
+ pthread_testcancel ();
+ }
+
+out:
+ return tret;
+
+unlock_out:
+ if ((ret = pthread_mutex_unlock (&mutex)) != 0)
+ printf ("signaller:mutex_unlock[2] failed: %s\n", strerror (ret));
+ goto out;
+}
+
+void *
+waiter (void *u)
+{
+ int i, ret = 0;
+ void *tret = NULL;
+ int seq = (uintptr_t) u;
+
+ for (i = 0; i < ITERS / NUM; i++)
+ {
+ if ((ret = pthread_mutex_lock (&mutex)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret));
+ goto out;
+ }
+ pthread_cleanup_push (cleanup, NULL);
+
+ if ((ret = pthread_cond_wait (&cond, &mutex)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("waiter[%u]:wait failed: %s\n", seq, strerror (ret));
+ goto unlock_out;
+ }
+
+ if ((ret = pthread_mutex_unlock (&mutex)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret));
+ goto out;
+ }
+ pthread_cleanup_pop (0);
+ }
+
+out:
+ puts ("waiter tests done");
+ return tret;
+
+unlock_out:
+ if ((ret = pthread_mutex_unlock (&mutex)) != 0)
+ printf ("waiter:mutex_unlock[2] failed: %s\n", strerror (ret));
+ goto out;
+}
+
+void *
+timed_waiter (void *u)
+{
+ int i, ret;
+ void *tret = NULL;
+ int seq = (uintptr_t) u;
+
+ for (i = 0; i < ITERS / NUM; i++)
+ {
+ struct timespec ts;
+
+ if ((ret = clock_gettime(CLOCK_REALTIME, &ts)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("%u:clock_gettime failed: %s\n", seq, strerror (errno));
+ goto out;
+ }
+ ts.tv_sec += 20;
+
+ if ((ret = pthread_mutex_lock (&mutex)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret));
+ goto out;
+ }
+ pthread_cleanup_push (cleanup, NULL);
+
+ /* We should not time out either. */
+ if ((ret = pthread_cond_timedwait (&cond, &mutex, &ts)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("waiter[%u]:timedwait failed: %s\n", seq, strerror (ret));
+ goto unlock_out;
+ }
+ if ((ret = pthread_mutex_unlock (&mutex)) != 0)
+ {
+ tret = (void *) (uintptr_t) 1;
+ printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret));
+ goto out;
+ }
+ pthread_cleanup_pop (0);
+ }
+
+out:
+ puts ("timed_waiter tests done");
+ return tret;
+
+unlock_out:
+ if ((ret = pthread_mutex_unlock (&mutex)) != 0)
+ printf ("waiter[%u]:mutex_unlock[2] failed: %s\n", seq, strerror (ret));
+ goto out;
+}
+
+int
+do_test_wait (thr_func f)
+{
+ pthread_t w[NUM];
+ pthread_t s;
+ pthread_mutexattr_t attr;
+ int i, j, ret = 0;
+ void *thr_ret;
+
+ for (i = 0; i < COUNT; i++)
+ {
+ if ((ret = pthread_mutexattr_init (&attr)) != 0)
+ {
+ printf ("mutexattr_init failed: %s\n", strerror (ret));
+ goto out;
+ }
+
+ if ((ret = pthread_mutexattr_setprotocol (&attr,
+ PTHREAD_PRIO_INHERIT)) != 0)
+ {
+ printf ("mutexattr_setprotocol failed: %s\n", strerror (ret));
+ goto out;
+ }
+
+ if ((ret = pthread_cond_init (&cond, NULL)) != 0)
+ {
+ printf ("cond_init failed: %s\n", strerror (ret));
+ goto out;
+ }
+
+ if ((ret = pthread_mutex_init (&mutex, &attr)) != 0)
+ {
+ printf ("mutex_init failed: %s\n", strerror (ret));
+ goto out;
+ }
+
+ for (j = 0; j < NUM; j++)
+ if ((ret = pthread_create (&w[j], NULL,
+ f, (void *) (uintptr_t) j)) != 0)
+ {
+ printf ("waiter[%d]: create failed: %s\n", j, strerror (ret));
+ goto out;
+ }
+
+ if ((ret = pthread_create (&s, NULL, signaller, NULL)) != 0)
+ {
+ printf ("signaller: create failed: %s\n", strerror (ret));
+ goto out;
+ }
+
+ for (j = 0; j < NUM; j++)
+ {
+ pthread_cancel (w[j]);
+
+ if ((ret = pthread_join (w[j], &thr_ret)) != 0)
+ {
+ printf ("waiter[%d]: join failed: %s\n", j, strerror (ret));
+ goto out;
+ }
+
+ if (thr_ret != NULL && thr_ret != PTHREAD_CANCELED)
+ {
+ ret = 1;
+ goto out;
+ }
+ }
+
+ /* The signalling thread could have ended before it was cancelled. */
+ pthread_cancel (s);
+
+ if ((ret = pthread_join (s, &thr_ret)) != 0)
+ {
+ printf ("signaller: join failed: %s\n", strerror (ret));
+ goto out;
+ }
+
+ if (thr_ret != NULL && thr_ret != PTHREAD_CANCELED)
+ {
+ ret = 1;
+ goto out;
+ }
+ }
+
+out:
+ return ret;
+}
+
+int
+do_test (int argc, char **argv)
+{
+ int ret = do_test_wait (waiter);
+
+ if (ret)
+ return ret;
+
+ return do_test_wait (timed_waiter);
+}
+
+#define TIMEOUT 5
+#include "../test-skeleton.c"
diff --git a/nptl/tst-cond8-static.c b/nptl/tst-cond8-static.c
new file mode 100644
index 0000000000..fed35db60d
--- /dev/null
+++ b/nptl/tst-cond8-static.c
@@ -0,0 +1 @@
+#include "tst-cond8.c"
diff --git a/nptl/tst-mutex8-static.c b/nptl/tst-mutex8-static.c
new file mode 100644
index 0000000000..d69ed49ad0
--- /dev/null
+++ b/nptl/tst-mutex8-static.c
@@ -0,0 +1 @@
+#include "tst-mutex8.c"
diff --git a/nptl/tst-mutexpi8-static.c b/nptl/tst-mutexpi8-static.c
new file mode 100644
index 0000000000..869e6df95c
--- /dev/null
+++ b/nptl/tst-mutexpi8-static.c
@@ -0,0 +1 @@
+#include "tst-mutexpi8.c"
diff --git a/nptl/tst-oddstacklimit.c b/nptl/tst-oddstacklimit.c
index 9fbef18892..be25948e52 100644
--- a/nptl/tst-oddstacklimit.c
+++ b/nptl/tst-oddstacklimit.c
@@ -1 +1,72 @@
-#include "tst-basic1.c"
+/* Test NPTL with stack limit that is not a multiple of the page size.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
+
+/* This sets the stack resource limit to 1023kb, which is not a multiple
+ of the page size since every architecture's page size is > 1k. */
+#ifndef ODD_STACK_LIMIT
+# define ODD_STACK_LIMIT (1023 * 1024)
+#endif
+
+static const char *command;
+
+static int
+do_test (void)
+{
+ int ret;
+ struct rlimit rlim;
+
+ ret = getrlimit (RLIMIT_STACK, &rlim);
+ if (ret != 0)
+ {
+ printf ("getrlimit failed: %s\n", strerror (errno));
+ return 1;
+ }
+ rlim.rlim_cur = ODD_STACK_LIMIT;
+ ret = setrlimit (RLIMIT_STACK, &rlim);
+ if (ret != 0)
+ {
+ printf ("setrlimit failed: %s\n", strerror (errno));
+ return 1;
+ }
+ ret = system (command);
+ if (ret == -1)
+ {
+ printf ("system failed: %s\n", strerror (errno));
+ return 1;
+ }
+ if (WIFEXITED (ret))
+ return WEXITSTATUS (ret);
+ else
+ return 1;
+}
+
+#define OPT_COMMAND 10000
+#define CMDLINE_OPTIONS \
+ { "command", required_argument, NULL, OPT_COMMAND },
+#define CMDLINE_PROCESS \
+ case OPT_COMMAND: \
+ command = optarg; \
+ break;
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/nptl/tst-sem11-static.c b/nptl/tst-sem11-static.c
new file mode 100644
index 0000000000..09b7698078
--- /dev/null
+++ b/nptl/tst-sem11-static.c
@@ -0,0 +1 @@
+#include "tst-sem11.c"
diff --git a/nptl/tst-sem12-static.c b/nptl/tst-sem12-static.c
new file mode 100644
index 0000000000..c06349f2b6
--- /dev/null
+++ b/nptl/tst-sem12-static.c
@@ -0,0 +1 @@
+#include "tst-sem12.c"
diff --git a/nptl/tst-sem14.c b/nptl/tst-sem14.c
new file mode 100644
index 0000000000..949c03fcc6
--- /dev/null
+++ b/nptl/tst-sem14.c
@@ -0,0 +1,91 @@
+/* Test for sem_post race: bug 14532.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <pthread.h>
+#include <semaphore.h>
+#include <stdio.h>
+
+#define NTHREADS 10
+#define NITER 100000
+
+sem_t sem;
+int c;
+volatile int thread_fail;
+
+static void *
+tf (void *arg)
+{
+ for (int i = 0; i < NITER; i++)
+ {
+ if (sem_wait (&sem) != 0)
+ {
+ perror ("sem_wait");
+ thread_fail = 1;
+ }
+ ++c;
+ if (sem_post (&sem) != 0)
+ {
+ perror ("sem_post");
+ thread_fail = 1;
+ }
+ }
+ return NULL;
+}
+
+static int
+do_test (void)
+{
+ if (sem_init (&sem, 0, 0) != 0)
+ {
+ perror ("sem_init");
+ return 1;
+ }
+
+ pthread_t th[NTHREADS];
+ for (int i = 0; i < NTHREADS; i++)
+ {
+ if (pthread_create (&th[i], NULL, tf, NULL) != 0)
+ {
+ puts ("pthread_create failed");
+ return 1;
+ }
+ }
+
+ if (sem_post (&sem) != 0)
+ {
+ perror ("sem_post");
+ return 1;
+ }
+
+ for (int i = 0; i < NTHREADS; i++)
+ if (pthread_join (th[i], NULL) != 0)
+ {
+ puts ("pthread_join failed");
+ return 1;
+ }
+
+ if (c != NTHREADS * NITER)
+ {
+ printf ("c = %d, should be %d\n", c, NTHREADS * NITER);
+ return 1;
+ }
+ return thread_fail;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/nptl/tst-tls6.sh b/nptl/tst-tls6.sh
index 1ae24fc6f0..27450c3857 100755
--- a/nptl/tst-tls6.sh
+++ b/nptl/tst-tls6.sh
@@ -1,8 +1,28 @@
-#!/bin/sh
+#! /bin/bash
+# A tls test.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
elf_objpfx=$1; shift
rtld_installed_name=$1; shift
+test_wrapper_env=$1; shift
logfile=$common_objpfx/nptl/tst-tls6.out
# We have to find libc and nptl
@@ -21,33 +41,38 @@ fail=0
for aligned in a e f; do
echo "preload tst-tls5mod{$aligned,b,c,d}.so" >> $logfile
echo "===============" >> $logfile
- LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \
- | sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
+ ${test_wrapper_env} \
+ LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{$aligned,b,c,d}.so \
+ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
echo "preload tst-tls5mod{b,$aligned,c,d}.so" >> $logfile
echo "===============" >> $logfile
- LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \
- | sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
+ ${test_wrapper_env} \
+ LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,$aligned,c,d}.so \
+ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
echo "preload tst-tls5mod{b,c,d,$aligned}.so" >> $logfile
echo "===============" >> $logfile
- LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \
- | sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
+ ${test_wrapper_env} \
+ LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{b,c,d,$aligned}.so \
+ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
done
echo "preload tst-tls5mod{d,a,b,c,e}" >> $logfile
echo "===============" >> $logfile
-LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \
- | sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
+${test_wrapper_env} \
+LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,c,e}.so \
+ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
echo "preload tst-tls5mod{d,a,b,e,f}" >> $logfile
echo "===============" >> $logfile
-LD_PRELOAD=`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \
- | sed 's/:$//;s/: /:/g'` ${tst_tls5} >> $logfile || fail=1
+${test_wrapper_env} \
+LD_PRELOAD="`echo ${common_objpfx}nptl/tst-tls5mod{d,a,b,e,f}.so \
+ | sed 's/:$//;s/: /:/g'`" ${tst_tls5} >> $logfile || fail=1
echo >> $logfile
exit $fail
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
index fe1778ee95..417514978b 100644
--- a/nptl_db/ChangeLog
+++ b/nptl_db/ChangeLog
@@ -1,3 +1,9 @@
+2012-10-08 Jonathan Nieder <jrnieder@gmail.com>
+
+ [BZ #14661]
+ * Makefile ($(objpfx)db-symbols.out): Force C locale when running
+ readelf -s.
+
2012-03-07 Ulrich Drepper <drepper@gmail.com>
* Makefile (distribute): Remove variable.
diff --git a/nptl_db/Makefile b/nptl_db/Makefile
index d15fb9e818..6ccb3d0ccb 100644
--- a/nptl_db/Makefile
+++ b/nptl_db/Makefile
@@ -60,6 +60,6 @@ $(objpfx)libthread_db.so: $(common-objpfx)libc.so \
tests: $(objpfx)db-symbols.out
$(objpfx)db-symbols.out: $(objpfx)db-symbols.v.i \
$(common-objpfx)nptl/libpthread.so
- readelf -W -s $(filter %.so,$^) | $(AWK) -f $< > $@
+ LC_ALL=C readelf -W -s $(filter %.so,$^) | $(AWK) -f $< > $@
$(objpfx)db-symbols.v.i: db-symbols.awk
diff --git a/nscd/Makefile b/nscd/Makefile
index ba052eb9de..0f8efcfb7c 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,2000,2002-2009,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -20,11 +20,13 @@
#
subdir := nscd
+include ../Makeconfig
+
+ifneq ($(use-nscd),no)
routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
nscd_initgroups nscd_getserv_r nscd_netgroup
aux := nscd_helper
-
-include ../Makeconfig
+endif
# To find xmalloc.c
vpath %.c ../locale/programs
@@ -36,7 +38,7 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \
xmalloc xstrdup aicache initgrcache gai res_hconf \
netgroupcache
-ifeq ($(have-thread-library),yes)
+ifeq ($(build-nscd)$(have-thread-library),yesyes)
others += nscd
others-pie += nscd
@@ -77,48 +79,21 @@ CFLAGS-nscd_gethst_r.c = -fexceptions
CFLAGS-nscd_getai.c = -fexceptions
CFLAGS-nscd_initgroups.c = -fexceptions
-nscd-cflags = -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2
+CPPFLAGS-nonlib += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2
+
ifeq (yesyes,$(have-fpie)$(build-shared))
-nscd-cflags += $(pie-ccflag)
+CFLAGS-nonlib += $(pie-ccflag)
endif
ifeq (yes,$(have-ssp))
-nscd-cflags += -fstack-protector
+CFLAGS-nonlib += -fstack-protector
endif
-CFLAGS-nscd.c += $(nscd-cflags)
-CFLAGS-connections.c += $(nscd-cflags)
-CFLAGS-pwdcache.c += $(nscd-cflags)
-CFLAGS-getpwnam_r.c += $(nscd-cflags)
-CFLAGS-getpwuid_r.c += $(nscd-cflags)
-CFLAGS-grpcache.c += $(nscd-cflags)
-CFLAGS-getgrnam_r.c += $(nscd-cflags)
-CFLAGS-getgrgid_r.c += $(nscd-cflags)
-CFLAGS-hstcache.c += $(nscd-cflags)
-CFLAGS-gethstbyad_r.c += $(nscd-cflags)
-CFLAGS-gethstbynm3_r.c += $(nscd-cflags)
-CFLAGS-dbg_log.c += $(nscd-cflags)
-CFLAGS-nscd_conf.c += $(nscd-cflags)
-CFLAGS-nscd_stat.c += $(nscd-cflags)
-CFLAGS-cache.c += $(nscd-cflags)
-CFLAGS-xmalloc.c += $(nscd-cflags)
-CFLAGS-xstrdup.c += $(nscd-cflags)
-CFLAGS-mem.c += $(nscd-cflags)
-CFLAGS-nscd_setup_thread.c += $(nscd-cflags)
-CFLAGS-aicache.c += $(nscd-cflags)
-CFLAGS-selinux.c += $(nscd-cflags)
-CFLAGS-initgrcache.c += $(nscd-cflags)
-CFLAGS-gai.c += $(nscd-cflags)
-CFLAGS-servicescache.c += $(nscd-cflags)
-CFLAGS-getsrvbynm_r.c += $(nscd-cflags)
-CFLAGS-getsrvbypt_r.c += $(nscd-cflags)
-CFLAGS-res_hconf.c += $(nscd-cflags)
-CFLAGS-netgroupcache.c += $(nscd-cflags)
-
ifeq (yesyes,$(have-fpie)$(build-shared))
LDFLAGS-nscd = -Wl,-z,now
endif
-# This makes sure -DNOT_IN_libc is passed for all these modules.
+# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
+# for all these modules.
cpp-srcs-left := $(nscd-modules:=.c)
lib := nonlib
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
@@ -126,9 +101,7 @@ include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
$(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
ifeq ($(build-shared),yes)
-$(objpfx)nscd: $(common-objpfx)rt/librt.so $(shared-thread-library) \
- $(common-objpfx)nis/libnsl.so
+$(objpfx)nscd: $(shared-thread-library) $(common-objpfx)nis/libnsl.so
else
-$(objpfx)nscd: $(common-objpfx)rt/librt.a $(static-thread-library) \
- $(common-objpfx)nis/libnsl.a
+$(objpfx)nscd: $(static-thread-library) $(common-objpfx)nis/libnsl.a
endif
diff --git a/nscd/gai.c b/nscd/gai.c
index 1c6527cf0c..0609332938 100644
--- a/nscd/gai.c
+++ b/nscd/gai.c
@@ -32,6 +32,9 @@
/* nscd uses 1MB or 2MB thread stacks. */
#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF)
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include <getaddrinfo.c>
/* Support code. */
diff --git a/nscd/getgrgid_r.c b/nscd/getgrgid_r.c
index 09b6cbf1cb..5b433321b5 100644
--- a/nscd/getgrgid_r.c
+++ b/nscd/getgrgid_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_VARIABLES gid
#define BUFLEN NSS_BUFLEN_GROUP
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include <nss/getXXbyYY_r.c>
diff --git a/nscd/getgrnam_r.c b/nscd/getgrnam_r.c
index 53e572d13a..aff6fcc532 100644
--- a/nscd/getgrnam_r.c
+++ b/nscd/getgrnam_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -24,4 +24,7 @@
#define ADD_PARAMS const char *name
#define ADD_VARIABLES name
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include <nss/getXXbyYY_r.c>
diff --git a/nscd/gethstbyad_r.c b/nscd/gethstbyad_r.c
index bb9fab98e8..c0988b862d 100644
--- a/nscd/gethstbyad_r.c
+++ b/nscd/gethstbyad_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -30,6 +30,9 @@
#define NEED__RES 1
#define NEED__RES_HCONF 1
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/nscd/gethstbynm3_r.c b/nscd/gethstbynm3_r.c
index 86038ba771..a7d25548a8 100644
--- a/nscd/gethstbynm3_r.c
+++ b/nscd/gethstbynm3_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1998, 2000, 2005, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -40,6 +40,9 @@
#define __inet_aton inet_aton
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/nscd/getpwnam_r.c b/nscd/getpwnam_r.c
index 7b6c5b31e3..06e57044bd 100644
--- a/nscd/getpwnam_r.c
+++ b/nscd/getpwnam_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_VARIABLES name
#define BUFLEN NSS_BUFLEN_PASSWD
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include <nss/getXXbyYY_r.c>
diff --git a/nscd/getpwuid_r.c b/nscd/getpwuid_r.c
index f3a01c64fe..ce8e2dfefa 100644
--- a/nscd/getpwuid_r.c
+++ b/nscd/getpwuid_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,4 +25,7 @@
#define ADD_VARIABLES uid
#define BUFLEN NSS_BUFLEN_PASSWD
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include <nss/getXXbyYY_r.c>
diff --git a/nscd/getsrvbynm_r.c b/nscd/getsrvbynm_r.c
index c8b3744153..a1c25c705f 100644
--- a/nscd/getsrvbynm_r.c
+++ b/nscd/getsrvbynm_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -24,4 +24,7 @@
#define ADD_PARAMS const char *name, const char *proto
#define ADD_VARIABLES name, proto
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/nscd/getsrvbypt_r.c b/nscd/getsrvbypt_r.c
index cb73426d8a..3c05771f1f 100644
--- a/nscd/getsrvbypt_r.c
+++ b/nscd/getsrvbypt_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -24,4 +24,7 @@
#define ADD_PARAMS int port, const char *proto
#define ADD_VARIABLES port, proto
+/* We are nscd, so we don't want to be talking to ourselves. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 79fb32f327..bee9ed49ff 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -305,8 +305,10 @@ main (int argc, char **argv)
# endif
#endif
+#ifdef USE_NSCD
/* Make sure we do not get recursive calls. */
__nss_disable_nscd (register_traced_file);
+#endif
/* Init databases. */
nscd_init ();
diff --git a/nss/Makefile b/nss/Makefile
index a272ebe13d..eecf57e205 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -111,6 +111,8 @@ CFLAGS-nss_test1.c = -DNOT_IN_libc=1
$(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(common-objpfx)libc.so \
$(common-objpfx)libc_nonshared.a
$(build-module)
+ifdef libnss_test1.so-version
$(objpfx)/libnss_test1.so$(libnss_test1.so-version): $(objpfx)/libnss_test1.so
$(make-link)
+endif
$(objpfx)tst-nss-test1.out: $(objpfx)/libnss_test1.so$(libnss_test1.so-version)
diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c
index 336676ad55..c308a70b93 100644
--- a/nss/getXXbyYY.c
+++ b/nss/getXXbyYY.c
@@ -151,4 +151,4 @@ done:
return result;
}
-static_link_warning (FUNCTION_NAME)
+nss_interface_function (FUNCTION_NAME)
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index d197c9be17..8b3b61b663 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004,2006,2007,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -51,7 +51,7 @@
|* *|
|* EXTRA_VARIABLES - names of optional parameter *|
|* *|
-|* FUNCTION_NAME - alternative name of the non-reentrant function *|
+|* FUNCTION2_NAME - alternative name of the non-reentrant function *|
|* *|
|* NEED_H_ERRNO - an extra parameter will be passed to point to *|
|* the global `h_errno' variable. *|
@@ -204,7 +204,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
if (no_more)
{
void *tmp_ptr = (service_user *) -1l;
+#ifdef PTR_MANGLE
PTR_MANGLE (tmp_ptr);
+#endif
startp = tmp_ptr;
}
else
@@ -225,10 +227,14 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
#endif /* need _res_hconf */
void *tmp_ptr = fct.l;
+#ifdef PTR_MANGLE
PTR_MANGLE (tmp_ptr);
+#endif
start_fct = tmp_ptr;
tmp_ptr = nip;
+#ifdef PTR_MANGLE
PTR_MANGLE (tmp_ptr);
+#endif
startp = tmp_ptr;
}
@@ -240,9 +246,11 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
else
{
fct.l = start_fct;
- PTR_DEMANGLE (fct.l);
nip = startp;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (fct.l);
PTR_DEMANGLE (nip);
+#endif
no_more = nip == (service_user *) -1l;
}
@@ -341,4 +349,4 @@ do_default_symbol_version (NEW (REENTRANT_NAME),
REENTRANT_NAME, GLIBC_2_1_2);
#endif
-static_link_warning (REENTRANT_NAME)
+nss_interface_function (REENTRANT_NAME)
diff --git a/nss/getXXent.c b/nss/getXXent.c
index 008851e597..152798f0c2 100644
--- a/nss/getXXent.c
+++ b/nss/getXXent.c
@@ -91,4 +91,4 @@ GETFUNC_NAME (void)
return result;
}
-static_link_warning (GETFUNC_NAME)
+nss_interface_function (GETFUNC_NAME)
diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c
index f1036058ff..6c52d27cb2 100644
--- a/nss/getXXent_r.c
+++ b/nss/getXXent_r.c
@@ -207,6 +207,6 @@ do_default_symbol_version (NEW (REENTRANT_GETNAME),
REENTRANT_GETNAME, GLIBC_2_1_2);
#endif
-static_link_warning (SETFUNC_NAME)
-static_link_warning (ENDFUNC_NAME)
-static_link_warning (REENTRANT_GETNAME)
+nss_interface_function (SETFUNC_NAME)
+nss_interface_function (ENDFUNC_NAME)
+nss_interface_function (REENTRANT_GETNAME)
diff --git a/nss/makedb.c b/nss/makedb.c
index 5890c054f0..ccaabdff95 100644
--- a/nss/makedb.c
+++ b/nss/makedb.c
@@ -27,6 +27,7 @@
#include <libintl.h>
#include <locale.h>
#include <search.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/nss/nss_db/db-init.c b/nss/nss_db/db-init.c
index d23e8f81d6..26508c2ca9 100644
--- a/nss/nss_db/db-init.c
+++ b/nss/nss_db/db-init.c
@@ -16,6 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifdef USE_NSCD
+
#include <paths.h>
#include <nscd/nscd.h>
#include <string.h>
@@ -51,3 +53,5 @@ _nss_db_init (void (*cb) (size_t, struct traced_file *))
strcpy (serv_traced_file.file.fname, _PATH_VARDB "services.db");
cb (servdb, &serv_traced_file.file);
}
+
+#endif
diff --git a/nss/nss_db/db-initgroups.c b/nss/nss_db/db-initgroups.c
index 16eb8e2d82..2e2e3f284b 100644
--- a/nss/nss_db/db-initgroups.c
+++ b/nss/nss_db/db-initgroups.c
@@ -22,6 +22,7 @@
#include <grp.h>
#include <limits.h>
#include <paths.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
diff --git a/nss/nss_db/db-netgrp.c b/nss/nss_db/db-netgrp.c
index 37705b05a1..3c18ea8305 100644
--- a/nss/nss_db/db-netgrp.c
+++ b/nss/nss_db/db-netgrp.c
@@ -1,5 +1,5 @@
/* Netgroup file parser in nss_db modules.
- Copyright (C) 1996, 1997, 1999, 2000, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,6 +25,7 @@
#include <string.h>
#include <bits/libc-lock.h>
#include <paths.h>
+#include <stdlib.h>
#include "nsswitch.h"
#include "nss_db.h"
diff --git a/nss/nss_files/files-init.c b/nss/nss_files/files-init.c
index 18757cb25b..d58bd82239 100644
--- a/nss/nss_files/files-init.c
+++ b/nss/nss_files/files-init.c
@@ -1,5 +1,5 @@
/* Initialization in nss_files module.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifdef USE_NSCD
+
#include <nscd/nscd.h>
@@ -55,3 +57,5 @@ _nss_files_init (void (*cb) (size_t, struct traced_file *))
cb (netgrdb, &netgr_traced_file.file);
}
+
+#endif
diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
index c8ce0656af..a5a2164eb3 100644
--- a/nss/nss_files/files-initgroups.c
+++ b/nss/nss_files/files-initgroups.c
@@ -1,5 +1,5 @@
/* Initgroups handling in nss_files module.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,8 @@
#include <stdio_ext.h>
#include <string.h>
#include <sys/param.h>
+#include <stdbool.h>
+#include <stdlib.h>
enum nss_status
_nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 464f478d2b..c0e3e1eb97 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -46,8 +46,10 @@ static name_database *nss_parse_file (const char *fname) internal_function;
static name_database_entry *nss_getline (char *line) internal_function;
static service_user *nss_parse_service_list (const char *line)
internal_function;
+#if !defined DO_STATIC_NSS || defined SHARED
static service_library *nss_new_service (name_database *database,
const char *name) internal_function;
+#endif
/* Declare external database variables. */
@@ -92,10 +94,12 @@ static name_database *service_table;
static name_database_entry *defconfig_entries;
+#ifdef USE_NSCD
/* Nonzero if this is the nscd process. */
static bool is_nscd;
/* The callback passed to the init functions when nscd is used. */
static void (*nscd_init_cb) (size_t, struct traced_file *);
+#endif
/* -1 == database not found
@@ -358,6 +362,7 @@ nss_load_library (service_user *ni)
ni->library->lib_handle = (void *) -1l;
__set_errno (saved_errno);
}
+# ifdef USE_NSCD
else if (is_nscd)
{
/* Call the init function when nscd is used. */
@@ -377,12 +382,13 @@ nss_load_library (service_user *ni)
if (ifct != NULL)
{
void (*cb) (size_t, struct traced_file *) = nscd_init_cb;
-# ifdef PTR_DEMANGLE
+# ifdef PTR_DEMANGLE
PTR_DEMANGLE (cb);
-# endif
+# endif
ifct (cb);
}
}
+# endif
}
return 0;
@@ -415,7 +421,9 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
{
/* The search found an existing structure in the tree. */
result = ((known_function *) *found)->fct_ptr;
+#ifdef PTR_DEMANGLE
PTR_DEMANGLE (result);
+#endif
}
else
{
@@ -427,7 +435,9 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
known_function *known = malloc (sizeof *known);
if (! known)
{
+#if !defined DO_STATIC_NSS || defined SHARED
remove_from_tree:
+#endif
/* Oops. We can't instantiate this node properly.
Remove it from the tree. */
__tdelete (&fct_name, &ni->known, &known_compare);
@@ -503,7 +513,9 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
/* Remember function pointer for later calls. Even if null, we
record it so a second try needn't search the library again. */
known->fct_ptr = result;
+#ifdef PTR_MANGLE
PTR_MANGLE (known->fct_ptr);
+#endif
}
}
@@ -778,6 +790,7 @@ nss_getline (char *line)
}
+#if !defined DO_STATIC_NSS || defined SHARED
static service_library *
internal_function
nss_new_service (name_database *database, const char *name)
@@ -802,9 +815,10 @@ nss_new_service (name_database *database, const char *name)
return *currentp;
}
+#endif
-#ifdef SHARED
+#if defined SHARED && defined USE_NSCD
/* Load all libraries for the service. */
static void
nss_load_all_libraries (const char *service, const char *def)
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index 047a9e5858..0cf67ff025 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -107,6 +107,14 @@ enum
/* Flags whether custom rules for database is set. */
extern bool __nss_database_custom[NSS_DBSIDX_max];
+/* Warning for NSS functions, which don't require dlopen if glibc
+ was built with --enable-static-nss. */
+#ifdef DO_STATIC_NSS
+# define nss_interface_function(name)
+#else
+# define nss_interface_function(name) static_link_warning (name)
+#endif
+
/* Interface functions for NSS. */
diff --git a/po/eo.po b/po/eo.po
new file mode 100644
index 0000000000..29e59bf2ea
--- /dev/null
+++ b/po/eo.po
@@ -0,0 +1,6992 @@
+# Esperanto translations for GNU libc.
+# Copyright (C) 2012 Free Software Foundation, Inc.
+# This file is distributed under the same license as the glibc package.
+#
+# "Under the spreading chestnut tree..."
+#
+# Do: iconv/iconv_prog.c, nis/nis_error.h,
+# stdio-common/psig*, sysdeps/gnu/errlist.c,
+#
+# Benno Schulenberg <benno@vertaalt.nl>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: libc 2.16-pre1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-06-21 07:51-0700\n"
+"PO-Revision-Date: 2012-09-14 21:31+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
+"Language: eo\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Lokalize 1.0\n"
+
+#: argp/argp-help.c:226
+#, c-format
+msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
+msgstr ""
+
+#: argp/argp-help.c:236
+#, c-format
+msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
+msgstr ""
+
+#: argp/argp-help.c:249
+#, c-format
+msgid "Garbage in ARGP_HELP_FMT: %s"
+msgstr ""
+
+#: argp/argp-help.c:1213
+msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
+msgstr ""
+"(Endaj aÅ­ eblaj argumentoj por longaj opcioj ankaÅ­ endas aÅ­ eblas por\n"
+"iuj korespondaj mallongaj opcioj.)"
+
+#: argp/argp-help.c:1599
+msgid "Usage:"
+msgstr "Uzmaniero: "
+
+#: argp/argp-help.c:1603
+msgid " or: "
+msgstr " aÅ­: "
+
+#: argp/argp-help.c:1615
+msgid " [OPTION...]"
+msgstr " [OPCIO...]"
+
+#: argp/argp-help.c:1642
+#, c-format
+msgid "Try `%s --help' or `%s --usage' for more information.\n"
+msgstr "Tajpu «%s --help» aŭ «%s --usage» por pli da informoj.\n"
+
+#: argp/argp-help.c:1670
+#, c-format
+msgid "Report bugs to %s.\n"
+msgstr "Raportu programmisojn al <%s>.\n"
+
+#: argp/argp-parse.c:101
+msgid "Give this help list"
+msgstr "montri ĉi tiun helptekston"
+
+#: argp/argp-parse.c:102
+msgid "Give a short usage message"
+msgstr "montri mallongan uzmanieran mesaÄon"
+
+#: argp/argp-parse.c:103
+msgid "Set the program name"
+msgstr "agordi la programnomon"
+
+#: argp/argp-parse.c:105
+msgid "Hang for SECS seconds (default 3600)"
+msgstr "paÅ­zi por SEKOJ sekundoj (defaÅ­lte 3600)"
+
+#: argp/argp-parse.c:166
+msgid "Print program version"
+msgstr "montri programversion"
+
+#: argp/argp-parse.c:182
+msgid "(PROGRAM ERROR) No version known!?"
+msgstr "(**Programmison**) Ne konas sian version!?"
+
+#: argp/argp-parse.c:622
+#, c-format
+msgid "%s: Too many arguments\n"
+msgstr "%s: tro da argumentoj\n"
+
+#: argp/argp-parse.c:765
+msgid "(PROGRAM ERROR) Option should have been recognized!?"
+msgstr "(**Programmison**) Opcio devus esti rekonata!?"
+
+#: assert/assert-perr.c:36
+#, c-format
+msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
+msgstr "%s%s%s:%u: %s%sNeatendata eraro: %s.\n"
+
+#: assert/assert.c:101
+#, c-format
+msgid ""
+"%s%s%s:%u: %s%sAssertion `%s' failed.\n"
+"%n"
+msgstr ""
+"%s%s%s:%u: %s%sKontrolo '%s' malsukcesis.\n"
+"%n"
+
+#: catgets/gencat.c:109 catgets/gencat.c:113 nscd/nscd.c:115 nss/makedb.c:118
+msgid "NAME"
+msgstr "NOMO"
+
+#: catgets/gencat.c:110
+msgid "Create C header file NAME containing symbol definitions"
+msgstr ""
+
+#: catgets/gencat.c:112
+msgid "Do not use existing catalog, force new output file"
+msgstr ""
+
+#: catgets/gencat.c:113 nss/makedb.c:118
+msgid "Write output to file NAME"
+msgstr "skribi eligon al dosiero NOMO"
+
+#: catgets/gencat.c:118
+msgid ""
+"Generate message catalog.\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n"
+"is -, output is written to standard output.\n"
+msgstr ""
+
+#: catgets/gencat.c:123
+msgid ""
+"-o OUTPUT-FILE [INPUT-FILE]...\n"
+"[OUTPUT-FILE [INPUT-FILE]...]"
+msgstr ""
+
+#: catgets/gencat.c:234 debug/pcprofiledump.c:207 debug/xtrace.sh:57
+#: elf/ldconfig.c:301 elf/ldd.bash.in:55 elf/pldd.c:56 elf/sln.c:85
+#: elf/sotruss.ksh:49 elf/sprof.c:370 iconv/iconv_prog.c:407
+#: iconv/iconvconfig.c:382 locale/programs/locale.c:278
+#: locale/programs/localedef.c:367 login/programs/pt_chown.c:91
+#: malloc/memusage.sh:64 malloc/memusagestat.c:538 nscd/nscd.c:456
+#: nss/getent.c:965 nss/makedb.c:369 posix/getconf.c:1121
+#: sunrpc/rpc_main.c:1446 sunrpc/rpcinfo.c:691
+#: sysdeps/unix/sysv/linux/lddlibc4.c:61
+msgid ""
+"For bug reporting instructions, please see:\n"
+"<http://www.gnu.org/software/libc/bugs.html>.\n"
+msgstr ""
+
+#: catgets/gencat.c:248 debug/pcprofiledump.c:221 debug/xtrace.sh:65
+#: elf/ldconfig.c:315 elf/ldd.bash.in:38 elf/pldd.c:220 elf/sotruss.ksh:76
+#: elf/sprof.c:385 iconv/iconv_prog.c:422 iconv/iconvconfig.c:397
+#: locale/programs/locale.c:293 locale/programs/localedef.c:383
+#: login/programs/pt_chown.c:62 malloc/memusage.sh:72
+#: malloc/memusagestat.c:556 nscd/nscd.c:470 nss/getent.c:86 nss/makedb.c:383
+#: posix/getconf.c:1103 sysdeps/unix/sysv/linux/lddlibc4.c:68
+#, c-format
+msgid ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+msgstr ""
+
+#: catgets/gencat.c:253 debug/pcprofiledump.c:226 debug/xtrace.sh:69
+#: elf/ldconfig.c:320 elf/pldd.c:225 elf/sprof.c:391 iconv/iconv_prog.c:427
+#: iconv/iconvconfig.c:402 locale/programs/locale.c:298
+#: locale/programs/localedef.c:388 malloc/memusage.sh:76
+#: malloc/memusagestat.c:561 nscd/nscd.c:475 nss/getent.c:91 nss/makedb.c:388
+#: posix/getconf.c:1108
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Verkita de %s.\n"
+
+#: catgets/gencat.c:284
+msgid "*standard input*"
+msgstr "*ĉefenigujo*"
+
+#: catgets/gencat.c:290 iconv/iconv_charmap.c:171 iconv/iconv_prog.c:293
+#: nss/makedb.c:247
+#, c-format
+msgid "cannot open input file `%s'"
+msgstr "ne eblas malfermi enigan dosieron «%s»"
+
+#: catgets/gencat.c:419 catgets/gencat.c:494
+msgid "illegal set number"
+msgstr "nevalida numero de aro"
+
+#: catgets/gencat.c:446
+msgid "duplicate set definition"
+msgstr "duobla difino de aro"
+
+#: catgets/gencat.c:448 catgets/gencat.c:620 catgets/gencat.c:672
+msgid "this is the first definition"
+msgstr "ĉi tiu estas la unua difino"
+
+#: catgets/gencat.c:519
+#, c-format
+msgid "unknown set `%s'"
+msgstr "nekonata aro «%s»"
+
+#: catgets/gencat.c:560
+msgid "invalid quote character"
+msgstr "nevalida cita signo"
+
+#: catgets/gencat.c:573
+#, c-format
+msgid "unknown directive `%s': line ignored"
+msgstr ""
+
+#: catgets/gencat.c:618
+msgid "duplicated message number"
+msgstr ""
+
+#: catgets/gencat.c:669
+msgid "duplicated message identifier"
+msgstr ""
+
+#: catgets/gencat.c:726
+msgid "invalid character: message ignored"
+msgstr "nevalida signo: mesaÄo ignoriÄas"
+
+#: catgets/gencat.c:769
+msgid "invalid line"
+msgstr "nevalida linio"
+
+#: catgets/gencat.c:823
+msgid "malformed line ignored"
+msgstr "misformita linio ignoriÄas"
+
+#: catgets/gencat.c:987 catgets/gencat.c:1028
+#, c-format
+msgid "cannot open output file `%s'"
+msgstr "ne eblas malfermi eligan dosieron «%s»"
+
+#: catgets/gencat.c:1190 locale/programs/linereader.c:559
+msgid "invalid escape sequence"
+msgstr ""
+
+# SIGTERM 15 Term Termination signal
+#: catgets/gencat.c:1212
+msgid "unterminated message"
+msgstr "nefinita mesaÄo"
+
+#: catgets/gencat.c:1236
+#, c-format
+msgid "while opening old catalog file"
+msgstr ""
+
+#: catgets/gencat.c:1327
+#, c-format
+msgid "conversion modules not available"
+msgstr ""
+
+#: catgets/gencat.c:1353
+#, c-format
+msgid "cannot determine escape character"
+msgstr ""
+
+#: debug/pcprofiledump.c:52
+msgid "Don't buffer output"
+msgstr "Ne bufri eligon"
+
+#: debug/pcprofiledump.c:57
+msgid "Dump information generated by PC profiling."
+msgstr ""
+
+#: debug/pcprofiledump.c:60
+msgid "[FILE]"
+msgstr "[DOSIERO]"
+
+#: debug/pcprofiledump.c:107
+#, c-format
+msgid "cannot open input file"
+msgstr "ne eblas malfermi enigan dosieron"
+
+#: debug/pcprofiledump.c:114
+#, c-format
+msgid "cannot read header"
+msgstr "ne eblas legi ĉapon"
+
+#: debug/pcprofiledump.c:178
+#, c-format
+msgid "invalid pointer size"
+msgstr ""
+
+#: debug/xtrace.sh:26 debug/xtrace.sh:44
+msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
+msgstr ""
+
+#: debug/xtrace.sh:32 elf/sotruss.ksh:57 elf/sotruss.ksh:68
+#: elf/sotruss.ksh:136 malloc/memusage.sh:26
+msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
+msgstr "Tajpu «%s --help» aŭ «%s --usage» por pli da informoj.\\n"
+
+#: debug/xtrace.sh:38
+msgid "%s: option '%s' requires an argument.\\n"
+msgstr "%s: opcio «%s» bezonas argumenton\\n"
+
+#: debug/xtrace.sh:45
+msgid ""
+"Trace execution of program by printing currently executed function.\n"
+"\n"
+" --data=FILE Don't run the program, just print the data from FILE.\n"
+"\n"
+" -?,--help Print this help and exit\n"
+" --usage Give a short usage message\n"
+" -V,--version Print version information and exit\n"
+"\n"
+"Mandatory arguments to long options are also mandatory for any corresponding\n"
+"short options.\n"
+"\n"
+msgstr ""
+
+#: debug/xtrace.sh:126
+msgid "xtrace: unrecognized option \\`$1'\\n"
+msgstr "xtrace: nekonata opcio «$1»\\n"
+
+#: debug/xtrace.sh:139
+msgid "No program name given\\n"
+msgstr "Ne indikatas programnomo\\n"
+
+#: debug/xtrace.sh:147
+#, sh-format
+msgid "executable \\`$program' not found\\n"
+msgstr "rulebla «$program» ne troviÄas\\n"
+
+#: debug/xtrace.sh:151
+#, sh-format
+msgid "\\`$program' is no executable\\n"
+msgstr "«$program» ne ruleblas\\n"
+
+#: dlfcn/dlinfo.c:63
+msgid "RTLD_SELF used in code not dynamically loaded"
+msgstr ""
+
+# SIGINFO 29,-,- A synonym for SIGPWR
+#: dlfcn/dlinfo.c:72
+msgid "unsupported dlinfo request"
+msgstr ""
+
+#: dlfcn/dlmopen.c:63
+msgid "invalid namespace"
+msgstr ""
+
+#: dlfcn/dlmopen.c:68
+msgid "invalid mode"
+msgstr "nevalida moduso"
+
+#: dlfcn/dlopen.c:64
+msgid "invalid mode parameter"
+msgstr "nevalida modusa argumento"
+
+#: elf/cache.c:68
+msgid "unknown"
+msgstr "nekonata"
+
+#: elf/cache.c:115
+msgid "Unknown OS"
+msgstr "Nekonata mastrumsistemo"
+
+#: elf/cache.c:120
+#, c-format
+msgid ", OS ABI: %s %d.%d.%d"
+msgstr ", mastruma ABI-o: %s %d.%d.%d"
+
+#: elf/cache.c:137 elf/ldconfig.c:1306
+#, c-format
+msgid "Can't open cache file %s\n"
+msgstr "Ne eblas malfermi kaÅmemoran dosieron %s\n"
+
+#: elf/cache.c:151
+#, c-format
+msgid "mmap of cache file failed.\n"
+msgstr "Malsukcesis enmemorigo de kaÅmemora dosiero.\n"
+
+#: elf/cache.c:155 elf/cache.c:169
+#, c-format
+msgid "File is not a cache file.\n"
+msgstr "Dosiero ne estas kaÅmemora dosiero.\n"
+
+#: elf/cache.c:202 elf/cache.c:212
+#, c-format
+msgid "%d libs found in cache `%s'\n"
+msgstr ""
+
+#: elf/cache.c:406
+#, c-format
+msgid "Can't create temporary cache file %s"
+msgstr "Ne eblas krei provizoran kaÅmemoran dosieron %s"
+
+#: elf/cache.c:414 elf/cache.c:424 elf/cache.c:428 elf/cache.c:433
+#, c-format
+msgid "Writing of cache data failed"
+msgstr "Malsukcesis skribado de kaÅmemoraj datumoj"
+
+#: elf/cache.c:438
+#, c-format
+msgid "Changing access rights of %s to %#o failed"
+msgstr ""
+
+#: elf/cache.c:443
+#, c-format
+msgid "Renaming of %s to %s failed"
+msgstr "Malsukcesis alinomo de %s al %s"
+
+#: elf/dl-close.c:386 elf/dl-open.c:460
+msgid "cannot create scope list"
+msgstr ""
+
+#: elf/dl-close.c:773
+msgid "shared object not open"
+msgstr "komuna objekto ne estas malferma"
+
+#: elf/dl-deps.c:114
+msgid "DST not allowed in SUID/SGID programs"
+msgstr ""
+
+#: elf/dl-deps.c:127
+msgid "empty dynamic string token substitution"
+msgstr ""
+
+#: elf/dl-deps.c:133
+#, c-format
+msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n"
+msgstr ""
+
+#: elf/dl-deps.c:486
+msgid "cannot allocate dependency list"
+msgstr ""
+
+#: elf/dl-deps.c:522 elf/dl-deps.c:582
+msgid "cannot allocate symbol search list"
+msgstr ""
+
+#: elf/dl-deps.c:562
+msgid "Filters not supported with LD_TRACE_PRELINKING"
+msgstr ""
+
+#: elf/dl-error.c:76
+msgid "DYNAMIC LINKER BUG!!!"
+msgstr ""
+
+#: elf/dl-error.c:123
+msgid "error while loading shared libraries"
+msgstr "eraro dum Åargo de komunaj bibliotekoj"
+
+#: elf/dl-fptr.c:87 ports/sysdeps/hppa/dl-fptr.c:93
+msgid "cannot map pages for fdesc table"
+msgstr ""
+
+#: elf/dl-fptr.c:191 ports/sysdeps/hppa/dl-fptr.c:206
+msgid "cannot map pages for fptr table"
+msgstr ""
+
+#: elf/dl-fptr.c:220 ports/sysdeps/hppa/dl-fptr.c:235
+msgid "internal error: symidx out of range of fptr table"
+msgstr ""
+
+#: elf/dl-load.c:470
+msgid "cannot allocate name record"
+msgstr ""
+
+#: elf/dl-load.c:547 elf/dl-load.c:663 elf/dl-load.c:748 elf/dl-load.c:861
+msgid "cannot create cache for search path"
+msgstr ""
+
+#: elf/dl-load.c:638
+msgid "cannot create RUNPATH/RPATH copy"
+msgstr ""
+
+#: elf/dl-load.c:734
+msgid "cannot create search path array"
+msgstr ""
+
+#: elf/dl-load.c:932
+msgid "cannot stat shared object"
+msgstr ""
+
+#: elf/dl-load.c:1010
+msgid "cannot open zero fill device"
+msgstr ""
+
+#: elf/dl-load.c:1056 elf/dl-load.c:2317
+msgid "cannot create shared object descriptor"
+msgstr ""
+
+#: elf/dl-load.c:1075 elf/dl-load.c:1731 elf/dl-load.c:1834
+msgid "cannot read file data"
+msgstr "ne eblas legi dosierdatumojn"
+
+#: elf/dl-load.c:1121
+msgid "ELF load command alignment not page-aligned"
+msgstr ""
+
+#: elf/dl-load.c:1128
+msgid "ELF load command address/offset not properly aligned"
+msgstr ""
+
+#: elf/dl-load.c:1211
+msgid "cannot allocate TLS data structures for initial thread"
+msgstr ""
+
+#: elf/dl-load.c:1234
+msgid "cannot handle TLS data"
+msgstr ""
+
+#: elf/dl-load.c:1253
+msgid "object file has no loadable segments"
+msgstr ""
+
+#: elf/dl-load.c:1289
+msgid "failed to map segment from shared object"
+msgstr ""
+
+#: elf/dl-load.c:1315
+msgid "cannot dynamically load executable"
+msgstr ""
+
+#: elf/dl-load.c:1377
+msgid "cannot change memory protections"
+msgstr ""
+
+#: elf/dl-load.c:1396
+msgid "cannot map zero-fill pages"
+msgstr ""
+
+#: elf/dl-load.c:1410
+msgid "object file has no dynamic section"
+msgstr ""
+
+#: elf/dl-load.c:1433
+msgid "shared object cannot be dlopen()ed"
+msgstr ""
+
+#: elf/dl-load.c:1446
+msgid "cannot allocate memory for program header"
+msgstr ""
+
+#: elf/dl-load.c:1463 elf/dl-open.c:178
+msgid "invalid caller"
+msgstr "nevalida vokanto"
+
+#: elf/dl-load.c:1502
+msgid "cannot enable executable stack as shared object requires"
+msgstr ""
+
+#: elf/dl-load.c:1515
+msgid "cannot close file descriptor"
+msgstr ""
+
+#: elf/dl-load.c:1731
+msgid "file too short"
+msgstr "dosiero tro mallongas"
+
+#: elf/dl-load.c:1767
+msgid "invalid ELF header"
+msgstr "nevalida ELF-ĉapo"
+
+#: elf/dl-load.c:1779
+msgid "ELF file data encoding not big-endian"
+msgstr ""
+
+#: elf/dl-load.c:1781
+msgid "ELF file data encoding not little-endian"
+msgstr ""
+
+#: elf/dl-load.c:1785
+msgid "ELF file version ident does not match current one"
+msgstr ""
+
+#: elf/dl-load.c:1789
+msgid "ELF file OS ABI invalid"
+msgstr ""
+
+#: elf/dl-load.c:1792
+msgid "ELF file ABI version invalid"
+msgstr ""
+
+#: elf/dl-load.c:1795
+msgid "nonzero padding in e_ident"
+msgstr ""
+
+#: elf/dl-load.c:1798
+msgid "internal error"
+msgstr "**interna eraro**"
+
+#: elf/dl-load.c:1805
+msgid "ELF file version does not match current one"
+msgstr ""
+
+#: elf/dl-load.c:1813
+msgid "only ET_DYN and ET_EXEC can be loaded"
+msgstr ""
+
+#: elf/dl-load.c:1819
+msgid "ELF file's phentsize not the expected size"
+msgstr ""
+
+#: elf/dl-load.c:2336
+msgid "wrong ELF class: ELFCLASS64"
+msgstr "malÄusta ELF-klaso: ELFCLASS64"
+
+#: elf/dl-load.c:2337
+msgid "wrong ELF class: ELFCLASS32"
+msgstr "malÄusta ELF-klaso: ELFCLASS32"
+
+#: elf/dl-load.c:2340
+msgid "cannot open shared object file"
+msgstr "ne eblas malfermi komunan objektdosieron"
+
+#: elf/dl-lookup.c:756 ports/sysdeps/mips/dl-lookup.c:773
+msgid "relocation error"
+msgstr ""
+
+#: elf/dl-lookup.c:785 ports/sysdeps/mips/dl-lookup.c:802
+msgid "symbol lookup error"
+msgstr ""
+
+#: elf/dl-open.c:108
+msgid "cannot extend global scope"
+msgstr ""
+
+#: elf/dl-open.c:510
+msgid "TLS generation counter wrapped! Please report this."
+msgstr ""
+
+#: elf/dl-open.c:532
+msgid "cannot load any more object with static TLS"
+msgstr ""
+
+#: elf/dl-open.c:581
+msgid "invalid mode for dlopen()"
+msgstr "nevalida moduso por 'dlopen()'"
+
+#: elf/dl-open.c:598
+msgid "no more namespaces available for dlmopen()"
+msgstr ""
+
+#: elf/dl-open.c:616
+msgid "invalid target namespace in dlmopen()"
+msgstr ""
+
+#: elf/dl-reloc.c:120
+msgid "cannot allocate memory in static TLS block"
+msgstr ""
+
+#: elf/dl-reloc.c:213
+msgid "cannot make segment writable for relocation"
+msgstr ""
+
+#: elf/dl-reloc.c:276
+#, c-format
+msgid "%s: no PLTREL found in object %s\n"
+msgstr ""
+
+#: elf/dl-reloc.c:287
+#, c-format
+msgid "%s: out of memory to store relocation results for %s\n"
+msgstr ""
+
+#: elf/dl-reloc.c:303
+msgid "cannot restore segment prot after reloc"
+msgstr ""
+
+#: elf/dl-reloc.c:332
+msgid "cannot apply additional memory protection after relocation"
+msgstr ""
+
+#: elf/dl-sym.c:162
+msgid "RTLD_NEXT used in code not dynamically loaded"
+msgstr ""
+
+#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
+msgid "cannot create capability list"
+msgstr ""
+
+#: elf/dl-tls.c:872
+msgid "cannot create TLS data structures"
+msgstr ""
+
+#: elf/dl-version.c:171
+msgid "version lookup error"
+msgstr ""
+
+#: elf/dl-version.c:302
+msgid "cannot allocate version reference table"
+msgstr ""
+
+#: elf/ldconfig.c:140
+msgid "Print cache"
+msgstr ""
+
+#: elf/ldconfig.c:141
+msgid "Generate verbose messages"
+msgstr ""
+
+#: elf/ldconfig.c:142
+msgid "Don't build cache"
+msgstr ""
+
+#: elf/ldconfig.c:143
+msgid "Don't generate links"
+msgstr ""
+
+#: elf/ldconfig.c:144
+msgid "Change to and use ROOT as root directory"
+msgstr ""
+
+#: elf/ldconfig.c:144
+msgid "ROOT"
+msgstr ""
+
+#: elf/ldconfig.c:145
+msgid "CACHE"
+msgstr ""
+
+#: elf/ldconfig.c:145
+msgid "Use CACHE as cache file"
+msgstr ""
+
+#: elf/ldconfig.c:146
+msgid "CONF"
+msgstr ""
+
+#: elf/ldconfig.c:146
+msgid "Use CONF as configuration file"
+msgstr ""
+
+#: elf/ldconfig.c:147
+msgid "Only process directories specified on the command line. Don't build cache."
+msgstr ""
+
+#: elf/ldconfig.c:148
+msgid "Manually link individual libraries."
+msgstr ""
+
+#: elf/ldconfig.c:149
+msgid "FORMAT"
+msgstr ""
+
+#: elf/ldconfig.c:149
+msgid "Format to use: new, old or compat (default)"
+msgstr ""
+
+#: elf/ldconfig.c:150
+msgid "Ignore auxiliary cache file"
+msgstr ""
+
+#: elf/ldconfig.c:158
+msgid "Configure Dynamic Linker Run Time Bindings."
+msgstr ""
+
+#: elf/ldconfig.c:338
+#, c-format
+msgid "Path `%s' given more than once"
+msgstr ""
+
+#: elf/ldconfig.c:378
+#, c-format
+msgid "%s is not a known library type"
+msgstr ""
+
+#: elf/ldconfig.c:406
+#, c-format
+msgid "Can't stat %s"
+msgstr ""
+
+#: elf/ldconfig.c:480
+#, c-format
+msgid "Can't stat %s\n"
+msgstr ""
+
+#: elf/ldconfig.c:490
+#, c-format
+msgid "%s is not a symbolic link\n"
+msgstr "%s ne estas simbola ligo\n"
+
+#: elf/ldconfig.c:509
+#, c-format
+msgid "Can't unlink %s"
+msgstr ""
+
+#: elf/ldconfig.c:515
+#, c-format
+msgid "Can't link %s to %s"
+msgstr ""
+
+# SIGWINCH 28,28,20 Ign Window resize signal (4.3 BSD, Sun)
+#: elf/ldconfig.c:521
+msgid " (changed)\n"
+msgstr " (ÅanÄiÄis)\n"
+
+#: elf/ldconfig.c:523
+msgid " (SKIPPED)\n"
+msgstr ""
+
+#: elf/ldconfig.c:578
+#, c-format
+msgid "Can't find %s"
+msgstr "Malsukcesis trovi %s"
+
+#: elf/ldconfig.c:594 elf/ldconfig.c:767 elf/ldconfig.c:826 elf/ldconfig.c:860
+#, c-format
+msgid "Cannot lstat %s"
+msgstr ""
+
+#: elf/ldconfig.c:601
+#, c-format
+msgid "Ignored file %s since it is not a regular file."
+msgstr ""
+
+#: elf/ldconfig.c:610
+#, c-format
+msgid "No link created since soname could not be found for %s"
+msgstr ""
+
+#: elf/ldconfig.c:693
+#, c-format
+msgid "Can't open directory %s"
+msgstr "Ne eblas malfermi dosierujon %s"
+
+#: elf/ldconfig.c:785 elf/ldconfig.c:847 elf/readlib.c:90
+#, c-format
+msgid "Input file %s not found.\n"
+msgstr "Eniga dosiero %s ne troviÄas.\n"
+
+#: elf/ldconfig.c:792
+#, c-format
+msgid "Cannot stat %s"
+msgstr "Malsukcesis eltrovi statinformon pri %s"
+
+#: elf/ldconfig.c:921
+#, c-format
+msgid "libc5 library %s in wrong directory"
+msgstr ""
+
+#: elf/ldconfig.c:924
+#, c-format
+msgid "libc6 library %s in wrong directory"
+msgstr ""
+
+#: elf/ldconfig.c:927
+#, c-format
+msgid "libc4 library %s in wrong directory"
+msgstr ""
+
+#: elf/ldconfig.c:955
+#, c-format
+msgid "libraries %s and %s in directory %s have same soname but different type."
+msgstr ""
+
+#: elf/ldconfig.c:1064
+#, c-format
+msgid "Warning: ignoring configuration file that cannot be opened: %s"
+msgstr ""
+
+#: elf/ldconfig.c:1130
+#, c-format
+msgid "%s:%u: bad syntax in hwcap line"
+msgstr ""
+
+#: elf/ldconfig.c:1136
+#, c-format
+msgid "%s:%u: hwcap index %lu above maximum %u"
+msgstr ""
+
+#: elf/ldconfig.c:1143 elf/ldconfig.c:1151
+#, c-format
+msgid "%s:%u: hwcap index %lu already defined as %s"
+msgstr ""
+
+#: elf/ldconfig.c:1154
+#, c-format
+msgid "%s:%u: duplicate hwcap %lu %s"
+msgstr ""
+
+#: elf/ldconfig.c:1176
+#, c-format
+msgid "need absolute file name for configuration file when using -r"
+msgstr ""
+
+#: elf/ldconfig.c:1183 locale/programs/xmalloc.c:65 malloc/obstack.c:433
+#: malloc/obstack.c:435 posix/getconf.c:1076 posix/getconf.c:1296
+#, c-format
+msgid "memory exhausted"
+msgstr "mankas sufiĉa memoro"
+
+#: elf/ldconfig.c:1215
+#, c-format
+msgid "%s:%u: cannot read directory %s"
+msgstr "%s:%u: ne eblas legi dosierujon %s"
+
+#: elf/ldconfig.c:1259
+#, c-format
+msgid "relative path `%s' used to build cache"
+msgstr ""
+
+#: elf/ldconfig.c:1285
+#, c-format
+msgid "Can't chdir to /"
+msgstr "Malsukcesis ÅanÄi aktualan dosierujon al «/»"
+
+#: elf/ldconfig.c:1326
+#, c-format
+msgid "Can't open cache file directory %s\n"
+msgstr ""
+
+#: elf/ldd.bash.in:42
+msgid "Written by %s and %s.\n"
+msgstr "Verkita de %s kaj %s.\n"
+
+#: elf/ldd.bash.in:47
+msgid ""
+"Usage: ldd [OPTION]... FILE...\n"
+" --help print this help and exit\n"
+" --version print version information and exit\n"
+" -d, --data-relocs process data relocations\n"
+" -r, --function-relocs process data and function relocations\n"
+" -u, --unused print unused direct dependencies\n"
+" -v, --verbose print all information\n"
+msgstr ""
+
+#: elf/ldd.bash.in:81
+msgid "ldd: option \\`$1' is ambiguous"
+msgstr "ldd: opcio «-$1» estas plursenca"
+
+#: elf/ldd.bash.in:88
+msgid "unrecognized option"
+msgstr "nekonata opcio"
+
+#: elf/ldd.bash.in:89 elf/ldd.bash.in:127
+msgid "Try \\`ldd --help' for more information."
+msgstr "Tajpu «ldd --help» por pli da informoj."
+
+#: elf/ldd.bash.in:126
+msgid "missing file arguments"
+msgstr "mankas dosieraj argumentoj"
+
+#. TRANS No such file or directory. This is a ``file doesn't exist'' error
+#. TRANS for ordinary files that are referenced in contexts where they are
+#. TRANS expected to already exist.
+#: elf/ldd.bash.in:149 sysdeps/gnu/errlist.c:36
+msgid "No such file or directory"
+msgstr "Dosiero aü dosierujo ne ekzistas"
+
+#: elf/ldd.bash.in:152 inet/rcmd.c:488
+msgid "not regular file"
+msgstr "ne estas normala dosiero"
+
+#: elf/ldd.bash.in:155
+msgid "warning: you do not have execution permission for"
+msgstr "averto: vi ne havas permeson ruli"
+
+#: elf/ldd.bash.in:184
+msgid "\tnot a dynamic executable"
+msgstr ""
+
+#: elf/ldd.bash.in:192
+msgid "exited with unknown exit code"
+msgstr "finis kun nekonata elirstato"
+
+#: elf/ldd.bash.in:197
+msgid "error: you do not have read permission for"
+msgstr "eraro: vi ne havas permeson legi"
+
+#: elf/pldd-xx.c:105
+#, c-format
+msgid "cannot find program header of process"
+msgstr ""
+
+#: elf/pldd-xx.c:110
+#, c-format
+msgid "cannot read program header"
+msgstr "ne eblas legi programĉapon"
+
+#: elf/pldd-xx.c:135
+#, c-format
+msgid "cannot read dynamic section"
+msgstr "ne eblas legi dinamikan sekcion"
+
+#: elf/pldd-xx.c:147
+#, c-format
+msgid "cannot read r_debug"
+msgstr "ne eblas legi 'r_debug'"
+
+#: elf/pldd-xx.c:167
+#, c-format
+msgid "cannot read program interpreter"
+msgstr "ne eblas legi programinterpretilon"
+
+#: elf/pldd-xx.c:196
+#, c-format
+msgid "cannot read link map"
+msgstr "ne eblas legi ligojmapon"
+
+#: elf/pldd-xx.c:207
+#, c-format
+msgid "cannot read object name"
+msgstr "ne eblas legi objektnomon"
+
+#: elf/pldd.c:67
+msgid "List dynamic shared objects loaded into process."
+msgstr ""
+
+#: elf/pldd.c:71
+msgid "PID"
+msgstr ""
+
+#: elf/pldd.c:102
+#, c-format
+msgid "Exactly one parameter with process ID required.\n"
+msgstr ""
+
+#: elf/pldd.c:114
+#, c-format
+msgid "invalid process ID '%s'"
+msgstr ""
+
+#: elf/pldd.c:122
+#, c-format
+msgid "cannot open %s"
+msgstr "ne eblas malfermi %s"
+
+#: elf/pldd.c:147
+#, c-format
+msgid "cannot open %s/task"
+msgstr "ne eblas malfermi %s/task"
+
+#: elf/pldd.c:150
+#, c-format
+msgid "cannot prepare reading %s/task"
+msgstr ""
+
+#: elf/pldd.c:163
+#, c-format
+msgid "invalid thread ID '%s'"
+msgstr ""
+
+#: elf/pldd.c:174
+#, c-format
+msgid "cannot attach to process %lu"
+msgstr ""
+
+#: elf/pldd.c:246
+#, c-format
+msgid "cannot get information about process %lu"
+msgstr ""
+
+#: elf/pldd.c:259
+#, c-format
+msgid "process %lu is no ELF program"
+msgstr ""
+
+#: elf/readelflib.c:34
+#, c-format
+msgid "file %s is truncated\n"
+msgstr ""
+
+#: elf/readelflib.c:66
+#, c-format
+msgid "%s is a 32 bit ELF file.\n"
+msgstr ""
+
+#: elf/readelflib.c:68
+#, c-format
+msgid "%s is a 64 bit ELF file.\n"
+msgstr ""
+
+#: elf/readelflib.c:70
+#, c-format
+msgid "Unknown ELFCLASS in file %s.\n"
+msgstr ""
+
+#: elf/readelflib.c:77
+#, c-format
+msgid "%s is not a shared object file (Type: %d).\n"
+msgstr ""
+
+#: elf/readelflib.c:108
+#, c-format
+msgid "more than one dynamic segment\n"
+msgstr ""
+
+#: elf/readlib.c:96
+#, c-format
+msgid "Cannot fstat file %s.\n"
+msgstr ""
+
+#: elf/readlib.c:107
+#, c-format
+msgid "File %s is empty, not checked."
+msgstr "Dosiero %s vakas; ne kontroliÄas."
+
+#: elf/readlib.c:113
+#, c-format
+msgid "File %s is too small, not checked."
+msgstr "Dosiero %s tro malgrandas; ne kontroliÄas."
+
+#: elf/readlib.c:123
+#, c-format
+msgid "Cannot mmap file %s.\n"
+msgstr ""
+
+#: elf/readlib.c:161
+#, c-format
+msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n"
+msgstr ""
+
+#: elf/sln.c:84
+#, c-format
+msgid ""
+"Usage: sln src dest|file\n"
+"\n"
+msgstr ""
+
+#: elf/sln.c:109
+#, c-format
+msgid "%s: file open error: %m\n"
+msgstr ""
+
+#: elf/sln.c:146
+#, c-format
+msgid "No target in line %d\n"
+msgstr ""
+
+#: elf/sln.c:178
+#, c-format
+msgid "%s: destination must not be a directory\n"
+msgstr ""
+
+#: elf/sln.c:184
+#, c-format
+msgid "%s: failed to remove the old destination\n"
+msgstr ""
+
+#: elf/sln.c:192
+#, c-format
+msgid "%s: invalid destination: %s\n"
+msgstr "%s: nevalida celo: %s\n"
+
+#: elf/sln.c:207 elf/sln.c:216
+#, c-format
+msgid "Invalid link from \"%s\" to \"%s\": %s\n"
+msgstr ""
+
+#: elf/sotruss.ksh:32
+#, sh-format
+msgid ""
+"Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
+" -F, --from FROMLIST Trace calls from objects on FROMLIST\n"
+" -T, --to TOLIST Trace calls to objects on TOLIST\n"
+"\n"
+" -e, --exit Also show exits from the function calls\n"
+" -f, --follow Trace child processes\n"
+" -o, --output FILENAME Write output to FILENAME (or FILENAME.$PID in case\n"
+"\t\t\t -f is also used) instead of standard error\n"
+"\n"
+" -?, --help Give this help list\n"
+" --usage Give a short usage message\n"
+" --version Print program version"
+msgstr ""
+
+#: elf/sotruss.ksh:46
+msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n"
+msgstr ""
+
+#: elf/sotruss.ksh:56
+msgid "%s: option requires an argument -- '%s'\\n"
+msgstr "%s: opcio bezonas argumenton -- «%s»\\n"
+
+#: elf/sotruss.ksh:62
+msgid "%s: option is ambiguous; possibilities:"
+msgstr "%s: opcio estas plursenca; eblaĵoj estas:"
+
+#: elf/sotruss.ksh:80
+msgid "Written by %s.\\n"
+msgstr "Verkita de %s.\\n"
+
+#: elf/sotruss.ksh:87
+msgid ""
+"Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]\n"
+"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\n"
+"\t [--help] [--usage] [--version] [--]\n"
+"\t EXECUTABLE [EXECUTABLE-OPTION...]\\n"
+msgstr ""
+
+#: elf/sotruss.ksh:135
+msgid "%s: unrecognized option '%c%s'\\n"
+msgstr "%s: nekonata opcio «%c%s»\\n"
+
+#: elf/sprof.c:76
+msgid "Output selection:"
+msgstr ""
+
+#: elf/sprof.c:78
+msgid "print list of count paths and their number of use"
+msgstr ""
+
+#: elf/sprof.c:80
+msgid "generate flat profile with counts and ticks"
+msgstr ""
+
+#: elf/sprof.c:81
+msgid "generate call graph"
+msgstr ""
+
+#: elf/sprof.c:88
+msgid "Read and display shared object profiling data."
+msgstr ""
+
+#: elf/sprof.c:93
+msgid "SHOBJ [PROFDATA]"
+msgstr ""
+
+#: elf/sprof.c:429
+#, c-format
+msgid "failed to load shared object `%s'"
+msgstr ""
+
+#: elf/sprof.c:438
+#, c-format
+msgid "cannot create internal descriptors"
+msgstr ""
+
+#: elf/sprof.c:550
+#, c-format
+msgid "Reopening shared object `%s' failed"
+msgstr ""
+
+#: elf/sprof.c:557 elf/sprof.c:652
+#, c-format
+msgid "reading of section headers failed"
+msgstr ""
+
+#: elf/sprof.c:565 elf/sprof.c:660
+#, c-format
+msgid "reading of section header string table failed"
+msgstr ""
+
+#: elf/sprof.c:591
+#, c-format
+msgid "*** Cannot read debuginfo file name: %m\n"
+msgstr ""
+
+#: elf/sprof.c:612
+#, c-format
+msgid "cannot determine file name"
+msgstr ""
+
+#: elf/sprof.c:645
+#, c-format
+msgid "reading of ELF header failed"
+msgstr ""
+
+#: elf/sprof.c:681
+#, c-format
+msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
+msgstr ""
+
+#: elf/sprof.c:711
+#, c-format
+msgid "failed to load symbol data"
+msgstr ""
+
+#: elf/sprof.c:776
+#, c-format
+msgid "cannot load profiling data"
+msgstr ""
+
+#: elf/sprof.c:785
+#, c-format
+msgid "while stat'ing profiling data file"
+msgstr ""
+
+#: elf/sprof.c:793
+#, c-format
+msgid "profiling data file `%s' does not match shared object `%s'"
+msgstr ""
+
+#: elf/sprof.c:804
+#, c-format
+msgid "failed to mmap the profiling data file"
+msgstr ""
+
+#: elf/sprof.c:812
+#, c-format
+msgid "error while closing the profiling data file"
+msgstr ""
+
+#: elf/sprof.c:821 elf/sprof.c:919
+#, c-format
+msgid "cannot create internal descriptor"
+msgstr ""
+
+#: elf/sprof.c:895
+#, c-format
+msgid "`%s' is no correct profile data file for `%s'"
+msgstr ""
+
+#: elf/sprof.c:1076 elf/sprof.c:1134
+#, c-format
+msgid "cannot allocate symbol data"
+msgstr ""
+
+#: iconv/iconv_charmap.c:143 iconv/iconv_prog.c:445
+#, c-format
+msgid "cannot open output file"
+msgstr "ne eblas malfermi eligan dosieron"
+
+#: iconv/iconv_charmap.c:189 iconv/iconv_prog.c:311
+#, c-format
+msgid "error while closing input `%s'"
+msgstr "eraro dum fermado de enigo «%s»"
+
+#: iconv/iconv_charmap.c:463
+#, c-format
+msgid "illegal input sequence at position %Zd"
+msgstr "nevalida eniga sekvenco je pozicio %Zd"
+
+#: iconv/iconv_charmap.c:482 iconv/iconv_prog.c:536
+#, c-format
+msgid "incomplete character or shift sequence at end of buffer"
+msgstr "nekompleta signo aÅ­ sekvenco je fino de bufro"
+
+#: iconv/iconv_charmap.c:527 iconv/iconv_charmap.c:563 iconv/iconv_prog.c:579
+#: iconv/iconv_prog.c:615
+#, c-format
+msgid "error while reading the input"
+msgstr "eraro dum legado de enigo"
+
+#: iconv/iconv_charmap.c:545 iconv/iconv_prog.c:597
+#, c-format
+msgid "unable to allocate buffer for input"
+msgstr "mankas sufiĉa memoro por eniga bufro"
+
+#: iconv/iconv_prog.c:59
+msgid "Input/Output format specification:"
+msgstr "Indiko de eniga/eliga aranÄo:"
+
+#: iconv/iconv_prog.c:60
+msgid "encoding of original text"
+msgstr "enkodigo de originala teksto"
+
+#: iconv/iconv_prog.c:61
+msgid "encoding for output"
+msgstr "enkodigo de eligo"
+
+# SIGINFO 29,-,- A synonym for SIGPWR
+#: iconv/iconv_prog.c:62
+msgid "Information:"
+msgstr "Informo:"
+
+#: iconv/iconv_prog.c:63
+msgid "list all known coded character sets"
+msgstr "listigi ĉiujn konatajn signarojn"
+
+#: iconv/iconv_prog.c:64 locale/programs/localedef.c:126
+msgid "Output control:"
+msgstr "Stiro de eligo:"
+
+#: iconv/iconv_prog.c:65
+msgid "omit invalid characters from output"
+msgstr "forlasi nevalidajn signojn de eligo"
+
+#: iconv/iconv_prog.c:66
+msgid "output file"
+msgstr "la eliga dosiero"
+
+#: iconv/iconv_prog.c:67
+msgid "suppress warnings"
+msgstr "forlasi avertojn"
+
+#: iconv/iconv_prog.c:68
+msgid "print progress information"
+msgstr "montri informon pri progreso"
+
+#: iconv/iconv_prog.c:73
+msgid "Convert encoding of given files from one encoding to another."
+msgstr "Konvertas la enkodigon de indikataj dosieroj de iu al alia."
+
+#: iconv/iconv_prog.c:77
+msgid "[FILE...]"
+msgstr "[DOSIERO...]"
+
+#: iconv/iconv_prog.c:233
+#, c-format
+msgid "conversions from `%s' and to `%s' are not supported"
+msgstr "konvertoj el «%s» kaj al «%s» ne subtenatas"
+
+#: iconv/iconv_prog.c:238
+#, c-format
+msgid "conversion from `%s' is not supported"
+msgstr "konverto el «%s» ne subtenatas"
+
+#: iconv/iconv_prog.c:245
+#, c-format
+msgid "conversion to `%s' is not supported"
+msgstr "konverto al «%s» ne subtenatas"
+
+#: iconv/iconv_prog.c:249
+#, c-format
+msgid "conversion from `%s' to `%s' is not supported"
+msgstr "konverto el «%s» al «%s» ne subtenatas"
+
+#: iconv/iconv_prog.c:259
+#, c-format
+msgid "failed to start conversion processing"
+msgstr "malsukcesis startigi konvertan procezadon"
+
+#: iconv/iconv_prog.c:357
+#, c-format
+msgid "error while closing output file"
+msgstr "eraro dum fermado de eliga dosiero"
+
+#: iconv/iconv_prog.c:455
+#, c-format
+msgid "conversion stopped due to problem in writing the output"
+msgstr "konverto haltis kaÅ­ze de problemo je skribado de eligo"
+
+#: iconv/iconv_prog.c:532
+#, c-format
+msgid "illegal input sequence at position %ld"
+msgstr "nevalida eniga sekvenco je pozicio %ld"
+
+#: iconv/iconv_prog.c:540
+#, c-format
+msgid "internal error (illegal descriptor)"
+msgstr "**interna programmiso** (nevalida dosiernumero)"
+
+#: iconv/iconv_prog.c:543
+#, c-format
+msgid "unknown iconv() error %d"
+msgstr "nekonata eraro %d de 'iconv()'"
+
+#: iconv/iconv_prog.c:788
+msgid ""
+"The following list contain all the coded character sets known. This does\n"
+"not necessarily mean that all combinations of these names can be used for\n"
+"the FROM and TO command line parameters. One coded character set can be\n"
+"listed with several different names (aliases).\n"
+"\n"
+" "
+msgstr ""
+
+#: iconv/iconvconfig.c:109
+msgid "Create fastloading iconv module configuration file."
+msgstr ""
+
+#: iconv/iconvconfig.c:113
+msgid "[DIR...]"
+msgstr ""
+
+#: iconv/iconvconfig.c:126
+msgid "Prefix used for all file accesses"
+msgstr ""
+
+#: iconv/iconvconfig.c:127
+msgid "Put output in FILE instead of installed location (--prefix does not apply to FILE)"
+msgstr ""
+
+#: iconv/iconvconfig.c:131
+msgid "Do not search standard directories, only those on the command line"
+msgstr ""
+
+#: iconv/iconvconfig.c:303
+#, c-format
+msgid "Directory arguments required when using --nostdlib"
+msgstr ""
+
+#: iconv/iconvconfig.c:345 locale/programs/localedef.c:287
+#, c-format
+msgid "no output file produced because warnings were issued"
+msgstr ""
+
+#: iconv/iconvconfig.c:431
+#, c-format
+msgid "while inserting in search tree"
+msgstr ""
+
+#: iconv/iconvconfig.c:1240
+#, c-format
+msgid "cannot generate output file"
+msgstr "ne eblas produkti eligan dosieron"
+
+#: inet/rcmd.c:163
+msgid "rcmd: Cannot allocate memory\n"
+msgstr "rcmd: Mankas sufiĉa memoro\n"
+
+#: inet/rcmd.c:178
+msgid "rcmd: socket: All ports in use\n"
+msgstr ""
+
+#: inet/rcmd.c:206
+#, c-format
+msgid "connect to address %s: "
+msgstr ""
+
+#: inet/rcmd.c:219
+#, c-format
+msgid "Trying %s...\n"
+msgstr ""
+
+#: inet/rcmd.c:255
+#, c-format
+msgid "rcmd: write (setting up stderr): %m\n"
+msgstr ""
+
+#: inet/rcmd.c:271
+#, c-format
+msgid "rcmd: poll (setting up stderr): %m\n"
+msgstr ""
+
+#: inet/rcmd.c:274
+msgid "poll: protocol failure in circuit setup\n"
+msgstr ""
+
+#: inet/rcmd.c:306
+msgid "socket: protocol failure in circuit setup\n"
+msgstr ""
+
+#: inet/rcmd.c:330
+#, c-format
+msgid "rcmd: %s: short read"
+msgstr ""
+
+#: inet/rcmd.c:486
+msgid "lstat failed"
+msgstr ""
+
+#: inet/rcmd.c:493
+msgid "cannot open"
+msgstr ""
+
+#: inet/rcmd.c:495
+msgid "fstat failed"
+msgstr ""
+
+#: inet/rcmd.c:497
+msgid "bad owner"
+msgstr ""
+
+#: inet/rcmd.c:499
+msgid "writeable by other than owner"
+msgstr ""
+
+#: inet/rcmd.c:501
+msgid "hard linked somewhere"
+msgstr ""
+
+#: inet/ruserpass.c:170 inet/ruserpass.c:193
+msgid "out of memory"
+msgstr "mankas sufiĉa memoro"
+
+#: inet/ruserpass.c:184
+msgid "Error: .netrc file is readable by others."
+msgstr ""
+
+#: inet/ruserpass.c:185
+msgid "Remove password or make file unreadable by others."
+msgstr ""
+
+#: inet/ruserpass.c:277
+#, c-format
+msgid "Unknown .netrc keyword %s"
+msgstr ""
+
+#: libidn/nfkc.c:462
+msgid "Character out of range for UTF-8"
+msgstr "Signo estas ekster gamo por UTF-8"
+
+#: locale/programs/charmap-dir.c:58
+#, c-format
+msgid "cannot read character map directory `%s'"
+msgstr ""
+
+#: locale/programs/charmap.c:137
+#, c-format
+msgid "character map file `%s' not found"
+msgstr ""
+
+#: locale/programs/charmap.c:194
+#, c-format
+msgid "default character map file `%s' not found"
+msgstr ""
+
+#: locale/programs/charmap.c:257
+#, c-format
+msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n"
+msgstr ""
+
+#: locale/programs/charmap.c:336
+#, c-format
+msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n"
+msgstr ""
+
+#: locale/programs/charmap.c:356 locale/programs/charmap.c:373
+#: locale/programs/repertoire.c:173
+#, c-format
+msgid "syntax error in prolog: %s"
+msgstr ""
+
+#: locale/programs/charmap.c:357
+msgid "invalid definition"
+msgstr "nevalida difino"
+
+#: locale/programs/charmap.c:374 locale/programs/locfile.c:125
+#: locale/programs/locfile.c:152 locale/programs/repertoire.c:174
+msgid "bad argument"
+msgstr ""
+
+#: locale/programs/charmap.c:402
+#, c-format
+msgid "duplicate definition of <%s>"
+msgstr ""
+
+#: locale/programs/charmap.c:409
+#, c-format
+msgid "value for <%s> must be 1 or greater"
+msgstr ""
+
+#: locale/programs/charmap.c:421
+#, c-format
+msgid "value of <%s> must be greater or equal than the value of <%s>"
+msgstr ""
+
+#: locale/programs/charmap.c:444 locale/programs/repertoire.c:182
+#, c-format
+msgid "argument to <%s> must be a single character"
+msgstr ""
+
+#: locale/programs/charmap.c:470
+msgid "character sets with locking states are not supported"
+msgstr ""
+
+#: locale/programs/charmap.c:497 locale/programs/charmap.c:551
+#: locale/programs/charmap.c:583 locale/programs/charmap.c:677
+#: locale/programs/charmap.c:732 locale/programs/charmap.c:773
+#: locale/programs/charmap.c:814
+#, c-format
+msgid "syntax error in %s definition: %s"
+msgstr ""
+
+#: locale/programs/charmap.c:498 locale/programs/charmap.c:678
+#: locale/programs/charmap.c:774 locale/programs/repertoire.c:229
+msgid "no symbolic name given"
+msgstr ""
+
+#: locale/programs/charmap.c:552
+msgid "invalid encoding given"
+msgstr ""
+
+#: locale/programs/charmap.c:561
+msgid "too few bytes in character encoding"
+msgstr ""
+
+#: locale/programs/charmap.c:563
+msgid "too many bytes in character encoding"
+msgstr ""
+
+#: locale/programs/charmap.c:585 locale/programs/charmap.c:733
+#: locale/programs/charmap.c:816 locale/programs/repertoire.c:295
+msgid "no symbolic name given for end of range"
+msgstr ""
+
+#: locale/programs/charmap.c:609 locale/programs/ld-address.c:601
+#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:3924
+#: locale/programs/ld-ctype.c:2255 locale/programs/ld-ctype.c:3006
+#: locale/programs/ld-identification.c:451
+#: locale/programs/ld-measurement.c:237 locale/programs/ld-messages.c:331
+#: locale/programs/ld-monetary.c:942 locale/programs/ld-name.c:306
+#: locale/programs/ld-numeric.c:367 locale/programs/ld-paper.c:240
+#: locale/programs/ld-telephone.c:312 locale/programs/ld-time.c:1220
+#: locale/programs/repertoire.c:312
+#, c-format
+msgid "%1$s: definition does not end with `END %1$s'"
+msgstr ""
+
+#: locale/programs/charmap.c:642
+msgid "only WIDTH definitions are allowed to follow the CHARMAP definition"
+msgstr ""
+
+#: locale/programs/charmap.c:650 locale/programs/charmap.c:713
+#, c-format
+msgid "value for %s must be an integer"
+msgstr ""
+
+#: locale/programs/charmap.c:841
+#, c-format
+msgid "%s: error in state machine"
+msgstr ""
+
+#: locale/programs/charmap.c:849 locale/programs/ld-address.c:617
+#: locale/programs/ld-collate.c:2763 locale/programs/ld-collate.c:4117
+#: locale/programs/ld-ctype.c:2252 locale/programs/ld-ctype.c:3023
+#: locale/programs/ld-identification.c:467
+#: locale/programs/ld-measurement.c:253 locale/programs/ld-messages.c:347
+#: locale/programs/ld-monetary.c:958 locale/programs/ld-name.c:322
+#: locale/programs/ld-numeric.c:383 locale/programs/ld-paper.c:256
+#: locale/programs/ld-telephone.c:328 locale/programs/ld-time.c:1236
+#: locale/programs/locfile.c:825 locale/programs/repertoire.c:323
+#, c-format
+msgid "%s: premature end of file"
+msgstr "%s: trofrua fino de dosiero"
+
+#: locale/programs/charmap.c:868 locale/programs/charmap.c:879
+#, c-format
+msgid "unknown character `%s'"
+msgstr "nekonata signo «%s»"
+
+#: locale/programs/charmap.c:887
+#, c-format
+msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"
+msgstr ""
+
+#: locale/programs/charmap.c:992 locale/programs/ld-collate.c:3043
+#: locale/programs/repertoire.c:418
+msgid "invalid names for character range"
+msgstr "nevalidaj nomoj por signogamo"
+
+#: locale/programs/charmap.c:1004 locale/programs/repertoire.c:430
+msgid "hexadecimal range format should use only capital characters"
+msgstr ""
+
+#: locale/programs/charmap.c:1022 locale/programs/repertoire.c:448
+#, c-format
+msgid "<%s> and <%s> are invalid names for range"
+msgstr ""
+
+#: locale/programs/charmap.c:1028 locale/programs/repertoire.c:455
+msgid "upper limit in range is smaller than lower limit"
+msgstr ""
+
+#: locale/programs/charmap.c:1086
+msgid "resulting bytes for range not representable."
+msgstr ""
+
+#: locale/programs/ld-address.c:134 locale/programs/ld-collate.c:1557
+#: locale/programs/ld-ctype.c:420 locale/programs/ld-identification.c:132
+#: locale/programs/ld-measurement.c:93 locale/programs/ld-messages.c:96
+#: locale/programs/ld-monetary.c:193 locale/programs/ld-name.c:93
+#: locale/programs/ld-numeric.c:97 locale/programs/ld-paper.c:90
+#: locale/programs/ld-telephone.c:93 locale/programs/ld-time.c:158
+#, c-format
+msgid "No definition for %s category found"
+msgstr ""
+
+#: locale/programs/ld-address.c:145 locale/programs/ld-address.c:183
+#: locale/programs/ld-address.c:201 locale/programs/ld-address.c:230
+#: locale/programs/ld-address.c:302 locale/programs/ld-address.c:321
+#: locale/programs/ld-address.c:334 locale/programs/ld-identification.c:145
+#: locale/programs/ld-measurement.c:104 locale/programs/ld-monetary.c:205
+#: locale/programs/ld-monetary.c:249 locale/programs/ld-monetary.c:265
+#: locale/programs/ld-monetary.c:277 locale/programs/ld-name.c:104
+#: locale/programs/ld-name.c:141 locale/programs/ld-numeric.c:111
+#: locale/programs/ld-numeric.c:125 locale/programs/ld-paper.c:101
+#: locale/programs/ld-paper.c:110 locale/programs/ld-telephone.c:104
+#: locale/programs/ld-telephone.c:161 locale/programs/ld-time.c:174
+#: locale/programs/ld-time.c:195
+#, c-format
+msgid "%s: field `%s' not defined"
+msgstr ""
+
+#: locale/programs/ld-address.c:157 locale/programs/ld-address.c:209
+#: locale/programs/ld-address.c:239 locale/programs/ld-address.c:277
+#: locale/programs/ld-name.c:116 locale/programs/ld-telephone.c:116
+#, c-format
+msgid "%s: field `%s' must not be empty"
+msgstr ""
+
+#: locale/programs/ld-address.c:169
+#, c-format
+msgid "%s: invalid escape `%%%c' sequence in field `%s'"
+msgstr ""
+
+#: locale/programs/ld-address.c:220
+#, c-format
+msgid "%s: terminology language code `%s' not defined"
+msgstr ""
+
+#: locale/programs/ld-address.c:245
+#, c-format
+msgid "%s: field `%s' must not be defined"
+msgstr ""
+
+#: locale/programs/ld-address.c:259 locale/programs/ld-address.c:288
+#, c-format
+msgid "%s: language abbreviation `%s' not defined"
+msgstr ""
+
+#: locale/programs/ld-address.c:266 locale/programs/ld-address.c:294
+#: locale/programs/ld-address.c:328 locale/programs/ld-address.c:340
+#, c-format
+msgid "%s: `%s' value does not match `%s' value"
+msgstr ""
+
+#: locale/programs/ld-address.c:313
+#, c-format
+msgid "%s: numeric country code `%d' not valid"
+msgstr ""
+
+#: locale/programs/ld-address.c:509 locale/programs/ld-address.c:546
+#: locale/programs/ld-address.c:584 locale/programs/ld-ctype.c:2630
+#: locale/programs/ld-identification.c:363
+#: locale/programs/ld-measurement.c:220 locale/programs/ld-messages.c:300
+#: locale/programs/ld-monetary.c:700 locale/programs/ld-monetary.c:735
+#: locale/programs/ld-monetary.c:776 locale/programs/ld-name.c:279
+#: locale/programs/ld-numeric.c:262 locale/programs/ld-paper.c:223
+#: locale/programs/ld-telephone.c:287 locale/programs/ld-time.c:1125
+#: locale/programs/ld-time.c:1167
+#, c-format
+msgid "%s: field `%s' declared more than once"
+msgstr ""
+
+#: locale/programs/ld-address.c:513 locale/programs/ld-address.c:551
+#: locale/programs/ld-identification.c:367 locale/programs/ld-messages.c:310
+#: locale/programs/ld-monetary.c:704 locale/programs/ld-monetary.c:739
+#: locale/programs/ld-name.c:283 locale/programs/ld-numeric.c:266
+#: locale/programs/ld-telephone.c:291 locale/programs/ld-time.c:1019
+#: locale/programs/ld-time.c:1088 locale/programs/ld-time.c:1130
+#, c-format
+msgid "%s: unknown character in field `%s'"
+msgstr ""
+
+#: locale/programs/ld-address.c:598 locale/programs/ld-collate.c:3922
+#: locale/programs/ld-ctype.c:3003 locale/programs/ld-identification.c:448
+#: locale/programs/ld-measurement.c:234 locale/programs/ld-messages.c:329
+#: locale/programs/ld-monetary.c:940 locale/programs/ld-name.c:304
+#: locale/programs/ld-numeric.c:365 locale/programs/ld-paper.c:238
+#: locale/programs/ld-telephone.c:310 locale/programs/ld-time.c:1218
+#, c-format
+msgid "%s: incomplete `END' line"
+msgstr ""
+
+#: locale/programs/ld-address.c:608 locale/programs/ld-collate.c:543
+#: locale/programs/ld-collate.c:595 locale/programs/ld-collate.c:891
+#: locale/programs/ld-collate.c:904 locale/programs/ld-collate.c:2732
+#: locale/programs/ld-collate.c:2753 locale/programs/ld-collate.c:4107
+#: locale/programs/ld-ctype.c:1984 locale/programs/ld-ctype.c:2242
+#: locale/programs/ld-ctype.c:2828 locale/programs/ld-ctype.c:3014
+#: locale/programs/ld-identification.c:458
+#: locale/programs/ld-measurement.c:244 locale/programs/ld-messages.c:338
+#: locale/programs/ld-monetary.c:949 locale/programs/ld-name.c:313
+#: locale/programs/ld-numeric.c:374 locale/programs/ld-paper.c:247
+#: locale/programs/ld-telephone.c:319 locale/programs/ld-time.c:1227
+#, c-format
+msgid "%s: syntax error"
+msgstr "%s: sintakseraro"
+
+#: locale/programs/ld-collate.c:418
+#, c-format
+msgid "`%.*s' already defined in charmap"
+msgstr ""
+
+#: locale/programs/ld-collate.c:427
+#, c-format
+msgid "`%.*s' already defined in repertoire"
+msgstr ""
+
+#: locale/programs/ld-collate.c:434
+#, c-format
+msgid "`%.*s' already defined as collating symbol"
+msgstr ""
+
+#: locale/programs/ld-collate.c:441
+#, c-format
+msgid "`%.*s' already defined as collating element"
+msgstr ""
+
+#: locale/programs/ld-collate.c:472 locale/programs/ld-collate.c:498
+#, c-format
+msgid "%s: `forward' and `backward' are mutually excluding each other"
+msgstr ""
+
+#: locale/programs/ld-collate.c:482 locale/programs/ld-collate.c:508
+#: locale/programs/ld-collate.c:524
+#, c-format
+msgid "%s: `%s' mentioned more than once in definition of weight %d"
+msgstr ""
+
+#: locale/programs/ld-collate.c:580
+#, c-format
+msgid "%s: too many rules; first entry only had %d"
+msgstr ""
+
+#: locale/programs/ld-collate.c:616
+#, c-format
+msgid "%s: not enough sorting rules"
+msgstr ""
+
+#: locale/programs/ld-collate.c:781
+#, c-format
+msgid "%s: empty weight string not allowed"
+msgstr ""
+
+#: locale/programs/ld-collate.c:876
+#, c-format
+msgid "%s: weights must use the same ellipsis symbol as the name"
+msgstr ""
+
+#: locale/programs/ld-collate.c:932
+#, c-format
+msgid "%s: too many values"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1052 locale/programs/ld-collate.c:1227
+#, c-format
+msgid "order for `%.*s' already defined at %s:%Zu"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1102
+#, c-format
+msgid "%s: the start and the end symbol of a range must stand for characters"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1129
+#, c-format
+msgid "%s: byte sequences of first and last character must have the same length"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1171
+#, c-format
+msgid "%s: byte sequence of first character of range is not lower than that of the last character"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1296
+#, c-format
+msgid "%s: symbolic range ellipsis must not directly follow `order_start'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1300
+#, c-format
+msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1320 locale/programs/ld-ctype.c:1501
+#, c-format
+msgid "`%s' and `%.*s' are not valid names for symbolic range"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1370 locale/programs/ld-collate.c:3858
+#, c-format
+msgid "%s: order for `%.*s' already defined at %s:%Zu"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1379
+#, c-format
+msgid "%s: `%s' must be a character"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1574
+#, c-format
+msgid "%s: `position' must be used for a specific level in all sections or none"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1599
+#, c-format
+msgid "symbol `%s' not defined"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1675 locale/programs/ld-collate.c:1781
+#, c-format
+msgid "symbol `%s' has the same encoding as"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1679 locale/programs/ld-collate.c:1785
+#, c-format
+msgid "symbol `%s'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1827
+#, c-format
+msgid "no definition of `UNDEFINED'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:1856
+#, c-format
+msgid "too many errors; giving up"
+msgstr ""
+
+#: locale/programs/ld-collate.c:2658 locale/programs/ld-collate.c:4046
+#, c-format
+msgid "%s: nested conditionals not supported"
+msgstr ""
+
+#: locale/programs/ld-collate.c:2676
+#, c-format
+msgid "%s: more then one 'else'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:2851
+#, c-format
+msgid "%s: duplicate definition of `%s'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:2887
+#, c-format
+msgid "%s: duplicate declaration of section `%s'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3023
+#, c-format
+msgid "%s: unknown character in collating symbol name"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3152
+#, c-format
+msgid "%s: unknown character in equivalent definition name"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3163
+#, c-format
+msgid "%s: unknown character in equivalent definition value"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3173
+#, c-format
+msgid "%s: unknown symbol `%s' in equivalent definition"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3182
+msgid "error while adding equivalent collating symbol"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3220
+#, c-format
+msgid "duplicate definition of script `%s'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3268
+#, c-format
+msgid "%s: unknown section name `%.*s'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3297
+#, c-format
+msgid "%s: multiple order definitions for section `%s'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3325
+#, c-format
+msgid "%s: invalid number of sorting rules"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3352
+#, c-format
+msgid "%s: multiple order definitions for unnamed section"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3407 locale/programs/ld-collate.c:3537
+#: locale/programs/ld-collate.c:3900
+#, c-format
+msgid "%s: missing `order_end' keyword"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3470
+#, c-format
+msgid "%s: order for collating symbol %.*s not yet defined"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3488
+#, c-format
+msgid "%s: order for collating element %.*s not yet defined"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3499
+#, c-format
+msgid "%s: cannot reorder after %.*s: symbol not known"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3551 locale/programs/ld-collate.c:3912
+#, c-format
+msgid "%s: missing `reorder-end' keyword"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3585 locale/programs/ld-collate.c:3783
+#, c-format
+msgid "%s: section `%.*s' not known"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3650
+#, c-format
+msgid "%s: bad symbol <%.*s>"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3846
+#, c-format
+msgid "%s: cannot have `%s' as end of ellipsis range"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3896
+#, c-format
+msgid "%s: empty category description not allowed"
+msgstr ""
+
+#: locale/programs/ld-collate.c:3915
+#, c-format
+msgid "%s: missing `reorder-sections-end' keyword"
+msgstr ""
+
+#: locale/programs/ld-collate.c:4079
+#, c-format
+msgid "%s: '%s' without matching 'ifdef' or 'ifndef'"
+msgstr ""
+
+#: locale/programs/ld-collate.c:4097
+#, c-format
+msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:439
+#, c-format
+msgid "No character set name specified in charmap"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:468
+#, c-format
+msgid "character L'\\u%0*x' in class `%s' must be in class `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:483
+#, c-format
+msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:497 locale/programs/ld-ctype.c:555
+#, c-format
+msgid "internal error in %s, line %u"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:526
+#, c-format
+msgid "character '%s' in class `%s' must be in class `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:542
+#, c-format
+msgid "character '%s' in class `%s' must not be in class `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:572 locale/programs/ld-ctype.c:610
+#, c-format
+msgid "<SP> character not in class `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:584 locale/programs/ld-ctype.c:621
+#, c-format
+msgid "<SP> character must not be in class `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:599
+#, c-format
+msgid "character <SP> not defined in character map"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:735
+#, c-format
+msgid "`digit' category has not entries in groups of ten"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:784
+#, c-format
+msgid "no input digits defined and none of the standard names in the charmap"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:849
+#, c-format
+msgid "not all characters used in `outdigit' are available in the charmap"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:866
+#, c-format
+msgid "not all characters used in `outdigit' are available in the repertoire"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1269
+#, c-format
+msgid "character class `%s' already defined"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1275
+#, c-format
+msgid "implementation limit: no more than %Zd character classes allowed"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1301
+#, c-format
+msgid "character map `%s' already defined"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1307
+#, c-format
+msgid "implementation limit: no more than %d character maps allowed"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1572 locale/programs/ld-ctype.c:1697
+#: locale/programs/ld-ctype.c:1803 locale/programs/ld-ctype.c:2493
+#: locale/programs/ld-ctype.c:3489
+#, c-format
+msgid "%s: field `%s' does not contain exactly ten entries"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1600 locale/programs/ld-ctype.c:2174
+#, c-format
+msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1727
+msgid "start and end character sequence of range must have the same length"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:1734
+msgid "to-value character sequence is smaller than from-value sequence"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2094 locale/programs/ld-ctype.c:2145
+msgid "premature end of `translit_ignore' definition"
+msgstr "trofrua fino de difino de 'translit_ignore'"
+
+#: locale/programs/ld-ctype.c:2100 locale/programs/ld-ctype.c:2151
+#: locale/programs/ld-ctype.c:2193
+msgid "syntax error"
+msgstr "sintakseraro"
+
+#: locale/programs/ld-ctype.c:2326
+#, c-format
+msgid "%s: syntax error in definition of new character class"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2341
+#, c-format
+msgid "%s: syntax error in definition of new character map"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2515
+msgid "ellipsis range must be marked by two operands of same type"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2524
+msgid "with symbolic name range values the absolute ellipsis `...' must not be used"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2539
+msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2553
+msgid "with character code range values one must use the absolute ellipsis `...'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2704
+#, c-format
+msgid "duplicated definition for mapping `%s'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2790 locale/programs/ld-ctype.c:2934
+#, c-format
+msgid "%s: `translit_start' section does not end with `translit_end'"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2885
+#, c-format
+msgid "%s: duplicate `default_missing' definition"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2890
+msgid "previous definition was here"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:2912
+#, c-format
+msgid "%s: no representable `default_missing' definition found"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3065 locale/programs/ld-ctype.c:3149
+#: locale/programs/ld-ctype.c:3169 locale/programs/ld-ctype.c:3190
+#: locale/programs/ld-ctype.c:3211 locale/programs/ld-ctype.c:3232
+#: locale/programs/ld-ctype.c:3253 locale/programs/ld-ctype.c:3293
+#: locale/programs/ld-ctype.c:3314 locale/programs/ld-ctype.c:3381
+#: locale/programs/ld-ctype.c:3423 locale/programs/ld-ctype.c:3448
+#, c-format
+msgid "%s: character `%s' not defined while needed as default value"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3070 locale/programs/ld-ctype.c:3154
+#: locale/programs/ld-ctype.c:3174 locale/programs/ld-ctype.c:3195
+#: locale/programs/ld-ctype.c:3216 locale/programs/ld-ctype.c:3237
+#: locale/programs/ld-ctype.c:3258 locale/programs/ld-ctype.c:3298
+#: locale/programs/ld-ctype.c:3319 locale/programs/ld-ctype.c:3386
+#, c-format
+msgid "%s: character `%s' in charmap not representable with one byte"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3430 locale/programs/ld-ctype.c:3455
+#, c-format
+msgid "%s: character `%s' needed as default value not representable with one byte"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3511
+#, c-format
+msgid "no output digits defined and none of the standard names in the charmap"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3802
+#, c-format
+msgid "%s: transliteration data from locale `%s' not available"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3903
+#, c-format
+msgid "%s: table for class \"%s\": %lu bytes\n"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:3972
+#, c-format
+msgid "%s: table for map \"%s\": %lu bytes\n"
+msgstr ""
+
+#: locale/programs/ld-ctype.c:4105
+#, c-format
+msgid "%s: table for width: %lu bytes\n"
+msgstr ""
+
+#: locale/programs/ld-identification.c:169
+#, c-format
+msgid "%s: no identification for category `%s'"
+msgstr ""
+
+#: locale/programs/ld-identification.c:434
+#, c-format
+msgid "%s: duplicate category version definition"
+msgstr ""
+
+#: locale/programs/ld-measurement.c:112
+#, c-format
+msgid "%s: invalid value for field `%s'"
+msgstr ""
+
+#: locale/programs/ld-messages.c:113 locale/programs/ld-messages.c:147
+#, c-format
+msgid "%s: field `%s' undefined"
+msgstr ""
+
+#: locale/programs/ld-messages.c:120 locale/programs/ld-messages.c:154
+#: locale/programs/ld-monetary.c:255 locale/programs/ld-numeric.c:117
+#, c-format
+msgid "%s: value for field `%s' must not be an empty string"
+msgstr ""
+
+#: locale/programs/ld-messages.c:136 locale/programs/ld-messages.c:170
+#, c-format
+msgid "%s: no correct regular expression for field `%s': %s"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:223
+#, c-format
+msgid "%s: value of field `int_curr_symbol' has wrong length"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:236
+#, c-format
+msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:284 locale/programs/ld-monetary.c:314
+#, c-format
+msgid "%s: value for field `%s' must be in range %d...%d"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:746 locale/programs/ld-numeric.c:273
+#, c-format
+msgid "%s: value for field `%s' must be a single character"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:843 locale/programs/ld-numeric.c:317
+#, c-format
+msgid "%s: `-1' must be last entry in `%s' field"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:865 locale/programs/ld-numeric.c:334
+#, c-format
+msgid "%s: values for field `%s' must be smaller than 127"
+msgstr ""
+
+#: locale/programs/ld-monetary.c:908
+msgid "conversion rate value cannot be zero"
+msgstr ""
+
+#: locale/programs/ld-name.c:128 locale/programs/ld-telephone.c:125
+#: locale/programs/ld-telephone.c:148
+#, c-format
+msgid "%s: invalid escape sequence in field `%s'"
+msgstr ""
+
+#: locale/programs/ld-time.c:246
+#, c-format
+msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'"
+msgstr ""
+
+#: locale/programs/ld-time.c:257
+#, c-format
+msgid "%s: direction flag in string %Zd in `era' field is not a single character"
+msgstr ""
+
+#: locale/programs/ld-time.c:270
+#, c-format
+msgid "%s: invalid number for offset in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:278
+#, c-format
+msgid "%s: garbage at end of offset value in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:329
+#, c-format
+msgid "%s: invalid starting date in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:338
+#, c-format
+msgid "%s: garbage at end of starting date in string %Zd in `era' field "
+msgstr ""
+
+#: locale/programs/ld-time.c:357
+#, c-format
+msgid "%s: starting date is invalid in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:406 locale/programs/ld-time.c:434
+#, c-format
+msgid "%s: invalid stopping date in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:415
+#, c-format
+msgid "%s: garbage at end of stopping date in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:443
+#, c-format
+msgid "%s: missing era name in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:455
+#, c-format
+msgid "%s: missing era format in string %Zd in `era' field"
+msgstr ""
+
+#: locale/programs/ld-time.c:496
+#, c-format
+msgid "%s: third operand for value of field `%s' must not be larger than %d"
+msgstr ""
+
+#: locale/programs/ld-time.c:504 locale/programs/ld-time.c:512
+#: locale/programs/ld-time.c:520
+#, c-format
+msgid "%s: values for field `%s' must not be larger than %d"
+msgstr ""
+
+#: locale/programs/ld-time.c:1003
+#, c-format
+msgid "%s: too few values for field `%s'"
+msgstr ""
+
+#: locale/programs/ld-time.c:1048
+msgid "extra trailing semicolon"
+msgstr ""
+
+#: locale/programs/ld-time.c:1051
+#, c-format
+msgid "%s: too many values for field `%s'"
+msgstr ""
+
+#: locale/programs/linereader.c:129
+msgid "trailing garbage at end of line"
+msgstr ""
+
+#: locale/programs/linereader.c:297
+msgid "garbage at end of number"
+msgstr ""
+
+#: locale/programs/linereader.c:409
+msgid "garbage at end of character code specification"
+msgstr ""
+
+#: locale/programs/linereader.c:495
+msgid "unterminated symbolic name"
+msgstr "nefinita simbola nomo"
+
+#: locale/programs/linereader.c:622
+msgid "illegal escape sequence at end of string"
+msgstr ""
+
+# SIGTERM 15 Term Termination signal
+#: locale/programs/linereader.c:626 locale/programs/linereader.c:854
+msgid "unterminated string"
+msgstr "nefinita signoĉeno"
+
+#: locale/programs/linereader.c:668
+msgid "non-symbolic character value should not be used"
+msgstr ""
+
+#: locale/programs/linereader.c:815
+#, c-format
+msgid "symbol `%.*s' not in charmap"
+msgstr ""
+
+#: locale/programs/linereader.c:836
+#, c-format
+msgid "symbol `%.*s' not in repertoire map"
+msgstr ""
+
+#: locale/programs/locale-spec.c:130
+#, c-format
+msgid "unknown name \"%s\""
+msgstr "nekonata nomo \"%s\""
+
+#: locale/programs/locale.c:74
+msgid "System information:"
+msgstr ""
+
+#: locale/programs/locale.c:76
+msgid "Write names of available locales"
+msgstr ""
+
+#: locale/programs/locale.c:78
+msgid "Write names of available charmaps"
+msgstr ""
+
+#: locale/programs/locale.c:79
+msgid "Modify output format:"
+msgstr ""
+
+#: locale/programs/locale.c:80
+msgid "Write names of selected categories"
+msgstr ""
+
+#: locale/programs/locale.c:81
+msgid "Write names of selected keywords"
+msgstr ""
+
+#: locale/programs/locale.c:82
+msgid "Print more information"
+msgstr ""
+
+#: locale/programs/locale.c:87
+msgid "Get locale-specific information."
+msgstr ""
+
+#: locale/programs/locale.c:90
+msgid ""
+"NAME\n"
+"[-a|-m]"
+msgstr ""
+
+#: locale/programs/locale.c:194
+#, c-format
+msgid "Cannot set LC_CTYPE to default locale"
+msgstr ""
+
+#: locale/programs/locale.c:196
+#, c-format
+msgid "Cannot set LC_MESSAGES to default locale"
+msgstr ""
+
+#: locale/programs/locale.c:209
+#, c-format
+msgid "Cannot set LC_COLLATE to default locale"
+msgstr ""
+
+#: locale/programs/locale.c:225
+#, c-format
+msgid "Cannot set LC_ALL to default locale"
+msgstr ""
+
+#: locale/programs/locale.c:518
+#, c-format
+msgid "while preparing output"
+msgstr ""
+
+#: locale/programs/localedef.c:119
+msgid "Input Files:"
+msgstr ""
+
+#: locale/programs/localedef.c:121
+msgid "Symbolic character names defined in FILE"
+msgstr ""
+
+#: locale/programs/localedef.c:122
+msgid "Source definitions are found in FILE"
+msgstr ""
+
+#: locale/programs/localedef.c:124
+msgid "FILE contains mapping from symbolic names to UCS4 values"
+msgstr ""
+
+#: locale/programs/localedef.c:128
+msgid "Create output even if warning messages were issued"
+msgstr ""
+
+#: locale/programs/localedef.c:129
+msgid "Create old-style tables"
+msgstr ""
+
+#: locale/programs/localedef.c:130
+msgid "Optional output file prefix"
+msgstr ""
+
+#: locale/programs/localedef.c:131
+msgid "Be strictly POSIX conform"
+msgstr ""
+
+#: locale/programs/localedef.c:133
+msgid "Suppress warnings and information messages"
+msgstr ""
+
+#: locale/programs/localedef.c:134
+msgid "Print more messages"
+msgstr ""
+
+#: locale/programs/localedef.c:135
+msgid "Archive control:"
+msgstr ""
+
+#: locale/programs/localedef.c:137
+msgid "Don't add new data to archive"
+msgstr ""
+
+#: locale/programs/localedef.c:139
+msgid "Add locales named by parameters to archive"
+msgstr ""
+
+#: locale/programs/localedef.c:140
+msgid "Replace existing archive content"
+msgstr ""
+
+#: locale/programs/localedef.c:142
+msgid "Remove locales named by parameters from archive"
+msgstr ""
+
+#: locale/programs/localedef.c:143
+msgid "List content of archive"
+msgstr ""
+
+#: locale/programs/localedef.c:145
+msgid "locale.alias file to consult when making archive"
+msgstr ""
+
+#: locale/programs/localedef.c:150
+msgid "Compile locale specification"
+msgstr ""
+
+#: locale/programs/localedef.c:153
+msgid ""
+"NAME\n"
+"[--add-to-archive|--delete-from-archive] FILE...\n"
+"--list-archive [FILE]"
+msgstr ""
+
+#: locale/programs/localedef.c:228
+#, c-format
+msgid "cannot create directory for output files"
+msgstr ""
+
+#: locale/programs/localedef.c:239
+#, c-format
+msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'"
+msgstr ""
+
+#: locale/programs/localedef.c:253 locale/programs/localedef.c:269
+#: locale/programs/localedef.c:595 locale/programs/localedef.c:615
+#, c-format
+msgid "cannot open locale definition file `%s'"
+msgstr ""
+
+#: locale/programs/localedef.c:281
+#, c-format
+msgid "cannot write output files to `%s'"
+msgstr "ne eblas skribi eligajn dosierojn al '%s'"
+
+#: locale/programs/localedef.c:362
+#, c-format
+msgid ""
+"System's directory for character maps : %s\n"
+"\t\t repertoire maps: %s\n"
+"\t\t locale path : %s\n"
+"%s"
+msgstr ""
+
+#: locale/programs/localedef.c:563
+#, c-format
+msgid "circular dependencies between locale definitions"
+msgstr ""
+
+#: locale/programs/localedef.c:569
+#, c-format
+msgid "cannot add already read locale `%s' a second time"
+msgstr ""
+
+#: locale/programs/locarchive.c:113 locale/programs/locarchive.c:347
+#: nss/makedb.c:289
+#, c-format
+msgid "cannot create temporary file"
+msgstr ""
+
+#: locale/programs/locarchive.c:143 locale/programs/locarchive.c:393
+#, c-format
+msgid "cannot initialize archive file"
+msgstr ""
+
+#: locale/programs/locarchive.c:150 locale/programs/locarchive.c:400
+#, c-format
+msgid "cannot resize archive file"
+msgstr ""
+
+#: locale/programs/locarchive.c:163 locale/programs/locarchive.c:413
+#: locale/programs/locarchive.c:619
+#, c-format
+msgid "cannot map archive header"
+msgstr ""
+
+#: locale/programs/locarchive.c:185
+#, c-format
+msgid "failed to create new locale archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:197
+#, c-format
+msgid "cannot change mode of new locale archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:296
+#, c-format
+msgid "cannot read data from locale archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:327
+#, c-format
+msgid "cannot map locale archive file"
+msgstr ""
+
+#: locale/programs/locarchive.c:421
+#, c-format
+msgid "cannot lock new archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:485
+#, c-format
+msgid "cannot extend locale archive file"
+msgstr ""
+
+#: locale/programs/locarchive.c:494
+#, c-format
+msgid "cannot change mode of resized locale archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:502
+#, c-format
+msgid "cannot rename new archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:555
+#, c-format
+msgid "cannot open locale archive \"%s\""
+msgstr ""
+
+#: locale/programs/locarchive.c:560
+#, c-format
+msgid "cannot stat locale archive \"%s\""
+msgstr ""
+
+#: locale/programs/locarchive.c:579
+#, c-format
+msgid "cannot lock locale archive \"%s\""
+msgstr ""
+
+#: locale/programs/locarchive.c:602
+#, c-format
+msgid "cannot read archive header"
+msgstr ""
+
+#: locale/programs/locarchive.c:666
+#, c-format
+msgid "locale '%s' already exists"
+msgstr ""
+
+#: locale/programs/locarchive.c:928 locale/programs/locarchive.c:943
+#: locale/programs/locarchive.c:955 locale/programs/locarchive.c:967
+#: locale/programs/locfile.c:343
+#, c-format
+msgid "cannot add to locale archive"
+msgstr ""
+
+#: locale/programs/locarchive.c:1125
+#, c-format
+msgid "locale alias file `%s' not found"
+msgstr ""
+
+#: locale/programs/locarchive.c:1275
+#, c-format
+msgid "Adding %s\n"
+msgstr ""
+
+#: locale/programs/locarchive.c:1281
+#, c-format
+msgid "stat of \"%s\" failed: %s: ignored"
+msgstr ""
+
+#: locale/programs/locarchive.c:1287
+#, c-format
+msgid "\"%s\" is no directory; ignored"
+msgstr ""
+
+#: locale/programs/locarchive.c:1294
+#, c-format
+msgid "cannot open directory \"%s\": %s: ignored"
+msgstr ""
+
+#: locale/programs/locarchive.c:1366
+#, c-format
+msgid "incomplete set of locale files in \"%s\""
+msgstr ""
+
+#: locale/programs/locarchive.c:1430
+#, c-format
+msgid "cannot read all files in \"%s\": ignored"
+msgstr ""
+
+#: locale/programs/locarchive.c:1500
+#, c-format
+msgid "locale \"%s\" not in archive"
+msgstr ""
+
+#: locale/programs/locfile.c:131
+#, c-format
+msgid "argument to `%s' must be a single character"
+msgstr ""
+
+#: locale/programs/locfile.c:251
+msgid "syntax error: not inside a locale definition section"
+msgstr ""
+
+#: locale/programs/locfile.c:625
+#, c-format
+msgid "cannot open output file `%s' for category `%s'"
+msgstr ""
+
+#: locale/programs/locfile.c:649
+#, c-format
+msgid "failure while writing data for category `%s'"
+msgstr ""
+
+#: locale/programs/locfile.c:745
+#, c-format
+msgid "cannot create output file `%s' for category `%s'"
+msgstr ""
+
+#: locale/programs/locfile.c:781
+msgid "expecting string argument for `copy'"
+msgstr ""
+
+#: locale/programs/locfile.c:785
+msgid "locale name should consist only of portable characters"
+msgstr ""
+
+#: locale/programs/locfile.c:804
+msgid "no other keyword shall be specified when `copy' is used"
+msgstr ""
+
+#: locale/programs/locfile.c:818
+#, c-format
+msgid "`%1$s' definition does not end with `END %1$s'"
+msgstr ""
+
+#: locale/programs/repertoire.c:228 locale/programs/repertoire.c:269
+#: locale/programs/repertoire.c:294
+#, c-format
+msgid "syntax error in repertoire map definition: %s"
+msgstr ""
+
+#: locale/programs/repertoire.c:270
+msgid "no <Uxxxx> or <Uxxxxxxxx> value given"
+msgstr ""
+
+#: locale/programs/repertoire.c:330
+#, c-format
+msgid "cannot save new repertoire map"
+msgstr ""
+
+#: locale/programs/repertoire.c:341
+#, c-format
+msgid "repertoire map file `%s' not found"
+msgstr ""
+
+#: login/programs/pt_chown.c:77
+#, c-format
+msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n"
+msgstr ""
+
+#: login/programs/pt_chown.c:87
+#, c-format
+msgid ""
+"The owner is set to the current user, the group is set to `%s', and the access permission is set to `%o'.\n"
+"\n"
+"%s"
+msgstr ""
+
+#: login/programs/pt_chown.c:191
+#, c-format
+msgid "too many arguments"
+msgstr "tro multaj argumentoj"
+
+#: login/programs/pt_chown.c:199
+#, c-format
+msgid "needs to be installed setuid `root'"
+msgstr ""
+
+#: malloc/mcheck.c:349
+msgid "memory is consistent, library is buggy\n"
+msgstr ""
+
+#: malloc/mcheck.c:352
+msgid "memory clobbered before allocated block\n"
+msgstr ""
+
+#: malloc/mcheck.c:355
+msgid "memory clobbered past end of allocated block\n"
+msgstr ""
+
+#: malloc/mcheck.c:358
+msgid "block freed twice\n"
+msgstr ""
+
+#: malloc/mcheck.c:361
+msgid "bogus mcheck_status, library is buggy\n"
+msgstr ""
+
+#: malloc/memusage.sh:32
+msgid "%s: option '%s' requires an argument\\n"
+msgstr "%s: opcio «%s» bezonas argumenton\\n"
+
+#: malloc/memusage.sh:38
+msgid ""
+"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...\n"
+"Profile memory usage of PROGRAM.\n"
+"\n"
+" -n,--progname=NAME Name of the program file to profile\n"
+" -p,--png=FILE Generate PNG graphic and store it in FILE\n"
+" -d,--data=FILE Generate binary data file and store it in FILE\n"
+" -u,--unbuffered Don't buffer output\n"
+" -b,--buffer=SIZE Collect SIZE entries before writing them out\n"
+" --no-timer Don't collect additional information through timer\n"
+" -m,--mmap Also trace mmap & friends\n"
+"\n"
+" -?,--help Print this help and exit\n"
+" --usage Give a short usage message\n"
+" -V,--version Print version information and exit\n"
+"\n"
+" The following options only apply when generating graphical output:\n"
+" -t,--time-based Make graph linear in time\n"
+" -T,--total Also draw graph of total memory use\n"
+" --title=STRING Use STRING as title of the graph\n"
+" -x,--x-size=SIZE Make graphic SIZE pixels wide\n"
+" -y,--y-size=SIZE Make graphic SIZE pixels high\n"
+"\n"
+"Mandatory arguments to long options are also mandatory for any corresponding\n"
+"short options.\n"
+"\n"
+msgstr ""
+
+#: malloc/memusage.sh:100
+msgid ""
+"Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
+"\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
+"\t PROGRAM [PROGRAMOPTION]..."
+msgstr ""
+
+#: malloc/memusage.sh:192
+msgid "memusage: option \\`${1##*=}' is ambiguous"
+msgstr "memusage: opcio «${1##*=}» estas plursenca"
+
+#: malloc/memusage.sh:201
+msgid "memusage: unrecognized option \\`$1'"
+msgstr "memusage: nekonata opcio «$1»"
+
+#: malloc/memusage.sh:214
+msgid "No program name given"
+msgstr "programnomo ne indikatas"
+
+#: malloc/memusagestat.c:56
+msgid "Name output file"
+msgstr ""
+
+#: malloc/memusagestat.c:57
+msgid "Title string used in output graphic"
+msgstr ""
+
+#: malloc/memusagestat.c:58
+msgid "Generate output linear to time (default is linear to number of function calls)"
+msgstr ""
+
+#: malloc/memusagestat.c:60
+msgid "Also draw graph for total memory consumption"
+msgstr ""
+
+#: malloc/memusagestat.c:61
+msgid "Make output graphic VALUE pixels wide"
+msgstr ""
+
+#: malloc/memusagestat.c:62
+msgid "Make output graphic VALUE pixels high"
+msgstr ""
+
+#: malloc/memusagestat.c:67
+msgid "Generate graphic from memory profiling data"
+msgstr ""
+
+#: malloc/memusagestat.c:70
+msgid "DATAFILE [OUTFILE]"
+msgstr ""
+
+#: misc/error.c:117
+msgid "Unknown system error"
+msgstr "Nekonata sistemeraro"
+
+#: nis/nis_callback.c:188
+msgid "unable to free arguments"
+msgstr ""
+
+#: nis/nis_error.h:1 nis/ypclnt.c:832 nis/ypclnt.c:920 posix/regcomp.c:131
+#: sysdeps/gnu/errlist.c:20
+msgid "Success"
+msgstr "Sukceso"
+
+#: nis/nis_error.h:2
+msgid "Probable success"
+msgstr "Probabla sukceso"
+
+#: nis/nis_error.h:3
+msgid "Not found"
+msgstr "Ne troviÄas"
+
+#: nis/nis_error.h:4
+msgid "Probably not found"
+msgstr "Probable ne troviÄas"
+
+#: nis/nis_error.h:5
+msgid "Cache expired"
+msgstr "KaÅmemoro kadukiÄis"
+
+#: nis/nis_error.h:6
+msgid "NIS+ servers unreachable"
+msgstr "NIS+-serviloj ne atingeblas"
+
+#: nis/nis_error.h:7
+msgid "Unknown object"
+msgstr "Nekonata objekto"
+
+#: nis/nis_error.h:8
+#, fuzzy
+msgid "Server busy, try again"
+msgstr "Servilo okupiÄas; reprovu poste"
+
+#: nis/nis_error.h:9
+#, fuzzy
+msgid "Generic system error"
+msgstr "Äœenerala sistemeraro"
+
+#: nis/nis_error.h:10
+msgid "First/next chain broken"
+msgstr "Unua/sekva-ĉeno estas rompita"
+
+#. TRANS Permission denied; the file permissions do not allow the attempted operation.
+#: nis/nis_error.h:11 nis/ypclnt.c:877 sysdeps/gnu/errlist.c:157
+msgid "Permission denied"
+msgstr "Mankas permeso"
+
+#: nis/nis_error.h:12
+msgid "Not owner"
+msgstr "Ne estas posedanto"
+
+#: nis/nis_error.h:13
+#, fuzzy
+msgid "Name not served by this server"
+msgstr "Nomo ne doniÄas per ĉi tiu servilo"
+
+#: nis/nis_error.h:14
+msgid "Server out of memory"
+msgstr "Mankas sufiĉa memoro je servilo"
+
+#: nis/nis_error.h:15
+msgid "Object with same name exists"
+msgstr "Objekto kun tiu nomo jam ekzistas"
+
+#: nis/nis_error.h:16
+msgid "Not master server for this domain"
+msgstr "Ne estas ĉefa servilo por ĉi tiu domajno"
+
+#: nis/nis_error.h:17
+msgid "Invalid object for operation"
+msgstr "Nevalida objekto por operacio"
+
+#: nis/nis_error.h:18
+msgid "Malformed name, or illegal name"
+msgstr "Malformita nomo aÅ­ nevalida nomo"
+
+#: nis/nis_error.h:19
+#, fuzzy
+msgid "Unable to create callback"
+msgstr "Malsukcesis krei realvokon"
+
+#: nis/nis_error.h:20
+#, fuzzy
+msgid "Results sent to callback proc"
+msgstr "Rezultoj sendiÄis al realvokan procezon"
+
+#: nis/nis_error.h:21
+msgid "Not found, no such name"
+msgstr "Ne troviÄas; tiu nomo ne ekzistas"
+
+#: nis/nis_error.h:22
+#, fuzzy
+msgid "Name/entry isn't unique"
+msgstr "Nomo/... ne estas unika"
+
+#: nis/nis_error.h:23
+msgid "Modification failed"
+msgstr "Malsukcesis modifo"
+
+#: nis/nis_error.h:24
+msgid "Database for table does not exist"
+msgstr ""
+
+#: nis/nis_error.h:25
+msgid "Entry/table type mismatch"
+msgstr ""
+
+#: nis/nis_error.h:26
+msgid "Link points to illegal name"
+msgstr "Ligo indikas nevalidan nomon"
+
+#: nis/nis_error.h:27
+msgid "Partial success"
+msgstr "Parta sukceso"
+
+#: nis/nis_error.h:28
+msgid "Too many attributes"
+msgstr "Tro multaj atributoj"
+
+#: nis/nis_error.h:29
+msgid "Error in RPC subsystem"
+msgstr ""
+
+#: nis/nis_error.h:30
+msgid "Missing or malformed attribute"
+msgstr ""
+
+#: nis/nis_error.h:31
+msgid "Named object is not searchable"
+msgstr ""
+
+#: nis/nis_error.h:32
+#, fuzzy
+msgid "Error while talking to callback proc"
+msgstr "Eraro dum komunikado kun realvoka procezo"
+
+#: nis/nis_error.h:33
+msgid "Non NIS+ namespace encountered"
+msgstr ""
+
+#: nis/nis_error.h:34
+msgid "Illegal object type for operation"
+msgstr "Nevalida objekttipo por operacio"
+
+#: nis/nis_error.h:35
+msgid "Passed object is not the same object on server"
+msgstr ""
+
+#: nis/nis_error.h:36
+msgid "Modify operation failed"
+msgstr "Malsukcesis modifa operacio"
+
+#: nis/nis_error.h:37
+msgid "Query illegal for named table"
+msgstr ""
+
+#: nis/nis_error.h:38
+msgid "Attempt to remove a non-empty table"
+msgstr ""
+
+#: nis/nis_error.h:39
+msgid "Error in accessing NIS+ cold start file. Is NIS+ installed?"
+msgstr ""
+
+#: nis/nis_error.h:40
+msgid "Full resync required for directory"
+msgstr ""
+
+#: nis/nis_error.h:41
+msgid "NIS+ operation failed"
+msgstr "Malsukcesis NIS+-operacio"
+
+#: nis/nis_error.h:42
+msgid "NIS+ service is unavailable or not installed"
+msgstr ""
+
+#: nis/nis_error.h:43
+msgid "Yes, 42 is the meaning of life"
+msgstr "Jes, 42 estas la senco de la vivo"
+
+#: nis/nis_error.h:44
+msgid "Unable to authenticate NIS+ server"
+msgstr ""
+
+#: nis/nis_error.h:45
+msgid "Unable to authenticate NIS+ client"
+msgstr ""
+
+#: nis/nis_error.h:46
+msgid "No file space on server"
+msgstr "Mankas spaco por dosieroj je servilo"
+
+#: nis/nis_error.h:47
+msgid "Unable to create process on server"
+msgstr "Malsukcesis krei procezon je servilo"
+
+#: nis/nis_error.h:48
+msgid "Master server busy, full dump rescheduled."
+msgstr ""
+
+#: nis/nis_local_names.c:121
+#, c-format
+msgid "LOCAL entry for UID %d in directory %s not unique\n"
+msgstr ""
+
+#: nis/nis_print.c:50
+msgid "UNKNOWN"
+msgstr "NEKONATA"
+
+#: nis/nis_print.c:108
+msgid "BOGUS OBJECT\n"
+msgstr "FALSA OBJEKTO\n"
+
+#: nis/nis_print.c:111
+msgid "NO OBJECT\n"
+msgstr "NENIU OBJEKTO\n"
+
+#: nis/nis_print.c:114
+msgid "DIRECTORY\n"
+msgstr "DOSIERUJO\n"
+
+#: nis/nis_print.c:117
+msgid "GROUP\n"
+msgstr "GRUPO\n"
+
+#: nis/nis_print.c:120
+msgid "TABLE\n"
+msgstr "TABELO\n"
+
+#: nis/nis_print.c:123
+msgid "ENTRY\n"
+msgstr "ERO\n"
+
+#: nis/nis_print.c:126
+msgid "LINK\n"
+msgstr "LIGO\n"
+
+#: nis/nis_print.c:129
+msgid "PRIVATE\n"
+msgstr "PRIVATA\n"
+
+#: nis/nis_print.c:132
+msgid "(Unknown object)\n"
+msgstr "(Nekonata objekto)\n"
+
+#: nis/nis_print.c:166
+#, c-format
+msgid "Name : `%s'\n"
+msgstr "Nomo : «%s»\n"
+
+#: nis/nis_print.c:167
+#, c-format
+msgid "Type : %s\n"
+msgstr "Tipo : %s\n"
+
+#: nis/nis_print.c:172
+msgid "Master Server :\n"
+msgstr "Ĉefa servilo :\n"
+
+#: nis/nis_print.c:174
+msgid "Replicate :\n"
+msgstr ""
+
+#: nis/nis_print.c:175
+#, c-format
+msgid "\tName : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:176
+msgid "\tPublic Key : "
+msgstr ""
+
+#: nis/nis_print.c:180
+msgid "None.\n"
+msgstr "Nenia.\n"
+
+#: nis/nis_print.c:183
+#, c-format
+msgid "Diffie-Hellmann (%d bits)\n"
+msgstr "Diffie-Hellmann (%d bitoj)\n"
+
+#: nis/nis_print.c:188
+#, c-format
+msgid "RSA (%d bits)\n"
+msgstr "RSA (%d bitoj)\n"
+
+#: nis/nis_print.c:191
+msgid "Kerberos.\n"
+msgstr "Kerberos.\n"
+
+#: nis/nis_print.c:194
+#, c-format
+msgid "Unknown (type = %d, bits = %d)\n"
+msgstr "Nekonata (tipo = %d, bitoj = %d)\n"
+
+#: nis/nis_print.c:205
+#, c-format
+msgid "\tUniversal addresses (%u)\n"
+msgstr ""
+
+#: nis/nis_print.c:227
+msgid "Time to live : "
+msgstr ""
+
+#: nis/nis_print.c:229
+msgid "Default Access rights :\n"
+msgstr ""
+
+#: nis/nis_print.c:238
+#, c-format
+msgid "\tType : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:239
+msgid "\tAccess rights: "
+msgstr ""
+
+#: nis/nis_print.c:253
+msgid "Group Flags :"
+msgstr ""
+
+#: nis/nis_print.c:256
+msgid ""
+"\n"
+"Group Members :\n"
+msgstr ""
+
+#: nis/nis_print.c:268
+#, c-format
+msgid "Table Type : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:269
+#, c-format
+msgid "Number of Columns : %d\n"
+msgstr ""
+
+#: nis/nis_print.c:270
+#, c-format
+msgid "Character Separator : %c\n"
+msgstr ""
+
+#: nis/nis_print.c:271
+#, c-format
+msgid "Search Path : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:272
+msgid "Columns :\n"
+msgstr ""
+
+#: nis/nis_print.c:275
+#, c-format
+msgid "\t[%d]\tName : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:277
+msgid "\t\tAttributes : "
+msgstr ""
+
+#: nis/nis_print.c:279
+msgid "\t\tAccess Rights : "
+msgstr ""
+
+#: nis/nis_print.c:289
+msgid "Linked Object Type : "
+msgstr ""
+
+#: nis/nis_print.c:291
+#, c-format
+msgid "Linked to : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:301
+#, c-format
+msgid "\tEntry data of type %s\n"
+msgstr ""
+
+#: nis/nis_print.c:304
+#, c-format
+msgid "\t[%u] - [%u bytes] "
+msgstr ""
+
+#: nis/nis_print.c:307
+msgid "Encrypted data\n"
+msgstr ""
+
+#: nis/nis_print.c:309
+msgid "Binary data\n"
+msgstr ""
+
+#: nis/nis_print.c:325
+#, c-format
+msgid "Object Name : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:326
+#, c-format
+msgid "Directory : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:327
+#, c-format
+msgid "Owner : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:328
+#, c-format
+msgid "Group : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:329
+msgid "Access Rights : "
+msgstr ""
+
+#: nis/nis_print.c:331
+#, c-format
+msgid ""
+"\n"
+"Time to Live : "
+msgstr ""
+
+#: nis/nis_print.c:334
+#, c-format
+msgid "Creation Time : %s"
+msgstr ""
+
+#: nis/nis_print.c:336
+#, c-format
+msgid "Mod. Time : %s"
+msgstr ""
+
+#: nis/nis_print.c:337
+msgid "Object Type : "
+msgstr ""
+
+#: nis/nis_print.c:357
+#, c-format
+msgid " Data Length = %u\n"
+msgstr ""
+
+#: nis/nis_print.c:371
+#, c-format
+msgid "Status : %s\n"
+msgstr ""
+
+#: nis/nis_print.c:372
+#, c-format
+msgid "Number of objects : %u\n"
+msgstr ""
+
+#: nis/nis_print.c:376
+#, c-format
+msgid "Object #%d:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:117
+#, c-format
+msgid "Group entry for \"%s.%s\" group:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:125
+msgid " Explicit members:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:130
+msgid " No explicit members\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:133
+msgid " Implicit members:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:138
+msgid " No implicit members\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:141
+msgid " Recursive members:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:146
+msgid " No recursive members\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:149
+msgid " Explicit nonmembers:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:154
+msgid " No explicit nonmembers\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:157
+msgid " Implicit nonmembers:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:162
+msgid " No implicit nonmembers\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:165
+msgid " Recursive nonmembers:\n"
+msgstr ""
+
+#: nis/nis_print_group_entry.c:170
+msgid " No recursive nonmembers\n"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:100
+#: nis/nss_nisplus/nisplus-publickey.c:182
+#, c-format
+msgid "DES entry for netname %s not unique\n"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:219
+#, c-format
+msgid "netname2user: missing group id list in `%s'"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:301
+#: nis/nss_nisplus/nisplus-publickey.c:307
+#: nis/nss_nisplus/nisplus-publickey.c:372
+#: nis/nss_nisplus/nisplus-publickey.c:381
+#, c-format
+msgid "netname2user: (nis+ lookup): %s\n"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:320
+#, c-format
+msgid "netname2user: DES entry for %s in directory %s not unique"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:338
+#, c-format
+msgid "netname2user: principal name `%s' too long"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:394
+#, c-format
+msgid "netname2user: LOCAL entry for %s in directory %s not unique"
+msgstr ""
+
+#: nis/nss_nisplus/nisplus-publickey.c:401
+msgid "netname2user: should not have uid 0"
+msgstr ""
+
+#: nis/ypclnt.c:835
+msgid "Request arguments bad"
+msgstr ""
+
+#: nis/ypclnt.c:838
+msgid "RPC failure on NIS operation"
+msgstr ""
+
+#: nis/ypclnt.c:841
+msgid "Can't bind to server which serves this domain"
+msgstr ""
+
+#: nis/ypclnt.c:844
+msgid "No such map in server's domain"
+msgstr ""
+
+#: nis/ypclnt.c:847
+msgid "No such key in map"
+msgstr ""
+
+#: nis/ypclnt.c:850
+msgid "Internal NIS error"
+msgstr "Interna NIS-eraro"
+
+#: nis/ypclnt.c:853
+msgid "Local resource allocation failure"
+msgstr ""
+
+#: nis/ypclnt.c:856
+msgid "No more records in map database"
+msgstr ""
+
+#: nis/ypclnt.c:859
+msgid "Can't communicate with portmapper"
+msgstr ""
+
+#: nis/ypclnt.c:862
+msgid "Can't communicate with ypbind"
+msgstr ""
+
+#: nis/ypclnt.c:865
+msgid "Can't communicate with ypserv"
+msgstr ""
+
+#: nis/ypclnt.c:868
+msgid "Local domain name not set"
+msgstr ""
+
+#: nis/ypclnt.c:871
+msgid "NIS map database is bad"
+msgstr ""
+
+#: nis/ypclnt.c:874
+msgid "NIS client/server version mismatch - can't supply service"
+msgstr ""
+
+#: nis/ypclnt.c:880
+msgid "Database is busy"
+msgstr ""
+
+#: nis/ypclnt.c:883
+msgid "Unknown NIS error code"
+msgstr "Nekonata NIS-erarkodo"
+
+#: nis/ypclnt.c:923
+msgid "Internal ypbind error"
+msgstr ""
+
+#: nis/ypclnt.c:926
+msgid "Domain not bound"
+msgstr "Domajno ne estas bindita"
+
+#: nis/ypclnt.c:929
+msgid "System resource allocation failure"
+msgstr ""
+
+#: nis/ypclnt.c:932
+msgid "Unknown ypbind error"
+msgstr ""
+
+#: nis/ypclnt.c:973
+msgid "yp_update: cannot convert host to netname\n"
+msgstr ""
+
+#: nis/ypclnt.c:991
+msgid "yp_update: cannot get server address\n"
+msgstr ""
+
+#: nscd/aicache.c:82 nscd/hstcache.c:493
+#, c-format
+msgid "Haven't found \"%s\" in hosts cache!"
+msgstr ""
+
+#: nscd/aicache.c:84 nscd/hstcache.c:495
+#, c-format
+msgid "Reloading \"%s\" in hosts cache!"
+msgstr ""
+
+#: nscd/cache.c:151
+#, c-format
+msgid "add new entry \"%s\" of type %s for %s to cache%s"
+msgstr ""
+
+#: nscd/cache.c:153
+msgid " (first)"
+msgstr ""
+
+#: nscd/cache.c:285 nscd/connections.c:1002
+#, c-format
+msgid "cannot stat() file `%s': %s"
+msgstr ""
+
+#: nscd/cache.c:331
+#, c-format
+msgid "pruning %s cache; time %ld"
+msgstr ""
+
+#: nscd/cache.c:360
+#, c-format
+msgid "considering %s entry \"%s\", timeout %<PRIu64>"
+msgstr ""
+
+#: nscd/connections.c:570
+#, c-format
+msgid "invalid persistent database file \"%s\": %s"
+msgstr ""
+
+#: nscd/connections.c:578
+msgid "uninitialized header"
+msgstr ""
+
+#: nscd/connections.c:583
+msgid "header size does not match"
+msgstr ""
+
+#: nscd/connections.c:593
+msgid "file size does not match"
+msgstr ""
+
+#: nscd/connections.c:610
+msgid "verification failed"
+msgstr ""
+
+#: nscd/connections.c:624
+#, c-format
+msgid "suggested size of table for database %s larger than the persistent database's table"
+msgstr ""
+
+#: nscd/connections.c:635 nscd/connections.c:720
+#, c-format
+msgid "cannot create read-only descriptor for \"%s\"; no mmap"
+msgstr ""
+
+#: nscd/connections.c:651
+#, c-format
+msgid "cannot access '%s'"
+msgstr ""
+
+#: nscd/connections.c:699
+#, c-format
+msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart"
+msgstr ""
+
+#: nscd/connections.c:706
+#, c-format
+msgid "cannot create %s; no persistent database used"
+msgstr ""
+
+#: nscd/connections.c:709
+#, c-format
+msgid "cannot create %s; no sharing possible"
+msgstr ""
+
+#: nscd/connections.c:780
+#, c-format
+msgid "cannot write to database file %s: %s"
+msgstr ""
+
+#: nscd/connections.c:819
+#, c-format
+msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:868
+#, c-format
+msgid "cannot open socket: %s"
+msgstr ""
+
+#: nscd/connections.c:888 nscd/connections.c:952
+#, c-format
+msgid "cannot change socket to nonblocking mode: %s"
+msgstr ""
+
+#: nscd/connections.c:896 nscd/connections.c:962
+#, c-format
+msgid "cannot set socket to close on exec: %s"
+msgstr ""
+
+#: nscd/connections.c:909
+#, c-format
+msgid "cannot enable socket to accept connections: %s"
+msgstr ""
+
+#: nscd/connections.c:986
+#, c-format
+msgid "register trace file %s for database %s"
+msgstr ""
+
+#: nscd/connections.c:1116
+#, c-format
+msgid "provide access to FD %d, for %s"
+msgstr ""
+
+#: nscd/connections.c:1128
+#, c-format
+msgid "cannot handle old request version %d; current version is %d"
+msgstr ""
+
+#: nscd/connections.c:1150
+#, c-format
+msgid "request from %ld not handled due to missing permission"
+msgstr ""
+
+#: nscd/connections.c:1155
+#, c-format
+msgid "request from '%s' [%ld] not handled due to missing permission"
+msgstr ""
+
+#: nscd/connections.c:1160
+msgid "request not handled due to missing permission"
+msgstr ""
+
+#: nscd/connections.c:1198 nscd/connections.c:1251
+#, c-format
+msgid "cannot write result: %s"
+msgstr ""
+
+#: nscd/connections.c:1342
+#, c-format
+msgid "error getting caller's id: %s"
+msgstr ""
+
+#: nscd/connections.c:1402
+#, c-format
+msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:1416
+#, c-format
+msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:1456
+#, c-format
+msgid "cannot change to old UID: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:1466
+#, c-format
+msgid "cannot change to old GID: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:1479
+#, c-format
+msgid "cannot change to old working directory: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:1525
+#, c-format
+msgid "re-exec failed: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/connections.c:1534
+#, c-format
+msgid "cannot change current working directory to \"/\": %s"
+msgstr ""
+
+#: nscd/connections.c:1727
+#, c-format
+msgid "short read while reading request: %s"
+msgstr ""
+
+#: nscd/connections.c:1760
+#, c-format
+msgid "key length in request too long: %d"
+msgstr ""
+
+#: nscd/connections.c:1773
+#, c-format
+msgid "short read while reading request key: %s"
+msgstr ""
+
+#: nscd/connections.c:1782
+#, c-format
+msgid "handle_request: request received (Version = %d) from PID %ld"
+msgstr ""
+
+#: nscd/connections.c:1787
+#, c-format
+msgid "handle_request: request received (Version = %d)"
+msgstr ""
+
+#: nscd/connections.c:1999 nscd/connections.c:2227
+#, c-format
+msgid "disabled inotify after read error %d"
+msgstr ""
+
+#: nscd/connections.c:2374
+msgid "could not initialize conditional variable"
+msgstr ""
+
+#: nscd/connections.c:2382
+msgid "could not start clean-up thread; terminating"
+msgstr ""
+
+#: nscd/connections.c:2396
+msgid "could not start any worker thread; terminating"
+msgstr ""
+
+#: nscd/connections.c:2447 nscd/connections.c:2448 nscd/connections.c:2465
+#: nscd/connections.c:2474 nscd/connections.c:2492 nscd/connections.c:2503
+#: nscd/connections.c:2514
+#, c-format
+msgid "Failed to run nscd as user '%s'"
+msgstr ""
+
+#: nscd/connections.c:2466
+#, c-format
+msgid "initial getgrouplist failed"
+msgstr ""
+
+#: nscd/connections.c:2475
+#, c-format
+msgid "getgrouplist failed"
+msgstr ""
+
+#: nscd/connections.c:2493
+#, c-format
+msgid "setgroups failed"
+msgstr ""
+
+#: nscd/grpcache.c:390 nscd/hstcache.c:440 nscd/initgrcache.c:411
+#: nscd/pwdcache.c:383 nscd/servicescache.c:338
+#, c-format
+msgid "short write in %s: %s"
+msgstr ""
+
+#: nscd/grpcache.c:435 nscd/initgrcache.c:77
+#, c-format
+msgid "Haven't found \"%s\" in group cache!"
+msgstr ""
+
+#: nscd/grpcache.c:437 nscd/initgrcache.c:79
+#, c-format
+msgid "Reloading \"%s\" in group cache!"
+msgstr ""
+
+#: nscd/grpcache.c:516
+#, c-format
+msgid "Invalid numeric gid \"%s\"!"
+msgstr ""
+
+#: nscd/mem.c:425
+#, c-format
+msgid "freed %zu bytes in %s cache"
+msgstr ""
+
+#: nscd/mem.c:568
+#, c-format
+msgid "no more memory for database '%s'"
+msgstr ""
+
+#: nscd/netgroupcache.c:77
+#, c-format
+msgid "Haven't found \"%s\" in netgroup cache!"
+msgstr ""
+
+#: nscd/netgroupcache.c:79
+#, c-format
+msgid "Reloading \"%s\" in netgroup cache!"
+msgstr ""
+
+#: nscd/netgroupcache.c:467
+#, c-format
+msgid "Haven't found \"%s (%s,%s,%s)\" in netgroup cache!"
+msgstr ""
+
+#: nscd/netgroupcache.c:470
+#, c-format
+msgid "Reloading \"%s (%s,%s,%s)\" in netgroup cache!"
+msgstr ""
+
+#: nscd/nscd.c:116
+msgid "Read configuration data from NAME"
+msgstr ""
+
+#: nscd/nscd.c:118
+msgid "Do not fork and display messages on the current tty"
+msgstr ""
+
+#: nscd/nscd.c:120
+msgid "Do not fork, but otherwise behave like a daemon"
+msgstr ""
+
+#: nscd/nscd.c:121
+msgid "NUMBER"
+msgstr ""
+
+#: nscd/nscd.c:121
+msgid "Start NUMBER threads"
+msgstr ""
+
+#: nscd/nscd.c:122
+msgid "Shut the server down"
+msgstr ""
+
+#: nscd/nscd.c:123
+msgid "Print current configuration statistics"
+msgstr ""
+
+#: nscd/nscd.c:124
+msgid "TABLE"
+msgstr ""
+
+#: nscd/nscd.c:125
+msgid "Invalidate the specified cache"
+msgstr ""
+
+#: nscd/nscd.c:126
+msgid "TABLE,yes"
+msgstr ""
+
+#: nscd/nscd.c:127
+msgid "Use separate cache for each user"
+msgstr ""
+
+#: nscd/nscd.c:132
+msgid "Name Service Cache Daemon."
+msgstr ""
+
+#: nscd/nscd.c:164 nss/getent.c:999 nss/makedb.c:207
+#, c-format
+msgid "wrong number of arguments"
+msgstr ""
+
+#: nscd/nscd.c:174
+#, c-format
+msgid "failure while reading configuration file; this is fatal"
+msgstr ""
+
+#: nscd/nscd.c:183
+#, c-format
+msgid "already running"
+msgstr ""
+
+#: nscd/nscd.c:201 nscd/nscd.c:259
+#, c-format
+msgid "cannot fork"
+msgstr "malsukcesis krei novan procezon"
+
+#: nscd/nscd.c:268
+#, c-format
+msgid "cannot change current working directory to \"/\""
+msgstr ""
+
+#: nscd/nscd.c:276
+msgid "Could not create log file"
+msgstr ""
+
+#: nscd/nscd.c:346 nscd/nscd.c:371 nscd/nscd_stat.c:173
+#, c-format
+msgid "Only root is allowed to use this option!"
+msgstr ""
+
+#: nscd/nscd.c:386
+#, c-format
+msgid "'%s' is not a known database"
+msgstr ""
+
+#: nscd/nscd.c:411 nscd/nscd_stat.c:192
+#, c-format
+msgid "write incomplete"
+msgstr ""
+
+#: nscd/nscd.c:422
+#, c-format
+msgid "cannot read invalidate ACK"
+msgstr ""
+
+#: nscd/nscd.c:428
+#, c-format
+msgid "invalidation failed"
+msgstr "malsukcesis malvalidigo"
+
+#: nscd/nscd.c:438
+#, c-format
+msgid "secure services not implemented anymore"
+msgstr ""
+
+#: nscd/nscd_conf.c:57
+#, c-format
+msgid "database %s is not supported"
+msgstr ""
+
+#: nscd/nscd_conf.c:108
+#, c-format
+msgid "Parse error: %s"
+msgstr ""
+
+#: nscd/nscd_conf.c:194
+#, c-format
+msgid "Must specify user name for server-user option"
+msgstr ""
+
+#: nscd/nscd_conf.c:201
+#, c-format
+msgid "Must specify user name for stat-user option"
+msgstr ""
+
+#: nscd/nscd_conf.c:258
+#, c-format
+msgid "Must specify value for restart-interval option"
+msgstr ""
+
+#: nscd/nscd_conf.c:272
+#, c-format
+msgid "Unknown option: %s %s %s"
+msgstr ""
+
+#: nscd/nscd_conf.c:285
+#, c-format
+msgid "cannot get current working directory: %s; disabling paranoia mode"
+msgstr ""
+
+#: nscd/nscd_conf.c:305
+#, c-format
+msgid "maximum file size for %s database too small"
+msgstr ""
+
+#: nscd/nscd_stat.c:142
+#, c-format
+msgid "cannot write statistics: %s"
+msgstr ""
+
+#: nscd/nscd_stat.c:157
+msgid "yes"
+msgstr "jes"
+
+#: nscd/nscd_stat.c:158
+msgid "no"
+msgstr "ne"
+
+#: nscd/nscd_stat.c:169
+#, c-format
+msgid "Only root or %s is allowed to use this option!"
+msgstr ""
+
+#: nscd/nscd_stat.c:180
+#, c-format
+msgid "nscd not running!\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:204
+#, c-format
+msgid "cannot read statistics data"
+msgstr ""
+
+#: nscd/nscd_stat.c:207
+#, c-format
+msgid ""
+"nscd configuration:\n"
+"\n"
+"%15d server debug level\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:231
+#, c-format
+msgid "%3ud %2uh %2um %2lus server runtime\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:234
+#, c-format
+msgid " %2uh %2um %2lus server runtime\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:236
+#, c-format
+msgid " %2um %2lus server runtime\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:238
+#, c-format
+msgid " %2lus server runtime\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:240
+#, c-format
+msgid ""
+"%15d current number of threads\n"
+"%15d maximum number of threads\n"
+"%15lu number of times clients had to wait\n"
+"%15s paranoia mode enabled\n"
+"%15lu restart internal\n"
+"%15u reload count\n"
+msgstr ""
+
+#: nscd/nscd_stat.c:275
+#, c-format
+msgid ""
+"\n"
+"%s cache:\n"
+"\n"
+"%15s cache is enabled\n"
+"%15s cache is persistent\n"
+"%15s cache is shared\n"
+"%15zu suggested size\n"
+"%15zu total data pool size\n"
+"%15zu used data pool size\n"
+"%15lu seconds time to live for positive entries\n"
+"%15lu seconds time to live for negative entries\n"
+"%15<PRIuMAX> cache hits on positive entries\n"
+"%15<PRIuMAX> cache hits on negative entries\n"
+"%15<PRIuMAX> cache misses on positive entries\n"
+"%15<PRIuMAX> cache misses on negative entries\n"
+"%15lu%% cache hit rate\n"
+"%15zu current number of cached values\n"
+"%15zu maximum number of cached values\n"
+"%15zu maximum chain length searched\n"
+"%15<PRIuMAX> number of delays on rdlock\n"
+"%15<PRIuMAX> number of delays on wrlock\n"
+"%15<PRIuMAX> memory allocations failed\n"
+"%15s check /etc/%s for changes\n"
+msgstr ""
+
+#: nscd/pwdcache.c:428
+#, c-format
+msgid "Haven't found \"%s\" in password cache!"
+msgstr ""
+
+#: nscd/pwdcache.c:430
+#, c-format
+msgid "Reloading \"%s\" in password cache!"
+msgstr ""
+
+#: nscd/pwdcache.c:511
+#, c-format
+msgid "Invalid numeric uid \"%s\"!"
+msgstr ""
+
+#: nscd/selinux.c:160
+#, c-format
+msgid "Failed opening connection to the audit subsystem: %m"
+msgstr ""
+
+#: nscd/selinux.c:181
+msgid "Failed to set keep-capabilities"
+msgstr ""
+
+#: nscd/selinux.c:182 nscd/selinux.c:245
+#, c-format
+msgid "prctl(KEEPCAPS) failed"
+msgstr ""
+
+#: nscd/selinux.c:196
+msgid "Failed to initialize drop of capabilities"
+msgstr ""
+
+#: nscd/selinux.c:197
+#, c-format
+msgid "cap_init failed"
+msgstr ""
+
+#: nscd/selinux.c:218 nscd/selinux.c:235
+msgid "Failed to drop capabilities"
+msgstr ""
+
+#: nscd/selinux.c:219 nscd/selinux.c:236
+#, c-format
+msgid "cap_set_proc failed"
+msgstr ""
+
+#: nscd/selinux.c:244
+msgid "Failed to unset keep-capabilities"
+msgstr ""
+
+#: nscd/selinux.c:260
+msgid "Failed to determine if kernel supports SELinux"
+msgstr ""
+
+#: nscd/selinux.c:275
+#, c-format
+msgid "Failed to start AVC thread"
+msgstr ""
+
+#: nscd/selinux.c:297
+#, c-format
+msgid "Failed to create AVC lock"
+msgstr ""
+
+#: nscd/selinux.c:337
+#, c-format
+msgid "Failed to start AVC"
+msgstr ""
+
+#: nscd/selinux.c:339
+msgid "Access Vector Cache (AVC) started"
+msgstr ""
+
+#: nscd/selinux.c:360
+msgid "Error getting context of socket peer"
+msgstr ""
+
+#: nscd/selinux.c:365
+msgid "Error getting context of nscd"
+msgstr ""
+
+#: nscd/selinux.c:371
+msgid "Error getting sid from context"
+msgstr ""
+
+#: nscd/selinux.c:378
+msgid "compile-time support for database policy missing"
+msgstr ""
+
+#: nscd/selinux.c:411
+#, c-format
+msgid ""
+"\n"
+"SELinux AVC Statistics:\n"
+"\n"
+"%15u entry lookups\n"
+"%15u entry hits\n"
+"%15u entry misses\n"
+"%15u entry discards\n"
+"%15u CAV lookups\n"
+"%15u CAV hits\n"
+"%15u CAV probes\n"
+"%15u CAV misses\n"
+msgstr ""
+
+#: nscd/servicescache.c:387
+#, c-format
+msgid "Haven't found \"%s\" in services cache!"
+msgstr ""
+
+#: nscd/servicescache.c:389
+#, c-format
+msgid "Reloading \"%s\" in services cache!"
+msgstr ""
+
+#: nss/getent.c:53
+msgid "database [key ...]"
+msgstr ""
+
+#: nss/getent.c:58
+msgid "Service configuration to be used"
+msgstr ""
+
+#: nss/getent.c:59
+msgid "disable IDN encoding"
+msgstr ""
+
+#: nss/getent.c:64
+msgid "Get entries from administrative database."
+msgstr ""
+
+#: nss/getent.c:148 nss/getent.c:477 nss/getent.c:522
+#, c-format
+msgid "Enumeration not supported on %s\n"
+msgstr ""
+
+#: nss/getent.c:913
+#, c-format
+msgid "Unknown database name"
+msgstr ""
+
+#: nss/getent.c:943
+msgid "Supported databases:\n"
+msgstr ""
+
+#: nss/getent.c:1009
+#, c-format
+msgid "Unknown database: %s\n"
+msgstr ""
+
+#: nss/makedb.c:117
+msgid "Convert key to lower case"
+msgstr ""
+
+#: nss/makedb.c:120
+msgid "Do not print messages while building database"
+msgstr ""
+
+#: nss/makedb.c:122
+msgid "Print content of database file, one entry a line"
+msgstr ""
+
+#: nss/makedb.c:123
+msgid "CHAR"
+msgstr ""
+
+#: nss/makedb.c:124
+msgid "Generated line not part of iteration"
+msgstr ""
+
+#: nss/makedb.c:129
+msgid "Create simple database from textual input."
+msgstr ""
+
+#: nss/makedb.c:132
+msgid ""
+"INPUT-FILE OUTPUT-FILE\n"
+"-o OUTPUT-FILE INPUT-FILE\n"
+"-u INPUT-FILE"
+msgstr ""
+
+#: nss/makedb.c:228
+#, c-format
+msgid "cannot open database file `%s'"
+msgstr ""
+
+#: nss/makedb.c:273
+#, c-format
+msgid "no entries to be processed"
+msgstr ""
+
+#: nss/makedb.c:283
+#, c-format
+msgid "cannot create temporary file name"
+msgstr ""
+
+#: nss/makedb.c:305
+#, c-format
+msgid "cannot stat newly created file"
+msgstr ""
+
+#: nss/makedb.c:316
+#, c-format
+msgid "cannot rename temporary file"
+msgstr ""
+
+#: nss/makedb.c:529 nss/makedb.c:552
+#, c-format
+msgid "cannot create search tree"
+msgstr ""
+
+#: nss/makedb.c:558
+msgid "duplicate key"
+msgstr ""
+
+#: nss/makedb.c:570
+#, c-format
+msgid "problems while reading `%s'"
+msgstr ""
+
+#: nss/makedb.c:794
+#, c-format
+msgid "failed to write new database file"
+msgstr ""
+
+#: nss/makedb.c:807
+#, c-format
+msgid "cannot stat database file"
+msgstr ""
+
+#: nss/makedb.c:812
+#, c-format
+msgid "cannot map database file"
+msgstr ""
+
+#: nss/makedb.c:815
+#, c-format
+msgid "file not a database file"
+msgstr ""
+
+#: nss/makedb.c:866
+#, c-format
+msgid "cannot set file creation context for `%s'"
+msgstr ""
+
+#: ports/sysdeps/unix/sysv/linux/ia64/makecontext.c:62
+#, c-format
+msgid "makecontext: does not know how to handle more than 8 arguments\n"
+msgstr ""
+
+#: posix/getconf.c:1035
+#, c-format
+msgid "Usage: %s [-v specification] variable_name [pathname]\n"
+msgstr ""
+
+#: posix/getconf.c:1038
+#, c-format
+msgid " %s -a [pathname]\n"
+msgstr ""
+
+#: posix/getconf.c:1114
+#, c-format
+msgid ""
+"Usage: getconf [-v SPEC] VAR\n"
+" or: getconf [-v SPEC] PATH_VAR PATH\n"
+"\n"
+"Get the configuration value for variable VAR, or for variable PATH_VAR\n"
+"for path PATH. If SPEC is given, give values for compilation\n"
+"environment SPEC.\n"
+"\n"
+msgstr ""
+
+#: posix/getconf.c:1172
+#, c-format
+msgid "unknown specification \"%s\""
+msgstr ""
+
+#: posix/getconf.c:1224
+#, c-format
+msgid "Couldn't execute %s"
+msgstr ""
+
+#: posix/getconf.c:1268 posix/getconf.c:1284
+msgid "undefined"
+msgstr ""
+
+#: posix/getconf.c:1306
+#, c-format
+msgid "Unrecognized variable `%s'"
+msgstr ""
+
+#: posix/getopt.c:593 posix/getopt.c:622
+#, c-format
+msgid "%s: option '%s' is ambiguous; possibilities:"
+msgstr "%s: opcio «%s» estas plursenca; eblaĵoj estas:"
+
+#: posix/getopt.c:663 posix/getopt.c:667
+#, c-format
+msgid "%s: option '--%s' doesn't allow an argument\n"
+msgstr "%s: opcio «--%s» ne toleras argumenton\n"
+
+#: posix/getopt.c:676 posix/getopt.c:681
+#, c-format
+msgid "%s: option '%c%s' doesn't allow an argument\n"
+msgstr "%s: opcio «%c%s» ne toleras argumenton\n"
+
+#: posix/getopt.c:724 posix/getopt.c:743
+#, c-format
+msgid "%s: option '--%s' requires an argument\n"
+msgstr "%s: opcio «--%s» bezonas argumenton\n"
+
+#: posix/getopt.c:781 posix/getopt.c:784
+#, c-format
+msgid "%s: unrecognized option '--%s'\n"
+msgstr "%s: nekonata opcio «--%s»\n"
+
+#: posix/getopt.c:792 posix/getopt.c:795
+#, c-format
+msgid "%s: unrecognized option '%c%s'\n"
+msgstr "%s: nekonata opcio «%c%s»\n"
+
+#: posix/getopt.c:844 posix/getopt.c:847
+#, c-format
+msgid "%s: invalid option -- '%c'\n"
+msgstr "%s: nevalida opcio -- «%c»\n"
+
+#: posix/getopt.c:900 posix/getopt.c:917 posix/getopt.c:1127
+#: posix/getopt.c:1145
+#, c-format
+msgid "%s: option requires an argument -- '%c'\n"
+msgstr "%s: opcio bezonas argumenton -- «%c»\n"
+
+#: posix/getopt.c:973 posix/getopt.c:989
+#, c-format
+msgid "%s: option '-W %s' is ambiguous\n"
+msgstr "%s: opcio «-W %s» estas plursenca\n"
+
+#: posix/getopt.c:1013 posix/getopt.c:1031
+#, c-format
+msgid "%s: option '-W %s' doesn't allow an argument\n"
+msgstr "%s: opcio «-W %s» ne toleras argumenton\n"
+
+#: posix/getopt.c:1052 posix/getopt.c:1070
+#, c-format
+msgid "%s: option '-W %s' requires an argument\n"
+msgstr "%s: opcio «-W %s» bezonas argumenton\n"
+
+#: posix/regcomp.c:134
+msgid "No match"
+msgstr "Neniu trafo"
+
+#: posix/regcomp.c:137
+msgid "Invalid regular expression"
+msgstr "Nevalida regulesprimo"
+
+#: posix/regcomp.c:140
+msgid "Invalid collation character"
+msgstr "Nevalida kunmetita signo"
+
+#: posix/regcomp.c:143
+msgid "Invalid character class name"
+msgstr "Nevalida nomo de signoklaso"
+
+#: posix/regcomp.c:146
+msgid "Trailing backslash"
+msgstr "Malsuprenstreko '\\' ĉe la fino"
+
+#: posix/regcomp.c:149
+msgid "Invalid back reference"
+msgstr "Nevalida retroreferenco"
+
+#: posix/regcomp.c:152
+msgid "Unmatched [ or [^"
+msgstr "Senpara [ aÅ­ [^"
+
+#: posix/regcomp.c:155
+msgid "Unmatched ( or \\("
+msgstr "Senpara ( aÅ­ \\("
+
+#: posix/regcomp.c:158
+msgid "Unmatched \\{"
+msgstr "Senpara \\{"
+
+#: posix/regcomp.c:161
+msgid "Invalid content of \\{\\}"
+msgstr "Nevalida enhavo de \\{\\}"
+
+#: posix/regcomp.c:164
+msgid "Invalid range end"
+msgstr "Nevalida fino de gamo"
+
+#: posix/regcomp.c:167
+msgid "Memory exhausted"
+msgstr "Mankas sufiĉa memoro"
+
+#: posix/regcomp.c:170
+msgid "Invalid preceding regular expression"
+msgstr "Nevalida antaÅ­a regulesprimo"
+
+#: posix/regcomp.c:173
+msgid "Premature end of regular expression"
+msgstr "Neatendita fino de regulesprimo"
+
+#: posix/regcomp.c:176
+msgid "Regular expression too big"
+msgstr "Regulesprimo tro grandas"
+
+#: posix/regcomp.c:179
+msgid "Unmatched ) or \\)"
+msgstr "Senpara ) aÅ­ \\)"
+
+#: posix/regcomp.c:679
+msgid "No previous regular expression"
+msgstr "Mankas antaÅ­a regulesprimo"
+
+#: posix/wordexp.c:1829
+msgid "parameter null or not set"
+msgstr ""
+
+#: resolv/herror.c:68
+msgid "Resolver Error 0 (no error)"
+msgstr ""
+
+#: resolv/herror.c:69
+msgid "Unknown host"
+msgstr "Nekonata gastiga komputilo"
+
+#: resolv/herror.c:70
+msgid "Host name lookup failure"
+msgstr "Malsukcesis eltrovo de nomo de gastiga komputilo"
+
+#: resolv/herror.c:71
+msgid "Unknown server error"
+msgstr "Nekonata eraro je servilo"
+
+#: resolv/herror.c:72
+msgid "No address associated with name"
+msgstr "Neniu adreso estas asociata kun nomo"
+
+#: resolv/herror.c:107
+msgid "Resolver internal error"
+msgstr "Interna eraro en adrestrovilo"
+
+#: resolv/herror.c:110
+msgid "Unknown resolver error"
+msgstr "Nekonata eraro en adrestrovilo"
+
+#: resolv/res_hconf.c:122
+#, c-format
+msgid "%s: line %d: cannot specify more than %d trim domains"
+msgstr ""
+
+#: resolv/res_hconf.c:143
+#, c-format
+msgid "%s: line %d: list delimiter not followed by domain"
+msgstr ""
+
+#: resolv/res_hconf.c:202
+#, c-format
+msgid "%s: line %d: expected `on' or `off', found `%s'\n"
+msgstr ""
+
+#: resolv/res_hconf.c:245
+#, c-format
+msgid "%s: line %d: bad command `%s'\n"
+msgstr ""
+
+#: resolv/res_hconf.c:280
+#, c-format
+msgid "%s: line %d: ignoring trailing garbage `%s'\n"
+msgstr ""
+
+#: stdio-common/psiginfo-data.h:2
+msgid "Illegal opcode"
+msgstr "Nevalida instrukcia kodo"
+
+#: stdio-common/psiginfo-data.h:3
+msgid "Illegal operand"
+msgstr "Nevalida operando"
+
+#: stdio-common/psiginfo-data.h:4
+msgid "Illegal addressing mode"
+msgstr "Nevalida adresada moduso"
+
+#: stdio-common/psiginfo-data.h:5
+msgid "Illegal trap"
+msgstr "Nevalida 'trap'-instrukcio"
+
+#: stdio-common/psiginfo-data.h:6
+msgid "Privileged opcode"
+msgstr "Privilegiata instrukcia kodo"
+
+#: stdio-common/psiginfo-data.h:7
+msgid "Privileged register"
+msgstr "Privilegiata reÄistro"
+
+#: stdio-common/psiginfo-data.h:8
+msgid "Coprocessor error"
+msgstr "Kromprocesora eraro"
+
+#: stdio-common/psiginfo-data.h:9
+msgid "Internal stack error"
+msgstr "Interna stak-eraro"
+
+#: stdio-common/psiginfo-data.h:12
+msgid "Integer divide by zero"
+msgstr "Entjerdivido per nulo"
+
+#: stdio-common/psiginfo-data.h:13
+msgid "Integer overflow"
+msgstr "Entjertroo"
+
+#: stdio-common/psiginfo-data.h:14
+msgid "Floating-point divide by zero"
+msgstr "Glitkomdivido per nulo"
+
+#: stdio-common/psiginfo-data.h:15
+msgid "Floating-point overflow"
+msgstr "Glitkomkalkul-troo"
+
+#: stdio-common/psiginfo-data.h:16
+msgid "Floating-point underflow"
+msgstr "Glitkomkalkul-maltroo"
+
+#: stdio-common/psiginfo-data.h:17
+msgid "Floating-poing inexact result"
+msgstr "Neekzakta glitkomkalkul-rezulto"
+
+#: stdio-common/psiginfo-data.h:18
+msgid "Invalid floating-point operation"
+msgstr "Nevalida glitkomkalkul-operacio"
+
+#: stdio-common/psiginfo-data.h:19
+msgid "Subscript out of range"
+msgstr "Indico estas ekster gamo"
+
+#: stdio-common/psiginfo-data.h:22
+msgid "Address not mapped to object"
+msgstr "Adreso ne estas ligata al iu objekto"
+
+#: stdio-common/psiginfo-data.h:23
+msgid "Invalid permissions for mapped object"
+msgstr "Nevalida permesoj por ligata objekto"
+
+#: stdio-common/psiginfo-data.h:26
+#, fuzzy
+msgid "Invalid address alignment"
+msgstr "Nevalida ... de adreso"
+
+#: stdio-common/psiginfo-data.h:27
+msgid "Nonexisting physical address"
+msgstr "Neekzistanta fizika adreso"
+
+#: stdio-common/psiginfo-data.h:28
+msgid "Object-specific hardware error"
+msgstr "Objektspecifa aparata eraro"
+
+#: stdio-common/psiginfo-data.h:31
+msgid "Process breakpoint"
+msgstr "Procezo-romppunkto"
+
+#: stdio-common/psiginfo-data.h:32
+msgid "Process trace trap"
+msgstr "Procezo-spuruma instrukcio"
+
+#: stdio-common/psiginfo-data.h:35
+msgid "Child has exited"
+msgstr "Ido finis"
+
+#: stdio-common/psiginfo-data.h:36
+msgid "Child has terminated abnormally and did not create a core file"
+msgstr "Ido ĉesis nenormale kaj ne kreis nekropsian 'core'-dosieron"
+
+#: stdio-common/psiginfo-data.h:37
+msgid "Child hat terminated abnormally and created a core file"
+msgstr "Ido ĉesis nenormale kaj kreis nekropsian 'core'-dosieron"
+
+#: stdio-common/psiginfo-data.h:38
+msgid "Traced child has trapped"
+msgstr "Spurita ido plenumis 'trap'-instrukcion"
+
+#: stdio-common/psiginfo-data.h:39
+msgid "Child has stopped"
+msgstr "Ido paÅ­ziÄis"
+
+#: stdio-common/psiginfo-data.h:40
+msgid "Stopped child has continued"
+msgstr "PaÅ­zigita ido kontinuis"
+
+#: stdio-common/psiginfo-data.h:43
+msgid "Data input available"
+msgstr "Disponeblas enigo de datumoj"
+
+#: stdio-common/psiginfo-data.h:44
+msgid "Output buffers available"
+msgstr "Disponeblas eligaj bufroj"
+
+#: stdio-common/psiginfo-data.h:45
+msgid "Input message available"
+msgstr "Disponeblas eniga mesaÄo"
+
+#: stdio-common/psiginfo-data.h:46
+msgid "I/O error"
+msgstr "Eniga/eliga eraro"
+
+#: stdio-common/psiginfo-data.h:47
+msgid "High priority input available"
+msgstr "Disponeblas urÄa enigo"
+
+#: stdio-common/psiginfo-data.h:48
+msgid "Device disconnected"
+msgstr "Aparato malkonektiÄis"
+
+#: stdio-common/psiginfo.c:139
+msgid "Signal sent by kill()"
+msgstr "Signalo sendita per 'kill()'"
+
+#: stdio-common/psiginfo.c:142
+msgid "Signal sent by sigqueue()"
+msgstr "Signalo sendita per 'sigqueue()'"
+
+#: stdio-common/psiginfo.c:145
+msgid "Signal generated by the expiration of a timer"
+msgstr ""
+
+#: stdio-common/psiginfo.c:148
+msgid "Signal generated by the completion of an asynchronous I/O request"
+msgstr ""
+
+#: stdio-common/psiginfo.c:152
+msgid "Signal generated by the arrival of a message on an empty message queue"
+msgstr ""
+
+#: stdio-common/psiginfo.c:157
+msgid "Signal sent by tkill()"
+msgstr "Signalo sendita per 'tkill()'"
+
+#: stdio-common/psiginfo.c:162
+msgid "Signal generated by the completion of an asynchronous name lookup request"
+msgstr ""
+
+#: stdio-common/psiginfo.c:168
+msgid "Signal generated by the completion of an I/O request"
+msgstr ""
+
+#: stdio-common/psiginfo.c:174
+msgid "Signal sent by the kernel"
+msgstr "Signalo sendita per kerno"
+
+#: stdio-common/psiginfo.c:198
+#, c-format
+msgid "Unknown signal %d\n"
+msgstr "Nekonata signalo %d\n"
+
+#: stdio-common/psignal.c:43
+#, c-format
+msgid "%s%sUnknown signal %d\n"
+msgstr "%s%sNekonata signalo %d\n"
+
+#: stdio-common/psignal.c:44
+msgid "Unknown signal"
+msgstr "Nekonata signalo"
+
+#: string/_strerror.c:46 sysdeps/mach/_strerror.c:86
+msgid "Unknown error "
+msgstr "Nekonata eraro "
+
+#: string/strerror.c:42
+msgid "Unknown error"
+msgstr "Nekonata eraro"
+
+#: string/strsignal.c:60
+#, c-format
+msgid "Real-time signal %d"
+msgstr "Realtempa signalo %d"
+
+#: string/strsignal.c:64
+#, c-format
+msgid "Unknown signal %d"
+msgstr "Nekonata signalo %d"
+
+#: sunrpc/auth_unix.c:111 sunrpc/clnt_tcp.c:123 sunrpc/clnt_udp.c:134
+#: sunrpc/clnt_unix.c:124 sunrpc/svc_tcp.c:171 sunrpc/svc_tcp.c:216
+#: sunrpc/svc_udp.c:145 sunrpc/svc_unix.c:171 sunrpc/svc_unix.c:212
+#: sunrpc/xdr.c:630 sunrpc/xdr.c:790 sunrpc/xdr_array.c:97
+#: sunrpc/xdr_rec.c:151 sunrpc/xdr_ref.c:76
+msgid "out of memory\n"
+msgstr "mankas sufiĉa memoro\n"
+
+#: sunrpc/auth_unix.c:349
+msgid "auth_unix.c: Fatal marshalling problem"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:95 sunrpc/clnt_perr.c:111
+#, c-format
+msgid "%s: %s; low version = %lu, high version = %lu"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:102
+#, c-format
+msgid "%s: %s; why = %s\n"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:104
+#, c-format
+msgid "%s: %s; why = (unknown authentication error - %d)\n"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:153
+msgid "RPC: Success"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:156
+msgid "RPC: Can't encode arguments"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:160
+msgid "RPC: Can't decode result"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:164
+msgid "RPC: Unable to send"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:168
+msgid "RPC: Unable to receive"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:172
+msgid "RPC: Timed out"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:176
+msgid "RPC: Incompatible versions of RPC"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:180
+msgid "RPC: Authentication error"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:184
+msgid "RPC: Program unavailable"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:188
+msgid "RPC: Program/version mismatch"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:192
+msgid "RPC: Procedure unavailable"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:196
+msgid "RPC: Server can't decode arguments"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:200
+msgid "RPC: Remote system error"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:204
+msgid "RPC: Unknown host"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:208
+msgid "RPC: Unknown protocol"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:212
+msgid "RPC: Port mapper failure"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:216
+msgid "RPC: Program not registered"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:220
+msgid "RPC: Failed (unspecified error)"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:261
+msgid "RPC: (unknown error code)"
+msgstr "RPC: (nekonata erarkodo)"
+
+#: sunrpc/clnt_perr.c:333
+msgid "Authentication OK"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:336
+msgid "Invalid client credential"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:340
+msgid "Server rejected credential"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:344
+msgid "Invalid client verifier"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:348
+msgid "Server rejected verifier"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:352
+msgid "Client credential too weak"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:356
+msgid "Invalid server verifier"
+msgstr ""
+
+#: sunrpc/clnt_perr.c:360
+msgid "Failed (unspecified error)"
+msgstr ""
+
+#: sunrpc/clnt_raw.c:115
+msgid "clnt_raw.c: fatal header serialization error"
+msgstr ""
+
+#: sunrpc/pm_getmaps.c:77
+msgid "pmap_getmaps.c: rpc problem"
+msgstr ""
+
+#: sunrpc/pmap_clnt.c:127
+msgid "Cannot register service"
+msgstr ""
+
+#: sunrpc/pmap_rmt.c:243
+msgid "Cannot create socket for broadcast rpc"
+msgstr ""
+
+#: sunrpc/pmap_rmt.c:250
+msgid "Cannot set socket option SO_BROADCAST"
+msgstr ""
+
+#: sunrpc/pmap_rmt.c:302
+msgid "Cannot send broadcast packet"
+msgstr ""
+
+#: sunrpc/pmap_rmt.c:327
+msgid "Broadcast poll problem"
+msgstr ""
+
+#: sunrpc/pmap_rmt.c:340
+msgid "Cannot receive reply to broadcast"
+msgstr ""
+
+#: sunrpc/rpc_main.c:280
+#, c-format
+msgid "%s: output would overwrite %s\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:287
+#, c-format
+msgid "%s: unable to open %s: %m\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:299
+#, c-format
+msgid "%s: while writing output %s: %m"
+msgstr ""
+
+#: sunrpc/rpc_main.c:334
+#, c-format
+msgid "cannot find C preprocessor: %s \n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:342
+msgid "cannot find any C preprocessor (cpp)\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:411
+#, c-format
+msgid "%s: C preprocessor failed with signal %d\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:414
+#, c-format
+msgid "%s: C preprocessor failed with exit code %d\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:454
+#, c-format
+msgid "illegal nettype: `%s'\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1089
+#, c-format
+msgid "rpcgen: too many defines\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1101
+#, c-format
+msgid "rpcgen: arglist coding error\n"
+msgstr ""
+
+#. TRANS: the file will not be removed; this is an
+#. TRANS: informative message.
+#: sunrpc/rpc_main.c:1134
+#, c-format
+msgid "file `%s' already exists and may be overwritten\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1179
+#, c-format
+msgid "Cannot specify more than one input file!\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1349
+#, c-format
+msgid "This implementation doesn't support newstyle or MT-safe code!\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1358
+#, c-format
+msgid "Cannot use netid flag with inetd flag!\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1367
+#, c-format
+msgid "Cannot use netid flag without TIRPC!\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1374
+#, c-format
+msgid "Cannot use table flags with newstyle!\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1393
+#, c-format
+msgid "\"infile\" is required for template generation flags.\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1398
+#, c-format
+msgid "Cannot have more than one file generation flag!\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1407
+#, c-format
+msgid "usage: %s infile\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1408
+#, c-format
+msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1410
+#, c-format
+msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1412
+#, c-format
+msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1413
+#, c-format
+msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1421
+#, c-format
+msgid "options:\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1422
+#, c-format
+msgid "-a\t\tgenerate all files, including samples\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1423
+#, c-format
+msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1424
+#, c-format
+msgid "-c\t\tgenerate XDR routines\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1425
+#, c-format
+msgid "-C\t\tANSI C mode\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1426
+#, c-format
+msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1427
+#, c-format
+msgid "-h\t\tgenerate header file\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1428
+#, c-format
+msgid "-i size\t\tsize at which to start generating inline code\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1429
+#, c-format
+msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1430
+#, c-format
+msgid "-K seconds\tserver exits after K seconds of inactivity\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1431
+#, c-format
+msgid "-l\t\tgenerate client side stubs\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1432
+#, c-format
+msgid "-L\t\tserver errors will be printed to syslog\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1433
+#, c-format
+msgid "-m\t\tgenerate server side stubs\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1434
+#, c-format
+msgid "-M\t\tgenerate MT-safe code\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1435
+#, c-format
+msgid "-n netid\tgenerate server code that supports named netid\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1436
+#, c-format
+msgid "-N\t\tsupports multiple arguments and call-by-value\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1437
+#, c-format
+msgid "-o outfile\tname of the output file\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1438
+#, c-format
+msgid "-s nettype\tgenerate server code that supports named nettype\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1439
+#, c-format
+msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1440
+#, c-format
+msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1441
+#, c-format
+msgid "-Sm \t\tgenerate makefile template \n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1442
+#, c-format
+msgid "-t\t\tgenerate RPC dispatch table\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1443
+#, c-format
+msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
+msgstr ""
+
+#: sunrpc/rpc_main.c:1444
+#, c-format
+msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
+msgstr ""
+
+#: sunrpc/rpc_scan.c:112
+msgid "constant or identifier expected"
+msgstr ""
+
+#: sunrpc/rpc_scan.c:308
+msgid "illegal character in file: "
+msgstr ""
+
+#: sunrpc/rpc_scan.c:347 sunrpc/rpc_scan.c:373
+msgid "unterminated string constant"
+msgstr "nefinita signoĉena konstanto"
+
+#: sunrpc/rpc_scan.c:379
+msgid "empty char string"
+msgstr ""
+
+#: sunrpc/rpc_scan.c:521 sunrpc/rpc_scan.c:531
+msgid "preprocessor error"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:246 sunrpc/rpcinfo.c:392
+#, c-format
+msgid "program %lu is not available\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:273 sunrpc/rpcinfo.c:319 sunrpc/rpcinfo.c:342
+#: sunrpc/rpcinfo.c:416 sunrpc/rpcinfo.c:462 sunrpc/rpcinfo.c:485
+#: sunrpc/rpcinfo.c:519
+#, c-format
+msgid "program %lu version %lu is not available\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:524
+#, c-format
+msgid "program %lu version %lu ready and waiting\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:565 sunrpc/rpcinfo.c:572
+msgid "rpcinfo: can't contact portmapper"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:579
+msgid "No remote programs registered.\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:583
+msgid " program vers proto port\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:622
+msgid "(unknown)"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:646
+#, c-format
+msgid "rpcinfo: broadcast failed: %s\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:667
+msgid "Sorry. You are not root\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:674
+#, c-format
+msgid "rpcinfo: Could not delete registration for prog %s version %s\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:683
+msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:685
+msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:687
+msgid " rpcinfo -p [ host ]\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:688
+msgid " rpcinfo -b prognum versnum\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:689
+msgid " rpcinfo -d prognum versnum\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:714
+#, c-format
+msgid "rpcinfo: %s is unknown service\n"
+msgstr ""
+
+#: sunrpc/rpcinfo.c:751
+#, c-format
+msgid "rpcinfo: %s is unknown host\n"
+msgstr ""
+
+#: sunrpc/svc_run.c:71
+msgid "svc_run: - out of memory"
+msgstr ""
+
+#: sunrpc/svc_run.c:91
+msgid "svc_run: - poll failed"
+msgstr ""
+
+#: sunrpc/svc_simple.c:80
+#, c-format
+msgid "can't reassign procedure number %ld\n"
+msgstr ""
+
+#: sunrpc/svc_simple.c:90
+msgid "couldn't create an rpc server\n"
+msgstr ""
+
+#: sunrpc/svc_simple.c:98
+#, c-format
+msgid "couldn't register prog %ld vers %ld\n"
+msgstr ""
+
+#: sunrpc/svc_simple.c:106
+msgid "registerrpc: out of memory\n"
+msgstr ""
+
+#: sunrpc/svc_simple.c:169
+#, c-format
+msgid "trouble replying to prog %d\n"
+msgstr ""
+
+#: sunrpc/svc_simple.c:178
+#, c-format
+msgid "never registered prog %d\n"
+msgstr ""
+
+#: sunrpc/svc_tcp.c:147
+msgid "svc_tcp.c - tcp socket creation problem"
+msgstr ""
+
+#: sunrpc/svc_tcp.c:162
+msgid "svc_tcp.c - cannot getsockname or listen"
+msgstr ""
+
+#: sunrpc/svc_udp.c:120
+msgid "svcudp_create: socket creation problem"
+msgstr ""
+
+#: sunrpc/svc_udp.c:134
+msgid "svcudp_create - cannot getsockname"
+msgstr ""
+
+#: sunrpc/svc_udp.c:166
+msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
+msgstr ""
+
+#: sunrpc/svc_udp.c:474
+msgid "enablecache: cache already enabled"
+msgstr ""
+
+#: sunrpc/svc_udp.c:480
+msgid "enablecache: could not allocate cache"
+msgstr ""
+
+#: sunrpc/svc_udp.c:489
+msgid "enablecache: could not allocate cache data"
+msgstr ""
+
+#: sunrpc/svc_udp.c:497
+msgid "enablecache: could not allocate cache fifo"
+msgstr ""
+
+#: sunrpc/svc_udp.c:533
+msgid "cache_set: victim not found"
+msgstr ""
+
+#: sunrpc/svc_udp.c:544
+msgid "cache_set: victim alloc failed"
+msgstr ""
+
+#: sunrpc/svc_udp.c:551
+msgid "cache_set: could not allocate new rpc_buffer"
+msgstr ""
+
+#: sunrpc/svc_unix.c:145
+msgid "svc_unix.c - AF_UNIX socket creation problem"
+msgstr ""
+
+#: sunrpc/svc_unix.c:161
+msgid "svc_unix.c - cannot getsockname or listen"
+msgstr ""
+
+# Hangup detected on controlling terminal or death of controlling process.
+#: sysdeps/generic/siglist.h:28
+msgid "Hangup"
+msgstr "Malkonekto"
+
+# Interrupt from keyboard.
+#: sysdeps/generic/siglist.h:29
+msgid "Interrupt"
+msgstr "Interrompo"
+
+# Quit from keyboard.
+#: sysdeps/generic/siglist.h:30
+msgid "Quit"
+msgstr "Forlasigo"
+
+#: sysdeps/generic/siglist.h:31
+msgid "Illegal instruction"
+msgstr "Miskomando"
+
+#: sysdeps/generic/siglist.h:32
+msgid "Trace/breakpoint trap"
+msgstr "Spurumo-/romppunkto-komando"
+
+#: sysdeps/generic/siglist.h:33
+msgid "Aborted"
+msgstr "Abortita"
+
+#: sysdeps/generic/siglist.h:34
+msgid "Floating point exception"
+msgstr "Glitkomkalkul-eraro"
+
+# SIGKILL 9 Term Kill signal
+# Nek kaptebla nek ignorebla (malkiel ABORT)
+#: sysdeps/generic/siglist.h:35
+msgid "Killed"
+msgstr "Buĉita"
+
+#: sysdeps/generic/siglist.h:36
+msgid "Bus error"
+msgstr "Bus-eraro"
+
+# SIGSEGV 11 Core Invalid memory reference
+#: sysdeps/generic/siglist.h:37
+msgid "Segmentation fault"
+msgstr "Adres-eraro"
+
+# SIGPIPE 13 Term Broken pipe: write to pipe with no readers
+#. TRANS Broken pipe; there is no process reading from the other end of a pipe.
+#. TRANS Every library function that returns this error code also generates a
+#. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled
+#. TRANS or blocked. Thus, your program will never actually see @code{EPIPE}
+#. TRANS unless it has handled or blocked @code{SIGPIPE}.
+#: sysdeps/generic/siglist.h:38 sysdeps/gnu/errlist.c:359
+msgid "Broken pipe"
+msgstr "Rompita dukto"
+
+# SIGALRM 14 Term Timer signal from alarm(2)
+#: sysdeps/generic/siglist.h:39
+msgid "Alarm clock"
+msgstr "VekhorloÄo"
+
+# SIGTERM 15 Term Termination signal
+#: sysdeps/generic/siglist.h:40
+msgid "Terminated"
+msgstr "Ĉesigita"
+
+#: sysdeps/generic/siglist.h:41
+msgid "Urgent I/O condition"
+msgstr "UrÄa enig-/elig-stato"
+
+# SIGSTOP 17,19,23 Stop Stop process
+# Nek kaptebla nek ignorebla (samkiel SIGKILL)
+# Haltu (poste eblos plu iri, vd SIGCONT)
+#: sysdeps/generic/siglist.h:42
+msgid "Stopped (signal)"
+msgstr "PaÅ­zigita (signale)"
+
+#: sysdeps/generic/siglist.h:43
+msgid "Stopped"
+msgstr "PaÅ­zigita (uzule)"
+
+#: sysdeps/generic/siglist.h:44
+msgid "Continued"
+msgstr "DaÅ­rigita"
+
+#: sysdeps/generic/siglist.h:45
+msgid "Child exited"
+msgstr "Ido finis"
+
+# SIGTTIN 21,21,26 Stop tty input for background process
+#: sysdeps/generic/siglist.h:46
+msgid "Stopped (tty input)"
+msgstr "PaÅ­zigita (pro terminalenigo)"
+
+# SIGTTOU 22,22,27 Stop tty output for background process
+#: sysdeps/generic/siglist.h:47
+msgid "Stopped (tty output)"
+msgstr "PaÅ­zigita (pro terminaleligo)"
+
+#: sysdeps/generic/siglist.h:48
+msgid "I/O possible"
+msgstr "Enigo/eligo eblas"
+
+#: sysdeps/generic/siglist.h:49
+msgid "CPU time limit exceeded"
+msgstr "Limo de procesortempo transpasiÄis"
+
+#: sysdeps/generic/siglist.h:50
+msgid "File size limit exceeded"
+msgstr "Limo de dosiergrando transpasiÄis"
+
+#: sysdeps/generic/siglist.h:51
+msgid "Virtual timer expired"
+msgstr "Virtuala horloÄo transpasis limtempon"
+
+#: sysdeps/generic/siglist.h:52
+msgid "Profiling timer expired"
+msgstr "Profilanta horloÄo transpasis limtempon"
+
+# SIGWINCH 28,28,20 Ign Window resize signal (4.3 BSD, Sun)
+#: sysdeps/generic/siglist.h:53
+msgid "Window changed"
+msgstr "Fenestro ÅanÄiÄis"
+
+#: sysdeps/generic/siglist.h:54
+msgid "User defined signal 1"
+msgstr "Uzula signalo 1"
+
+#: sysdeps/generic/siglist.h:55
+msgid "User defined signal 2"
+msgstr "Uzula signalo 2"
+
+#: sysdeps/generic/siglist.h:59
+msgid "EMT trap"
+msgstr "EMT-komando"
+
+# SIGSYS 12,-,12 Core Bad argument to routine (SVID)
+#: sysdeps/generic/siglist.h:62
+msgid "Bad system call"
+msgstr "Misa sistemvoko"
+
+#: sysdeps/generic/siglist.h:65
+msgid "Stack fault"
+msgstr "Stak-eraro"
+
+# SIGINFO 29,-,- A synonym for SIGPWR
+#: sysdeps/generic/siglist.h:68
+msgid "Information request"
+msgstr "Informmendo"
+
+#: sysdeps/generic/siglist.h:70
+msgid "Power failure"
+msgstr "Elektra provizo perdiÄis"
+
+#: sysdeps/generic/siglist.h:73
+msgid "Resource lost"
+msgstr "Risurco perdiÄis"
+
+#. TRANS Operation not permitted; only the owner of the file (or other resource)
+#. TRANS or processes with special privileges can perform the operation.
+#: sysdeps/gnu/errlist.c:25
+msgid "Operation not permitted"
+msgstr "Operacio ne permesiÄas"
+
+#. TRANS No process matches the specified process ID.
+#: sysdeps/gnu/errlist.c:45
+msgid "No such process"
+msgstr "Tiu procezo ne ekzistas"
+
+#. TRANS Interrupted function call; an asynchronous signal occurred and prevented
+#. TRANS completion of the call. When this happens, you should try the call
+#. TRANS again.
+#. TRANS
+#. TRANS You can choose to have functions resume after a signal that is handled,
+#. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted
+#. TRANS Primitives}.
+#: sysdeps/gnu/errlist.c:60
+msgid "Interrupted system call"
+msgstr "Interrompita sistemvoko"
+
+#. TRANS Input/output error; usually used for physical read or write errors.
+#: sysdeps/gnu/errlist.c:69
+msgid "Input/output error"
+msgstr "Eraro de enigo/eligo"
+
+#. TRANS No such device or address. The system tried to use the device
+#. TRANS represented by a file you specified, and it couldn't find the device.
+#. TRANS This can mean that the device file was installed incorrectly, or that
+#. TRANS the physical device is missing or not correctly attached to the
+#. TRANS computer.
+#: sysdeps/gnu/errlist.c:82
+msgid "No such device or address"
+msgstr "Tiu aparato aü adreso ne ekzistas"
+
+#. TRANS Argument list too long; used when the arguments passed to a new program
+#. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
+#. TRANS File}) occupy too much memory space. This condition never arises on
+#. TRANS @gnuhurdsystems{}.
+#: sysdeps/gnu/errlist.c:94
+msgid "Argument list too long"
+msgstr "Listo de argumentoj tro longas"
+
+#. TRANS Invalid executable file format. This condition is detected by the
+#. TRANS @code{exec} functions; see @ref{Executing a File}.
+#: sysdeps/gnu/errlist.c:104
+msgid "Exec format error"
+msgstr "Nevalida aranÄo de rulenda dosiero"
+
+#. TRANS Bad file descriptor; for example, I/O on a descriptor that has been
+#. TRANS closed or reading from a descriptor open only for writing (or vice
+#. TRANS versa).
+#: sysdeps/gnu/errlist.c:115
+msgid "Bad file descriptor"
+msgstr "Nevalida dosiernumero"
+
+#. TRANS There are no child processes. This error happens on operations that are
+#. TRANS supposed to manipulate child processes, when there aren't any processes
+#. TRANS to manipulate.
+#: sysdeps/gnu/errlist.c:126
+msgid "No child processes"
+msgstr "Ne ekzistas idaj procezoj"
+
+#. TRANS Deadlock avoided; allocating a system resource would have resulted in a
+#. TRANS deadlock situation. The system does not guarantee that it will notice
+#. TRANS all such situations. This error means you got lucky and the system
+#. TRANS noticed; it might just hang. @xref{File Locks}, for an example.
+#: sysdeps/gnu/errlist.c:138
+msgid "Resource deadlock avoided"
+msgstr "EvitiÄis klinĉo inter risurcoj"
+
+#. TRANS No memory available. The system cannot allocate more virtual memory
+#. TRANS because its capacity is full.
+#: sysdeps/gnu/errlist.c:148
+msgid "Cannot allocate memory"
+msgstr "Mankas sufiĉa memoro"
+
+#. TRANS Bad address; an invalid pointer was detected.
+#. TRANS On @gnuhurdsystems{}, this error never happens; you get a signal instead.
+#: sysdeps/gnu/errlist.c:167
+msgid "Bad address"
+msgstr "Nevalida adreso"
+
+#. TRANS A file that isn't a block special file was given in a situation that
+#. TRANS requires one. For example, trying to mount an ordinary file as a file
+#. TRANS system in Unix gives this error.
+#: sysdeps/gnu/errlist.c:178
+msgid "Block device required"
+msgstr "Blokaparato bezoniÄas"
+
+#. TRANS Resource busy; a system resource that can't be shared is already in use.
+#. TRANS For example, if you try to delete a file that is the root of a currently
+#. TRANS mounted filesystem, you get this error.
+#: sysdeps/gnu/errlist.c:189
+msgid "Device or resource busy"
+msgstr "Aparato aÅ­ risurco uziÄas"
+
+#. TRANS File exists; an existing file was specified in a context where it only
+#. TRANS makes sense to specify a new file.
+#: sysdeps/gnu/errlist.c:199
+msgid "File exists"
+msgstr "Dosiero jam ekzistas"
+
+#. TRANS An attempt to make an improper link across file systems was detected.
+#. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but
+#. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}).
+#: sysdeps/gnu/errlist.c:210
+msgid "Invalid cross-device link"
+msgstr "Nevalida ligo inter aparatoj"
+
+#. TRANS The wrong type of device was given to a function that expects a
+#. TRANS particular sort of device.
+#: sysdeps/gnu/errlist.c:220
+msgid "No such device"
+msgstr "Tiu aparato ne ekzistas"
+
+#. TRANS A file that isn't a directory was specified when a directory is required.
+#: sysdeps/gnu/errlist.c:229
+msgid "Not a directory"
+msgstr "Ne estas dosierujo"
+
+#. TRANS File is a directory; you cannot open a directory for writing,
+#. TRANS or create or remove hard links to it.
+#: sysdeps/gnu/errlist.c:239
+msgid "Is a directory"
+msgstr "Estas dosierujo"
+
+#. TRANS Invalid argument. This is used to indicate various kinds of problems
+#. TRANS with passing the wrong argument to a library function.
+#: sysdeps/gnu/errlist.c:249
+msgid "Invalid argument"
+msgstr "Nevalida argumento"
+
+#. TRANS The current process has too many files open and can't open any more.
+#. TRANS Duplicate descriptors do count toward this limit.
+#. TRANS
+#. TRANS In BSD and GNU, the number of open files is controlled by a resource
+#. TRANS limit that can usually be increased. If you get this error, you might
+#. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited;
+#. TRANS @pxref{Limits on Resources}.
+#: sysdeps/gnu/errlist.c:264
+msgid "Too many open files"
+msgstr "Tro da malfermaj dosieroj"
+
+#. TRANS There are too many distinct file openings in the entire system. Note
+#. TRANS that any number of linked channels count as just one file opening; see
+#. TRANS @ref{Linked Channels}. This error never occurs on @gnuhurdsystems{}.
+#: sysdeps/gnu/errlist.c:275
+msgid "Too many open files in system"
+msgstr "Tro da malfermaj dosieroj en sistemo"
+
+#. TRANS Inappropriate I/O control operation, such as trying to set terminal
+#. TRANS modes on an ordinary file.
+#: sysdeps/gnu/errlist.c:285
+msgid "Inappropriate ioctl for device"
+msgstr "Nevalida 'ioctl' por aparato"
+
+#. TRANS An attempt to execute a file that is currently open for writing, or
+#. TRANS write to a file that is currently being executed. Often using a
+#. TRANS debugger to run a program is considered having it open for writing and
+#. TRANS will cause this error. (The name stands for ``text file busy''.) This
+#. TRANS is not an error on @gnuhurdsystems{}; the text is copied as necessary.
+#: sysdeps/gnu/errlist.c:298
+msgid "Text file busy"
+msgstr "Tekstdosiero uziÄas"
+
+#. TRANS File too big; the size of a file would be larger than allowed by the system.
+#: sysdeps/gnu/errlist.c:307
+msgid "File too large"
+msgstr "Dosiero tro grandas"
+
+#. TRANS No space left on device; write operation on a file failed because the
+#. TRANS disk is full.
+#: sysdeps/gnu/errlist.c:317
+#, fuzzy
+msgid "No space left on device"
+msgstr "Ne haviÄas plu da spaco sur aparato"
+
+#. TRANS Invalid seek operation (such as on a pipe).
+#: sysdeps/gnu/errlist.c:326
+msgid "Illegal seek"
+msgstr "Nevalida 'seek'"
+
+#. TRANS An attempt was made to modify something on a read-only file system.
+#: sysdeps/gnu/errlist.c:335
+msgid "Read-only file system"
+msgstr "Nur-lega dosiersistemo"
+
+#. TRANS Too many links; the link count of a single file would become too large.
+#. TRANS @code{rename} can cause this error if the file being renamed already has
+#. TRANS as many links as it can take (@pxref{Renaming Files}).
+#: sysdeps/gnu/errlist.c:346
+msgid "Too many links"
+msgstr "Tro da ligoj"
+
+#. TRANS Domain error; used by mathematical functions when an argument value does
+#. TRANS not fall into the domain over which the function is defined.
+#: sysdeps/gnu/errlist.c:369
+msgid "Numerical argument out of domain"
+msgstr "Numereca argumento estas ekster gamo"
+
+#. TRANS Range error; used by mathematical functions when the result value is
+#. TRANS not representable because of overflow or underflow.
+#: sysdeps/gnu/errlist.c:379
+msgid "Numerical result out of range"
+msgstr "Numereca rezulto estas ekster gamo"
+
+#. TRANS Resource temporarily unavailable; the call might work if you try again
+#. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN};
+#. TRANS they are always the same in @theglibc{}.
+#. TRANS
+#. TRANS This error can happen in a few different situations:
+#. TRANS
+#. TRANS @itemize @bullet
+#. TRANS @item
+#. TRANS An operation that would block was attempted on an object that has
+#. TRANS non-blocking mode selected. Trying the same operation again will block
+#. TRANS until some external condition makes it possible to read, write, or
+#. TRANS connect (whatever the operation). You can use @code{select} to find out
+#. TRANS when the operation will be possible; @pxref{Waiting for I/O}.
+#. TRANS
+#. TRANS @strong{Portability Note:} In many older Unix systems, this condition
+#. TRANS was indicated by @code{EWOULDBLOCK}, which was a distinct error code
+#. TRANS different from @code{EAGAIN}. To make your program portable, you should
+#. TRANS check for both codes and treat them the same.
+#. TRANS
+#. TRANS @item
+#. TRANS A temporary resource shortage made an operation impossible. @code{fork}
+#. TRANS can return this error. It indicates that the shortage is expected to
+#. TRANS pass, so your program can try the call again later and it may succeed.
+#. TRANS It is probably a good idea to delay for a few seconds before trying it
+#. TRANS again, to allow time for other processes to release scarce resources.
+#. TRANS Such shortages are usually fairly serious and affect the whole system,
+#. TRANS so usually an interactive program should report the error to the user
+#. TRANS and return to its command loop.
+#. TRANS @end itemize
+#: sysdeps/gnu/errlist.c:416
+msgid "Resource temporarily unavailable"
+msgstr "Risurco dumtempe ne disponeblas"
+
+#. TRANS In @theglibc{}, this is another name for @code{EAGAIN} (above).
+#. TRANS The values are always the same, on every operating system.
+#. TRANS
+#. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a
+#. TRANS separate error code.
+#: sysdeps/gnu/errlist.c:429
+msgid "Operation would block"
+msgstr "Operacio blokiÄus"
+
+#. TRANS An operation that cannot complete immediately was initiated on an object
+#. TRANS that has non-blocking mode selected. Some functions that must always
+#. TRANS block (such as @code{connect}; @pxref{Connecting}) never return
+#. TRANS @code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that
+#. TRANS the operation has begun and will take some time. Attempts to manipulate
+#. TRANS the object before the call completes return @code{EALREADY}. You can
+#. TRANS use the @code{select} function to find out when the pending operation
+#. TRANS has completed; @pxref{Waiting for I/O}.
+#: sysdeps/gnu/errlist.c:445
+msgid "Operation now in progress"
+msgstr "Operacio nun fariÄas"
+
+#. TRANS An operation is already in progress on an object that has non-blocking
+#. TRANS mode selected.
+#: sysdeps/gnu/errlist.c:455
+msgid "Operation already in progress"
+msgstr "Iu operacio jam fariÄas"
+
+#. TRANS A file that isn't a socket was specified when a socket is required.
+#: sysdeps/gnu/errlist.c:464
+msgid "Socket operation on non-socket"
+msgstr "Konektila operacio sur ne-konektilo"
+
+#. TRANS The size of a message sent on a socket was larger than the supported
+#. TRANS maximum size.
+#: sysdeps/gnu/errlist.c:474
+msgid "Message too long"
+msgstr "MesaÄo tro longas"
+
+#. TRANS The socket type does not support the requested communications protocol.
+#: sysdeps/gnu/errlist.c:483
+msgid "Protocol wrong type for socket"
+msgstr "Protokolo havas malÄustan tipon por konektilo"
+
+#. TRANS You specified a socket option that doesn't make sense for the
+#. TRANS particular protocol being used by the socket. @xref{Socket Options}.
+#: sysdeps/gnu/errlist.c:493
+msgid "Protocol not available"
+msgstr "Protokolo ne disponeblas"
+
+#. TRANS The socket domain does not support the requested communications protocol
+#. TRANS (perhaps because the requested protocol is completely invalid).
+#. TRANS @xref{Creating a Socket}.
+#: sysdeps/gnu/errlist.c:504
+msgid "Protocol not supported"
+msgstr "Protokolo ne subtenatas"
+
+#. TRANS The socket type is not supported.
+#: sysdeps/gnu/errlist.c:513
+msgid "Socket type not supported"
+msgstr "Konektiltipo ne subtenatas"
+
+#. TRANS The operation you requested is not supported. Some socket functions
+#. TRANS don't make sense for all types of sockets, and others may not be
+#. TRANS implemented for all communications protocols. On @gnuhurdsystems{}, this
+#. TRANS error can happen for many calls when the object does not support the
+#. TRANS particular operation; it is a generic indication that the server knows
+#. TRANS nothing to do for that call.
+#: sysdeps/gnu/errlist.c:527
+msgid "Operation not supported"
+msgstr "Operacio ne subtenatas"
+
+#. TRANS The socket communications protocol family you requested is not supported.
+#: sysdeps/gnu/errlist.c:536
+msgid "Protocol family not supported"
+msgstr "Familio de protokoloj ne subtenatas"
+
+#. TRANS The address family specified for a socket is not supported; it is
+#. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}.
+#: sysdeps/gnu/errlist.c:546
+msgid "Address family not supported by protocol"
+msgstr "Protokolo ne subtenas adresfamilion"
+
+#. TRANS The requested socket address is already in use. @xref{Socket Addresses}.
+#: sysdeps/gnu/errlist.c:555
+msgid "Address already in use"
+msgstr "Adreso jam uziÄas"
+
+#. TRANS The requested socket address is not available; for example, you tried
+#. TRANS to give a socket a name that doesn't match the local host name.
+#. TRANS @xref{Socket Addresses}.
+#: sysdeps/gnu/errlist.c:566
+msgid "Cannot assign requested address"
+msgstr "Ne eblas asigni petatan adreson"
+
+#. TRANS A socket operation failed because the network was down.
+#: sysdeps/gnu/errlist.c:575
+msgid "Network is down"
+msgstr "La reto ne funkcias"
+
+#. TRANS A socket operation failed because the subnet containing the remote host
+#. TRANS was unreachable.
+#: sysdeps/gnu/errlist.c:585
+msgid "Network is unreachable"
+msgstr "La reto ne atingeblas"
+
+#. TRANS A network connection was reset because the remote host crashed.
+#: sysdeps/gnu/errlist.c:594
+#, fuzzy
+msgid "Network dropped connection on reset"
+msgstr "La retkonekto malekis ĉar gastiganto malfunkciis"
+
+#. TRANS A network connection was aborted locally.
+#: sysdeps/gnu/errlist.c:603
+#, fuzzy
+msgid "Software caused connection abort"
+msgstr "La retkonekto malekis ĉar loka komputilo malfunkciis"
+
+#. TRANS A network connection was closed for reasons outside the control of the
+#. TRANS local host, such as by the remote machine rebooting or an unrecoverable
+#. TRANS protocol violation.
+#: sysdeps/gnu/errlist.c:614
+#, fuzzy
+msgid "Connection reset by peer"
+msgstr "Konekto malekis"
+
+#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this
+#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the
+#. TRANS other from network operations.
+#: sysdeps/gnu/errlist.c:625
+msgid "No buffer space available"
+msgstr "Mankas sufiĉa memoro por bufroj"
+
+#. TRANS You tried to connect a socket that is already connected.
+#. TRANS @xref{Connecting}.
+#: sysdeps/gnu/errlist.c:635
+msgid "Transport endpoint is already connected"
+msgstr "Celkonektilo jam havas konekton"
+
+#. TRANS The socket is not connected to anything. You get this error when you
+#. TRANS try to transmit data over a socket, without first specifying a
+#. TRANS destination for the data. For a connectionless socket (for datagram
+#. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead.
+#: sysdeps/gnu/errlist.c:647
+msgid "Transport endpoint is not connected"
+msgstr "Celkonektilo ne havas konekton"
+
+#. TRANS No default destination address was set for the socket. You get this
+#. TRANS error when you try to transmit data over a connectionless socket,
+#. TRANS without first specifying a destination for the data with @code{connect}.
+#: sysdeps/gnu/errlist.c:658
+msgid "Destination address required"
+msgstr "Celadreso bezoniÄas"
+
+#. TRANS The socket has already been shut down.
+#: sysdeps/gnu/errlist.c:667
+msgid "Cannot send after transport endpoint shutdown"
+msgstr "Ne eblas sendi post fermado de celkonektilo"
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:676
+msgid "Too many references: cannot splice"
+msgstr "Tro da referencoj: ne eblas displekti"
+
+#. TRANS A socket operation with a specified timeout received no response during
+#. TRANS the timeout period.
+#: sysdeps/gnu/errlist.c:686
+msgid "Connection timed out"
+msgstr "Konekto transpasis limtempon"
+
+#. TRANS A remote host refused to allow the network connection (typically because
+#. TRANS it is not running the requested service).
+#: sysdeps/gnu/errlist.c:696
+msgid "Connection refused"
+msgstr "Konekto rifuziÄas"
+
+#. TRANS Too many levels of symbolic links were encountered in looking up a file name.
+#. TRANS This often indicates a cycle of symbolic links.
+#: sysdeps/gnu/errlist.c:706
+msgid "Too many levels of symbolic links"
+msgstr "Tro multaj sinsekvaj simbolaj ligoj"
+
+#. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for
+#. TRANS Files}) or host name too long (in @code{gethostname} or
+#. TRANS @code{sethostname}; @pxref{Host Identification}).
+#: sysdeps/gnu/errlist.c:717
+msgid "File name too long"
+msgstr "Dosiernomo tro longas"
+
+#. TRANS The remote host for a requested network connection is down.
+#: sysdeps/gnu/errlist.c:726
+msgid "Host is down"
+msgstr "Gastiganto ne funkcias"
+
+#. TRANS The remote host for a requested network connection is not reachable.
+#: sysdeps/gnu/errlist.c:735
+msgid "No route to host"
+msgstr "Gastiganto ne atingeblas"
+
+#. TRANS Directory not empty, where an empty directory was expected. Typically,
+#. TRANS this error occurs when you are trying to delete a directory.
+#: sysdeps/gnu/errlist.c:745
+msgid "Directory not empty"
+msgstr "Dosierujo ne vakas"
+
+#. TRANS This means that the per-user limit on new process would be exceeded by
+#. TRANS an attempted @code{fork}. @xref{Limits on Resources}, for details on
+#. TRANS the @code{RLIMIT_NPROC} limit.
+#: sysdeps/gnu/errlist.c:756
+msgid "Too many processes"
+msgstr "Tro multaj procezoj"
+
+#. TRANS The file quota system is confused because there are too many users.
+#. TRANS @c This can probably happen in a GNU system when using NFS.
+#: sysdeps/gnu/errlist.c:766
+msgid "Too many users"
+msgstr "Tro multaj uzantoj"
+
+#. TRANS The user's disk quota was exceeded.
+#: sysdeps/gnu/errlist.c:775
+msgid "Disk quota exceeded"
+msgstr "Diska kvoto transpasiÄis"
+
+#. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS
+#. TRANS system which is due to file system rearrangements on the server host.
+#. TRANS Repairing this condition usually requires unmounting and remounting
+#. TRANS the NFS file system on the local host.
+#: sysdeps/gnu/errlist.c:787
+msgid "Stale NFS file handle"
+msgstr ""
+
+#. TRANS An attempt was made to NFS-mount a remote file system with a file name that
+#. TRANS already specifies an NFS-mounted file.
+#. TRANS (This is an error on some operating systems, but we expect it to work
+#. TRANS properly on @gnuhurdsystems{}, making this error code impossible.)
+#: sysdeps/gnu/errlist.c:799
+msgid "Object is remote"
+msgstr "Objekto estas fora"
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:808
+msgid "RPC struct is bad"
+msgstr ""
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:817
+msgid "RPC version wrong"
+msgstr ""
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:826
+msgid "RPC program not available"
+msgstr ""
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:835
+msgid "RPC program version wrong"
+msgstr ""
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:844
+msgid "RPC bad procedure for program"
+msgstr ""
+
+#. TRANS No locks available. This is used by the file locking facilities; see
+#. TRANS @ref{File Locks}. This error is never generated by @gnuhurdsystems{}, but
+#. TRANS it can result from an operation to an NFS server running another
+#. TRANS operating system.
+#: sysdeps/gnu/errlist.c:856
+msgid "No locks available"
+msgstr "Neniu Åloso disponeblas"
+
+#. TRANS Inappropriate file type or format. The file was the wrong type for the
+#. TRANS operation, or a data file had the wrong format.
+#. TRANS
+#. TRANS On some systems @code{chmod} returns this error if you try to set the
+#. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}.
+#: sysdeps/gnu/errlist.c:869
+msgid "Inappropriate file type or format"
+msgstr "Maladekvata dosiera tipo aÅ­ aranÄo"
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:878
+msgid "Authentication error"
+msgstr ""
+
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:887
+msgid "Need authenticator"
+msgstr ""
+
+#. TRANS Function not implemented. This indicates that the function called is
+#. TRANS not implemented at all, either in the C library itself or in the
+#. TRANS operating system. When you get this error, you can be sure that this
+#. TRANS particular function will always fail with @code{ENOSYS} unless you
+#. TRANS install a new version of the C library or the operating system.
+#: sysdeps/gnu/errlist.c:900
+msgid "Function not implemented"
+msgstr "Funkcio ne realiÄis"
+
+#. TRANS Not supported. A function returns this error when certain parameter
+#. TRANS values are valid, but the functionality they request is not available.
+#. TRANS This can mean that the function does not implement a particular command
+#. TRANS or option value or flag bit at all. For functions that operate on some
+#. TRANS object given in a parameter, such as a file descriptor or a port, it
+#. TRANS might instead mean that only @emph{that specific object} (file
+#. TRANS descriptor, port, etc.) is unable to support the other parameters given;
+#. TRANS different file descriptors might support different ranges of parameter
+#. TRANS values.
+#. TRANS
+#. TRANS If the entire function is not available at all in the implementation,
+#. TRANS it returns @code{ENOSYS} instead.
+#: sysdeps/gnu/errlist.c:920
+msgid "Not supported"
+msgstr "Ne subtenatas"
+
+#. TRANS While decoding a multibyte character the function came along an invalid
+#. TRANS or an incomplete sequence of bytes or the given wide character is invalid.
+#: sysdeps/gnu/errlist.c:930
+msgid "Invalid or incomplete multibyte or wide character"
+msgstr "Nevalida aü nekompleta plurbajta aü larÄa signo"
+
+#. TRANS On @gnuhurdsystems{}, servers supporting the @code{term} protocol return
+#. TRANS this error for certain operations when the caller is not in the
+#. TRANS foreground process group of the terminal. Users do not usually see this
+#. TRANS error because functions such as @code{read} and @code{write} translate
+#. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control},
+#. TRANS for information on process groups and these signals.
+#: sysdeps/gnu/errlist.c:944
+msgid "Inappropriate operation for background process"
+msgstr "Maladekvata operacio por fona procezo"
+
+#. TRANS On @gnuhurdsystems{}, opening a file returns this error when the file is
+#. TRANS translated by a program and the translator program dies while starting
+#. TRANS up, before it has connected to the file.
+#: sysdeps/gnu/errlist.c:955
+msgid "Translator died"
+msgstr "Tradukprogramo pereis"
+
+#. TRANS The experienced user will know what is wrong.
+#. TRANS @c This error code is a joke. Its perror text is part of the joke.
+#. TRANS @c Don't change it.
+#: sysdeps/gnu/errlist.c:966
+msgid "?"
+msgstr "?"
+
+#. TRANS You did @strong{what}?
+#: sysdeps/gnu/errlist.c:975
+msgid "You really blew it this time"
+msgstr "Vi plene ruinigis Äin ĉifoje"
+
+#. TRANS Go home and have a glass of warm, dairy-fresh milk.
+#: sysdeps/gnu/errlist.c:984
+msgid "Computer bought the farm"
+msgstr "SidiÄu kaj ne pensu plu"
+
+#. TRANS This error code has no purpose.
+#: sysdeps/gnu/errlist.c:993
+msgid "Gratuitous error"
+msgstr "Sensenca eraro"
+
+#: sysdeps/gnu/errlist.c:1001
+msgid "Bad message"
+msgstr "Malbona mesaÄo"
+
+#: sysdeps/gnu/errlist.c:1009
+msgid "Identifier removed"
+msgstr "Indentigilo forigiÄis"
+
+#: sysdeps/gnu/errlist.c:1017
+msgid "Multihop attempted"
+msgstr "Plursalta provo"
+
+#: sysdeps/gnu/errlist.c:1025
+msgid "No data available"
+msgstr "Ne disponeblas datumoj"
+
+#: sysdeps/gnu/errlist.c:1033
+msgid "Link has been severed"
+msgstr "Ligo tranĉiÄis"
+
+#: sysdeps/gnu/errlist.c:1041
+msgid "No message of desired type"
+msgstr "Neniu mesaÄo de petita tipo"
+
+#: sysdeps/gnu/errlist.c:1049
+msgid "Out of streams resources"
+msgstr "Ne havas plu da flu-risurcoj"
+
+#: sysdeps/gnu/errlist.c:1057
+msgid "Device not a stream"
+msgstr "Aparato ne estas fluo"
+
+#: sysdeps/gnu/errlist.c:1065
+msgid "Value too large for defined data type"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1073
+msgid "Protocol error"
+msgstr "Protokol-eraro"
+
+#: sysdeps/gnu/errlist.c:1081
+msgid "Timer expired"
+msgstr "HorloÄo transpasis limtempon"
+
+#. TRANS Operation canceled; an asynchronous operation was canceled before it
+#. TRANS completed. @xref{Asynchronous I/O}. When you call @code{aio_cancel},
+#. TRANS the normal result is for the operations affected to complete with this
+#. TRANS error; @pxref{Cancel AIO Operations}.
+#: sysdeps/gnu/errlist.c:1093
+msgid "Operation canceled"
+msgstr "Operacio nuligitas"
+
+#: sysdeps/gnu/errlist.c:1101
+msgid "Interrupted system call should be restarted"
+msgstr "Interrompita sistemvoko devus esti restartigata"
+
+#: sysdeps/gnu/errlist.c:1109
+msgid "Channel number out of range"
+msgstr "Kanalnumero estas ekster gamo"
+
+#: sysdeps/gnu/errlist.c:1117
+#, fuzzy
+msgid "Level 2 not synchronized"
+msgstr "Nivelo 2 ne sinkroniÄis"
+
+#: sysdeps/gnu/errlist.c:1125
+msgid "Level 3 halted"
+msgstr "Nivelo 3 haltiÄis"
+
+#: sysdeps/gnu/errlist.c:1133
+msgid "Level 3 reset"
+msgstr "Nivelo 3 rekomenco"
+
+#: sysdeps/gnu/errlist.c:1141
+msgid "Link number out of range"
+msgstr "Lignumero estas ekster gamo"
+
+#: sysdeps/gnu/errlist.c:1149
+msgid "Protocol driver not attached"
+msgstr "Protokolpelilo ne kunligatas"
+
+#: sysdeps/gnu/errlist.c:1157
+msgid "No CSI structure available"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1165
+msgid "Level 2 halted"
+msgstr "Nivelo 2 haltiÄis"
+
+#: sysdeps/gnu/errlist.c:1173
+msgid "Invalid exchange"
+msgstr "Nevalida interÅanÄo"
+
+#: sysdeps/gnu/errlist.c:1181
+#, fuzzy
+msgid "Invalid request descriptor"
+msgstr "Nevalida mend..."
+
+#: sysdeps/gnu/errlist.c:1189
+msgid "Exchange full"
+msgstr "InterÅanÄo plenas"
+
+#: sysdeps/gnu/errlist.c:1197
+msgid "No anode"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1205
+msgid "Invalid request code"
+msgstr "Nevalida mendkodo"
+
+#: sysdeps/gnu/errlist.c:1213
+msgid "Invalid slot"
+msgstr "Nevalida sulko"
+
+#: sysdeps/gnu/errlist.c:1221
+msgid "File locking deadlock error"
+msgstr "Klinĉeraro je dosierÅlosado"
+
+#: sysdeps/gnu/errlist.c:1229
+msgid "Bad font file format"
+msgstr "Nevalida aranÄo de tipardosiero"
+
+#: sysdeps/gnu/errlist.c:1237
+msgid "Machine is not on the network"
+msgstr "Komputilo ne havas retkonekton"
+
+#: sysdeps/gnu/errlist.c:1245
+msgid "Package not installed"
+msgstr "Pako ne estas instalita"
+
+#: sysdeps/gnu/errlist.c:1253
+msgid "Advertise error"
+msgstr "Anonc-eraro"
+
+#: sysdeps/gnu/errlist.c:1261
+msgid "Srmount error"
+msgstr "Eraro je 'srmount'"
+
+#: sysdeps/gnu/errlist.c:1269
+msgid "Communication error on send"
+msgstr "Komunik-eraro je sendo"
+
+#: sysdeps/gnu/errlist.c:1277
+msgid "RFS specific error"
+msgstr "RFS-specifa eraro"
+
+#: sysdeps/gnu/errlist.c:1285
+msgid "Name not unique on network"
+msgstr "Nomo ne unikas en reto"
+
+#: sysdeps/gnu/errlist.c:1293
+msgid "File descriptor in bad state"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1301
+msgid "Remote address changed"
+msgstr "Fora adreso ÅanÄis"
+
+#: sysdeps/gnu/errlist.c:1309
+msgid "Can not access a needed shared library"
+msgstr "Ne eblas atingi necesan komunan bibliotekon"
+
+#: sysdeps/gnu/errlist.c:1317
+msgid "Accessing a corrupted shared library"
+msgstr "Atingo de kripla komuna biblioteko"
+
+#: sysdeps/gnu/errlist.c:1325
+msgid ".lib section in a.out corrupted"
+msgstr "Sekcio '.lib' en «a.out» kriplas"
+
+#: sysdeps/gnu/errlist.c:1333
+msgid "Attempting to link in too many shared libraries"
+msgstr "Provo de bindi tro multajn komunajn bibliotekojn"
+
+#: sysdeps/gnu/errlist.c:1341
+msgid "Cannot exec a shared library directly"
+msgstr "Ne eblas rekte ruli komunan bibliotekon"
+
+#: sysdeps/gnu/errlist.c:1349
+msgid "Streams pipe error"
+msgstr "Fludukta eraro"
+
+#: sysdeps/gnu/errlist.c:1357
+msgid "Structure needs cleaning"
+msgstr "Strukturo bezonas purigon"
+
+#: sysdeps/gnu/errlist.c:1365
+msgid "Not a XENIX named type file"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1373
+msgid "No XENIX semaphores available"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1381
+msgid "Is a named type file"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1389
+msgid "Remote I/O error"
+msgstr "Fora eniga/eliga eraro"
+
+#: sysdeps/gnu/errlist.c:1397
+msgid "No medium found"
+msgstr "Neniu datumportilo troviÄas"
+
+#: sysdeps/gnu/errlist.c:1405
+msgid "Wrong medium type"
+msgstr "NeÄusta tipo de datumportilo"
+
+#: sysdeps/gnu/errlist.c:1413
+msgid "Required key not available"
+msgstr "Necesa Ålosilo ne disponeblas"
+
+#: sysdeps/gnu/errlist.c:1421
+msgid "Key has expired"
+msgstr "Åœlosilo kadukiÄis"
+
+#: sysdeps/gnu/errlist.c:1429
+msgid "Key has been revoked"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1437
+msgid "Key was rejected by service"
+msgstr "Åœlosilo rifuziÄis per servo"
+
+#: sysdeps/gnu/errlist.c:1445
+msgid "Owner died"
+msgstr "Posedanto ĉesiÄis"
+
+#: sysdeps/gnu/errlist.c:1453
+msgid "State not recoverable"
+msgstr "Stato ne ripareblas"
+
+#: sysdeps/gnu/errlist.c:1461
+msgid "Operation not possible due to RF-kill"
+msgstr ""
+
+#: sysdeps/gnu/errlist.c:1469
+msgid "Memory page has hardware error"
+msgstr "MemorpaÄo havas fizikan difekton"
+
+#: sysdeps/mach/_strerror.c:56
+msgid "Error in unknown error system: "
+msgstr "Eraro en nekonata erarsistemo: "
+
+#: sysdeps/posix/gai_strerror-strs.h:1
+msgid "Address family for hostname not supported"
+msgstr "Ne subteniÄas adresfamilio por komputilretnomo"
+
+#: sysdeps/posix/gai_strerror-strs.h:2
+msgid "Temporary failure in name resolution"
+msgstr "Dumtempa malsukceso ĉe nom-eltrovo"
+
+#: sysdeps/posix/gai_strerror-strs.h:3
+msgid "Bad value for ai_flags"
+msgstr "Misa valoro por 'ai_flags'"
+
+#: sysdeps/posix/gai_strerror-strs.h:4
+msgid "Non-recoverable failure in name resolution"
+msgstr "Neriparebla malsukceso ĉe nom-eltrovo"
+
+#: sysdeps/posix/gai_strerror-strs.h:5
+msgid "ai_family not supported"
+msgstr "'ai_family' ne subtenatas"
+
+#: sysdeps/posix/gai_strerror-strs.h:6
+msgid "Memory allocation failure"
+msgstr "Mankas sufiĉa memoro"
+
+#: sysdeps/posix/gai_strerror-strs.h:7
+msgid "No address associated with hostname"
+msgstr "Neniu adreso estas asociata kun nomo de gastiga komputilo"
+
+#: sysdeps/posix/gai_strerror-strs.h:8
+msgid "Name or service not known"
+msgstr "Nomo aÅ­ servo ne konatas"
+
+#: sysdeps/posix/gai_strerror-strs.h:9
+msgid "Servname not supported for ai_socktype"
+msgstr "'servname' ne subtenatas por 'ai_socktype'"
+
+#: sysdeps/posix/gai_strerror-strs.h:10
+msgid "ai_socktype not supported"
+msgstr "'ai_socktype' ne subtenatas"
+
+#: sysdeps/posix/gai_strerror-strs.h:11
+msgid "System error"
+msgstr "Sistemeraro"
+
+#: sysdeps/posix/gai_strerror-strs.h:12
+msgid "Processing request in progress"
+msgstr "Traktado de peto daÅ­ras"
+
+#: sysdeps/posix/gai_strerror-strs.h:13
+msgid "Request canceled"
+msgstr "Peto nuligitas"
+
+#: sysdeps/posix/gai_strerror-strs.h:14
+msgid "Request not canceled"
+msgstr "Peto ne nuligitas"
+
+#: sysdeps/posix/gai_strerror-strs.h:15
+msgid "All requests done"
+msgstr "Ĉiuj petoj estas plenumitaj"
+
+#: sysdeps/posix/gai_strerror-strs.h:16
+msgid "Interrupted by a signal"
+msgstr "Interrompita per signalo"
+
+#: sysdeps/posix/gai_strerror-strs.h:17
+msgid "Parameter string not correctly encoded"
+msgstr "Parametra ĉeno ne estas Äuste kodita"
+
+#: sysdeps/unix/sysv/linux/i386/readelflib.c:65
+#, c-format
+msgid "%s is for unknown machine %d.\n"
+msgstr ""
+
+#: sysdeps/unix/sysv/linux/lddlibc4.c:60
+#, c-format
+msgid ""
+"Usage: lddlibc4 FILE\n"
+"\n"
+msgstr ""
+
+#: sysdeps/unix/sysv/linux/lddlibc4.c:81
+#, c-format
+msgid "cannot open `%s'"
+msgstr "ne eblas malfermi «%s»"
+
+#: sysdeps/unix/sysv/linux/lddlibc4.c:85
+#, c-format
+msgid "cannot read header from `%s'"
+msgstr "ne eblas legi ĉapon el «%s»"
+
+#: timezone/zdump.c:215
+msgid "lacks alphabetic at start"
+msgstr "ne havas komencan literon"
+
+#: timezone/zdump.c:217
+msgid "has fewer than 3 alphabetics"
+msgstr "havas malpli ol tri literojn"
+
+#: timezone/zdump.c:219
+msgid "has more than 6 alphabetics"
+msgstr "havas pli ol ses literojn"
+
+#: timezone/zdump.c:227
+msgid "differs from POSIX standard"
+msgstr ""
+
+#: timezone/zdump.c:233
+#, c-format
+msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
+msgstr ""
+
+#: timezone/zdump.c:244
+#, c-format
+msgid ""
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
+"\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
+msgstr ""
+
+#: timezone/zdump.c:313
+#, c-format
+msgid "%s: wild -c argument %s\n"
+msgstr ""
+
+#: timezone/zdump.c:400
+msgid "Error writing to standard output"
+msgstr "Eraro dum skribado al ĉefeligujo"
+
+#: timezone/zdump.c:423
+#, c-format
+msgid "%s: use of -v on system with floating time_t other than float or double\n"
+msgstr ""
+
+#: timezone/zic.c:388
+#, c-format
+msgid "%s: Memory exhausted: %s\n"
+msgstr "%s: Mankas sufiĉa memoro: %s\n"
+
+#: timezone/zic.c:434
+#, c-format
+msgid "\"%s\", line %d: %s"
+msgstr "«%s», linio %d: %s"
+
+#: timezone/zic.c:437
+#, c-format
+msgid " (rule from \"%s\", line %d)"
+msgstr " (regulo el «%s», linio %d)"
+
+#: timezone/zic.c:449
+msgid "warning: "
+msgstr "averto: "
+
+#: timezone/zic.c:459
+#, c-format
+msgid ""
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
+"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
+"\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
+msgstr ""
+
+#: timezone/zic.c:496
+msgid "wild compilation-time specification of zic_t"
+msgstr ""
+
+#: timezone/zic.c:515
+#, c-format
+msgid "%s: More than one -d option specified\n"
+msgstr "%s: Indikatas pluraj opcioj «-d»\n"
+
+#: timezone/zic.c:525
+#, c-format
+msgid "%s: More than one -l option specified\n"
+msgstr "%s: Indikatas pluraj opcioj «-l»\n"
+
+#: timezone/zic.c:535
+#, c-format
+msgid "%s: More than one -p option specified\n"
+msgstr "%s: Indikatas pluraj opcioj «-p»\n"
+
+#: timezone/zic.c:545
+#, c-format
+msgid "%s: More than one -y option specified\n"
+msgstr "%s: Indikatas pluraj opcioj «-y»\n"
+
+#: timezone/zic.c:555
+#, c-format
+msgid "%s: More than one -L option specified\n"
+msgstr "%s: Indikatas pluraj opcioj «-L»\n"
+
+#: timezone/zic.c:604
+msgid "link to link"
+msgstr "ligo al ligo"
+
+#: timezone/zic.c:669
+msgid "hard link failed, symbolic link used"
+msgstr "senpera ligo malsukcesis; simbola ligo uziÄis"
+
+#: timezone/zic.c:677
+#, c-format
+msgid "%s: Can't link from %s to %s: %s\n"
+msgstr "%s: Ne eblas ligi de %s al %s: %s\n"
+
+#: timezone/zic.c:749 timezone/zic.c:751
+msgid "same rule name in multiple files"
+msgstr "sama regulnomo en pluraj dosieroj"
+
+#: timezone/zic.c:792
+msgid "unruly zone"
+msgstr "senbrida zono"
+
+#: timezone/zic.c:799
+#, c-format
+msgid "%s in ruleless zone"
+msgstr "%s en senregula zono"
+
+#: timezone/zic.c:820
+msgid "standard input"
+msgstr "ĉefenigujo"
+
+#: timezone/zic.c:825
+#, c-format
+msgid "%s: Can't open %s: %s\n"
+msgstr "%s: Ne eblas malfermi %s: %s\n"
+
+#: timezone/zic.c:836
+msgid "line too long"
+msgstr "linio tro longas"
+
+#: timezone/zic.c:856
+msgid "input line of unknown type"
+msgstr "eniga linio estas de nekonata tipo"
+
+#: timezone/zic.c:872
+#, c-format
+msgid "%s: Leap line in non leap seconds file %s\n"
+msgstr ""
+
+#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
+#, c-format
+msgid "%s: panic: Invalid l_value %d\n"
+msgstr ""
+
+#: timezone/zic.c:887
+#, c-format
+msgid "%s: Error reading %s\n"
+msgstr "%s: Eraro dum legado de %s\n"
+
+#: timezone/zic.c:894
+#, c-format
+msgid "%s: Error closing %s: %s\n"
+msgstr "%s: Eraro dum fermado de %s: %s\n"
+
+#: timezone/zic.c:899
+msgid "expected continuation line not found"
+msgstr ""
+
+#: timezone/zic.c:943 timezone/zic.c:2541 timezone/zic.c:2560
+msgid "time overflow"
+msgstr "temptroo"
+
+#: timezone/zic.c:947
+msgid "24:00 not handled by pre-1998 versions of zic"
+msgstr ""
+
+#: timezone/zic.c:950
+msgid "values over 24 hours not handled by pre-2007 versions of zic"
+msgstr ""
+
+#: timezone/zic.c:963
+msgid "wrong number of fields on Rule line"
+msgstr ""
+
+#: timezone/zic.c:967
+msgid "nameless rule"
+msgstr "sennoma regulo"
+
+#: timezone/zic.c:972
+msgid "invalid saved time"
+msgstr "nevalida konservita tempo"
+
+#: timezone/zic.c:993
+msgid "wrong number of fields on Zone line"
+msgstr ""
+
+#: timezone/zic.c:999
+#, c-format
+msgid "\"Zone %s\" line and -l option are mutually exclusive"
+msgstr ""
+
+#: timezone/zic.c:1007
+#, c-format
+msgid "\"Zone %s\" line and -p option are mutually exclusive"
+msgstr ""
+
+#: timezone/zic.c:1019
+#, c-format
+msgid "duplicate zone name %s (file \"%s\", line %d)"
+msgstr ""
+
+#: timezone/zic.c:1035
+msgid "wrong number of fields on Zone continuation line"
+msgstr ""
+
+#: timezone/zic.c:1075
+msgid "invalid UTC offset"
+msgstr "nevalida UTC-deÅovo"
+
+#: timezone/zic.c:1078
+msgid "invalid abbreviation format"
+msgstr "nevalida aranÄo de mallongigo"
+
+#: timezone/zic.c:1107
+msgid "Zone continuation line end time is not after end time of previous line"
+msgstr ""
+
+#: timezone/zic.c:1135
+msgid "wrong number of fields on Leap line"
+msgstr ""
+
+#: timezone/zic.c:1144
+msgid "invalid leaping year"
+msgstr ""
+
+#: timezone/zic.c:1164 timezone/zic.c:1270
+msgid "invalid month name"
+msgstr "nevalida monatnomo"
+
+#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
+msgid "invalid day of month"
+msgstr "nevalida tago de monato"
+
+#: timezone/zic.c:1182
+msgid "time before zero"
+msgstr "tempo antaÅ­ nulo"
+
+#: timezone/zic.c:1186
+msgid "time too small"
+msgstr "tempo tro etas"
+
+#: timezone/zic.c:1190
+msgid "time too large"
+msgstr "tempo tro grandas"
+
+#: timezone/zic.c:1194 timezone/zic.c:1299
+msgid "invalid time of day"
+msgstr "nevalida tempo de tago"
+
+#: timezone/zic.c:1213
+msgid "illegal CORRECTION field on Leap line"
+msgstr ""
+
+#: timezone/zic.c:1218
+msgid "illegal Rolling/Stationary field on Leap line"
+msgstr ""
+
+#: timezone/zic.c:1234
+msgid "wrong number of fields on Link line"
+msgstr ""
+
+#: timezone/zic.c:1238
+msgid "blank FROM field on Link line"
+msgstr ""
+
+#: timezone/zic.c:1242
+msgid "blank TO field on Link line"
+msgstr ""
+
+#: timezone/zic.c:1320
+msgid "invalid starting year"
+msgstr "nevalida komencjaro"
+
+#: timezone/zic.c:1342
+msgid "invalid ending year"
+msgstr "nevalida finjaro"
+
+#: timezone/zic.c:1346
+msgid "starting year greater than ending year"
+msgstr "komencjaro pli grandas ol finjaro"
+
+#: timezone/zic.c:1353
+msgid "typed single year"
+msgstr ""
+
+#: timezone/zic.c:1388
+msgid "invalid weekday name"
+msgstr "nevalida nomo de semajntago"
+
+#: timezone/zic.c:1566
+#, c-format
+msgid "%s: Can't remove %s: %s\n"
+msgstr "%s: Ne eblas forigi %s: %s\n"
+
+#: timezone/zic.c:1576
+#, c-format
+msgid "%s: Can't create %s: %s\n"
+msgstr "%s: Ne eblas krei %s: %s\n"
+
+#: timezone/zic.c:1773
+#, c-format
+msgid "%s: Error writing %s\n"
+msgstr "%s: Eraro dum skribado de %s\n"
+
+#: timezone/zic.c:2070
+msgid "no POSIX environment variable for zone"
+msgstr ""
+
+#: timezone/zic.c:2237
+msgid "can't determine time zone abbreviation to use just after until time"
+msgstr ""
+
+#: timezone/zic.c:2283
+msgid "too many transitions?!"
+msgstr ""
+
+#: timezone/zic.c:2302
+msgid "internal error - addtype called with bad isdst"
+msgstr ""
+
+#: timezone/zic.c:2306
+msgid "internal error - addtype called with bad ttisstd"
+msgstr ""
+
+#: timezone/zic.c:2310
+msgid "internal error - addtype called with bad ttisgmt"
+msgstr ""
+
+#: timezone/zic.c:2329
+msgid "too many local time types"
+msgstr ""
+
+#: timezone/zic.c:2333
+msgid "UTC offset out of range"
+msgstr ""
+
+#: timezone/zic.c:2361
+msgid "too many leap seconds"
+msgstr ""
+
+#: timezone/zic.c:2367
+msgid "repeated leap second moment"
+msgstr ""
+
+#: timezone/zic.c:2419
+msgid "Wild result from command execution"
+msgstr "Bizara rezulto el komandrulo"
+
+#: timezone/zic.c:2420
+#, c-format
+msgid "%s: command was '%s', result was %d\n"
+msgstr "%s: komando estis '%s', rezulto estis %d\n"
+
+#: timezone/zic.c:2518
+msgid "Odd number of quotation marks"
+msgstr "Nepara nombro de citiloj"
+
+#: timezone/zic.c:2607
+msgid "use of 2/29 in non leap-year"
+msgstr ""
+
+#: timezone/zic.c:2642
+msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
+msgstr ""
+
+#: timezone/zic.c:2674
+msgid "time zone abbreviation lacks alphabetic at start"
+msgstr ""
+
+#: timezone/zic.c:2676
+msgid "time zone abbreviation has more than 3 alphabetics"
+msgstr ""
+
+#: timezone/zic.c:2678
+msgid "time zone abbreviation has too many alphabetics"
+msgstr ""
+
+#: timezone/zic.c:2688
+msgid "time zone abbreviation differs from POSIX standard"
+msgstr ""
+
+#: timezone/zic.c:2700
+msgid "too many, or too long, time zone abbreviations"
+msgstr ""
+
+#: timezone/zic.c:2741
+#, c-format
+msgid "%s: Can't create directory %s: %s\n"
+msgstr "%s: Ne eblas krei dosierujon %s: %s\n"
+
+#: timezone/zic.c:2763
+#, c-format
+msgid "%s: %d did not sign extend correctly\n"
+msgstr ""
diff --git a/po/ru.po b/po/ru.po
index d019327ad2..97128d2737 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,12 +7,13 @@
# Oleg Tihonov <ost@tatnipi.ru>, 2005, 2007.
# Dimitriy Ryazantcev <DJm00n@mail.ru>, 2009.
# Pavel Maryanov <acid_jack@ukr.net>, 2009.
+# Dmitry V. Levin <ldv@altlinux.org>, 2012.
# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2011, 2012.
msgid ""
msgstr ""
"Project-Id-Version: libc 2.16-pre1\n"
"POT-Creation-Date: 2012-06-21 07:51-0700\n"
-"PO-Revision-Date: 2012-07-15 11:30+0400\n"
+"PO-Revision-Date: 2012-10-15 18:38+0400\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <gnu@mx.ru>\n"
"Language: ru\n"
@@ -220,7 +221,7 @@ msgstr "неверный Ñкранирующий знак"
#: catgets/gencat.c:573
#, c-format
msgid "unknown directive `%s': line ignored"
-msgstr "неизвеÑÑ‚Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° «%s»: Ñтрока игнорирована"
+msgstr "неизвеÑÑ‚Ð½Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¸Ð²Ð° «%s»: Ñтрока проигнорирована"
#: catgets/gencat.c:618
msgid "duplicated message number"
@@ -232,7 +233,7 @@ msgstr "повторный идентификатор ÑообщениÑ"
#: catgets/gencat.c:726
msgid "invalid character: message ignored"
-msgstr "недопуÑтимый знак: Ñообщение игнорировано"
+msgstr "недопуÑтимый знак: Ñообщение проигнорировано"
#: catgets/gencat.c:769
msgid "invalid line"
@@ -240,7 +241,7 @@ msgstr "Ð½ÐµÐ²ÐµÑ€Ð½Ð°Ñ Ñтрока"
#: catgets/gencat.c:823
msgid "malformed line ignored"
-msgstr "Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока игнорирована"
+msgstr "Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтрока проигнорирована"
#: catgets/gencat.c:987 catgets/gencat.c:1028
#, c-format
@@ -697,7 +698,7 @@ msgstr "RTLD_NEXT иÑпользовано в не динамичеÑки заг
#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
msgid "cannot create capability list"
-msgstr "невозможно Ñоздать ÑпиÑок возможноÑтей"
+msgstr "невозможно Ñоздать capability list"
#: elf/dl-tls.c:872
msgid "cannot create TLS data structures"
@@ -831,7 +832,7 @@ msgstr "Ðевозможно выполнить lstat %s"
#: elf/ldconfig.c:601
#, c-format
msgid "Ignored file %s since it is not a regular file."
-msgstr "Файл %s игнорирован, поÑкольку Ñто не обычный файл"
+msgstr "Файл %s проигнорирован, поÑкольку не ÑвлÑетÑÑ Ð¾Ð±Ñ‹Ñ‡Ð½Ñ‹Ð¼ файлом"
#: elf/ldconfig.c:610
#, c-format
@@ -2867,17 +2868,17 @@ msgstr "Добавление %s\n"
#: locale/programs/locarchive.c:1281
#, c-format
msgid "stat of \"%s\" failed: %s: ignored"
-msgstr "Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ stat Ð´Ð»Ñ Â«%s» завершилаÑÑŒ неудачно: %s: игнорировано"
+msgstr "Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ stat Ð´Ð»Ñ Â«%s» завершилаÑÑŒ неудачно: %s: проигнорировано"
#: locale/programs/locarchive.c:1287
#, c-format
msgid "\"%s\" is no directory; ignored"
-msgstr "«%s» не ÑвлÑетÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼; игнорировано"
+msgstr "«%s» не ÑвлÑетÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼; проигнорировано"
#: locale/programs/locarchive.c:1294
#, c-format
msgid "cannot open directory \"%s\": %s: ignored"
-msgstr "невозможно открыть каталог «%s»: %s: игнорировано"
+msgstr "невозможно открыть каталог «%s»: %s: проигнорировано"
#: locale/programs/locarchive.c:1366
#, c-format
@@ -2887,7 +2888,7 @@ msgstr "неполный набор файлов локали в «%s»"
#: locale/programs/locarchive.c:1430
#, c-format
msgid "cannot read all files in \"%s\": ignored"
-msgstr "невозможно прочитать вÑе файлы в «%s»: игнорировано"
+msgstr "невозможно прочитать вÑе файлы в «%s»: проигнорировано"
#: locale/programs/locarchive.c:1500
#, c-format
@@ -4358,7 +4359,7 @@ msgstr "Ðе удалоÑÑŒ открыть Ñоединение Ñ Ð¿Ð¾Ð´ÑиÑÑ
#: nscd/selinux.c:181
msgid "Failed to set keep-capabilities"
-msgstr "Ðе удалоÑÑŒ уÑтановить возможноÑти хранениÑ"
+msgstr "Ðе удалоÑÑŒ уÑтановить keep-capabilities"
#: nscd/selinux.c:182 nscd/selinux.c:245
#, c-format
@@ -4367,7 +4368,7 @@ msgstr "prctl(KEEPCAPS) завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: nscd/selinux.c:196
msgid "Failed to initialize drop of capabilities"
-msgstr "Ðе удалоÑÑŒ инициализировать возможноÑти ÑброÑа"
+msgstr "Ðе удалоÑÑŒ инициализировать ÑÐ±Ñ€Ð¾Ñ capabilities"
#: nscd/selinux.c:197
#, c-format
@@ -4376,7 +4377,7 @@ msgstr "cap_init завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: nscd/selinux.c:218 nscd/selinux.c:235
msgid "Failed to drop capabilities"
-msgstr "Ðе удалоÑÑŒ ÑброÑить возможноÑти"
+msgstr "Ðе удалоÑÑŒ ÑброÑить capabilities"
#: nscd/selinux.c:219 nscd/selinux.c:236
#, c-format
@@ -4385,7 +4386,7 @@ msgstr "cap_set_proc завершилÑÑ Ð½ÐµÑƒÐ´Ð°Ñ‡Ð½Ð¾"
#: nscd/selinux.c:244
msgid "Failed to unset keep-capabilities"
-msgstr "Ðе удалоÑÑŒ ÑнÑÑ‚ÑŒ возможноÑти хранениÑ"
+msgstr "Ðе удалоÑÑŒ ÑнÑÑ‚ÑŒ keep-capabilities"
#: nscd/selinux.c:260
msgid "Failed to determine if kernel supports SELinux"
@@ -4828,7 +4829,7 @@ msgstr "%s: Ñтрока %d: Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð° «%s»\n"
#: resolv/res_hconf.c:280
#, c-format
msgid "%s: line %d: ignoring trailing garbage `%s'\n"
-msgstr "%s: Ñтрока %d: игнорирован муÑор в конце «%s»\n"
+msgstr "%s: Ñтрока %d: проигнорирован муÑор в конце «%s»\n"
#: stdio-common/psiginfo-data.h:2
msgid "Illegal opcode"
@@ -5776,7 +5777,7 @@ msgstr "ÐŸÐ¾Ñ‚ÐµÑ€Ñ Ñ€ÐµÑурÑа"
#. TRANS or processes with special privileges can perform the operation.
#: sysdeps/gnu/errlist.c:25
msgid "Operation not permitted"
-msgstr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ позволÑетÑÑ"
+msgstr "ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ позволена"
#. TRANS No process matches the specified process ID.
#: sysdeps/gnu/errlist.c:45
@@ -5948,7 +5949,7 @@ msgstr "Файл Ñлишком велик"
#. TRANS disk is full.
#: sysdeps/gnu/errlist.c:317
msgid "No space left on device"
-msgstr "Ðа уÑтройÑтве кончилоÑÑŒ меÑто"
+msgstr "Ðа уÑтройÑтве не оÑталоÑÑŒ Ñвободного меÑта"
#. TRANS Invalid seek operation (such as on a pipe).
#: sysdeps/gnu/errlist.c:326
@@ -6053,7 +6054,7 @@ msgstr "Сообщение Ñлишком длинное"
#. TRANS The socket type does not support the requested communications protocol.
#: sysdeps/gnu/errlist.c:483
msgid "Protocol wrong type for socket"
-msgstr "Ðеподдерживаемый Ð´Ð»Ñ Ñокета тип протокола"
+msgstr "Ðеподдерживаемый тип протокола Ð´Ð»Ñ Ñокета"
#. TRANS You specified a socket option that doesn't make sense for the
#. TRANS particular protocol being used by the socket. @xref{Socket Options}.
@@ -6120,19 +6121,19 @@ msgstr "Сеть недоÑтупна"
#. TRANS A network connection was reset because the remote host crashed.
#: sysdeps/gnu/errlist.c:594
msgid "Network dropped connection on reset"
-msgstr "Сетевое Ñоединение было Ñброшено"
+msgstr "Сетевое Ñоединение было разорвано"
#. TRANS A network connection was aborted locally.
#: sysdeps/gnu/errlist.c:603
msgid "Software caused connection abort"
-msgstr "Программа вызвала ÑÐ±Ñ€Ð¾Ñ ÑоединениÑ"
+msgstr "Программа вызвала разрыв ÑоединениÑ"
#. TRANS A network connection was closed for reasons outside the control of the
#. TRANS local host, such as by the remote machine rebooting or an unrecoverable
#. TRANS protocol violation.
#: sysdeps/gnu/errlist.c:614
msgid "Connection reset by peer"
-msgstr "Соединение Ñброшено другой Ñтороной"
+msgstr "Соединение разорвано другой Ñтороной"
#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this
#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the
@@ -6165,7 +6166,7 @@ msgstr "ТребуетÑÑ ÑƒÐºÐ°Ð·Ð°Ñ‚ÑŒ Ð°Ð´Ñ€ÐµÑ Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ"
#. TRANS The socket has already been shut down.
#: sysdeps/gnu/errlist.c:667
msgid "Cannot send after transport endpoint shutdown"
-msgstr "Ðевозможно поÑлать данные поÑле Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½ÐµÑ‡Ð½Ð¾Ð¹ точки передачи"
+msgstr "Ðевозможно отправить данные поÑле Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ ÐºÐ¾Ð½ÐµÑ‡Ð½Ð¾Ð¹ точки передачи"
#. TRANS ???
#: sysdeps/gnu/errlist.c:676
@@ -6250,7 +6251,7 @@ msgstr "Это удаленный объект"
#. TRANS ???
#: sysdeps/gnu/errlist.c:808
msgid "RPC struct is bad"
-msgstr " RPC Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтруктура"
+msgstr "RPC Ð½ÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ñтруктура"
#. TRANS ???
#: sysdeps/gnu/errlist.c:817
@@ -6328,7 +6329,7 @@ msgstr "Ðе поддерживаетÑÑ"
#. TRANS or an incomplete sequence of bytes or the given wide character is invalid.
#: sysdeps/gnu/errlist.c:930
msgid "Invalid or incomplete multibyte or wide character"
-msgstr "Ðеверный или неполный мультибайтный или широкий знак"
+msgstr "Ðеверный или неполный мультибайтный или широкий Ñимвол"
#. TRANS On @gnuhurdsystems{}, servers supporting the @code{term} protocol return
#. TRANS this error for certain operations when the caller is not in the
@@ -6362,7 +6363,7 @@ msgstr "Ðа Ñтот раз вы вÑех опрокинули"
#. TRANS Go home and have a glass of warm, dairy-fresh milk.
#: sysdeps/gnu/errlist.c:984
msgid "Computer bought the farm"
-msgstr "Компьютер купил ферму"
+msgstr "Компьютер отброÑил копыта"
#. TRANS This error code has no purpose.
#: sysdeps/gnu/errlist.c:993
@@ -6555,7 +6556,7 @@ msgstr "Структуру необходимо почиÑтить"
#: sysdeps/gnu/errlist.c:1365
msgid "Not a XENIX named type file"
-msgstr "Тип файла не назван XENIX"
+msgstr "Ðе ÑвлÑетÑÑ Ñ„Ð°Ð¹Ð»Ð¾Ð¼ именованного типа XENIX"
#: sysdeps/gnu/errlist.c:1373
msgid "No XENIX semaphores available"
@@ -6563,7 +6564,7 @@ msgstr "Семафоры XENIX недоÑтупны"
#: sysdeps/gnu/errlist.c:1381
msgid "Is a named type file"
-msgstr "ЯвлÑетÑÑ Ñ„Ð°Ð¹Ð»Ð¾Ð¼ имен типов"
+msgstr "ЯвлÑетÑÑ Ñ„Ð°Ð¹Ð»Ð¾Ð¼ именованного типа"
#: sysdeps/gnu/errlist.c:1389
msgid "Remote I/O error"
diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 3094fcd214..eff592b0cb 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,3 +1,133 @@
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14047]
+ * sysdeps/alpha/tininess.h: New file.
+
+2012-10-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
+ (GLIBC_2.17): Add clock_* symbols.
+
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/alpha/configure: Regenerated.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-10-01 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+ (__SWBLK_T_TYPE): Macro removed.
+
+2012-09-28 Richard Henderson <rth@redhat.com>
+
+ * sysdeps/unix/alpha/sysdep.h (PSEUDO_END): Merge versions and
+ move $syscall_error label...
+ (SYSCALL_ERROR_HANDLER): ... here.
+ (SYSCALL_ERROR_FALLTHRU): New.
+ (PSEUDO_PROF): Split out of ...
+ (PSEUDO_PROLOGUE): ... here.
+ * sysdeps/unix/sysv/linux/alpha/syscall.S (__syscall): Use
+ SYSCALL_ERROR_LABEL and PSEUDO_END.
+ * sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Likewise.
+ Use USEPV_PROF and cfi markup.
+ (thread_start): Use cfi markup and cfi_undefined on ra.
+ * sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+ (PSEUDO_PROF): Remove.
+ (PSEUDO): Use SYSCALL_ERROR_FALLTHRU.
+
+2012-09-13 Richard Henderson <rth@redhat.com>
+
+ * sysdeps/unix/sysv/linux/alpha/setfpucw.c (__setfpucw): Rewrite
+ with the assumption of being used at program startup only.
+
+ * sysdeps/unix/sysv/linux/alpha/nptl/localplt.data: Add optional
+ entries for _OtsConvertFloatTX, _OtsCvtQUX, _OtsCvtXQ, _OtsGtrX,
+ _OtsLeqX, _OtsNintXQ.
+
+ * sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
+
+ * sysdeps/alpha/fpu/get-rounding-mode.h: New file.
+
+2012-08-30 Richard Henderson <rth@redhat.com>
+
+ * sysdeps/alpha/fpu/s_isnan.c: Define all aliases in terms of
+ the original __isnan symbol.
+
+2012-08-27 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #5400]
+ * sysdeps/unix/sysv/linux/alpha/Makefile (CFLAGS-fdatasync.c): Define.
+ * sysdeps/unix/sysv/linux/alpha/fdatasync.c: New file
+ * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+ (__ASSUME_FDATASYNC): Define.
+
+2012-08-16 Carlos O'Donell <carlos_odonell@mentor.com>
+
+ * sysdeps/alpha/ldsodefs.h (ARCH_PLTENTER_MEMBERS)
+ <alpha_gnu_pltenter>: struct La_alpha_regs is not const.
+
+2012-08-13 Richard Henderson <rth@twiddle.net>
+
+ * configure.in: Don't test toolchain support for TLS or GPREL.
+ * configure: Rebuild.
+
+ * sysdeps/alpha/fpu/s_nearbyint.c (nearbyintl): Do compat
+ with GLIBC_2_1.
+
+2012-08-08 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+ (__ASSUME_TGKILL): Remove.
+
+2012-08-08 Richard Henderson <rth@twiddle.net>
+
+ * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+ (__ASSUME_IEEE_RAISE_EXCEPTION): Remove.
+ * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S: New file.
+ * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: Remove.
+
+ * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use dwarf2
+ cfi markup for unwind. Adjust stack early so that the normal
+ syscall error path can be used.
+ * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
+
+ * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+ * sysdeps/unix/sysv/linux/alpha/fxstat.c: Remove test
+ for __ASSUME_STAT64_SYSCALL.
+ * sysdeps/unsx/sysv/linux/alpha/fxstatat.c: Likewise.
+ * sysdeps/unsx/sysv/linux/alpha/lxstat.c: Likewise.
+ * sysdeps/unsx/sysv/linux/alpha/xstat.c: Likewise.
+ * sysdeps/unsx/sysv/linux/alpha/xstatconv.c: Likewise.
+ * sysdeps/unsx/sysv/linux/alpha/xstatconv.h: Likewise.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+ (__ASSUME_TGKILL): Define unconditionally.
+ (__ASSUME_STAT64_SYSCALL): Likewise.
+ (__ASSUME_IEEE_RAISE_EXCEPTION): Likewise.
+
+2012-08-02 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/dirent.h
+ (_DIRENT_MATCHES_DIRENT64): New macro.
+
+2012-08-02 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+ (__OFF_T_MATCHES_OFF64_T): New macro.
+
+2012-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/alpha/configure.in
+ (arch_minimum_kernel): Remove.
+ * sysdeps/unix/sysv/linux/alpha/configure: Regenerated.
+
2012-07-26 Joseph Myers <joseph@codesourcery.com>
* sysdeps/alpha/tst-audit.h (int_retval): Define.
diff --git a/ports/ChangeLog.am33 b/ports/ChangeLog.am33
index d14f7226d9..d732d2c2b8 100644
--- a/ports/ChangeLog.am33
+++ b/ports/ChangeLog.am33
@@ -1,3 +1,23 @@
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14047]
+ * sysdeps/am33/tininess.h: New file.
+
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/am33/configure: Regenerated.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/am33/configure.in (arch_minimum_kernel):
+ Change to 2.6.25.
+ * sysdeps/unix/sysv/linux/am33/configure: Regenerated.
+
+2012-08-01 Roland McGrath <roland@hack.frob.com>
+
+ [BZ #14138]
+ * sysdeps/unix/sysv/linux/am33/getrlimit.c: File removed.
+
2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
[BZ #13673]
diff --git a/ports/ChangeLog.arm b/ports/ChangeLog.arm
index b921a769c5..0b76f5ed22 100644
--- a/ports/ChangeLog.arm
+++ b/ports/ChangeLog.arm
@@ -1,3 +1,185 @@
+2012-10-22 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
+ (GLIBC_2.17): Add clock_* symbols.
+
+2012-10-22 Andreas Jaeger <aj@suse.de>
+
+ * ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h (__O_LARGEFILE):
+ Define always.
+
+ * sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/configure: Regenerated.
+
+2012-10-05 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/dl-machine.h (fix_bad_pc24): Rewritten, replaced with ...
+ (relocate_pc24): ... this new function.
+ (elf_machine_rel, elf_machine_rela): Update callers.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-09-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/arm/dl-tlsdesc.h (ADDRIDX): Removed.
+
+2012-09-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/bits/atomic.h [!__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4]
+ (__arch_compare_and_exchange_val_32_acq): Correct order of
+ arguments of __arm_assisted_compare_and_exchange_val_32_acq.
+
+2012-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/get-rounding-mode.h: New file.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-23 Steve McIntyre <steve.mcintyre@linaro.org>
+
+ * sysdeps/unix/sysv/linux/arm/ldsodefs.h (VALID_FLOAT_ABI): Define
+ depending on __ARM_PCS_VFP.
+ (VALID_ELF_HEADER): Also check VALID_FLOAT_ABI.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
+2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sysdeps/arm/nptl/pthread_spin_lock.c: Use generic code.
+ * sysdeps/arm/nptl/pthread_spin_trylock.c: Remove, use generic version.
+
+2012-08-14 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/arm/bits/atomic.h: ... this.
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+ [!__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4]
+ (atomic_full_barrier): Renamed to ...
+ (__arm_assisted_full_barrier): ... this.
+ (__arch_compare_and_exchange_val_32_acq): Renamed to ...
+ (__arm_assisted_compare_and_exchange_val_32_acq): ... this.
+ (atomic8_t, uatomic8_t, atomic_fast8_t, uatomic_fast8_t,
+ atomic32_t, uatomic32_t, atomic_fast32_t, uatomic_fast32_t,
+ atomicptr_t, uatomicptr_t, atomic_max_t, uatomic_max_t,
+ atomic_full_barrier, __arch_compare_and_exchange_val_32_acq,
+ __arch_compare_and_exchange_val_8_acq,
+ __arch_compare_and_exchange_val_16_acq,
+ __arch_compare_and_exchange_val_64_acq): Types and macros moved to ...
+ * sysdeps/arm/bits/atomic.h: ... this new file.
+
+2012-08-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/arm/dl-machine.h (elf_machine_rel) [R_ARM_ABS32]: Fix style.
+
+2012-08-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/arm/dl-machine.h (elf_machine_rel) [R_ARM_ABS32]: Declare
+ a new unaligned struct. Cast reloc_addr to that when updating the
+ value it points to.
+
+2012-08-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/arm-features.h: Document ARM_ASSUME_NO_IWMMXT.
+ * sysdeps/arm/setjmp.S: Include <arm-features.h>.
+ [!ARM_ASSUME_NO_IWMMXT || __SOFTFP__]: Conditionalize hwcap
+ fetching bits on this.
+ [!ARM_ASSUME_NO_IWMMXT]: Conditionalize iWMMXt register use on this.
+ * sysdeps/arm/__longjmp.S: Likewise.
+
+ * sysdeps/arm/__longjmp.S: Use .Lxxx rather than Lxxx for local labels.
+ [__SOFTFP__]: Conditionalize HWCAP_ARM_VFP check on this.
+ * sysdeps/arm/setjmp.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/getcontext.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/setcontext.S: Likewise.
+
+ * sysdeps/arm/arm-features.h: New file.
+ * sysdeps/unix/sysv/linux/arm/arm-features.h: New file.
+ * sysdeps/arm/fclrexcpt.c: Use ARM_HAVE_VFP instead of hwcap bits.
+ * sysdeps/arm/fedisblxcpt.c: Likewise.
+ * sysdeps/arm/feenablxcpt.c: Likewise.
+ * sysdeps/arm/fegetenv.c: Likewise.
+ * sysdeps/arm/fegetexcept.c: Likewise.
+ * sysdeps/arm/fegetround.c: Likewise.
+ * sysdeps/arm/feholdexcpt.c: Likewise.
+ * sysdeps/arm/fesetenv.c: Likewise.
+ * sysdeps/arm/fesetround.c: Likewise.
+ * sysdeps/arm/feupdateenv.c: Likewise.
+ * sysdeps/arm/fgetexcptflg.c: Likewise.
+ * sysdeps/arm/fraiseexcpt.c: Likewise.
+ * sysdeps/arm/fsetexcptflg.c: Likewise.
+ * sysdeps/arm/ftestexcept.c: Likewise.
+ * sysdeps/arm/setfpucw.c: Likewise.
+
+2012-08-08 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/sotruss-lib.c: New file.
+
+ * sysdeps/arm/ldsodefs.h (ARCH_PLTEXIT_MEMBERS): Use const on
+ `struct La_arm_regs *' parameter.
+
+ * sysdeps/unix/sysv/linux/arm/dl-machine.h: Move #include outside of
+ [!dl_machine_h].
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+ [!__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4]
+ (__arch_compare_and_exchange_val_32_acq): Use uint32_t rather than
+ __typeof (...) for non-pointer variables derived from the arguments.
+
+ * sysdeps/arm/dl-irel.h: Include <ldsodefs.h>.
+
+ * sysdeps/arm/dl-machine.h (elf_machine_load_address): Use proper type
+ for __dl_start declaration.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/configure.in (arch_minimum_kernel):
+ Remove.
+ * sysdeps/unix/sysv/linux/arm/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_UTIMES):
+ Define unconditionally.
+
+2012-08-02 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/arm/sysdep.h (ASM_TYPE_DIRECTIVE): Remove.
+ (ENTRY): Do not use ASM_TYPE_DIRECTIVE.
+
+2012-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_FCNTL64): Remove.
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_VFORK_SYSCALL): Remove.
+
+2012-08-01 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/dl-machine.h (CLEAR_CACHE): Don't define it.
+ Instead, #error if it's not defined.
+ * sysdeps/unix/sysv/linux/arm/dl-machine.h: New file.
+
+ [BZ #14138]
+ * sysdeps/unix/sysv/linux/arm/getrlimit.c: File removed.
+
+2012-07-30 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/arm/preconfigure: Don't refuse configurations with
+ $config_os not linux-gnueabi* unless it's also linux*.
+
2012-07-25 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/arm/kernel-features.h
diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index 83d298fe4a..6c828ddbfc 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,3 +1,103 @@
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14047]
+ * sysdeps/hppa/tininess.h: New file.
+
+2012-10-29 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h (ENTRY): Add cfi_startproc.
+ Use .cfi_offset for rp store.
+ (ENTRY_LEAF): Likewise.
+ (END) Add cfi_Endproc.
+ (DO_CALL): Add cfi directives.
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h: Document register clobbering.
+ [PIC](TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
+ CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): Move...
+ (TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
+ CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): ... to here.
+ [!PIC](TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
+ CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): Remove.
+ (TREG): Use r4.
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h: Don't include sys/syscall.h.
+ Document nop removal.
+ (PSEUDO): Remove nop.
+ (PSEUDO_NOERRNO): Likeise.
+ (PSEUDO_ERRVAL): Likewise.
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h: Remove trailing whitespace.
+
+2012-10-26 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+ (__O_PATH): Define.
+
+2012-10-24 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/hppa/nptl/Makefile (tst-oddstacklimit-ENV): Remove.
+ * sysdeps/hppa/nptl/tst-oddstacklimit.c: New file.
+
+2012-10-10 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/pthread.h: Update.
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c: Removed.
+
+ * sysdeps/hppa/nptl/shlib-versions: New file.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-09-20 Carlos O'Donell <carlos@systemhalted.org>
+
+ * sysdeps/unix/sysv/linux/hppa/syscalls.list: Use __prlimit64 as
+ the strong name.
+
+2012-09-20 Carlos O'Donell <carlos@systemhalted.org>
+ Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/hppa/Versions: Add new errlist-compat
+ entry value of 260 for GLIBC_2.17.
+ * sysdeps/unix/sysv/linux/hppa/bits/errno.h (EHWPOISON): Define if
+ not defined.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
+2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sysdeps/hppa/nptl/pthread_spin_lock.c: Use generic code.
+ * sysdeps/hppa/nptl/pthread_spin_trylock.c: Remove, use generic version.
+
+2012-08-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/unix/sysv/linux/hppa/syscalls.list: Add prlimit64.
+ * sysdeps/unix/sysv/linux/hppa/Versions (GLIBC_2.17): Likewise.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/configure.in: Remove.
+ * sysdeps/unix/sysv/linux/hppa/nptl/configure: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ (__ASSUME_LWS_CAS): Define unconditionally.
+
+2012-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ (__ASSUME_FCNTL64): Remove.
+
2012-07-26 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/hppa/sys/epoll.h (EPOLLWAKEUP): Add new
diff --git a/ports/ChangeLog.ia64 b/ports/ChangeLog.ia64
index 31d86da3ee..1531304ad6 100644
--- a/ports/ChangeLog.ia64
+++ b/ports/ChangeLog.ia64
@@ -1,3 +1,91 @@
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14047]
+ * sysdeps/ia64/tininess.h: New file.
+
+2012-10-25 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
+2012-10-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
+ (GLIBC_2.17): Add clock_* symbols.
+
+ * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c (__get_clockfreq):
+ Use __open, __read, __close rather than their public counterparts.
+
+2012-10-09 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/ia64/configure: Regenerated.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-09-24 Mike Frysinger <vapier@gentoo.org>
+
+ * ports/sysdeps/ia64/fpu/fegetround.c (fegetround): Move contents
+ of function to ...
+ * ports/sysdeps/ia64/fpu/get-rounding-mode.h: ... here.
+
+2012-09-24 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/ia64/Makeconfig: New file.
+
+2012-08-16 Carlos O'Donell <carlos_odonell@mentor.com>
+
+ * sysdeps/ia64/ldsodefs.h (ARCH_PLTENTER_MEMBERS)
+ <ia64_gnu_pltenter>: struct La_ia64_regs is not constant.
+
+2012-08-14 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/ia64/configure.in: Remove assembler-with-cpp debug check.
+ * sysdeps/ia64/configure: Regenerated.
+
+2012-08-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/ia64/kernel-features.h
+ (__ASSUME_CLONE_THREAD_FLAGS): Remove.
+ * sysdeps/unix/sysv/linux/ia64/system.c (FORK): Define
+ unconditionally.
+
+2012-08-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/ia64/configure.in: Remove TLS check.
+ * sysdeps/ia64/configure: Regenerated.
+
+2012-08-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sysdeps/ia64/fpu/libm-symbols.h (ASM_TYPE_DIRECTIVE): Remove.
+ (LOCAL_OBJECT_START): Do not use ASM_TYPE_DIRECTIVE.
+ (WEAK_LIBM_END): Likewise.
+ (GLOBAL_IEEE754_END): Likewise.
+ * sysdeps/ia64/fpu/libm_tan.S: Likewise.
+
+2012-08-10 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h
+ (_dl_discover_osversion): Do not condition on
+ __LINUX_KERNEL_VERSION < 0x020617.
+ (HAVE_DL_DISCOVER_OSVERSION): Likewise.
+
+2012-08-03 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #12194]
+ * sysdeps/ia64/bits/byteswap-16.h (__bswap_16): Avoid -Wconversion
+ warning.
+ * sysdeps/ia64/bits/byteswap.h (__bswap_constant_16): Likewise.
+
+2012-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/ia64/configure.in (arch_minimum_kernel):
+ Remove.
+ * sysdeps/unix/sysv/linux/ia64/configure: Regenerated.
+
2012-07-26 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (__ptrace_eventcodes):
diff --git a/ports/ChangeLog.linux-generic b/ports/ChangeLog.linux-generic
index 79d46129b3..0dfb8402c6 100644
--- a/ports/ChangeLog.linux-generic
+++ b/ports/ChangeLog.linux-generic
@@ -1,3 +1,25 @@
+2012-10-27 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/generic/bits/fcntl.h: (__O_LARGEFILE)
+ [__WORDSIZE != 64]: Do not define, take value from
+ <bits/fcntl-linux.h>.
+
+2012-10-23 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/generic/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
+2012-10-01 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/generic/bits/typesizes.h
+ (__SWBLK_T_TYPE): Macro removed.
+
+2012-08-02 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/generic/bits/typesizes.h
+ [__LP64__] (__OFF_T_MATCHES_OFF64_T): New macro.
+
2012-05-30 Chris Metcalf <cmetcalf@tilera.com>
* sysdeps/unix/sysv/linux/generic/syscalls.list: Remove
diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index 642b132927..ac879c19fb 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,103 @@
+2012-10-25 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
+2012-10-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist:
+ (GLIBC_2.17): Add clock_* symbols.
+ * sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist: Likewise.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-09-28 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/m68k/init-first.c: Include main file from
+ csu/ rather than sysdeps/unix/sysv/linux/.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_FADVISE64_64_SYSCALL): Remove.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
+2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sysdeps/m68k/nptl/pthread_spin_lock.c: Use generic code.
+ * sysdeps/m68k/nptl/pthread_spin_trylock.c: Remove, use generic version.
+
+2012-08-10 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/ldsodefs.h (m68k_gnu_pltenter): Remove const on
+ fifth parameter.
+
+2012-08-08 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_TGKILL): Remove.
+
+2012-08-08 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/coldfire/fpu/bits/mathinline.h: New file.
+
+ * sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
+ (atomic_compare_and_exchange_val_acq) [!SHARED]: Add cast to avoid
+ warning.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/configure.in (arch_minimum_kernel):
+ Remove.
+ * sysdeps/unix/sysv/linux/m68k/configure: Regenerated.
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_TGKILL): Define unconditionally.
+ (__ASSUME_UTIMES): Likewise.
+ (__ASSUME_FADVISE64_64_SYSCALL): Likewise.
+
+2012-08-03 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/sysdep.h (ALIGNARG, ASM_TYPE_DIRECTIVE)
+ (ASM_SIZE_DIRECTIVE): Remove.
+ (ENTRY, END): Use .p2align. Use .type and .size instead of
+ ASM_TYPE_DIRECTIVE and ASM_SIZE_DIRECTIVE.
+ * sysdeps/m68k/asm-syntax.h (ALIGNARG, PROLOG, EPILOG, ALIGN)
+ (GLOBL): Remove unused macros.
+
+2012-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_FCNTL64): Remove.
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_VFORK_SYSCALL): Remove.
+ * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork) [__NR_vfork]:
+ Make code unconditional.
+ (__vfork) [__ASSUME_VFORK_SYSCALL]: Likewise.
+ (__vfork) [!__ASSUME_VFORK_SYSCALL]: Remove conditional code.
+
+2012-08-01 Roland McGrath <roland@hack.frob.com>
+
+ [BZ #14138]
+ * sysdeps/unix/sysv/linux/m68k/getrlimit.c: File removed.
+
+2012-08-01 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
+
2012-07-26 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index a1b6dc5886..eda8081bce 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,3 +1,160 @@
+2012-10-31 Steve Ellcey <sellcey@mips.com>
+
+ * sysdeps/mips/memcpy.S: Add prefetching and more unrolling, make
+ it work in 32 or 64 bit modes.
+ * sysdeps/mips/mips64/memcpy.S: Remove.
+
+2012-10-30 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #14047]
+ * sysdeps/mips/tininess.h: New file.
+
+2012-10-29 Steve Ellcey <sellcey@mips.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/Makefile: Remove.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile: Remove.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile: Remove.
+ * sysdeps/unix/sysv/linux/mips/configure.in: Create default_abi.make.
+ * sysdeps/unix/sysv/linux/mips/configure: Regenerate.
+ * sysdeps/unix/sysv/linux/mips/Makefile: Include default_abi.make.
+ (abi-variants): Add hard and soft float versions.
+ (abi-o32-options): Remove.
+ (abi-o32-condition): Remove.
+ (abi-n32-options): Remove.
+ (abi-n32-condition): Remove.
+ (abi-n64-options): Remove.
+ (abi-n64-condition): Remove.
+ (abi-o32_soft-options): New.
+ (abi-o32_soft-condition): New.
+ (abi-o32_hard-options): New.
+ (abi-o32_hard-condition): New.
+ (abi-n32_soft-options): New.
+ (abi-n32_soft-condition): New.
+ (abi-n32_hard-options): New.
+ (abi-n32_hard-condition): New.
+ (abi-n64_soft-options): New.
+ (abi-n64_soft-condition): New.
+ (abi-n64_hard-options): New.
+ (abi-n64_hard-condition): New.
+
+2012-10-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
+ (GLIBC_2.17): Add clock_* symbols.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist: Likewise.
+
+2012-10-24 Andreas Jaeger <aj@suse.de>
+
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Remove all
+ definitions and declarations that are provided by
+ <bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
+
+2012-10-03 Steve Ellcey <sellcey@mips.com>
+
+ * sysdeps/mips/ieee754.h: Move to...
+ * sysdeps/mips/ieee754/ieee754.h: Here.
+ * sysdeps/mips/mips32/Implies: Add mips/ieee754.
+ * sysdeps/mips/mips64/Implies: Ditto.
+ * sysdeps/mips/mips64/n32/Implies: Ditto.
+ * sysdeps/mips/mips64/n64/Implies: Ditto.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-09-28 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/mips/init-first.c: File removed.
+
+2012-09-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * sysdeps/mips/dl-trampoline.c (VERSYMIDX): Removed.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-27 Guido Guenther <agx@sigxcpu.org>
+
+ * sysdeps/mips/fpu_control.h (_FPU_RESERVED): Set bit 23.
+
+2012-08-22 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h [_MIPS_SIM ==
+ _ABIO32] (__ASSUME_STAT64_SYSCALL): Define.
+ * sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c: New file. Based
+ on version from ../sysdeps/unix/sysv/linux/.
+ * sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/xstat64.c: Likewise.
+
+2012-08-16 Carlos O'Donell <carlos_odonell@mentor.com>
+
+ * sysdeps/mips/ldsodefs.h (ARCH_PLTENTER_MEMBERS)
+ <mips_o32_gnu_pltenter, mips_n32_gnu_pltenter, mips_n64_gnu_pltenter>:
+ struct La_mips_32_regs and struct La_mips_64_regs are not constant.
+
+2012-08-15 Tom de Vries <vries@codesourcery.com>
+ Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (__libc_lock_lock)
+ (__libc_lock_trylock): Define versions optimized for MIPS.
+
+2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * sysdeps/mips/nptl/pthread_spin_lock.S: Remove, use generic version.
+ * sysdeps/mips/nptl/pthread_spin_lock.c: New file.
+ * sysdeps/mips/nptl/pthread_spin_trylock.S: Remove, use generic version.
+
+2012-08-15 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
+2012-08-13 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ [__GNUC_PREREQ (4, 8)]
+ (atomic_exchange_and_add): Split into ...
+ (atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
+ New atomic macros.
+ [!__GNUC_PREREQ (4, 8)]
+ (atomic_exchange_and_add): Split into ...
+ (atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
+ New atomic macros.
+
+2012-08-09 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
+ (__ASSUME_UTIMES): Define.
+
+2012-08-07 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/configure.in (arch_minimum_kernel):
+ Remove.
+ * sysdeps/unix/sysv/linux/mips/configure: Regenerated.
+
+2012-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
+ (__ASSUME_FCNTL64): Remove.
+
+2012-08-01 Steve Ellcey <sellcey@mips.com>
+
+ * sysdeps/mips/sys/asm.h [_MIPS_ISA != _MIPS_ISA_MIPS4 &&
+ _MIPS_ISA != _MIPS_ISA_MIPS5 && _MIPS_ISA != _MIPS_ISA_MIPS32 &&
+ _MIPS_ISA != _MIPS_ISA_MIPS64] (PREF): Define as function-like
+ macro.
+ (PREFX): Likewise.
+
+2012-07-31 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/fcntl.c: Remove.
+ * sysdeps/unix/sysv/linux/mips/lockf64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips32/fcntl.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/lockf64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c: Likewise.
+
2012-07-27 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): New.
diff --git a/ports/ChangeLog.powerpc b/ports/ChangeLog.powerpc
index c8a8584000..758853ed8e 100644
--- a/ports/ChangeLog.powerpc
+++ b/ports/ChangeLog.powerpc
@@ -1,3 +1,31 @@
+2012-10-31 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist:
+ Fix sort order.
+
+2012-10-30 Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
+ Ryan S. Arnold <rsa@linux.vnet.ibm.com>
+
+ [BZ #14595]
+ * sysdeps/powerpc/powerpc32/476/memset.S: New file copied from
+ 405/memset.S to preserve 128-byte cacheline size.
+ * sysdeps/powerpc/powerpc32/405/memset.S (memset): Fix cacheline size
+ to 32-bytes for 405, 440, and 464 processors.
+
+2012-10-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
+ (GLIBC_2.17): Add clock_* symbols.
+
+2012-09-26 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist:
+ Add __ppc_get_timebase_freq.
+
+2012-09-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/powerpc/nofpu/get-rounding-mode.h: New file.
+
2012-07-25 Florian Weimer <fweimer@redhat.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist:
@@ -171,7 +199,7 @@
* sysdeps/powerpc/nofpu/Makefile
[subdirs-soft-fp] (sysdep_routines): Remove gcc-quad-routines.
[subdirs-math] (CPPFLAGS): Add -I../soft-fp.
- [subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl.
+ [subdirs-math] (CFLAGS-e_powl.c): Add -fno-builtin-fabsl.
[subdirs-math] (CFLAGS-s_ccoshl.c): Likewise.
[subdirs-math] (CFLAGS-s_csinhl.c): Likewise.
[subdirs-math] (CFLAGS-s_clogl.c): Likewise.
diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile
index 9ef3f99ec3..1f04349bc6 100644
--- a/ports/ChangeLog.tile
+++ b/ports/ChangeLog.tile
@@ -1,3 +1,87 @@
+2012-10-30 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/tile/dl-machine.h: Use new DL_AFTER_LOAD macro
+ and rename _dl_arch_map_object to _dl_after_load.
+ * sysdeps/tile/dl-runtime.c: Rename _dl_arch_map_object
+ to _dl_after_load and remove spurious DL_UNMAP definition.
+
+ * sysdeps/unix/sysv/linux/tile/init-first.c: Use better #include.
+ * sysdeps/unix/sysv/linux/tile/gettimeofday.c: Use gettimeofday
+ aliases that match existing tile ABI.
+
+ * sysdeps/tile/libm-test-ulps: Account for new tests.
+
+2012-10-26 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/unix/sysv/linux/tile/Makefile (sysdep_routines):
+ Include dl-vdso.
+ * sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h: New file.
+ * sysdeps/unix/sysv/linux/tile/gettimeofday.c: New file.
+ * sysdeps/unix/sysv/linux/tile/init-first.c: New file.
+
+2012-10-19 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist:
+ (GLIBC_2.17): Add clock_* symbols.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist:
+ Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist:
+ Likewise.
+
+2012-10-11 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/unix/sysv/linux/tile/tilegx/sched_getcpu.c: New file.
+
+2012-10-02 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h: Fix clone
+ flag name in comment to CLONE_CHILD_CLEARTID.
+
+2012-09-17 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/tile/libm-test-ulps: Account for new tests.
+
+2012-09-06 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/unix/sysv/linux/tile/sys/procfs.h: Fix type of prfpregset_t.
+
+ [BZ #14237]
+ * sysdeps/tile/__tls_get_addr.S: Fix TLS module initialization bug.
+
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_FADVISE64_64_SYSCALL): Remove.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
+2012-08-14 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_CLONE_THREAD_FLAGS): Remove.
+
+2012-08-08 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_TGKILL): Remove.
+
+2012-08-02 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/tile/sysdep.h: Do not define ASM_TYPE_DIRECTIVE.
+
+2012-08-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_FCNTL64): Remove.
+
2012-07-26 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/tile/sys/ptrace.h (__ptrace_eventcodes):
diff --git a/ports/sysdeps/alpha/configure b/ports/sysdeps/alpha/configure
index 1d0daf5a81..9c03229df2 100644
--- a/ports/sysdeps/alpha/configure
+++ b/ports/sysdeps/alpha/configure
@@ -1,176 +1,7 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/alpha.
-# Check for support of thread-local storage handling in assembler and linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Alpha TLS support" >&5
-$as_echo_n "checking for Alpha TLS support... " >&6; }
-if ${libc_cv_alpha_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata", "awT", @progbits
- .globl foo
-foo: .quad 1
- .section ".tbss", "awT", @nobits
- .globl bar
-bar: .skip 8
- .text
-baz:
- .set nomacro
- ldq $27, __tls_get_addr($29) !literal!1
- ldq $16, a($29) !tlsgd!1
- jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
-
- jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
- ldq $27, __tls_get_addr($29) !literal!2
- ldq $16, b($29) !tlsldm!2
-
- ldq $16, c($29) !tlsgd
- ldq $16, d($29) !tlsldm
-
- ldq $16, e($29) !tlsgd!3
- ldq $16, f($29) !tlsldm!4
-
- ldq $16, g($29) !gotdtprel
- ldah $16, h($31) !dtprelhi
- lda $16, i($16) !dtprello
- lda $16, j($31) !dtprel
-
- ldq $16, k($29) !gottprel
- ldah $16, l($31) !tprelhi
- lda $16, m($16) !tprello
- lda $16, n($31) !tprel
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_alpha_tls=yes
-else
- libc_cv_alpha_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_alpha_tls" >&5
-$as_echo "$libc_cv_alpha_tls" >&6; }
-if test $libc_cv_alpha_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GP relative module local relocs" >&5
-$as_echo_n "checking for GP relative module local relocs... " >&6; }
-if ${libc_cv_alpha_hidden_gprel+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<\EOF
-static volatile int bar;
-int baz __attribute__((visibility("hidden")));
-int f(void) { return bar + baz; }
-EOF
-
-libc_cv_alpha_hidden_gprel=no
-if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- if grep -q 'bar.*!gprel' conftest.s \
- && grep -q 'baz.*!gprel' conftest.s \
- && ! grep -q 'bar.*!literal' conftest.s \
- && ! grep -q 'baz.*!literal' conftest.s; then
- libc_cv_alpha_hidden_gprel=yes
- fi
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_alpha_hidden_gprel" >&5
-$as_echo "$libc_cv_alpha_hidden_gprel" >&6; }
-if test $libc_cv_alpha_hidden_gprel = yes; then
- $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+# With required gcc+binutils, we can always access static and hidden
+# symbols in a position independent way.
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
-fi
diff --git a/ports/sysdeps/alpha/configure.in b/ports/sysdeps/alpha/configure.in
index bf8e926657..eadc57afe3 100644
--- a/ports/sysdeps/alpha/configure.in
+++ b/ports/sysdeps/alpha/configure.in
@@ -1,71 +1,6 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/alpha.
-# Check for support of thread-local storage handling in assembler and linker.
-AC_CACHE_CHECK(for Alpha TLS support, libc_cv_alpha_tls, [dnl
-cat > conftest.s <<\EOF
- .section ".tdata", "awT", @progbits
- .globl foo
-foo: .quad 1
- .section ".tbss", "awT", @nobits
- .globl bar
-bar: .skip 8
- .text
-baz:
- .set nomacro
- ldq $27, __tls_get_addr($29) !literal!1
- ldq $16, a($29) !tlsgd!1
- jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
-
- jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
- ldq $27, __tls_get_addr($29) !literal!2
- ldq $16, b($29) !tlsldm!2
-
- ldq $16, c($29) !tlsgd
- ldq $16, d($29) !tlsldm
-
- ldq $16, e($29) !tlsgd!3
- ldq $16, f($29) !tlsldm!4
-
- ldq $16, g($29) !gotdtprel
- ldah $16, h($31) !dtprelhi
- lda $16, i($16) !dtprello
- lda $16, j($31) !dtprel
-
- ldq $16, k($29) !gottprel
- ldah $16, l($31) !tprelhi
- lda $16, m($16) !tprello
- lda $16, n($31) !tprel
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_alpha_tls=yes
-else
- libc_cv_alpha_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_alpha_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
-AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
-cat > conftest.c <<\EOF
-static volatile int bar;
-int baz __attribute__((visibility("hidden")));
-int f(void) { return bar + baz; }
-EOF
-dnl
-
-libc_cv_alpha_hidden_gprel=no
-if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&AS_MESSAGE_LOG_FD); then
- if grep -q 'bar.*!gprel' conftest.s \
- && grep -q 'baz.*!gprel' conftest.s \
- && ! grep -q 'bar.*!literal' conftest.s \
- && ! grep -q 'baz.*!literal' conftest.s; then
- libc_cv_alpha_hidden_gprel=yes
- fi
-fi
-rm -f conftest*])
-if test $libc_cv_alpha_hidden_gprel = yes; then
- AC_DEFINE(PI_STATIC_AND_HIDDEN)
-fi
+# With required gcc+binutils, we can always access static and hidden
+# symbols in a position independent way.
+AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/ports/sysdeps/alpha/fpu/get-rounding-mode.h b/ports/sysdeps/alpha/fpu/get-rounding-mode.h
new file mode 100644
index 0000000000..9d5b7246a6
--- /dev/null
+++ b/ports/sysdeps/alpha/fpu/get-rounding-mode.h
@@ -0,0 +1,35 @@
+/* Determine floating-point rounding mode within libc. Alpha version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef ALPHA_GET_ROUNDING_MODE_H
+#define ALPHA_GET_ROUNDING_MODE_H 1
+
+#include <fenv.h>
+#include <fenv_libc.h>
+
+/* Return the floating-point rounding mode. */
+
+static inline int
+get_rounding_mode (void)
+{
+ unsigned long fpcr;
+ __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
+ return (fpcr >> FPCR_ROUND_SHIFT) & 3;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/ports/sysdeps/alpha/fpu/libm-test-ulps b/ports/sysdeps/alpha/fpu/libm-test-ulps
index bc3d8281d7..a5d29412cb 100644
--- a/ports/sysdeps/alpha/fpu/libm-test-ulps
+++ b/ports/sysdeps/alpha/fpu/libm-test-ulps
@@ -820,20 +820,116 @@ ildouble: 1
ldouble: 1
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16445 i) == 11356.49165759582936919077408168801636572 + pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16494 i) == 11356.49165759582936919077408168801636572 + pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - pi i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-16445 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16494 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - 0 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1p-16445 i) == 11356.49165759582936919077408168801636572 + +0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 + 0x1p-16494 i) == 11356.49165759582936919077408168801636572 + +0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - 0 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - 0 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
double: 1
idouble: 1
Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
float: 1
ifloat: 1
+Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1p-16445 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16494 + 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 + pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -846,6 +942,53 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i) == 308.2409272754311106024666378243768099991 - 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i) == 38.51805116050395969095658815123105801479 + 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i) == 38.51805116050395969095658815123105801479 - 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
ildouble: 1
ldouble: 1
@@ -903,6 +1046,46 @@ ifloat: 1
Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-60 i) == 4.285899851347756188767674032946882584784e-19 + 4.285899850759344225805480528847018395861e-19 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
double: 1
float: 1
@@ -923,22 +1106,65 @@ ldouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
double: 1
idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
double: 1
idouble: 1
Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
double: 1
idouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
double: 1
float: 1
@@ -961,6 +1187,12 @@ idouble: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -1128,6 +1360,8 @@ ifloat: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
@@ -1329,6 +1563,20 @@ ildouble: 1
ldouble: 1
# csqrt
+Test "Real part of: csqrt (-0x1.0000000000000000000000000001p-16382 - 0x1.0000000000000000000000000001p-16382 i) == 8.344545284118961663847948339519226074126e-2467 - 2.014551439675644900022606748976158925145e-2466 i":
+ldouble: 1
+Test "Real part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i) == 8.344545284118961664300307045791497724440e-2467 - 2.014551439675644900131815801350165472778e-2466 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-0x1.0000000000001p-1022 - 0x1.0000000000001p-1022 i) == 6.788430486774966350907249113759995429568e-155 - 1.638872094839911521020410942677082920935e-154 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i) == 4.934094449071842328766868579214125217132e-20 - 1.191195773697904627170323731331667740087e-19 i":
+double: 1
+idouble: 1
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
@@ -1342,6 +1590,20 @@ ldouble: 1
Test "Imaginary part of: csqrt (0.75 + 1.25 i) == 1.05065169626078392338656675760808326 + 0.594868882070379067881984030639932657 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000000000000000001p-16382 + 0x1.0000000000000000000000000001p-16382 i) == 2.014551439675644900022606748976158925145e-2466 + 8.344545284118961663847948339519226074126e-2":
+ldouble: 1
+Test "Real part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i) == 2.014551439675644900131815801350165472778e-2466 + 8.344545284118961664300307045791497724440e-2467 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i) == 2.014551439675644900131815801350165472778e-2466 + 8.344545284118961664300307045791497724440e-2467 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.0000000000001p-1022 + 0x1.0000000000001p-1022 i) == 1.638872094839911521020410942677082920935e-154 + 6.788430486774966350907249113759995429568e-155 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i) == 1.191195773697904627170323731331667740087e-19 + 4.934094449071842328766868579214125217132e-20 i":
+double: 1
+idouble: 1
Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
float: 1
ifloat: 1
@@ -1426,6 +1688,97 @@ Test "Real part of: ctan (1 + 47 i) == 2.729321264492904590777293425576722354636
ildouble: 1
ldouble: 1
+# ctan_downward
+Test "Real part of: ctan_downward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 4
+ldouble: 4
+Test "Imaginary part of: ctan_downward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+# ctan_tonearest
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+# ctan_towardzero
+Test "Real part of: ctan_towardzero (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+# ctan_upward
+Test "Real part of: ctan_upward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d1846ap+0 + 0x1p-16445 i) == -3.986797629811710706723242948653362815645e19 + 5.793882568875674066286163141055208625180e-4912 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
@@ -1490,6 +1843,97 @@ Test "Imaginary part of: ctanh (47 + 1 i) == 1.0 + 2.729321264492904590777293425
ildouble: 1
ldouble: 1
+# ctanh_downward
+Test "Real part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_downward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 4
+ldouble: 4
+Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_downward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 2
+ldouble: 2
+
+# ctanh_tonearest
+Test "Real part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_tonearest (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_towardzero
+Test "Real part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: ctanh_towardzero (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: ctanh_towardzero (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
+# ctanh_upward
+Test "Real part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+ildouble: 3
+ldouble: 3
+Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i) == 1.317719414943508315995636961402669067843e-291 + 1.633123935319536975596773704152891653086e16 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ctanh_upward (0x1p-16445 + 0x1.921fb54442d1846ap+0 i) == 5.793882568875674066286163141055208625180e-4912 - 3.986797629811710706723242948653362815645e19 i":
+ildouble: 1
+ldouble: 1
+
# erf
Test "erf (1.25) == 0.922900128256458230136523481197281140":
double: 1
@@ -1576,6 +2020,9 @@ ildouble: 1
ldouble: 1
# expm1
+Test "expm1 (-79.0) == -0.9999999999999999999999999999999999509391":
+ildouble: 1
+ldouble: 1
Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
double: 1
idouble: 1
@@ -2026,6 +2473,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -2567,10 +3020,16 @@ ifloat: 1
ildouble: 1
ldouble: 1
+Function: Imaginary part of "clog":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
Function: Real part of "clog10":
-double: 1
+double: 2
float: 1
-idouble: 1
+idouble: 2
ifloat: 1
ildouble: 1
ldouble: 1
@@ -2580,8 +3039,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "cos":
double: 2
@@ -2705,6 +3164,60 @@ idouble: 1
ildouble: 2
ldouble: 2
+Function: Real part of "ctan_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Imaginary part of "ctan_downward":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Real part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctan_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Imaginary part of "ctan_towardzero":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Real part of "ctan_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "ctan_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
Function: Real part of "ctanh":
double: 1
float: 1
@@ -2721,6 +3234,60 @@ ifloat: 2
ildouble: 2
ldouble: 2
+Function: Real part of "ctanh_downward":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "ctanh_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 4
+ldouble: 4
+
+Function: Real part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_tonearest":
+float: 1
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: Real part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: Real part of "ctanh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "ctanh_upward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
Function: "erf":
double: 1
idouble: 1
diff --git a/ports/sysdeps/alpha/fpu/s_isnan.c b/ports/sysdeps/alpha/fpu/s_isnan.c
index b18c7bb5f1..1f239ac249 100644
--- a/ports/sysdeps/alpha/fpu/s_isnan.c
+++ b/ports/sysdeps/alpha/fpu/s_isnan.c
@@ -28,11 +28,6 @@
#undef isnanf
#undef __GI___isnanf
-/* The hidden_proto in include/math.h was obscured by the macro hackery. */
-__typeof (__isnan) __isnanf;
-hidden_proto (__isnanf)
-
-
int
__isnan (double x)
{
@@ -45,8 +40,11 @@ weak_alias (__isnan, isnan)
/* It turns out that the 'double' version will also always work for
single-precision. */
strong_alias (__isnan, __isnanf)
-hidden_def (__isnanf)
-weak_alias (__isnanf, isnanf)
+weak_alias (__isnan, isnanf)
+
+/* ??? GCC 4.8 fails to look through chains of aliases with asm names
+ attached. Work around this for now. */
+hidden_ver (__isnan, __isnanf)
#ifdef NO_LONG_DOUBLE
strong_alias (__isnan, __isnanl)
diff --git a/ports/sysdeps/alpha/fpu/s_nearbyint.c b/ports/sysdeps/alpha/fpu/s_nearbyint.c
index 4589bfcc3e..19ed06bb45 100644
--- a/ports/sysdeps/alpha/fpu/s_nearbyint.c
+++ b/ports/sysdeps/alpha/fpu/s_nearbyint.c
@@ -43,6 +43,6 @@ weak_alias (__nearbyint, nearbyint)
strong_alias (__nearbyint, __nearbyintl)
weak_alias (__nearbyint, nearbyintl)
#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0);
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_1);
#endif
diff --git a/ports/sysdeps/alpha/ldsodefs.h b/ports/sysdeps/alpha/ldsodefs.h
index 478bf237db..464e84ea39 100644
--- a/ports/sysdeps/alpha/ldsodefs.h
+++ b/ports/sysdeps/alpha/ldsodefs.h
@@ -26,7 +26,7 @@ struct La_alpha_retval;
#define ARCH_PLTENTER_MEMBERS \
Elf64_Addr (*alpha_gnu_pltenter) (Elf64_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_alpha_regs *, \
+ struct La_alpha_regs *, \
unsigned int *, const char *name, \
long int *framesizep);
diff --git a/ports/sysdeps/alpha/tininess.h b/ports/sysdeps/alpha/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/ports/sysdeps/alpha/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/ports/sysdeps/am33/tininess.h b/ports/sysdeps/am33/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/ports/sysdeps/am33/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S
index cc802c15bd..b3c286083c 100644
--- a/ports/sysdeps/arm/__longjmp.S
+++ b/ports/sysdeps/arm/__longjmp.S
@@ -1,6 +1,5 @@
/* longjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +21,7 @@
#define _ASM
#include <bits/setjmp.h>
#include <rtld-global-offsets.h>
+#include <arm-features.h>
/* __longjmp(jmpbuf, val) */
@@ -47,27 +47,35 @@ ENTRY (__longjmp)
cfi_restore (sp)
cfi_restore (lr)
-#ifdef IS_IN_rtld
- ldr a2, 1f
- ldr a3, Lrtld_local_ro
+#if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__
+# define NEED_HWCAP 1
+#endif
+
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
+ ldr a2, 1f
+ ldr a3, .Lrtld_local_ro
0: add a2, pc, a2
add a2, a2, a3
ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
- ldr a2, 1f
- ldr a3, Lrtld_global_ro
+# else
+# ifdef PIC
+ ldr a2, 1f
+ ldr a3, .Lrtld_global_ro
0: add a2, pc, a2
ldr a2, [a2, a3]
ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
- ldr a2, Lhwcap
+# else
+ ldr a2, .Lhwcap
ldr a2, [a2, #0]
-#endif
+# endif
+# endif
#endif
+#ifdef __SOFTFP__
tst a2, #HWCAP_ARM_VFP
- beq Lno_vfp
+ beq .Lno_vfp
+#endif
/* Restore the VFP registers. */
/* Following instruction is vldmia ip!, {d8-d15}. */
@@ -76,10 +84,11 @@ ENTRY (__longjmp)
ldr a3, [ip], #4
/* Following instruction is fmxr fpscr, a3. */
mcr p10, 7, a3, cr1, cr0, 0
-Lno_vfp:
+.Lno_vfp:
+#ifndef ARM_ASSUME_NO_IWMMXT
tst a2, #HWCAP_ARM_IWMMXT
- beq Lno_iwmmxt
+ beq .Lno_iwmmxt
/* Restore the call-preserved iWMMXt registers. */
/* Following instructions are wldrd wr10, [ip], #8 (etc.) */
@@ -89,23 +98,26 @@ Lno_vfp:
ldcl p1, cr13, [r12], #8
ldcl p1, cr14, [r12], #8
ldcl p1, cr15, [r12], #8
-Lno_iwmmxt:
+.Lno_iwmmxt:
+#endif
DO_RET(lr)
-#ifdef IS_IN_rtld
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_local_ro:
+.Lrtld_local_ro:
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
+# else
+# ifdef PIC
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
+.Lrtld_global_ro:
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
-Lhwcap:
+# else
+.Lhwcap:
.long C_SYMBOL_NAME(_dl_hwcap)
-#endif
+# endif
+# endif
#endif
END (__longjmp)
diff --git a/ports/sysdeps/arm/arm-features.h b/ports/sysdeps/arm/arm-features.h
new file mode 100644
index 0000000000..41befb57f5
--- /dev/null
+++ b/ports/sysdeps/arm/arm-features.h
@@ -0,0 +1,39 @@
+/* Macros to test for CPU features on ARM. Generic ARM version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _ARM_ARM_FEATURES_H
+#define _ARM_ARM_FEATURES_H 1
+
+/* An OS-specific arm-features.h file should define ARM_HAVE_VFP to
+ an appropriate expression for testing at runtime whether the VFP
+ hardware is present. We'll then redefine it to a constant if we
+ know at compile time that we can assume VFP. */
+
+#ifndef __SOFTFP__
+/* The compiler is generating VFP instructions, so we're already
+ assuming the hardware exists. */
+# undef ARM_HAVE_VFP
+# define ARM_HAVE_VFP 1
+#endif
+
+/* An OS-specific arm-features.h file may define ARM_ASSUME_NO_IWMMXT
+ to indicate at compile time that iWMMXt hardware is never present
+ at runtime (or that we never care about its state) and so need not
+ be checked for. */
+
+#endif /* arm-features.h */
diff --git a/ports/sysdeps/arm/bits/atomic.h b/ports/sysdeps/arm/bits/atomic.h
new file mode 100644
index 0000000000..39e276f098
--- /dev/null
+++ b/ports/sysdeps/arm/bits/atomic.h
@@ -0,0 +1,81 @@
+/* Atomic operations. Pure ARM version.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdint.h>
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+void __arm_link_error (void);
+
+/* Use the atomic builtins provided by GCC in case the backend provides
+ a pattern to do this efficiently. */
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+# define atomic_full_barrier() __sync_synchronize ()
+#else
+# define atomic_full_barrier() __arm_assisted_full_barrier ()
+#endif
+
+/* An OS-specific bits/atomic.h file will define this macro if
+ the OS can provide something. If not, we'll fail to build
+ with a compiler that doesn't supply the operation. */
+#ifndef __arm_assisted_full_barrier
+# define __arm_assisted_full_barrier() __arm_link_error()
+#endif
+
+/* Atomic compare and exchange. */
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ __sync_val_compare_and_swap ((mem), (oldval), (newval))
+#else
+# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ __arm_assisted_compare_and_exchange_val_32_acq ((mem), (newval), (oldval))
+#endif
+
+/* We don't support atomic operations on any non-word types.
+ So make them link errors. */
+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+/* An OS-specific bits/atomic.h file will define this macro if
+ the OS can provide something. If not, we'll fail to build
+ with a compiler that doesn't supply the operation. */
+#ifndef __arm_assisted_compare_and_exchange_val_32_acq
+# define __arm_assisted_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+#endif
diff --git a/ports/sysdeps/arm/configure b/ports/sysdeps/arm/configure
index 51fd725570..385f295904 100755..100644
--- a/ports/sysdeps/arm/configure
+++ b/ports/sysdeps/arm/configure
@@ -1,102 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/arm.
diff --git a/ports/sysdeps/arm/dl-irel.h b/ports/sysdeps/arm/dl-irel.h
index 5b1964e90e..292bc1afba 100644
--- a/ports/sysdeps/arm/dl-irel.h
+++ b/ports/sysdeps/arm/dl-irel.h
@@ -1,6 +1,6 @@
/* Machine-dependent ELF indirect relocation inline functions.
ARM version.
- Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <unistd.h>
+#include <ldsodefs.h>
#define ELF_MACHINE_IREL 1
diff --git a/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h
index 8d905e8ad9..3b25e0f0f0 100644
--- a/ports/sysdeps/arm/dl-machine.h
+++ b/ports/sysdeps/arm/dl-machine.h
@@ -1,6 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. ARM version.
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,
- 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,8 +26,9 @@
#include <dl-tlsdesc.h>
#include <dl-irel.h>
-#define CLEAR_CACHE(BEG,END) \
- INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
+#ifndef CLEAR_CACHE
+# error CLEAR_CACHE definition required to handle TEXTREL
+#endif
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int __attribute__ ((unused))
@@ -70,7 +70,7 @@ elf_machine_dynamic (void)
static inline Elf32_Addr __attribute__ ((unused))
elf_machine_load_address (void)
{
- extern void __dl_start asm ("_dl_start");
+ extern Elf32_Addr internal_function __dl_start (void *) asm ("_dl_start");
Elf32_Addr got_addr = (Elf32_Addr) &__dl_start;
Elf32_Addr pcrel_addr;
#ifdef __thumb__
@@ -302,36 +302,56 @@ elf_machine_plt_value (struct link_map *map, const Elf32_Rel *reloc,
#define ARCH_LA_PLTEXIT arm_gnu_pltexit
#ifdef RESOLVE_MAP
-
-/* Deal with an out-of-range PC24 reloc. */
-auto Elf32_Addr
-fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
+/* Handle a PC24 reloc, including the out-of-range case. */
+auto void
+relocate_pc24 (struct link_map *map, Elf32_Addr value,
+ Elf32_Addr *const reloc_addr, Elf32_Sword addend)
{
- static void *fix_page;
- static unsigned int fix_offset;
- static size_t pagesize;
- Elf32_Word *fix_address;
+ Elf32_Addr new_value;
+
+ /* Set NEW_VALUE based on V, and return true iff it overflows 24 bits. */
+ inline bool set_new_value (Elf32_Addr v)
+ {
+ new_value = v + addend - (Elf32_Addr) reloc_addr;
+ Elf32_Addr topbits = new_value & 0xfe000000;
+ return topbits != 0xfe000000 && topbits != 0x00000000;
+ }
- if (! fix_page)
+ if (set_new_value (value))
{
- if (! pagesize)
- pagesize = getpagesize ();
- fix_page = mmap (NULL, pagesize, PROT_READ | PROT_WRITE | PROT_EXEC,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- if (! fix_page)
- assert (! "could not map page for fixup");
- fix_offset = 0;
+ /* The PC-relative address doesn't fit in 24 bits! */
+
+ static void *fix_page;
+ static size_t fix_offset;
+ if (fix_page == NULL)
+ {
+ void *new_page = __mmap (NULL, GLRO(dl_pagesize),
+ PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANON, -1, 0);
+ if (new_page == MAP_FAILED)
+ _dl_signal_error (0, map->l_name, NULL,
+ "could not map page for fixup");
+ fix_page = new_page;
+ assert (fix_offset == 0);
+ }
+
+ Elf32_Word *fix_address = fix_page + fix_offset;
+ fix_address[0] = 0xe51ff004; /* ldr pc, [pc, #-4] */
+ fix_address[1] = value;
+
+ fix_offset += sizeof fix_address[0] * 2;
+ if (fix_offset >= GLRO(dl_pagesize))
+ {
+ fix_page = NULL;
+ fix_offset = 0;
+ }
+
+ if (set_new_value ((Elf32_Addr) fix_address))
+ _dl_signal_error (0, map->l_name, NULL,
+ "R_ARM_PC24 relocation out of range");
}
- fix_address = (Elf32_Word *)(fix_page + fix_offset);
- fix_address[0] = 0xe51ff004; /* ldr pc, [pc, #-4] */
- fix_address[1] = value;
-
- fix_offset += 8;
- if (fix_offset >= pagesize)
- fix_page = NULL;
-
- return (Elf32_Addr)fix_address;
+ *reloc_addr = (*reloc_addr & 0xff000000) | ((new_value >> 2) & 0x00ffffff);
}
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
@@ -413,6 +433,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
break;
case R_ARM_ABS32:
{
+ struct unaligned
+ {
+ Elf32_Addr x;
+ } __attribute__ ((packed, may_alias));
# ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static
libc.a; make the reference weak so static programs can
@@ -431,7 +455,8 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
used while loading those libraries. */
value -= map->l_addr + refsym->st_value;
# endif
- *reloc_addr += value;
+ /* Support relocations on mis-aligned offsets. */
+ ((struct unaligned *) reloc_addr)->x += value;
break;
}
case R_ARM_TLS_DESC:
@@ -468,30 +493,11 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
break;
case R_ARM_PC24:
- {
- Elf32_Sword addend;
- Elf32_Addr newvalue, topbits;
-
- addend = *reloc_addr & 0x00ffffff;
- if (addend & 0x00800000) addend |= 0xff000000;
-
- newvalue = value - (Elf32_Addr)reloc_addr + (addend << 2);
- topbits = newvalue & 0xfe000000;
- if (topbits != 0xfe000000 && topbits != 0x00000000)
- {
- newvalue = fix_bad_pc24(reloc_addr, value)
- - (Elf32_Addr)reloc_addr + (addend << 2);
- topbits = newvalue & 0xfe000000;
- if (topbits != 0xfe000000 && topbits != 0x00000000)
- {
- _dl_signal_error (0, map->l_name, NULL,
- "R_ARM_PC24 relocation out of range");
- }
- }
- newvalue >>= 2;
- value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff);
- *reloc_addr = value;
- }
+ relocate_pc24 (map, value, reloc_addr,
+ /* Sign-extend the 24-bit addend in the
+ instruction (which counts instructions), and
+ then shift it up two so as to count bytes. */
+ (((Elf32_Sword) *reloc_addr << 8) >> 8) << 2);
break;
#if !defined RTLD_BOOTSTRAP
case R_ARM_TLS_DTPMOD32:
@@ -584,26 +590,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
*reloc_addr = value + reloc->r_addend;
break;
case R_ARM_PC24:
- {
- Elf32_Addr newvalue, topbits;
-
- newvalue = value + reloc->r_addend - (Elf32_Addr)reloc_addr;
- topbits = newvalue & 0xfe000000;
- if (topbits != 0xfe000000 && topbits != 0x00000000)
- {
- newvalue = fix_bad_pc24(reloc_addr, value)
- - (Elf32_Addr)reloc_addr + (reloc->r_addend << 2);
- topbits = newvalue & 0xfe000000;
- if (topbits != 0xfe000000 && topbits != 0x00000000)
- {
- _dl_signal_error (0, map->l_name, NULL,
- "R_ARM_PC24 relocation out of range");
- }
- }
- newvalue >>= 2;
- value = (*reloc_addr & 0xff000000) | (newvalue & 0x00ffffff);
- *reloc_addr = value;
- }
+ relocate_pc24 (map, value, reloc_addr, reloc->r_addend);
break;
#if !defined RTLD_BOOTSTRAP
case R_ARM_TLS_DTPMOD32:
diff --git a/ports/sysdeps/arm/dl-tlsdesc.h b/ports/sysdeps/arm/dl-tlsdesc.h
index 2b1131c55a..97951c0da8 100644
--- a/ports/sysdeps/arm/dl-tlsdesc.h
+++ b/ports/sysdeps/arm/dl-tlsdesc.h
@@ -20,12 +20,6 @@
#ifndef _ARM_DL_TLSDESC_H
# define _ARM_DL_TLSDESC_H 1
-/* Use this to access DT_TLSDESC_PLT and DT_TLSDESC_GOT. */
-#ifndef ADDRIDX
-# define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
-#endif
-
/* Type used to represent a TLS descriptor in the GOT. */
struct tlsdesc
{
diff --git a/ports/sysdeps/arm/fclrexcpt.c b/ports/sysdeps/arm/fclrexcpt.c
index ddedc3573c..23435fba78 100644
--- a/ports/sysdeps/arm/fclrexcpt.c
+++ b/ports/sysdeps/arm/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997,98,99,2000,01,05,11 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
__feclearexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long int temp;
diff --git a/ports/sysdeps/arm/fedisblxcpt.c b/ports/sysdeps/arm/fedisblxcpt.c
index c9c62a48ef..5b63d9a2e8 100644
--- a/ports/sysdeps/arm/fedisblxcpt.c
+++ b/ports/sysdeps/arm/fedisblxcpt.c
@@ -1,5 +1,5 @@
/* Disable floating-point exceptions.
- Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -19,16 +19,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
fedisableexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long int new_exc, old_exc;
diff --git a/ports/sysdeps/arm/feenablxcpt.c b/ports/sysdeps/arm/feenablxcpt.c
index 3b2b934f57..c5f0630066 100644
--- a/ports/sysdeps/arm/feenablxcpt.c
+++ b/ports/sysdeps/arm/feenablxcpt.c
@@ -1,5 +1,5 @@
/* Enable floating-point exceptions.
- Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001.
@@ -19,16 +19,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
feenableexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long int new_exc, old_exc;
diff --git a/ports/sysdeps/arm/fegetenv.c b/ports/sysdeps/arm/fegetenv.c
index c638635df4..1e8063ca82 100644
--- a/ports/sysdeps/arm/fegetenv.c
+++ b/ports/sysdeps/arm/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997,98,99,2000,01,05,10 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
__fegetenv (fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long int temp;
_FPU_GETCW (temp);
diff --git a/ports/sysdeps/arm/fegetexcept.c b/ports/sysdeps/arm/fegetexcept.c
index 929d6c5cfa..a71e7dad6c 100644
--- a/ports/sysdeps/arm/fegetexcept.c
+++ b/ports/sysdeps/arm/fegetexcept.c
@@ -1,5 +1,5 @@
/* Get floating-point exceptions.
- Copyright (C) 2001, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <philb@gnu.org>, 2001
@@ -19,16 +19,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
fegetexcept (void)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long temp;
diff --git a/ports/sysdeps/arm/fegetround.c b/ports/sysdeps/arm/fegetround.c
index df1049706b..0ed3dc996d 100644
--- a/ports/sysdeps/arm/fegetround.c
+++ b/ports/sysdeps/arm/fegetround.c
@@ -1,5 +1,5 @@
/* Return current rounding direction.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
fegetround (void)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned int temp;
diff --git a/ports/sysdeps/arm/feholdexcpt.c b/ports/sysdeps/arm/feholdexcpt.c
index 4aed48bb39..cfa11d7321 100644
--- a/ports/sysdeps/arm/feholdexcpt.c
+++ b/ports/sysdeps/arm/feholdexcpt.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
feholdexcept (fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long int temp;
diff --git a/ports/sysdeps/arm/fesetenv.c b/ports/sysdeps/arm/fesetenv.c
index 61370325e2..2fad61da1a 100644
--- a/ports/sysdeps/arm/fesetenv.c
+++ b/ports/sysdeps/arm/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
__fesetenv (const fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned int temp;
diff --git a/ports/sysdeps/arm/fesetround.c b/ports/sysdeps/arm/fesetround.c
index 997bd98f5a..6de1644a7a 100644
--- a/ports/sysdeps/arm/fesetround.c
+++ b/ports/sysdeps/arm/fesetround.c
@@ -1,5 +1,5 @@
/* Set current rounding direction.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
fesetround (int round)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
fpu_control_t temp;
diff --git a/ports/sysdeps/arm/feupdateenv.c b/ports/sysdeps/arm/feupdateenv.c
index 98f265432c..c0ed06e32e 100644
--- a/ports/sysdeps/arm/feupdateenv.c
+++ b/ports/sysdeps/arm/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997, 1999, 2000, 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,16 +19,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
__feupdateenv (const fenv_t *envp)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned int temp;
diff --git a/ports/sysdeps/arm/fgetexcptflg.c b/ports/sysdeps/arm/fgetexcptflg.c
index 41661a2e29..7b6d66961a 100644
--- a/ports/sysdeps/arm/fgetexcptflg.c
+++ b/ports/sysdeps/arm/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997, 1999, 2000, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,16 +19,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
__fegetexceptflag (fexcept_t *flagp, int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
unsigned long temp;
diff --git a/ports/sysdeps/arm/fraiseexcpt.c b/ports/sysdeps/arm/fraiseexcpt.c
index 0a4368839f..cb0f75cf9e 100644
--- a/ports/sysdeps/arm/fraiseexcpt.c
+++ b/ports/sysdeps/arm/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,16 +19,13 @@
#include <fpu_control.h>
#include <fenv.h>
#include <float.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
feraiseexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
int fpscr;
const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
diff --git a/ports/sysdeps/arm/fsetexcptflg.c b/ports/sysdeps/arm/fsetexcptflg.c
index bee51a96a2..f26268da6d 100644
--- a/ports/sysdeps/arm/fsetexcptflg.c
+++ b/ports/sysdeps/arm/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997,98,99,2000,01,05,08,11 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,16 +19,13 @@
#include <fenv.h>
#include <math.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
__fesetexceptflag (const fexcept_t *flagp, int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
fexcept_t temp;
diff --git a/ports/sysdeps/arm/ftestexcept.c b/ports/sysdeps/arm/ftestexcept.c
index 06817d2fe0..8e37db10b7 100644
--- a/ports/sysdeps/arm/ftestexcept.c
+++ b/ports/sysdeps/arm/ftestexcept.c
@@ -1,5 +1,5 @@
/* Test exception in current environment.
- Copyright (C) 1997, 1998, 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <fenv.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
int
fetestexcept (int excepts)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
fexcept_t temp;
diff --git a/ports/sysdeps/arm/get-rounding-mode.h b/ports/sysdeps/arm/get-rounding-mode.h
new file mode 100644
index 0000000000..a614fe43f8
--- /dev/null
+++ b/ports/sysdeps/arm/get-rounding-mode.h
@@ -0,0 +1,42 @@
+/* Determine floating-point rounding mode within libc. ARM version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _ARM_GET_ROUNDING_MODE_H
+#define _ARM_GET_ROUNDING_MODE_H 1
+
+#include <arm-features.h>
+#include <fenv.h>
+#include <fpu_control.h>
+
+/* Return the floating-point rounding mode. */
+
+static inline int
+get_rounding_mode (void)
+{
+ if (ARM_HAVE_VFP)
+ {
+ fpu_control_t fc;
+
+ _FPU_GETCW (fc);
+ return fc & FE_TOWARDZERO;
+ }
+ else
+ return FE_TONEAREST;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/ports/sysdeps/arm/ldsodefs.h b/ports/sysdeps/arm/ldsodefs.h
index aa323d3ecd..73375b60d4 100644
--- a/ports/sysdeps/arm/ldsodefs.h
+++ b/ports/sysdeps/arm/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ struct La_arm_retval;
#define ARCH_PLTEXIT_MEMBERS \
Elf32_Addr (*arm_gnu_pltexit) (Elf32_Sym *, unsigned int, uintptr_t *, \
- uintptr_t *, struct La_arm_regs *, \
+ uintptr_t *, const struct La_arm_regs *, \
struct La_arm_retval *, const char *)
#include_next <ldsodefs.h>
diff --git a/ports/sysdeps/arm/nptl/pthread_spin_lock.c b/ports/sysdeps/arm/nptl/pthread_spin_lock.c
index 3a23bd31a5..4f81571735 100644
--- a/ports/sysdeps/arm/nptl/pthread_spin_lock.c
+++ b/ports/sysdeps/arm/nptl/pthread_spin_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,15 +15,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <atomic.h>
-#include "pthreadP.h"
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-int
-pthread_spin_lock (pthread_spinlock_t *lock)
-{
- while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0)
- while (*lock != 0)
- ;
-
- return 0;
-}
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
diff --git a/ports/sysdeps/arm/preconfigure b/ports/sysdeps/arm/preconfigure
index d98c167a95..20f6d91a12 100644
--- a/ports/sysdeps/arm/preconfigure
+++ b/ports/sysdeps/arm/preconfigure
@@ -41,7 +41,7 @@ arm*)
fi
CFLAGS="$CFLAGS -fno-unwind-tables"
;;
- *)
+ linux*)
echo "Old ABI no longer supported" 2>&1
exit 1
;;
diff --git a/ports/sysdeps/arm/setfpucw.c b/ports/sysdeps/arm/setfpucw.c
index d0cea32b9d..0947e273d0 100644
--- a/ports/sysdeps/arm/setfpucw.c
+++ b/ports/sysdeps/arm/setfpucw.c
@@ -1,5 +1,5 @@
/* Set the FPU control word.
- Copyright (C) 1996, 1997, 1999, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,16 +18,13 @@
#include <math.h>
#include <fpu_control.h>
+#include <arm-features.h>
-#include <unistd.h>
-#include <ldsodefs.h>
-#include <dl-procinfo.h>
-#include <sysdep.h>
void
__setfpucw (fpu_control_t set)
{
- if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
+ if (ARM_HAVE_VFP)
{
fpu_control_t cw;
diff --git a/ports/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S
index 5e3f39cc75..dbd59dd7cf 100644
--- a/ports/sysdeps/arm/setjmp.S
+++ b/ports/sysdeps/arm/setjmp.S
@@ -1,5 +1,5 @@
/* setjmp for ARM.
- Copyright (C) 1997, 1998, 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
#define _ASM
#include <bits/setjmp.h>
#include <rtld-global-offsets.h>
+#include <arm-features.h>
ENTRY (__sigsetjmp)
mov ip, r0
@@ -28,28 +29,36 @@ ENTRY (__sigsetjmp)
/* Save registers */
stmia ip!, {v1-v6, sl, fp, sp, lr}
+#if !defined ARM_ASSUME_NO_IWMMXT || defined __SOFTFP__
+# define NEED_HWCAP 1
+#endif
+
+#ifdef NEED_HWCAP
/* Check if we have a VFP unit. */
-#ifdef IS_IN_rtld
+# ifdef IS_IN_rtld
ldr a3, 1f
- ldr a4, Lrtld_local_ro
+ ldr a4, .Lrtld_local_ro
0: add a3, pc, a3
add a3, a3, a4
ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
-#ifdef PIC
+# else
+# ifdef PIC
ldr a3, 1f
- ldr a4, Lrtld_global_ro
+ ldr a4, .Lrtld_global_ro
0: add a3, pc, a3
ldr a3, [a3, a4]
ldr a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
-#else
- ldr a3, Lhwcap
+# else
+ ldr a3, .Lhwcap
ldr a3, [a3, #0]
-#endif
+# endif
+# endif
#endif
+#ifdef __SOFTFP__
tst a3, #HWCAP_ARM_VFP
- beq Lno_vfp
+ beq .Lno_vfp
+#endif
/* Store the VFP registers.
Don't use VFP instructions directly because this code
@@ -60,10 +69,11 @@ ENTRY (__sigsetjmp)
/* Following instruction is vmrs a4, fpscr. */
mrc p10, 7, a4, cr1, cr0, 0
str a4, [ip], #4
-Lno_vfp:
+.Lno_vfp:
+#ifndef ARM_ASSUME_NO_IWMMXT
tst a3, #HWCAP_ARM_IWMMXT
- beq Lno_iwmmxt
+ beq .Lno_iwmmxt
/* Save the call-preserved iWMMXt registers. */
/* Following instructions are wstrd wr10, [ip], #8 (etc.) */
@@ -73,24 +83,27 @@ Lno_vfp:
stcl p1, cr13, [r12], #8
stcl p1, cr14, [r12], #8
stcl p1, cr15, [r12], #8
-Lno_iwmmxt:
+.Lno_iwmmxt:
+#endif
/* Make a tail call to __sigjmp_save; it takes the same args. */
B PLTJMP(C_SYMBOL_NAME(__sigjmp_save))
-#ifdef IS_IN_rtld
+#ifdef NEED_HWCAP
+# ifdef IS_IN_rtld
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_local_ro:
+.Lrtld_local_ro:
.long C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
-#else
-#ifdef PIC
+# else
+# ifdef PIC
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
+.Lrtld_global_ro:
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
-#else
-Lhwcap:
+# else
+.Lhwcap:
.long C_SYMBOL_NAME(_dl_hwcap)
-#endif
+# endif
+# endif
#endif
END (__sigsetjmp)
diff --git a/ports/sysdeps/arm/sotruss-lib.c b/ports/sysdeps/arm/sotruss-lib.c
new file mode 100644
index 0000000000..c665a40939
--- /dev/null
+++ b/ports/sysdeps/arm/sotruss-lib.c
@@ -0,0 +1,49 @@
+/* Override generic sotruss-lib.c to define actual functions for ARM.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+ElfW(Addr)
+la_arm_gnu_pltenter (ElfW(Sym) *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_arm_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[0], regs->lr_reg[1], regs->lr_reg[2],
+ *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_arm_gnu_pltexit (ElfW(Sym) *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook, const struct La_arm_regs *inregs,
+ struct La_arm_retval *outregs, const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_reg[0]);
+
+ return 0;
+}
diff --git a/ports/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h
index cd3d70b5aa..6ec2bd61c2 100644
--- a/ports/sysdeps/arm/sysdep.h
+++ b/ports/sysdeps/arm/sysdep.h
@@ -30,8 +30,6 @@
/* Syntactic details of assembler. */
#define ALIGNARG(log2) log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,%##typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
#define PLTJMP(_x) _x##(PLT)
@@ -63,7 +61,7 @@
/* Define an entry point visible from C. */
#define ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
+ .type C_SYMBOL_NAME(name),%function; \
.align ALIGNARG(4); \
C_LABEL(name) \
.cfi_sections .debug_frame; \
diff --git a/ports/sysdeps/hppa/configure b/ports/sysdeps/hppa/configure
index c47fb6d0a3..762b668f48 100644
--- a/ports/sysdeps/hppa/configure
+++ b/ports/sysdeps/hppa/configure
@@ -1,85 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler line separator" >&5
diff --git a/ports/sysdeps/hppa/nptl/Makefile b/ports/sysdeps/hppa/nptl/Makefile
index 86be06ade8..bc09dd1e79 100644
--- a/ports/sysdeps/hppa/nptl/Makefile
+++ b/ports/sysdeps/hppa/nptl/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 2005 Free Software Foundation, Inc.
+# Copyright (C) 2005-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
# The GNU C Library is free software; you can redistribute it and/or
@@ -18,9 +18,3 @@
ifeq ($(subdir),csu)
gen-as-const-headers += tcb-offsets.sym
endif
-
-# This sets the stack resource limit to 8193kb, which is not a multiple
-# of the page size, and therefore an odd sized stack limit. We override
-# this because the default is too small to run with.
-tst-oddstacklimit-ENV = ; ulimit -s 8193;
-
diff --git a/ports/sysdeps/hppa/nptl/pthread_spin_lock.c b/ports/sysdeps/hppa/nptl/pthread_spin_lock.c
index bcf22408da..e011853130 100644
--- a/ports/sysdeps/hppa/nptl/pthread_spin_lock.c
+++ b/ports/sysdeps/hppa/nptl/pthread_spin_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,23 +15,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <atomic.h>
-#include "pthreadP.h"
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-int
-pthread_spin_lock (pthread_spinlock_t *lock)
-{
-#if 0
- volatile unsigned int *addr = __ldcw_align (lock);
-
- while (__ldcw (addr) == 0)
- while (*addr == 0) ;
-
- return 0;
-#endif
-
- while (atomic_compare_and_exchange_val_acq(lock, 1, 0) == 1)
- while (*lock == 1);
-
- return 0;
-}
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
diff --git a/ports/sysdeps/hppa/nptl/shlib-versions b/ports/sysdeps/hppa/nptl/shlib-versions
new file mode 100644
index 0000000000..adc26364b1
--- /dev/null
+++ b/ports/sysdeps/hppa/nptl/shlib-versions
@@ -0,0 +1 @@
+hppa.*-.*-linux.* libpthread=0 GLIBC_2.2
diff --git a/ports/sysdeps/hppa/nptl/tst-oddstacklimit.c b/ports/sysdeps/hppa/nptl/tst-oddstacklimit.c
new file mode 100644
index 0000000000..6fcc9e312d
--- /dev/null
+++ b/ports/sysdeps/hppa/nptl/tst-oddstacklimit.c
@@ -0,0 +1,26 @@
+/* Test NPTL with stack limit that is not a multiple of the page size.
+ HPPA version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* This sets the stack resource limit to 8193kb, which is not a multiple
+ of the page size, and therefore an odd sized stack limit. We override
+ this because the default is too small to run with. */
+
+#define ODD_STACK_LIMIT (8193 * 1024)
+
+#include <sysdeps/../nptl/tst-oddstacklimit.c>
diff --git a/ports/sysdeps/hppa/tininess.h b/ports/sysdeps/hppa/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/ports/sysdeps/hppa/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/ports/sysdeps/ia64/Makeconfig b/ports/sysdeps/ia64/Makeconfig
new file mode 100644
index 0000000000..d1d3f6c95c
--- /dev/null
+++ b/ports/sysdeps/ia64/Makeconfig
@@ -0,0 +1,2 @@
+# ia64 does not provide crtbeginT.o, so use crtbegin.o.
++prectorT = $(+prector)
diff --git a/ports/sysdeps/ia64/bits/byteswap-16.h b/ports/sysdeps/ia64/bits/byteswap-16.h
index 0a85909276..4a53ffaf6d 100644
--- a/ports/sysdeps/ia64/bits/byteswap-16.h
+++ b/ports/sysdeps/ia64/bits/byteswap-16.h
@@ -23,7 +23,7 @@
#if defined __GNUC__ && __GNUC__ >= 2
# define __bswap_16(x) \
(__extension__ \
- ({ register unsigned short int __v, __x = (x); \
+ ({ register unsigned short int __v, __x = (unsigned short int) (x); \
if (__builtin_constant_p (x)) \
__v = __bswap_constant_16 (__x); \
else \
diff --git a/ports/sysdeps/ia64/bits/byteswap.h b/ports/sysdeps/ia64/bits/byteswap.h
index 68612487d3..d363c3e1cf 100644
--- a/ports/sysdeps/ia64/bits/byteswap.h
+++ b/ports/sysdeps/ia64/bits/byteswap.h
@@ -25,7 +25,7 @@
/* Swap bytes in 16 bit value. */
#define __bswap_constant_16(x) \
- ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
+ ((unsigned short int)((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
/* Get __bswap_16. */
#include <bits/byteswap-16.h>
diff --git a/ports/sysdeps/ia64/configure b/ports/sysdeps/ia64/configure
index a3a1137132..e1fe62d8c5 100644
--- a/ports/sysdeps/ia64/configure
+++ b/ports/sysdeps/ia64/configure
@@ -1,176 +1,5 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/ia64.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
-$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop.b 0;;
- /* comment */
- nop.b 0;;
- /* comment */
- nop.b 0;;
-EOF
-if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } && {
- ac_pattern='conftest\.S'
- { ac_try='readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
-$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
-
-fi
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia64 TLS support" >&5
-$as_echo_n "checking for ia64 TLS support... " >&6; }
-if ${libc_cv_ia64_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata","awT",@progbits
-foo: data8 25
- .text
- addl r16 = @ltoff(@dtpmod(foo#)), gp
- addl r17 = @ltoff(@dtprel(foo#)), gp
- addl r18 = @ltoff(@tprel(foo#)), gp
- addl r19 = @dtprel(foo#), gp
- adds r21 = @dtprel(foo#), r13
- movl r23 = @dtprel(foo#)
- addl r20 = @tprel(foo#), gp
- adds r22 = @tprel(foo#), r13
- movl r24 = @tprel(foo#)
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_ia64_tls=yes
-else
- libc_cv_ia64_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ia64_tls" >&5
-$as_echo "$libc_cv_ia64_tls" >&6; }
-if test $libc_cv_ia64_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
diff --git a/ports/sysdeps/ia64/configure.in b/ports/sysdeps/ia64/configure.in
index 5f1b1123f9..4ad04ff2f7 100644
--- a/ports/sysdeps/ia64/configure.in
+++ b/ports/sysdeps/ia64/configure.in
@@ -1,67 +1,6 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/ia64.
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop.b 0;;
- /* comment */
- nop.b 0;;
- /* comment */
- nop.b 0;;
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
- ac_pattern='conftest\.S'
- AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for ia64 TLS support, libc_cv_ia64_tls, [dnl
-cat > conftest.s <<\EOF
- .section ".tdata","awT",@progbits
-foo: data8 25
- .text
- addl r16 = @ltoff(@dtpmod(foo#)), gp
- addl r17 = @ltoff(@dtprel(foo#)), gp
- addl r18 = @ltoff(@tprel(foo#)), gp
- addl r19 = @dtprel(foo#), gp
- adds r21 = @dtprel(foo#), r13
- movl r23 = @dtprel(foo#)
- addl r20 = @tprel(foo#), gp
- adds r22 = @tprel(foo#), r13
- movl r24 = @tprel(foo#)
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_ia64_tls=yes
-else
- libc_cv_ia64_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_ia64_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
dnl It is always possible to access static and hidden symbols in an
dnl position independent way.
AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/ports/sysdeps/ia64/fpu/fegetround.c b/ports/sysdeps/ia64/fpu/fegetround.c
index e672f61922..403aadb41b 100644
--- a/ports/sysdeps/ia64/fpu/fegetround.c
+++ b/ports/sysdeps/ia64/fpu/fegetround.c
@@ -1,5 +1,5 @@
/* Return current rounding direction.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Christian Boissat <Christian.Boissat@cern.ch>, 1999.
@@ -17,14 +17,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <fenv.h>
+#include <get-rounding-mode.h>
int
fegetround (void)
{
- fenv_t fpsr;
-
- __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr));
-
- return (fpsr >> 10) & 3;
+ return get_rounding_mode ();
}
diff --git a/ports/sysdeps/ia64/fpu/get-rounding-mode.h b/ports/sysdeps/ia64/fpu/get-rounding-mode.h
new file mode 100644
index 0000000000..1e184730e5
--- /dev/null
+++ b/ports/sysdeps/ia64/fpu/get-rounding-mode.h
@@ -0,0 +1,37 @@
+/* Return current rounding direction within libc. IA64 version.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Christian Boissat <Christian.Boissat@cern.ch>, 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef IA64_GET_ROUNDING_MODE_H
+#define IA64_GET_ROUNDING_MODE_H 1
+
+#include <fenv.h>
+
+/* Return the floating-point rounding mode. */
+
+static inline int
+get_rounding_mode (void)
+{
+ fenv_t fpsr;
+
+ __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr));
+
+ return (fpsr >> 10) & 3;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/ports/sysdeps/ia64/fpu/libm-symbols.h b/ports/sysdeps/ia64/fpu/libm-symbols.h
index 81084bd62e..0df807601c 100644
--- a/ports/sysdeps/ia64/fpu/libm-symbols.h
+++ b/ports/sysdeps/ia64/fpu/libm-symbols.h
@@ -4,7 +4,6 @@
/* Support for compatible assembler handling. */
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
-#define ASM_TYPE_DIRECTIVE(name,T) .type name,T
#define LOCAL_LIBM_ENTRY(name) \
.proc name; \
@@ -18,7 +17,7 @@
#define RODATA .rodata
#define LOCAL_OBJECT_START(name) \
name:; \
- ASM_TYPE_DIRECTIVE(name, @object)
+ .type name, @object
#define LOCAL_OBJECT_END(name) \
ASM_SIZE_DIRECTIVE(name)
@@ -42,7 +41,7 @@
.hidden __##name; \
LOCAL_LIBM_END(__##name); \
ASM_SIZE_DIRECTIVE(__##name); \
- ASM_TYPE_DIRECTIVE(__##name, @function)
+ .type __##name, @function
#define GLOBAL_IEEE754_ENTRY(name) \
WEAK_LIBM_ENTRY(name); \
@@ -52,7 +51,7 @@
#define GLOBAL_IEEE754_END(name) \
WEAK_LIBM_END(name); \
ASM_SIZE_DIRECTIVE(__ieee754_##name); \
- ASM_TYPE_DIRECTIVE(__ieee754_##name, @function)
+ .type __ieee754_##name, @function
#if defined ASSEMBLER && !defined NOT_IN_libc
# define __libm_error_support HIDDEN_JUMPTARGET(__libm_error_support)
diff --git a/ports/sysdeps/ia64/fpu/libm_tan.S b/ports/sysdeps/ia64/fpu/libm_tan.S
index 655a864552..b267f13d9e 100644
--- a/ports/sysdeps/ia64/fpu/libm_tan.S
+++ b/ports/sysdeps/ia64/fpu/libm_tan.S
@@ -689,7 +689,7 @@
.align 128
TAN_BASE_CONSTANTS:
-ASM_TYPE_DIRECTIVE(TAN_BASE_CONSTANTS,@object)
+.type TAN_BASE_CONSTANTS, @object
data4 0x4B800000, 0xCB800000, 0x38800000, 0xB8800000 // two**24, -two**24
// two**-14, -two**-14
data4 0x4E44152A, 0xA2F9836E, 0x00003FFE, 0x00000000 // two_by_pi
diff --git a/ports/sysdeps/ia64/ldsodefs.h b/ports/sysdeps/ia64/ldsodefs.h
index 269319e841..d5fde93836 100644
--- a/ports/sysdeps/ia64/ldsodefs.h
+++ b/ports/sysdeps/ia64/ldsodefs.h
@@ -26,7 +26,7 @@ struct La_ia64_retval;
#define ARCH_PLTENTER_MEMBERS \
Elf64_Addr (*ia64_gnu_pltenter) (Elf64_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_ia64_regs *, \
+ struct La_ia64_regs *, \
unsigned int *, const char *name, \
long int *framesizep);
diff --git a/ports/sysdeps/ia64/tininess.h b/ports/sysdeps/ia64/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/ports/sysdeps/ia64/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/ports/sysdeps/m68k/asm-syntax.h b/ports/sysdeps/m68k/asm-syntax.h
index 53f5259b0e..f011ff2de8 100644
--- a/ports/sysdeps/m68k/asm-syntax.h
+++ b/ports/sysdeps/m68k/asm-syntax.h
@@ -1,5 +1,5 @@
/* Definitions for 68k syntax variations.
- Copyright (C) 1992, 1994, 1996, 1997, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in the GNU MP Library.
@@ -17,11 +17,6 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
-#define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define PROLOG(name) .type name,@function
-#define EPILOG(name) .size name,.-name
/* For ELF we need to prefix register names and local labels. */
#define R_(r) %##r
#define R(r) R_(r)
@@ -35,8 +30,6 @@
#define MEM_PREDEC(memory_base)R(memory_base)@-
#define MEM_POSTINC(memory_base)R(memory_base)@+
#define TEXT .text
-#define ALIGN .even
-#define GLOBL .globl
/* Use variable sized opcodes. */
#define bcc jcc
#define bcs jcs
@@ -56,8 +49,6 @@
#define MEM_INDX1_(base,idx,size_suffix,scale)(R(base),R(idx##.##size_suffix*scale))
#define MEM_INDX1(base,idx,size_suffix,scale)MEM_INDX1_(base,idx,size_suffix,scale)
#define TEXT .text
-#define ALIGN .align ALIGNARG(2)
-#define GLOBL .globl
#define bcc jbcc
#define bcs jbcs
#define bls jbls
diff --git a/ports/sysdeps/m68k/coldfire/fpu/bits/mathinline.h b/ports/sysdeps/m68k/coldfire/fpu/bits/mathinline.h
new file mode 100644
index 0000000000..928b7d3e3d
--- /dev/null
+++ b/ports/sysdeps/m68k/coldfire/fpu/bits/mathinline.h
@@ -0,0 +1,44 @@
+/* Inline math functions for Coldfire.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
+#endif
+
+#ifndef __extern_always_inline
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE __extern_always_inline
+#endif
+
+#if defined __USE_ISOC99 && defined __GNUC__
+
+/* Test for negative number. Used in the signbit macro. */
+__MATH_INLINE int
+__NTH (__signbitf (float __x))
+{
+ return __builtin_signbitf (__x);
+}
+
+__MATH_INLINE int
+__NTH (__signbit (double __x))
+{
+ return __builtin_signbit (__x);
+}
+
+#endif
diff --git a/ports/sysdeps/m68k/ldsodefs.h b/ports/sysdeps/m68k/ldsodefs.h
index bc8d540990..2fe4858b48 100644
--- a/ports/sysdeps/m68k/ldsodefs.h
+++ b/ports/sysdeps/m68k/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@ struct La_m68k_retval;
#define ARCH_PLTENTER_MEMBERS \
Elf32_Addr (*m68k_gnu_pltenter) (Elf32_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_m68k_regs *, \
+ struct La_m68k_regs *, \
unsigned int *, const char *name, \
long int *framesizep);
diff --git a/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
index 66dc109e08..54d6909905 100644
--- a/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
+++ b/ports/sysdeps/m68k/m680x0/fpu/libm-test-ulps
@@ -169,8 +169,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -195,8 +199,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -244,8 +252,12 @@ ldouble: 1
# cacosh
Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -255,8 +267,12 @@ Test "Real part of: cacosh (+0 + 1.5 i) == 1.19476321728710930411193082851909052
double: 1
idouble: 1
Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -266,8 +282,12 @@ Test "Real part of: cacosh (+0 - 1.5 i) == 1.19476321728710930411193082851909052
double: 1
idouble: 1
Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -277,8 +297,12 @@ Test "Real part of: cacosh (-0 + 1.5 i) == 1.19476321728710930411193082851909052
double: 1
idouble: 1
Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -298,11 +322,19 @@ idouble: 1
ildouble: 1
ldouble: 1
Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 7
@@ -322,11 +354,19 @@ Test "Imaginary part of: cacosh (0.75 + 1.25 i) == 1.132393631605308195222663336
float: 1
ifloat: 1
Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# casin
Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
@@ -345,8 +385,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -371,8 +415,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -472,11 +520,19 @@ ifloat: 6
ildouble: 6
ldouble: 6
Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -605,6 +661,12 @@ ildouble: 1
ldouble: 1
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
@@ -613,6 +675,12 @@ ldouble: 1
Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-100 i) == 8.237022655933121125560939513260027133767e-5 + 8.974094312218060110948251664314290484113e-31 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0x1.fp+16383 + 0x1p+16383 i) == 11356.60974243783798653123798337822335902 + 0.4764674194737066993385333770295162295856 i":
ildouble: 1
ldouble: 1
@@ -630,6 +698,15 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-0x1.234566p-40 - 1.0 i) == 2.325249110681915353442924915876654139373e-25 - 6.821881769213700828789403802671540158935e-1 i":
double: 1
idouble: 1
@@ -678,6 +755,14 @@ double: 1
idouble: 1
ildouble: 2
ldouble: 2
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
ildouble: 1
ldouble: 1
@@ -895,6 +980,8 @@ idouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
@@ -2430,7 +2517,9 @@ ildouble: 1
ldouble: 1
Function: Real part of "clog":
+double: 1
float: 1
+idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
diff --git a/ports/sysdeps/m68k/nptl/pthread_spin_lock.c b/ports/sysdeps/m68k/nptl/pthread_spin_lock.c
index 90a8262b24..2616a7f2a2 100644
--- a/ports/sysdeps/m68k/nptl/pthread_spin_lock.c
+++ b/ports/sysdeps/m68k/nptl/pthread_spin_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -16,15 +16,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <atomic.h>
-#include "pthreadP.h"
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-int
-pthread_spin_lock (pthread_spinlock_t *lock)
-{
- while (atomic_compare_and_exchange_val_acq(lock, 1, 0) != 0)
- while (*lock != 0)
- ;
-
- return 0;
-}
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
diff --git a/ports/sysdeps/m68k/sysdep.h b/ports/sysdeps/m68k/sysdep.h
index 980cae5b84..a621830dbb 100644
--- a/ports/sysdeps/m68k/sysdep.h
+++ b/ports/sysdeps/m68k/sysdep.h
@@ -1,5 +1,5 @@
/* Assembler macros for m68k.
- Copyright (C) 1998, 2003, 2010, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,14 +20,6 @@
#ifdef __ASSEMBLER__
-/* Syntactic details of assembler. */
-
-/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
-# define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg
-# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
-
/* Define an entry point visible from C.
There is currently a bug in gdb which prevents us from specifying
@@ -35,8 +27,8 @@
the current source file. */
# define ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function); \
- .align ALIGNARG(2); \
+ .type C_SYMBOL_NAME(name),@function; \
+ .p2align 2; \
C_LABEL(name) \
cfi_startproc; \
CALL_MCOUNT
@@ -44,7 +36,7 @@
# undef END
# define END(name) \
cfi_endproc; \
- ASM_SIZE_DIRECTIVE(name)
+ .size name,.-name
/* If compiled for profiling, call `_mcount' at the start of each function. */
diff --git a/ports/sysdeps/mips/bits/atomic.h b/ports/sysdeps/mips/bits/atomic.h
index b0942737dd..749e166908 100644
--- a/ports/sysdeps/mips/bits/atomic.h
+++ b/ports/sysdeps/mips/bits/atomic.h
@@ -193,11 +193,13 @@ typedef uintmax_t uatomic_max_t;
__atomic_fetch_add (mem, value, model)
# endif
-/* ??? Barrier semantics for atomic_exchange_and_add appear to be
- undefined. Use full barrier for now, as that's safe. */
-# define atomic_exchange_and_add(mem, value) \
+# define atomic_exchange_and_add_acq(mem, value) \
__atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
- __ATOMIC_ACQ_REL)
+ __ATOMIC_ACQUIRE)
+
+# define atomic_exchange_and_add_rel(mem, value) \
+ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
+ __ATOMIC_RELEASE)
#else /* !__GNUC_PREREQ (4, 8) */
/* This implementation using inline assembly will be removed once glibc
requires GCC 4.8 or later to build. */
@@ -434,11 +436,13 @@ typedef uintmax_t uatomic_max_t;
__prev; })
# endif
-/* ??? Barrier semantics for atomic_exchange_and_add appear to be
- undefined. Use full barrier for now, as that's safe. */
-# define atomic_exchange_and_add(mem, value) \
- __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
- MIPS_SYNC_STR, MIPS_SYNC_STR)
+# define atomic_exchange_and_add_acq(mem, value) \
+ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
+ "", MIPS_SYNC_STR)
+
+# define atomic_exchange_and_add_rel(mem, value) \
+ __atomic_val_bysize (__arch_exchange_and_add, int, mem, value, \
+ MIPS_SYNC_STR, "")
#endif /* __GNUC_PREREQ (4, 8) */
/* TODO: More atomic operations could be implemented efficiently; only the
diff --git a/ports/sysdeps/mips/dl-lookup.c b/ports/sysdeps/mips/dl-lookup.c
index f7e98b7f53..e62c7d0608 100644
--- a/ports/sysdeps/mips/dl-lookup.c
+++ b/ports/sysdeps/mips/dl-lookup.c
@@ -1,6 +1,6 @@
/* Look up a symbol in the loaded objects.
MIPS/Linux version - special handling of non-PIC undefined symbol rules.
- Copyright (C) 1995-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@
#include <sysdep-cancel.h>
#include <bits/libc-lock.h>
#include <tls.h>
+#include <atomic.h>
#include <assert.h>
diff --git a/ports/sysdeps/mips/dl-trampoline.c b/ports/sysdeps/mips/dl-trampoline.c
index 3454eb306f..e4886cc9bd 100644
--- a/ports/sysdeps/mips/dl-trampoline.c
+++ b/ports/sysdeps/mips/dl-trampoline.c
@@ -112,8 +112,6 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
generated by the gnu linker. */
int _dl_mips_gnu_objects = 1;
-#define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
-
/* This is called from assembly stubs below which the compiler can't see. */
static ElfW(Addr)
__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr))
diff --git a/ports/sysdeps/mips/fpu_control.h b/ports/sysdeps/mips/fpu_control.h
index e9c859a4e3..7307d030ea 100644
--- a/ports/sysdeps/mips/fpu_control.h
+++ b/ports/sysdeps/mips/fpu_control.h
@@ -85,7 +85,7 @@ extern fpu_control_t __fpu_control;
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
/* The fdlibm code requires strict IEEE double precision arithmetic,
diff --git a/ports/sysdeps/mips/ieee754.h b/ports/sysdeps/mips/ieee754/ieee754.h
index 87dbf658eb..87dbf658eb 100644
--- a/ports/sysdeps/mips/ieee754.h
+++ b/ports/sysdeps/mips/ieee754/ieee754.h
diff --git a/ports/sysdeps/mips/init-first.c b/ports/sysdeps/mips/init-first.c
deleted file mode 100644
index 6a5e7caf09..0000000000
--- a/ports/sysdeps/mips/init-first.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Initialization code run first thing by the ELF startup code. For mips/Unix.
- Copyright (C) 1996, 1997, 2010 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <unistd.h>
-
-extern void __libc_init (int, char **, char **);
-extern void __libc_global_ctors (void);
-
-
-static void
-init (int *data)
-{
- int argc = *data;
- char **argv = (void *) (data + 1);
- char **envp = &argv[argc + 1];
-
- __environ = envp;
- __libc_init (argc, argv, envp);
-}
-
-#ifdef SHARED
-/* This function is called to initialize the shared C library.
- It is called just before the user _start code from mips/elf/start.S,
- with the stack set up as that code gets it. */
-
-/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
- pointer in the dynamic section based solely on that. It is convention
- for this function to be in the `.init' section, but the symbol name is
- the only thing that really matters!! */
-/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
-
-void
-_init (int argc, ...)
-{
- init (&argc);
-
-#ifndef NO_CTORS_DTORS_SECTIONS
- __libc_global_ctors ();
-#endif
-}
-#endif
-
-
-void
-__libc_init_first (int argc __attribute__ ((unused)), ...)
-{
-#ifndef SHARED
- init (&argc);
-#endif
-}
diff --git a/ports/sysdeps/mips/ldsodefs.h b/ports/sysdeps/mips/ldsodefs.h
index ab4e9ef1ec..791e61896e 100644
--- a/ports/sysdeps/mips/ldsodefs.h
+++ b/ports/sysdeps/mips/ldsodefs.h
@@ -29,17 +29,17 @@ struct La_mips_64_retval;
#define ARCH_PLTENTER_MEMBERS \
Elf32_Addr (*mips_o32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_mips_32_regs *, \
+ struct La_mips_32_regs *, \
unsigned int *, const char *name, \
long int *framesizep); \
Elf32_Addr (*mips_n32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_mips_64_regs *, \
+ struct La_mips_64_regs *, \
unsigned int *, const char *name, \
long int *framesizep); \
Elf64_Addr (*mips_n64_gnu_pltenter) (Elf64_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_mips_64_regs *, \
+ struct La_mips_64_regs *, \
unsigned int *, const char *name, \
long int *framesizep);
diff --git a/ports/sysdeps/mips/memcpy.S b/ports/sysdeps/mips/memcpy.S
index 753f67ca17..abb07f9ee9 100644
--- a/ports/sysdeps/mips/memcpy.S
+++ b/ports/sysdeps/mips/memcpy.S
@@ -1,6 +1,5 @@
-/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
+/* Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,119 +15,616 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
+#ifdef ANDROID_CHANGES
+#include "machine/asm.h"
+#include "machine/regdef.h"
+#define USE_MEMMOVE_FOR_OVERLAP
+#define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
+#define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
+#elif _LIBC
#include <sysdep.h>
+#include <regdef.h>
+#include <sys/asm.h>
+#define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
+#define PREFETCH_STORE_HINT PREFETCH_HINT_STORE_STREAMED
+#elif _COMPILING_NEWLIB
+#include "machine/asm.h"
+#include "machine/regdef.h"
+#define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
+#define PREFETCH_STORE_HINT PREFETCH_HINT_STORE_STREAMED
+#else
+#include <regdef.h>
+#include <sys/asm.h>
+#endif
+
+#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \
+ (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#ifndef DISABLE_PREFETCH
+#define USE_PREFETCH
+#endif
+#endif
+
+#if (_MIPS_SIM == _ABI64) || (_MIPS_SIM == _ABIN32)
+#ifndef DISABLE_DOUBLE
+#define USE_DOUBLE
+#endif
+#endif
+
+
+
+/* Some asm.h files do not have the L macro definition. */
+#ifndef L
+#if _MIPS_SIM == _ABIO32
+# define L(label) $L ## label
+#else
+# define L(label) .L ## label
+#endif
+#endif
+
+/* Some asm.h files do not have the PTR_ADDIU macro definition. */
+#ifndef PTR_ADDIU
+#ifdef USE_DOUBLE
+#define PTR_ADDIU daddiu
+#else
+#define PTR_ADDIU addiu
+#endif
+#endif
+
+/* Some asm.h files do not have the PTR_SRA macro definition. */
+#ifndef PTR_SRA
+#ifdef USE_DOUBLE
+#define PTR_SRA dsra
+#else
+#define PTR_SRA sra
+#endif
+#endif
+
+
+/*
+ * Using PREFETCH_HINT_LOAD_STREAMED instead of PREFETCH_LOAD on load
+ * prefetches appears to offer a slight preformance advantage.
+ *
+ * Using PREFETCH_HINT_PREPAREFORSTORE instead of PREFETCH_STORE
+ * or PREFETCH_STORE_STREAMED offers a large performance advantage
+ * but PREPAREFORSTORE has some special restrictions to consider.
+ *
+ * Prefetch with the 'prepare for store' hint does not copy a memory
+ * location into the cache, it just allocates a cache line and zeros
+ * it out. This means that if you do not write to the entire cache
+ * line before writing it out to memory some data will get zero'ed out
+ * when the cache line is written back to memory and data will be lost.
+ *
+ * Also if you are using this memcpy to copy overlapping buffers it may
+ * not behave correctly when using the 'prepare for store' hint. If you
+ * use the 'prepare for store' prefetch on a memory area that is in the
+ * memcpy source (as well as the memcpy destination), then you will get
+ * some data zero'ed out before you have a chance to read it and data will
+ * be lost.
+ *
+ * If you are going to use this memcpy routine with the 'prepare for store'
+ * prefetch you may want to set USE_MEMMOVE_FOR_OVERLAP in order to avoid
+ * the problem of running memcpy on overlapping buffers.
+ *
+ * There are ifdef'ed sections of this memcpy to make sure that it does not
+ * do prefetches on cache lines that are not going to be completely written.
+ * This code is only needed and only used when PREFETCH_STORE_HINT is set to
+ * PREFETCH_HINT_PREPAREFORSTORE. This code assumes that cache lines are
+ * 32 bytes and if the cache line is larger it will not work correctly.
+ */
+#ifdef USE_PREFETCH
+# define PREFETCH_HINT_LOAD 0
+# define PREFETCH_HINT_STORE 1
+# define PREFETCH_HINT_LOAD_STREAMED 4
+# define PREFETCH_HINT_STORE_STREAMED 5
+# define PREFETCH_HINT_LOAD_RETAINED 6
+# define PREFETCH_HINT_STORE_RETAINED 7
+# define PREFETCH_HINT_WRITEBACK_INVAL 25
+# define PREFETCH_HINT_PREPAREFORSTORE 30
+
+/*
+ * If we have not picked out what hints to use at this point use the
+ * standard load and store prefetch hints.
+ */
+#ifndef PREFETCH_STORE_HINT
+# define PREFETCH_STORE_HINT PREFETCH_HINT_STORE
+#endif
+#ifndef PREFETCH_LOAD_HINT
+# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD
+#endif
-/* void *memcpy(void *s1, const void *s2, size_t n); */
+/*
+ * We double everything when USE_DOUBLE is true so we do 2 prefetches to
+ * get 64 bytes in that case. The assumption is that each individual
+ * prefetch brings in 32 bytes.
+ */
+#ifdef USE_DOUBLE
+# define PREFETCH_CHUNK 64
+# define PREFETCH_FOR_LOAD(chunk, reg) \
+ pref PREFETCH_LOAD_HINT, (chunk)*32(reg); \
+ pref PREFETCH_LOAD_HINT, ((chunk)+1)*32(reg)
+# define PREFETCH_FOR_STORE(chunk, reg) \
+ pref PREFETCH_STORE_HINT, (chunk)*32(reg); \
+ pref PREFETCH_STORE_HINT, ((chunk)+1)*32(reg)
+#else
+# define PREFETCH_CHUNK 32
+# define PREFETCH_FOR_LOAD(chunk, reg) \
+ pref PREFETCH_LOAD_HINT, (chunk)*32(reg)
+# define PREFETCH_FOR_STORE(chunk, reg) \
+ pref PREFETCH_STORE_HINT, (chunk)*32(reg)
+#endif
+# define PREFETCH_LIMIT (5 * PREFETCH_CHUNK)
+#else /* USE_PREFETCH not defined */
+# define PREFETCH_FOR_LOAD(offset, reg)
+# define PREFETCH_FOR_STORE(offset, reg)
+#endif
+
+/* Allow the routine to be named something else if desired. */
+#ifndef MEMCPY_NAME
+#define MEMCPY_NAME memcpy
+#endif
+/* We use these 32/64 bit registers as temporaries to do the copying. */
+#define REG0 t0
+#define REG1 t1
+#define REG2 t2
+#define REG3 t3
+#if _MIPS_SIM == _ABIO32
+# define REG4 t4
+# define REG5 t5
+# define REG6 t6
+# define REG7 t7
+#else
+# define REG4 ta0
+# define REG5 ta1
+# define REG6 ta2
+# define REG7 ta3
+#endif
+
+/* We load/store 64 bits at a time when USE_DOUBLE is true.
+ * The C_ prefix stands for CHUNK and is used to avoid macro name
+ * conflicts with system header files. */
+
+#ifdef USE_DOUBLE
+# define C_ST sd
+# define C_LD ld
+#if __MIPSEB
+# define C_LDHI ldl /* high part is left in big-endian */
+# define C_STHI sdl /* high part is left in big-endian */
+# define C_LDLO ldr /* low part is right in big-endian */
+# define C_STLO sdr /* low part is right in big-endian */
+#else
+# define C_LDHI ldr /* high part is right in little-endian */
+# define C_STHI sdr /* high part is right in little-endian */
+# define C_LDLO ldl /* low part is left in little-endian */
+# define C_STLO sdl /* low part is left in little-endian */
+#endif
+#else
+# define C_ST sw
+# define C_LD lw
#if __MIPSEB
-# define LWHI lwl /* high part is left in big-endian */
-# define SWHI swl /* high part is left in big-endian */
-# define LWLO lwr /* low part is right in big-endian */
-# define SWLO swr /* low part is right in big-endian */
+# define C_LDHI lwl /* high part is left in big-endian */
+# define C_STHI swl /* high part is left in big-endian */
+# define C_LDLO lwr /* low part is right in big-endian */
+# define C_STLO swr /* low part is right in big-endian */
#else
-# define LWHI lwr /* high part is right in little-endian */
-# define SWHI swr /* high part is right in little-endian */
-# define LWLO lwl /* low part is left in little-endian */
-# define SWLO swl /* low part is left in little-endian */
+# define C_LDHI lwr /* high part is right in little-endian */
+# define C_STHI swr /* high part is right in little-endian */
+# define C_LDLO lwl /* low part is left in little-endian */
+# define C_STLO swl /* low part is left in little-endian */
+#endif
#endif
-ENTRY (memcpy)
+/* Bookkeeping values for 32 vs. 64 bit mode. */
+#ifdef USE_DOUBLE
+# define NSIZE 8
+# define NSIZEMASK 0x3f
+# define NSIZEDMASK 0x7f
+#else
+# define NSIZE 4
+# define NSIZEMASK 0x1f
+# define NSIZEDMASK 0x3f
+#endif
+#define UNIT(unit) ((unit)*NSIZE)
+#define UNITM1(unit) (((unit)*NSIZE)-1)
+
+#ifdef ANDROID_CHANGES
+LEAF(MEMCPY_NAME, 0)
+#else
+LEAF(MEMCPY_NAME)
+#endif
+ .set nomips16
.set noreorder
+/*
+ * Below we handle the case where memcpy is called with overlapping src and dst.
+ * Although memcpy is not required to handle this case, some parts of Android
+ * like Skia rely on such usage. We call memmove to handle such cases.
+ */
+#ifdef USE_MEMMOVE_FOR_OVERLAP
+ PTR_SUBU t0,a0,a1
+ PTR_SRA t2,t0,31
+ xor t1,t0,t2
+ PTR_SUBU t0,t1,t2
+ sltu t2,t0,a2
+ beq t2,zero,L(memcpy)
+ la t9,memmove
+ jr t9
+ nop
+L(memcpy):
+#endif
+/*
+ * If the size is less then 2*NSIZE (8 or 16), go to L(lastb). Regardless of
+ * size, copy dst pointer to v0 for the return value.
+ */
+ slti t2,a2,(2 * NSIZE)
+ bne t2,zero,L(lastb)
+ move v0,a0
+/*
+ * If src and dst have different alignments, go to L(unaligned), if they
+ * have the same alignment (but are not actually aligned) do a partial
+ * load/store to make them aligned. If they are both already aligned
+ * we can start copying at L(aligned).
+ */
+ xor t8,a1,a0
+ andi t8,t8,(NSIZE-1) /* t8 is a0/a1 word-displacement */
+ bne t8,zero,L(unaligned)
+ PTR_SUBU a3, zero, a0
+
+ andi a3,a3,(NSIZE-1) /* copy a3 bytes to align a0/a1 */
+ beq a3,zero,L(aligned) /* if a3=0, it is already aligned */
+ PTR_SUBU a2,a2,a3 /* a2 is the remining bytes count */
- slti t0, a2, 8 # Less than 8?
- bne t0, zero, L(last8)
- move v0, a0 # Setup exit value before too late
-
- xor t0, a1, a0 # Find a0/a1 displacement
- andi t0, 0x3
- bne t0, zero, L(shift) # Go handle the unaligned case
- subu t1, zero, a1
- andi t1, 0x3 # a0/a1 are aligned, but are we
- beq t1, zero, L(chk8w) # starting in the middle of a word?
- subu a2, t1
- LWHI t0, 0(a1) # Yes we are... take care of that
- addu a1, t1
- SWHI t0, 0(a0)
- addu a0, t1
-
-L(chk8w):
- andi t0, a2, 0x1f # 32 or more bytes left?
- beq t0, a2, L(chk1w)
- subu a3, a2, t0 # Yes
- addu a3, a1 # a3 = end address of loop
- move a2, t0 # a2 = what will be left after loop
-L(lop8w):
- lw t0, 0(a1) # Loop taking 8 words at a time
- lw t1, 4(a1)
- lw t2, 8(a1)
- lw t3, 12(a1)
- lw t4, 16(a1)
- lw t5, 20(a1)
- lw t6, 24(a1)
- lw t7, 28(a1)
- addiu a0, 32
- addiu a1, 32
- sw t0, -32(a0)
- sw t1, -28(a0)
- sw t2, -24(a0)
- sw t3, -20(a0)
- sw t4, -16(a0)
- sw t5, -12(a0)
- sw t6, -8(a0)
- bne a1, a3, L(lop8w)
- sw t7, -4(a0)
-
-L(chk1w):
- andi t0, a2, 0x3 # 4 or more bytes left?
- beq t0, a2, L(last8)
- subu a3, a2, t0 # Yes, handle them one word at a time
- addu a3, a1 # a3 again end address
- move a2, t0
-L(lop1w):
- lw t0, 0(a1)
- addiu a0, 4
- addiu a1, 4
- bne a1, a3, L(lop1w)
- sw t0, -4(a0)
-
-L(last8):
- blez a2, L(lst8e) # Handle last 8 bytes, one at a time
- addu a3, a2, a1
-L(lst8l):
- lb t0, 0(a1)
- addiu a0, 1
- addiu a1, 1
- bne a1, a3, L(lst8l)
- sb t0, -1(a0)
-L(lst8e):
- jr ra # Bye, bye
+ C_LDHI t8,0(a1)
+ PTR_ADDU a1,a1,a3
+ C_STHI t8,0(a0)
+ PTR_ADDU a0,a0,a3
+
+/*
+ * Now dst/src are both aligned to (word or double word) aligned addresses
+ * Set a2 to count how many bytes we have to copy after all the 64/128 byte
+ * chunks are copied and a3 to the dst pointer after all the 64/128 byte
+ * chunks have been copied. We will loop, incrementing a0 and a1 until a0
+ * equals a3.
+ */
+
+L(aligned):
+ andi t8,a2,NSIZEDMASK /* any whole 64-byte/128-byte chunks? */
+ beq a2,t8,L(chkw) /* if a2==t8, no 64-byte/128-byte chunks */
+ PTR_SUBU a3,a2,t8 /* subtract from a2 the reminder */
+ PTR_ADDU a3,a0,a3 /* Now a3 is the final dst after loop */
+
+/* When in the loop we may prefetch with the 'prepare to store' hint,
+ * in this case the a0+x should not be past the "t0-32" address. This
+ * means: for x=128 the last "safe" a0 address is "t0-160". Alternatively,
+ * for x=64 the last "safe" a0 address is "t0-96" In the current version we
+ * will use "prefetch hint,128(a0)", so "t0-160" is the limit.
+ */
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ PTR_ADDU t0,a0,a2 /* t0 is the "past the end" address */
+ PTR_SUBU t9,t0,PREFETCH_LIMIT /* t9 is the "last safe pref" address */
+#endif
+ PREFETCH_FOR_LOAD (0, a1)
+ PREFETCH_FOR_LOAD (1, a1)
+ PREFETCH_FOR_LOAD (2, a1)
+ PREFETCH_FOR_STORE (1, a0)
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ sltu v1,t9,a0 /* If a0 > t9 don't use next prefetch */
+ bgtz v1,L(loop16w)
nop
+#endif
+ PREFETCH_FOR_STORE (2, a0)
+L(loop16w):
+ PREFETCH_FOR_LOAD (3, a1)
+ C_LD t0,UNIT(0)(a1)
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ bgtz v1,L(skip_pref30_96)
+#endif
+ C_LD t1,UNIT(1)(a1)
+ PREFETCH_FOR_STORE (3, a0)
+L(skip_pref30_96):
+ C_LD REG2,UNIT(2)(a1)
+ C_LD REG3,UNIT(3)(a1)
+ C_LD REG4,UNIT(4)(a1)
+ C_LD REG5,UNIT(5)(a1)
+ C_LD REG6,UNIT(6)(a1)
+ C_LD REG7,UNIT(7)(a1)
+ PREFETCH_FOR_LOAD (4, a1)
+
+ C_ST t0,UNIT(0)(a0)
+ C_ST t1,UNIT(1)(a0)
+ C_ST REG2,UNIT(2)(a0)
+ C_ST REG3,UNIT(3)(a0)
+ C_ST REG4,UNIT(4)(a0)
+ C_ST REG5,UNIT(5)(a0)
+ C_ST REG6,UNIT(6)(a0)
+ C_ST REG7,UNIT(7)(a0)
+
+ C_LD t0,UNIT(8)(a1)
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ bgtz v1,L(skip_pref30_128)
+#endif
+ C_LD t1,UNIT(9)(a1)
+ PREFETCH_FOR_STORE (4, a0)
+L(skip_pref30_128):
+ C_LD REG2,UNIT(10)(a1)
+ C_LD REG3,UNIT(11)(a1)
+ C_LD REG4,UNIT(12)(a1)
+ C_LD REG5,UNIT(13)(a1)
+ C_LD REG6,UNIT(14)(a1)
+ C_LD REG7,UNIT(15)(a1)
+ PREFETCH_FOR_LOAD (5, a1)
+ C_ST t0,UNIT(8)(a0)
+ C_ST t1,UNIT(9)(a0)
+ C_ST REG2,UNIT(10)(a0)
+ C_ST REG3,UNIT(11)(a0)
+ C_ST REG4,UNIT(12)(a0)
+ C_ST REG5,UNIT(13)(a0)
+ C_ST REG6,UNIT(14)(a0)
+ C_ST REG7,UNIT(15)(a0)
+ PTR_ADDIU a0,a0,UNIT(16) /* adding 64/128 to dest */
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ sltu v1,t9,a0
+#endif
+ bne a0,a3,L(loop16w)
+ PTR_ADDIU a1,a1,UNIT(16) /* adding 64/128 to src */
+ move a2,t8
-L(shift):
- subu a3, zero, a0 # Src and Dest unaligned
- andi a3, 0x3 # (unoptimized case...)
- beq a3, zero, L(shft1)
- subu a2, a3 # a2 = bytes left
- LWHI t0, 0(a1) # Take care of first odd part
- LWLO t0, 3(a1)
- addu a1, a3
- SWHI t0, 0(a0)
- addu a0, a3
-L(shft1):
- andi t0, a2, 0x3
- subu a3, a2, t0
- addu a3, a1
-L(shfth):
- LWHI t1, 0(a1) # Limp through, word by word
- LWLO t1, 3(a1)
- addiu a0, 4
- addiu a1, 4
- bne a1, a3, L(shfth)
- sw t1, -4(a0)
- b L(last8) # Handle anything which may be left
- move a2, t0
+/* Here we have src and dest word-aligned but less than 64-bytes or
+ * 128 bytes to go. Check for a 32(64) byte chunk and copy if if there
+ * is one. Otherwise jump down to L(chk1w) to handle the tail end of
+ * the copy.
+ */
+L(chkw):
+ PREFETCH_FOR_LOAD (0, a1)
+ andi t8,a2,NSIZEMASK /* Is there a 32-byte/64-byte chunk. */
+ /* The t8 is the reminder count past 32-bytes */
+ beq a2,t8,L(chk1w) /* When a2=t8, no 32-byte chunk */
+ nop
+ C_LD t0,UNIT(0)(a1)
+ C_LD t1,UNIT(1)(a1)
+ C_LD REG2,UNIT(2)(a1)
+ C_LD REG3,UNIT(3)(a1)
+ C_LD REG4,UNIT(4)(a1)
+ C_LD REG5,UNIT(5)(a1)
+ C_LD REG6,UNIT(6)(a1)
+ C_LD REG7,UNIT(7)(a1)
+ PTR_ADDIU a1,a1,UNIT(8)
+ C_ST t0,UNIT(0)(a0)
+ C_ST t1,UNIT(1)(a0)
+ C_ST REG2,UNIT(2)(a0)
+ C_ST REG3,UNIT(3)(a0)
+ C_ST REG4,UNIT(4)(a0)
+ C_ST REG5,UNIT(5)(a0)
+ C_ST REG6,UNIT(6)(a0)
+ C_ST REG7,UNIT(7)(a0)
+ PTR_ADDIU a0,a0,UNIT(8)
+
+/*
+ * Here we have less then 32(64) bytes to copy. Set up for a loop to
+ * copy one word (or double word) at a time. Set a2 to count how many
+ * bytes we have to copy after all the word (or double word) chunks are
+ * copied and a3 to the dst pointer after all the (d)word chunks have
+ * been copied. We will loop, incrementing a0 and a1 until a0 equals a3.
+ */
+L(chk1w):
+ andi a2,t8,(NSIZE-1) /* a2 is the reminder past one (d)word chunks */
+ beq a2,t8,L(lastb)
+ PTR_SUBU a3,t8,a2 /* a3 is count of bytes in one (d)word chunks */
+ PTR_ADDU a3,a0,a3 /* a3 is the dst address after loop */
+
+/* copying in words (4-byte or 8-byte chunks) */
+L(wordCopy_loop):
+ C_LD REG3,UNIT(0)(a1)
+ PTR_ADDIU a1,a1,UNIT(1)
+ PTR_ADDIU a0,a0,UNIT(1)
+ bne a0,a3,L(wordCopy_loop)
+ C_ST REG3,UNIT(-1)(a0)
+
+/* Copy the last 8 (or 16) bytes */
+L(lastb):
+ blez a2,L(leave)
+ PTR_ADDU a3,a0,a2 /* a3 is the last dst address */
+L(lastbloop):
+ lb v1,0(a1)
+ PTR_ADDIU a1,a1,1
+ PTR_ADDIU a0,a0,1
+ bne a0,a3,L(lastbloop)
+ sb v1,-1(a0)
+L(leave):
+ j ra
+ nop
+/*
+ * UNALIGNED case, got here with a3 = "negu a0"
+ * This code is nearly identical to the aligned code above
+ * but only the destination (not the source) gets aligned
+ * so we need to do partial loads of the source followed
+ * by normal stores to the destination (once we have aligned
+ * the destination).
+ */
+
+L(unaligned):
+ andi a3,a3,(NSIZE-1) /* copy a3 bytes to align a0/a1 */
+ beqz a3,L(ua_chk16w) /* if a3=0, it is already aligned */
+ PTR_SUBU a2,a2,a3 /* a2 is the remining bytes count */
+
+ C_LDHI v1,UNIT(0)(a1)
+ C_LDLO v1,UNITM1(1)(a1)
+ PTR_ADDU a1,a1,a3
+ C_STHI v1,UNIT(0)(a0)
+ PTR_ADDU a0,a0,a3
+
+/*
+ * Now the destination (but not the source) is aligned
+ * Set a2 to count how many bytes we have to copy after all the 64/128 byte
+ * chunks are copied and a3 to the dst pointer after all the 64/128 byte
+ * chunks have been copied. We will loop, incrementing a0 and a1 until a0
+ * equals a3.
+ */
+
+L(ua_chk16w):
+ andi t8,a2,NSIZEDMASK /* any whole 64-byte/128-byte chunks? */
+ beq a2,t8,L(ua_chkw) /* if a2==t8, no 64-byte/128-byte chunks */
+ PTR_SUBU a3,a2,t8 /* subtract from a2 the reminder */
+ PTR_ADDU a3,a0,a3 /* Now a3 is the final dst after loop */
+
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ PTR_ADDU t0,a0,a2 /* t0 is the "past the end" address */
+ PTR_SUBU t9,t0,PREFETCH_LIMIT /* t9 is the "last safe pref" address */
+#endif
+ PREFETCH_FOR_LOAD (0, a1)
+ PREFETCH_FOR_LOAD (1, a1)
+ PREFETCH_FOR_LOAD (2, a1)
+ PREFETCH_FOR_STORE (1, a0)
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ sltu v1,t9,a0
+ bgtz v1,L(ua_loop16w) /* skip prefetch for too short arrays */
+ nop
+#endif
+ PREFETCH_FOR_STORE (2, a0)
+L(ua_loop16w):
+ PREFETCH_FOR_LOAD (3, a1)
+ C_LDHI t0,UNIT(0)(a1)
+ C_LDLO t0,UNITM1(1)(a1)
+ C_LDHI t1,UNIT(1)(a1)
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ bgtz v1,L(ua_skip_pref30_96)
+#endif
+ C_LDLO t1,UNITM1(2)(a1)
+ PREFETCH_FOR_STORE (3, a0)
+L(ua_skip_pref30_96):
+ C_LDHI REG2,UNIT(2)(a1)
+ C_LDLO REG2,UNITM1(3)(a1)
+ C_LDHI REG3,UNIT(3)(a1)
+ C_LDLO REG3,UNITM1(4)(a1)
+ C_LDHI REG4,UNIT(4)(a1)
+ C_LDLO REG4,UNITM1(5)(a1)
+ C_LDHI REG5,UNIT(5)(a1)
+ C_LDLO REG5,UNITM1(6)(a1)
+ C_LDHI REG6,UNIT(6)(a1)
+ C_LDLO REG6,UNITM1(7)(a1)
+ C_LDHI REG7,UNIT(7)(a1)
+ C_LDLO REG7,UNITM1(8)(a1)
+ PREFETCH_FOR_LOAD (4, a1)
+ C_ST t0,UNIT(0)(a0)
+ C_ST t1,UNIT(1)(a0)
+ C_ST REG2,UNIT(2)(a0)
+ C_ST REG3,UNIT(3)(a0)
+ C_ST REG4,UNIT(4)(a0)
+ C_ST REG5,UNIT(5)(a0)
+ C_ST REG6,UNIT(6)(a0)
+ C_ST REG7,UNIT(7)(a0)
+ C_LDHI t0,UNIT(8)(a1)
+ C_LDLO t0,UNITM1(9)(a1)
+ C_LDHI t1,UNIT(9)(a1)
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ bgtz v1,L(ua_skip_pref30_128)
+#endif
+ C_LDLO t1,UNITM1(10)(a1)
+ PREFETCH_FOR_STORE (4, a0)
+L(ua_skip_pref30_128):
+ C_LDHI REG2,UNIT(10)(a1)
+ C_LDLO REG2,UNITM1(11)(a1)
+ C_LDHI REG3,UNIT(11)(a1)
+ C_LDLO REG3,UNITM1(12)(a1)
+ C_LDHI REG4,UNIT(12)(a1)
+ C_LDLO REG4,UNITM1(13)(a1)
+ C_LDHI REG5,UNIT(13)(a1)
+ C_LDLO REG5,UNITM1(14)(a1)
+ C_LDHI REG6,UNIT(14)(a1)
+ C_LDLO REG6,UNITM1(15)(a1)
+ C_LDHI REG7,UNIT(15)(a1)
+ C_LDLO REG7,UNITM1(16)(a1)
+ PREFETCH_FOR_LOAD (5, a1)
+ C_ST t0,UNIT(8)(a0)
+ C_ST t1,UNIT(9)(a0)
+ C_ST REG2,UNIT(10)(a0)
+ C_ST REG3,UNIT(11)(a0)
+ C_ST REG4,UNIT(12)(a0)
+ C_ST REG5,UNIT(13)(a0)
+ C_ST REG6,UNIT(14)(a0)
+ C_ST REG7,UNIT(15)(a0)
+ PTR_ADDIU a0,a0,UNIT(16) /* adding 64/128 to dest */
+#if defined(USE_PREFETCH) && (PREFETCH_STORE_HINT == PREFETCH_HINT_PREPAREFORSTORE)
+ sltu v1,t9,a0
+#endif
+ bne a0,a3,L(ua_loop16w)
+ PTR_ADDIU a1,a1,UNIT(16) /* adding 64/128 to src */
+ move a2,t8
+
+/* Here we have src and dest word-aligned but less than 64-bytes or
+ * 128 bytes to go. Check for a 32(64) byte chunk and copy if if there
+ * is one. Otherwise jump down to L(ua_chk1w) to handle the tail end of
+ * the copy. */
+
+L(ua_chkw):
+ PREFETCH_FOR_LOAD (0, a1)
+ andi t8,a2,NSIZEMASK /* Is there a 32-byte/64-byte chunk. */
+ /* t8 is the reminder count past 32-bytes */
+ beq a2,t8,L(ua_chk1w) /* When a2=t8, no 32-byte chunk */
+ nop
+ C_LDHI t0,UNIT(0)(a1)
+ C_LDLO t0,UNITM1(1)(a1)
+ C_LDHI t1,UNIT(1)(a1)
+ C_LDLO t1,UNITM1(2)(a1)
+ C_LDHI REG2,UNIT(2)(a1)
+ C_LDLO REG2,UNITM1(3)(a1)
+ C_LDHI REG3,UNIT(3)(a1)
+ C_LDLO REG3,UNITM1(4)(a1)
+ C_LDHI REG4,UNIT(4)(a1)
+ C_LDLO REG4,UNITM1(5)(a1)
+ C_LDHI REG5,UNIT(5)(a1)
+ C_LDLO REG5,UNITM1(6)(a1)
+ C_LDHI REG6,UNIT(6)(a1)
+ C_LDLO REG6,UNITM1(7)(a1)
+ C_LDHI REG7,UNIT(7)(a1)
+ C_LDLO REG7,UNITM1(8)(a1)
+ PTR_ADDIU a1,a1,UNIT(8)
+ C_ST t0,UNIT(0)(a0)
+ C_ST t1,UNIT(1)(a0)
+ C_ST REG2,UNIT(2)(a0)
+ C_ST REG3,UNIT(3)(a0)
+ C_ST REG4,UNIT(4)(a0)
+ C_ST REG5,UNIT(5)(a0)
+ C_ST REG6,UNIT(6)(a0)
+ C_ST REG7,UNIT(7)(a0)
+ PTR_ADDIU a0,a0,UNIT(8)
+/*
+ * Here we have less then 32(64) bytes to copy. Set up for a loop to
+ * copy one word (or double word) at a time.
+ */
+L(ua_chk1w):
+ andi a2,t8,(NSIZE-1) /* a2 is the reminder past one (d)word chunks */
+ beq a2,t8,L(ua_smallCopy)
+ PTR_SUBU a3,t8,a2 /* a3 is count of bytes in one (d)word chunks */
+ PTR_ADDU a3,a0,a3 /* a3 is the dst address after loop */
+
+/* copying in words (4-byte or 8-byte chunks) */
+L(ua_wordCopy_loop):
+ C_LDHI v1,UNIT(0)(a1)
+ C_LDLO v1,UNITM1(1)(a1)
+ PTR_ADDIU a1,a1,UNIT(1)
+ PTR_ADDIU a0,a0,UNIT(1)
+ bne a0,a3,L(ua_wordCopy_loop)
+ C_ST v1,UNIT(-1)(a0)
+
+/* Copy the last 8 (or 16) bytes */
+L(ua_smallCopy):
+ beqz a2,L(leave)
+ PTR_ADDU a3,a0,a2 /* a3 is the last dst address */
+L(ua_smallCopy_loop):
+ lb v1,0(a1)
+ PTR_ADDIU a1,a1,1
+ PTR_ADDIU a0,a0,1
+ bne a0,a3,L(ua_smallCopy_loop)
+ sb v1,-1(a0)
+
+ j ra
+ nop
+
+ .set at
.set reorder
-END (memcpy)
-libc_hidden_builtin_def (memcpy)
+END(MEMCPY_NAME)
+#ifdef _LIBC
+libc_hidden_builtin_def (MEMCPY_NAME)
+#endif
diff --git a/ports/sysdeps/mips/mips32/Implies b/ports/sysdeps/mips/mips32/Implies
index fab98d7312..6473f2517c 100644
--- a/ports/sysdeps/mips/mips32/Implies
+++ b/ports/sysdeps/mips/mips32/Implies
@@ -1,2 +1,3 @@
+mips/ieee754
mips
wordsize-32
diff --git a/ports/sysdeps/mips/mips64/Implies b/ports/sysdeps/mips/mips64/Implies
index 8c18cb3034..826ff1541f 100644
--- a/ports/sysdeps/mips/mips64/Implies
+++ b/ports/sysdeps/mips/mips64/Implies
@@ -1,3 +1,4 @@
# MIPS uses IEEE 754 floating point.
+mips/ieee754
ieee754/flt-32
ieee754/dbl-64
diff --git a/ports/sysdeps/mips/mips64/memcpy.S b/ports/sysdeps/mips/mips64/memcpy.S
deleted file mode 100644
index 49ef34d0c6..0000000000
--- a/ports/sysdeps/mips/mips64/memcpy.S
+++ /dev/null
@@ -1,138 +0,0 @@
-/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Hartvig Ekner <hartvige@mips.com>, 2002.
- Ported to mips3 n32/n64 by Alexandre Oliva <aoliva@redhat.com>
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <sys/asm.h>
-
-
-/* void *memcpy(void *s1, const void *s2, size_t n);
-
- This could probably be optimized further. */
-
-#if __MIPSEB
-# define LDHI ldl /* high part is left in big-endian */
-# define SDHI sdl /* high part is left in big-endian */
-# define LDLO ldr /* low part is right in big-endian */
-# define SDLO sdr /* low part is right in big-endian */
-#else
-# define LDHI ldr /* high part is right in little-endian */
-# define SDHI sdr /* high part is right in little-endian */
-# define LDLO ldl /* low part is left in little-endian */
-# define SDLO sdl /* low part is left in little-endian */
-#endif
-
-ENTRY (memcpy)
- .set noreorder
-
- slti t0, a2, 16 # Less than 16?
- bne t0, zero, L(last16)
- move v0, a0 # Setup exit value before too late
-
- xor t0, a1, a0 # Find a0/a1 displacement
- andi t0, 0x7
- bne t0, zero, L(shift) # Go handle the unaligned case
- PTR_SUBU t1, zero, a1
- andi t1, 0x7 # a0/a1 are aligned, but are we
- beq t1, zero, L(chk8w) # starting in the middle of a word?
- PTR_SUBU a2, t1
- LDHI t0, 0(a1) # Yes we are... take care of that
- PTR_ADDU a1, t1
- SDHI t0, 0(a0)
- PTR_ADDU a0, t1
-
-L(chk8w):
- andi t0, a2, 0x3f # 64 or more bytes left?
- beq t0, a2, L(chk1w)
- PTR_SUBU a3, a2, t0 # Yes
- PTR_ADDU a3, a1 # a3 = end address of loop
- move a2, t0 # a2 = what will be left after loop
-L(lop8w):
- ld t0, 0(a1) # Loop taking 8 words at a time
- ld t1, 8(a1)
- ld t2, 16(a1)
- ld t3, 24(a1)
- ld ta0, 32(a1)
- ld ta1, 40(a1)
- ld ta2, 48(a1)
- ld ta3, 56(a1)
- PTR_ADDIU a0, 64
- PTR_ADDIU a1, 64
- sd t0, -64(a0)
- sd t1, -56(a0)
- sd t2, -48(a0)
- sd t3, -40(a0)
- sd ta0, -32(a0)
- sd ta1, -24(a0)
- sd ta2, -16(a0)
- bne a1, a3, L(lop8w)
- sd ta3, -8(a0)
-
-L(chk1w):
- andi t0, a2, 0x7 # 8 or more bytes left?
- beq t0, a2, L(last16)
- PTR_SUBU a3, a2, t0 # Yes, handle them one dword at a time
- PTR_ADDU a3, a1 # a3 again end address
- move a2, t0
-L(lop1w):
- ld t0, 0(a1)
- PTR_ADDIU a0, 8
- PTR_ADDIU a1, 8
- bne a1, a3, L(lop1w)
- sd t0, -8(a0)
-
-L(last16):
- blez a2, L(lst16e) # Handle last 16 bytes, one at a time
- PTR_ADDU a3, a2, a1
-L(lst16l):
- lb t0, 0(a1)
- PTR_ADDIU a0, 1
- PTR_ADDIU a1, 1
- bne a1, a3, L(lst16l)
- sb t0, -1(a0)
-L(lst16e):
- jr ra # Bye, bye
- nop
-
-L(shift):
- PTR_SUBU a3, zero, a0 # Src and Dest unaligned
- andi a3, 0x7 # (unoptimized case...)
- beq a3, zero, L(shft1)
- PTR_SUBU a2, a3 # a2 = bytes left
- LDHI t0, 0(a1) # Take care of first odd part
- LDLO t0, 7(a1)
- PTR_ADDU a1, a3
- SDHI t0, 0(a0)
- PTR_ADDU a0, a3
-L(shft1):
- andi t0, a2, 0x7
- PTR_SUBU a3, a2, t0
- PTR_ADDU a3, a1
-L(shfth):
- LDHI t1, 0(a1) # Limp through, dword by dword
- LDLO t1, 7(a1)
- PTR_ADDIU a0, 8
- PTR_ADDIU a1, 8
- bne a1, a3, L(shfth)
- sd t1, -8(a0)
- b L(last16) # Handle anything which may be left
- move a2, t0
-
- .set reorder
-END (memcpy)
-libc_hidden_builtin_def (memcpy)
diff --git a/ports/sysdeps/mips/mips64/n32/Implies b/ports/sysdeps/mips/mips64/n32/Implies
index bed8f14c30..9ab2f3261c 100644
--- a/ports/sysdeps/mips/mips64/n32/Implies
+++ b/ports/sysdeps/mips/mips64/n32/Implies
@@ -1,3 +1,4 @@
+mips/ieee754
ieee754/ldbl-128
mips/mips64/soft-fp
mips/mips64
diff --git a/ports/sysdeps/mips/mips64/n64/Implies b/ports/sysdeps/mips/mips64/n64/Implies
index 214b85c776..de23ed1c36 100644
--- a/ports/sysdeps/mips/mips64/n64/Implies
+++ b/ports/sysdeps/mips/mips64/n64/Implies
@@ -1,3 +1,4 @@
+mips/ieee754
ieee754/ldbl-128
mips/mips64/soft-fp
mips/mips64
diff --git a/ports/sysdeps/mips/nptl/pthread_spin_lock.S b/ports/sysdeps/mips/nptl/pthread_spin_lock.c
index a8504f1636..f39b0182bc 100644
--- a/ports/sysdeps/mips/nptl/pthread_spin_lock.S
+++ b/ports/sysdeps/mips/nptl/pthread_spin_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,22 +15,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <sys/asm.h>
-#include <sysdep.h>
-#include <sgidefs.h>
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-ENTRY (pthread_spin_lock)
- .set push
-#if _MIPS_SIM == _ABIO32
- .set mips2
-#endif
-1: ll a2, 0(a0)
- li a1, 1
- bnez a2, 1b
- sc a1, 0(a0)
- beqz a1, 1b
- MIPS_SYNC
- .set pop
- li v0, 0
- ret
-PSEUDO_END (pthread_spin_lock)
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
diff --git a/ports/sysdeps/mips/sys/asm.h b/ports/sysdeps/mips/sys/asm.h
index 347d738f70..0f5edf9243 100644
--- a/ports/sysdeps/mips/sys/asm.h
+++ b/ports/sysdeps/mips/sys/asm.h
@@ -233,8 +233,8 @@ symbol = value
# define PREFX(hint,addr) \
prefx hint,addr
#else
-# define PREF
-# define PREFX
+# define PREF(hint,addr)
+# define PREFX(hint,addr)
#endif
/*
diff --git a/ports/sysdeps/mips/tininess.h b/ports/sysdeps/mips/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/ports/sysdeps/mips/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/ports/sysdeps/powerpc/nofpu/get-rounding-mode.h b/ports/sysdeps/powerpc/nofpu/get-rounding-mode.h
new file mode 100644
index 0000000000..14be20f7b6
--- /dev/null
+++ b/ports/sysdeps/powerpc/nofpu/get-rounding-mode.h
@@ -0,0 +1,35 @@
+/* Determine floating-point rounding mode within libc. PowerPC
+ soft-float version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _POWERPC_NOFPU_GET_ROUNDING_MODE_H
+#define _POWERPC_NOFPU_GET_ROUNDING_MODE_H 1
+
+#include <fenv.h>
+
+#include "soft-supp.h"
+
+/* Return the floating-point rounding mode. */
+
+static inline int
+get_rounding_mode (void)
+{
+ return __sim_round_mode;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/ports/sysdeps/powerpc/powerpc32/405/memset.S b/ports/sysdeps/powerpc/powerpc32/405/memset.S
index e132ce3652..c2ee6c593c 100644
--- a/ports/sysdeps/powerpc/powerpc32/405/memset.S
+++ b/ports/sysdeps/powerpc/powerpc32/405/memset.S
@@ -1,5 +1,5 @@
-/* Optimized memset implementation for PowerPC476.
- Copyright (C) 2010 Free Software Foundation, Inc.
+/* Optimized memset for PowerPC405,440,464 (32-byte cacheline).
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -104,7 +104,7 @@ L(use_dcbz):
add r3,r3,r7
L(skip_string_loop):
- clrlwi r8,r6,25
+ clrlwi r8,r6,27
srwi. r8,r8,4
beq L(dcbz_pre_loop)
mtctr r8
@@ -119,14 +119,14 @@ L(word_loop):
bdnz L(word_loop)
L(dcbz_pre_loop):
- srwi r6,r5,7
+ srwi r6,r5,5
mtctr r6
addi r7,0,0
L(dcbz_loop):
dcbz r3,r7
- addi r3,r3,0x80
- subi r5,r5,0x80
+ addi r3,r3,0x20
+ subi r5,r5,0x20
bdnz L(dcbz_loop)
srwi. r6,r5,4
beq L(postword2_count_loop)
diff --git a/ports/sysdeps/powerpc/powerpc32/476/memset.S b/ports/sysdeps/powerpc/powerpc32/476/memset.S
new file mode 100644
index 0000000000..8b5750442b
--- /dev/null
+++ b/ports/sysdeps/powerpc/powerpc32/476/memset.S
@@ -0,0 +1,154 @@
+/* Optimized memset for PowerPC476 (128-byte cacheline).
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+
+/* memset
+
+ r3:destination address and return address
+ r4:source integer to copy
+ r5:byte count
+ r11:sources integer to copy in all 32 bits of reg
+ r12:temp return address
+
+ Save return address in r12
+ If destinationn is unaligned and count is greater tha 255 bytes
+ set 0-3 bytes to make destination aligned
+ If count is greater tha 255 bytes and setting zero to memory
+ use dbcz to set memeory when we can
+ otherwsie do the follwoing
+ If 16 or more words to set we use 16 word copy loop.
+ Finaly we set 0-15 extra bytes with string store. */
+
+EALIGN (BP_SYM (memset), 5, 0)
+ rlwinm r11,r4,0,24,31
+ rlwimi r11,r4,8,16,23
+ rlwimi r11,r11,16,0,15
+ addi r12,r3,0
+ cmpwi r5,0x00FF
+ ble L(preword8_count_loop)
+ cmpwi r4,0x00
+ beq L(use_dcbz)
+ neg r6,r3
+ clrlwi. r6,r6,30
+ beq L(preword8_count_loop)
+ addi r8,0,1
+ mtctr r6
+ subi r3,r3,1
+
+L(unaligned_bytecopy_loop):
+ stbu r11,0x1(r3)
+ subf. r5,r8,r5
+ beq L(end_memset)
+ bdnz L(unaligned_bytecopy_loop)
+ addi r3,r3,1
+
+L(preword8_count_loop):
+ srwi. r6,r5,4
+ beq L(preword2_count_loop)
+ mtctr r6
+ addi r3,r3,-4
+ mr r8,r11
+ mr r9,r11
+ mr r10,r11
+
+L(word8_count_loop_no_dcbt):
+ stwu r8,4(r3)
+ stwu r9,4(r3)
+ subi r5,r5,0x10
+ stwu r10,4(r3)
+ stwu r11,4(r3)
+ bdnz L(word8_count_loop_no_dcbt)
+ addi r3,r3,4
+
+L(preword2_count_loop):
+ clrlwi. r7,r5,28
+ beq L(end_memset)
+ mr r8,r11
+ mr r9,r11
+ mr r10,r11
+ mtxer r7
+ stswx r8,0,r3
+
+L(end_memset):
+ addi r3,r12,0
+ blr
+
+L(use_dcbz):
+ neg r6,r3
+ clrlwi. r7,r6,28
+ beq L(skip_string_loop)
+ mr r8,r11
+ mr r9,r11
+ mr r10,r11
+ subf r5,r7,r5
+ mtxer r7
+ stswx r8,0,r3
+ add r3,r3,r7
+
+L(skip_string_loop):
+ clrlwi r8,r6,25
+ srwi. r8,r8,4
+ beq L(dcbz_pre_loop)
+ mtctr r8
+
+L(word_loop):
+ stw r11,0(r3)
+ subi r5,r5,0x10
+ stw r11,4(r3)
+ stw r11,8(r3)
+ stw r11,12(r3)
+ addi r3,r3,0x10
+ bdnz L(word_loop)
+
+L(dcbz_pre_loop):
+ srwi r6,r5,7
+ mtctr r6
+ addi r7,0,0
+
+L(dcbz_loop):
+ dcbz r3,r7
+ addi r3,r3,0x80
+ subi r5,r5,0x80
+ bdnz L(dcbz_loop)
+ srwi. r6,r5,4
+ beq L(postword2_count_loop)
+ mtctr r6
+
+L(postword8_count_loop):
+ stw r11,0(r3)
+ subi r5,r5,0x10
+ stw r11,4(r3)
+ stw r11,8(r3)
+ stw r11,12(r3)
+ addi r3,r3,0x10
+ bdnz L(postword8_count_loop)
+
+L(postword2_count_loop):
+ clrlwi. r7,r5,28
+ beq L(end_memset)
+ mr r8,r11
+ mr r9,r11
+ mr r10,r11
+ mtxer r7
+ stswx r8,0,r3
+ b L(end_memset)
+END (BP_SYM (memset))
+libc_hidden_builtin_def (memset)
diff --git a/ports/sysdeps/tile/__tls_get_addr.S b/ports/sysdeps/tile/__tls_get_addr.S
index 74e4fa2c26..6de79ba53d 100644
--- a/ports/sysdeps/tile/__tls_get_addr.S
+++ b/ports/sysdeps/tile/__tls_get_addr.S
@@ -76,6 +76,8 @@ ENTRY (__tls_get_addr)
ADD_PTR r28, r28, r27 /* pointer into module array */
}
LD_PTR r26, r28 /* r26 = module TLS pointer */
+ CMPEQI r25, r26, -1 /* check r26 == TLS_DTV_UNALLOCATED */
+ BNEZ r25, .Lslowpath
{
ADD_PTR r0, r26, r29
jrp lr
diff --git a/ports/sysdeps/tile/dl-machine.h b/ports/sysdeps/tile/dl-machine.h
index c4413f9e8a..09a2993582 100644
--- a/ports/sysdeps/tile/dl-machine.h
+++ b/ports/sysdeps/tile/dl-machine.h
@@ -253,8 +253,8 @@ elf_machine_plt_value (struct link_map *map, const ElfW(Rela) *reloc,
}
/* Support notifying the simulator about new objects. */
-void internal_function _dl_arch_map_object (struct link_map *l);
-#define _dl_arch_map_object _dl_arch_map_object
+void internal_function _dl_after_load (struct link_map *l);
+#define DL_AFTER_LOAD _dl_after_load
/* Names of the architecture-specific auditing callback functions. */
#define ARCH_LA_PLTENTER tile_gnu_pltenter
diff --git a/ports/sysdeps/tile/dl-runtime.c b/ports/sysdeps/tile/dl-runtime.c
index 0aa211db17..6864c3ac96 100644
--- a/ports/sysdeps/tile/dl-runtime.c
+++ b/ports/sysdeps/tile/dl-runtime.c
@@ -30,7 +30,7 @@
/* Support notifying the simulator about new objects. */
void internal_function
-_dl_arch_map_object (struct link_map *l)
+_dl_after_load (struct link_map *l)
{
int shift;
@@ -75,5 +75,3 @@ _dl_unmap (struct link_map *l)
__munmap ((void *) l->l_map_start, l->l_map_end - l->l_map_start);
}
-
-#define DL_UNMAP(map) _dl_unmap (map)
diff --git a/ports/sysdeps/tile/libm-test-ulps b/ports/sysdeps/tile/libm-test-ulps
index 9f5d085593..0187d5a65d 100644
--- a/ports/sysdeps/tile/libm-test-ulps
+++ b/ports/sysdeps/tile/libm-test-ulps
@@ -460,6 +460,15 @@ float: 2
ifloat: 2
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i":
float: 1
ifloat: 1
@@ -481,6 +490,12 @@ ifloat: 1
Test "Real part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
float: 1
ifloat: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + +0 i":
float: 1
ifloat: 1
@@ -499,6 +514,12 @@ ifloat: 1
Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
float: 1
ifloat: 1
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -507,6 +528,18 @@ ifloat: 1
Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
double: 1
idouble: 1
@@ -535,6 +568,9 @@ idouble: 1
Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
double: 1
idouble: 1
+Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
idouble: 1
@@ -565,12 +601,48 @@ ifloat: 1
Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+float: 2
+idouble: 1
+ifloat: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
float: 1
ifloat: 1
Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i) == 38.53183941910362389414093724045094697423 + 1.276276851248440096917018665609900318458e-39 i":
float: 1
ifloat: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+idouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+idouble: 1
Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
double: 1
idouble: 1
@@ -596,6 +668,59 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+idouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+idouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+idouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+idouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+idouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
float: 1
ifloat: 1
@@ -610,6 +735,12 @@ float: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -1121,6 +1252,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -1392,10 +1529,10 @@ float: 1
ifloat: 1
Function: Real part of "clog10":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
Function: Imaginary part of "clog10":
double: 1
diff --git a/ports/sysdeps/tile/sysdep.h b/ports/sysdeps/tile/sysdep.h
index 34d7046595..4db70836e4 100644
--- a/ports/sysdeps/tile/sysdep.h
+++ b/ports/sysdeps/tile/sysdep.h
@@ -24,14 +24,13 @@
#include <feedback.h>
-/* Make use of .type and .size directives. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
+/* Make use of .size directive. */
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
/* Define an entry point visible from C. */
#define ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .type C_SYMBOL_NAME(name),@function; \
.align 8; \
C_LABEL(name) \
cfi_startproc; \
@@ -67,7 +66,7 @@
#define REGSIZE 4
#endif
-/* Support a limited form of shared assembly between tile and tilegx.
+/* Support a limited form of shared assembly between tilepro and tilegx.
The presumption is that LD/ST are used for manipulating registers.
Since opcode parsing is case-insensitive, we don't need to provide
definitions for these on tilegx. */
@@ -87,7 +86,7 @@
#endif
/* Provide "pointer-oriented" instruction variants. These differ not
- just for tile vs tilegx, but also for tilegx -m64 vs -m32. */
+ just for tilepro vs tilegx, but also for tilegx -m64 vs -m32. */
#if defined __tilegx__ && __WORDSIZE == 32
#define ADD_PTR addx
#define ADDI_PTR addxi
diff --git a/ports/sysdeps/unix/alpha/sysdep.h b/ports/sysdeps/unix/alpha/sysdep.h
index 4ee0746acc..75c06c9cfd 100644
--- a/ports/sysdeps/unix/alpha/sysdep.h
+++ b/ports/sysdeps/unix/alpha/sysdep.h
@@ -52,13 +52,20 @@
#define END(sym) .end sym
#ifdef PROF
+# define PSEUDO_PROF \
+ .set noat; \
+ lda AT, _mcount; \
+ jsr AT, (AT), _mcount; \
+ .set at
+#else
+# define PSEUDO_PROF
+#endif
+
+#ifdef PROF
# define PSEUDO_PROLOGUE \
.frame sp, 0, ra; \
ldgp gp,0(pv); \
- .set noat; \
- lda AT,_mcount; \
- jsr AT,(AT),_mcount; \
- .set at; \
+ PSEUDO_PROF; \
.prologue 1
#elif defined PIC
# define PSEUDO_PROLOGUE \
@@ -80,16 +87,21 @@
#if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_LABEL $syscall_error
# define SYSCALL_ERROR_HANDLER \
+$syscall_error: \
stl v0, rtld_errno(gp) !gprel; \
lda v0, -1; \
ret
+# define SYSCALL_ERROR_FALLTHRU
#elif defined(PIC)
-# define SYSCALL_ERROR_LABEL __syscall_error !samegp
+# define SYSCALL_ERROR_LABEL __syscall_error !samegp
# define SYSCALL_ERROR_HANDLER
+# define SYSCALL_ERROR_FALLTHRU br SYSCALL_ERROR_LABEL
#else
-# define SYSCALL_ERROR_LABEL $syscall_error
-# define SYSCALL_ERROR_HANDLER \
- jmp $31, __syscall_error
+# define SYSCALL_ERROR_LABEL $syscall_error
+# define SYSCALL_ERROR_HANDLER \
+$syscall_error: \
+ jmp $31, __syscall_error
+# define SYSCALL_ERROR_FALLTHRU
#endif /* RTLD_PRIVATE_ERRNO */
/* Overridden by specific syscalls. */
@@ -108,14 +120,9 @@ __LABEL(name) \
bne a3, SYSCALL_ERROR_LABEL
#undef PSEUDO_END
-#if defined(PIC) && !RTLD_PRIVATE_ERRNO
-# define PSEUDO_END(sym) END(sym)
-#else
-# define PSEUDO_END(sym) \
-$syscall_error: \
+#define PSEUDO_END(sym) \
SYSCALL_ERROR_HANDLER; \
END(sym)
-#endif
#define PSEUDO_NOERRNO(name, syscall_name, args) \
.globl name; \
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/Makefile b/ports/sysdeps/unix/sysv/linux/alpha/Makefile
index f64f23fd7a..9676feea98 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/ports/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -20,6 +20,7 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
# Support old ipc control
sysdep_routines += oldmsgctl oldsemctl oldshmctl
+CFLAGS-fdatasync.c = -fexceptions
CFLAGS-ioperm.c = -Wa,-mev6
endif
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
index f146466e68..487ad15253 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/dirent.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,4 +51,7 @@ struct dirent64
#define _DIRENT_HAVE_D_OFF
#define _DIRENT_HAVE_D_TYPE
+/* Inform libc code that these two types are effectively identical. */
+#define _DIRENT_MATCHES_DIRENT64 1
+
#endif /* bits/dirent.h */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
index 2dbeb42a17..5ab9ac43a3 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/Alpha version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,7 +50,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __S64_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
@@ -61,6 +60,10 @@
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
#define __FSWORD_T_TYPE __S32_TYPE
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+#define __OFF_T_MATCHES_OFF64_T 1
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/clone.S b/ports/sysdeps/unix/sysv/linux/alpha/clone.S
index 1c6c8d6b7e..b92b6c2e79 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/clone.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/clone.S
@@ -35,89 +35,84 @@
we don't bother checking FLAGS. */
.text
-ENTRY(__clone)
+ .align 4
+ .globl __clone
+ .ent __clone
+ .usepv __clone, USEPV_PROF
+
+ cfi_startproc
+__clone:
#ifdef PROF
ldgp gp,0(pv)
- .set noat
lda AT, _mcount
jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#else
- .prologue 0
#endif
/* Sanity check arguments. */
- ldiq v0,EINVAL
- beq a0,$error /* no NULL function pointers */
- beq a1,$error /* no NULL stack pointers */
+ ldiq v0, EINVAL
+ beq a0, SYSCALL_ERROR_LABEL /* no NULL function pointers */
+ beq a1, SYSCALL_ERROR_LABEL /* no NULL stack pointers */
/* Save the fn ptr and arg on the new stack. */
- subq a1,32,a1
- stq a0,0(a1)
- stq a3,8(a1)
+ subq a1, 32, a1
+ stq a0, 0(a1)
+ stq a3, 8(a1)
#ifdef RESET_PID
- stq a2,16(a1)
+ stq a2, 16(a1)
#endif
/* The syscall is of the form clone(flags, usp, ptid, ctid, tls).
Shift the flags, ptid, ctid, tls arguments into place; the
child_stack argument is already correct. */
- mov a2,a0
- mov a4,a2
- ldq a3,0(sp)
- mov a5,a4
+ mov a2, a0
+ mov a4, a2
+ ldq a3, 0(sp)
+ mov a5, a4
/* Do the system call. */
- ldiq v0,__NR_clone
+ ldiq v0, __NR_clone
call_pal PAL_callsys
- bne a3,$error
- beq v0,thread_start
+ bne a3, SYSCALL_ERROR_LABEL
+ beq v0, thread_start
/* Successful return from the parent. */
ret
- /* Something bad happened -- no child created. */
-$error:
-#ifndef PROF
- br gp,1f
-1: ldgp gp,0(gp)
-#endif
- SYSCALL_ERROR_HANDLER
-
- END(__clone)
+PSEUDO_END(__clone)
+ cfi_endproc
/* Load up the arguments to the function. Put this block of code in
its own function so that we can terminate the stack trace with our
debug info. */
.ent thread_start
+ cfi_startproc
thread_start:
- .frame fp,0,fp,0
mov 0, fp
- .prologue 0
+ cfi_def_cfa_register(fp)
+ cfi_undefined(ra)
#ifdef RESET_PID
/* Check and see if we need to reset the PID. */
- ldq t0,16(sp)
- lda t1,CLONE_THREAD
- and t0,t1,t2
- beq t2,2f
+ ldq t0, 16(sp)
+ lda t1, CLONE_THREAD
+ and t0, t1, t2
+ beq t2, 2f
1:
#endif
/* Load up the arguments. */
- ldq pv,0(sp)
- ldq a0,8(sp)
- addq sp,32,sp
+ ldq pv, 0(sp)
+ ldq a0, 8(sp)
+ addq sp, 32, sp
/* Call the user's function. */
- jsr ra,(pv)
- ldgp gp,0(ra)
+ jsr ra, (pv)
+ ldgp gp, 0(ra)
/* Call _exit rather than doing it inline for breakpoint purposes. */
- mov v0,a0
+ mov v0, a0
#ifdef PIC
bsr ra, HIDDEN_JUMPTARGET(_exit) !samegp
#else
@@ -142,7 +137,7 @@ thread_start:
stl v0, TID_OFFSET(s0)
br 1b
#endif
-
+ cfi_endproc
.end thread_start
weak_alias (__clone, clone)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/configure b/ports/sysdeps/unix/sysv/linux/alpha/configure
index c7c4feeea1..b5df524c1c 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/configure
+++ b/ports/sysdeps/unix/sysv/linux/alpha/configure
@@ -1,11 +1,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/alpha
-# There are several bits that no longer compile cleanly without
-# realtime signal support (ver 2.2.0). Given that we also now
-# require TLS (ver 2.6.0), it seems pointless to fix them.
-# ??? Surely this should now be the generic default.
-arch_minimum_kernel=2.6.0
-
# We did historically export the unwinder from glibc.
libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/configure.in b/ports/sysdeps/unix/sysv/linux/alpha/configure.in
index 5a1af62073..a8b6996657 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/alpha/configure.in
@@ -1,11 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/alpha
-# There are several bits that no longer compile cleanly without
-# realtime signal support (ver 2.2.0). Given that we also now
-# require TLS (ver 2.6.0), it seems pointless to fix them.
-# ??? Surely this should now be the generic default.
-arch_minimum_kernel=2.6.0
-
# We did historically export the unwinder from glibc.
libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c b/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
new file mode 100644
index 0000000000..10f5035787
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
@@ -0,0 +1,65 @@
+/* fdatasync -- synchronize at least the data part of a file with
+ the underlying media. Linux version.
+
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+static int
+do_fdatasync (int fd)
+{
+#ifdef __ASSUME_FDATASYNC
+ return INLINE_SYSCALL (fdatasync, 1, fd);
+#elif defined __NR_fdatasync
+ static int __have_no_fdatasync;
+
+ if (!__builtin_expect (__have_no_fdatasync, 0))
+ {
+ int result = INLINE_SYSCALL (fdatasync, 1, fd);
+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
+ return result;
+
+ __have_no_fdatasync = 1;
+ }
+#endif
+ return INLINE_SYSCALL (fsync, 1, fd);
+}
+
+int
+__fdatasync (int fd)
+{
+ if (SINGLE_THREAD_P)
+ return do_fdatasync (fd);
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ int result = do_fdatasync (fd);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+weak_alias (__fdatasync, fdatasync)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
new file mode 100644
index 0000000000..6e770ad66c
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
@@ -0,0 +1,56 @@
+/* Copyright (C) 2004-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#include "kernel_sysinfo.h"
+
+
+ .text
+
+ENTRY(__feraiseexcept)
+ cfi_startproc
+ PSEUDO_PROLOGUE
+
+ lda sp, -16(sp)
+ cfi_adjust_cfa_offset(16)
+
+ ldi v0, __NR_osf_setsysinfo
+ stq a0, 0(sp)
+ mov sp, a1
+ ldi a0, SSI_IEEE_RAISE_EXCEPTION
+ call_pal PAL_callsys
+
+ lda sp, 16(sp)
+ cfi_adjust_cfa_offset(-16)
+
+ /* Here in libm we can't use SYSCALL_ERROR_LABEL. Nor is it clear
+ that we'd want to set errno anyway. All we're required to do is
+ return non-zero on error. Which is exactly A3. */
+ mov a3, v0
+ ret
+
+END(__feraiseexcept)
+ cfi_endproc
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
deleted file mode 100644
index a01b2cf11a..0000000000
--- a/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright (C) 2004,2006 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <fenv_libc.h>
-#include <sysdep.h>
-#include <float.h>
-#include <kernel-features.h>
-#include "kernel_sysinfo.h"
-
-
-int
-__feraiseexcept (int excepts)
-{
- INTERNAL_SYSCALL_DECL (err);
- unsigned long t = excepts;
- long r;
-
- r = INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_RAISE_EXCEPTION, &t);
-
-#ifndef __ASSUME_IEEE_RAISE_EXCEPTION
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- double d;
-
- /* If we got an error from SSI_IEEE_RAISE_EXCEPTION, assume it means that
- the system call isn't actually implemented. Do the best we can. */
-
- /* Invalid implemented with 0 / 0 -> NaN. */
- if (excepts & FE_INVALID)
- __asm__ __volatile__ ("divs/su $f31,$f31,%0; trapb" : "=f"(d) : );
-
- /* Division By Zero implemented with 1 / 0 -> NaN. */
- if (excepts & FE_DIVBYZERO)
- __asm__ __volatile__ ("divs/su %1,$f31,%0; trapb" : "=&f"(d) : "f"(1.0f));
-
- /* Overflow and underflow cannot be had all by themselves. We can
- generate them with arithmetic, but we always get INEXACT raised
- at the same time. Prepare to undo. */
- if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) && !(excepts & FE_INEXACT))
- INTERNAL_SYSCALL (osf_getsysinfo, err, 2, GSI_IEEE_FP_CONTROL, &t);
-
- /* Overflow implemented with FLT_MAX + FLT_MAX -> Inf. */
- if (excepts & FE_OVERFLOW)
- __asm__ __volatile__ ("adds/sui %1,%1,%0; trapb"
- : "=&f"(d) : "f"(FLT_MAX));
-
- /* Underflow implemented with FLT_MIN * FLT_MIN -> 0. */
- if (excepts & FE_UNDERFLOW)
- __asm__ __volatile__ ("muls/sui %1,%1,%0; trapb"
- : "=&f"(d) : "f"(FLT_MIN));
-
- /* Inexact implemented with (long)0.5 -> 0. */
- if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)) == FE_INEXACT)
- __asm__ __volatile__ ("cvttq/svi %1,%0; trapb" : "=&f"(d) : "f"(0.5f));
-
- /* If we raised inexact when not asked, and inexact was not previously
- raised, then clear that exception. */
- if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW))
- && !((excepts | t) & FE_INEXACT))
- {
- t |= excepts & SWCR_STATUS_MASK;
- INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_FP_CONTROL, &t);
- }
-#endif /* !__ASSUME_IEEE_RAISE_EXCEPTION */
-
- return 0;
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feraiseexcept, __old_feraiseexcept)
-compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
-#endif
-
-libm_hidden_ver (__feraiseexcept, feraiseexcept)
-versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c
index e53b2da13d..5648142f4c 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c
@@ -1,5 +1,5 @@
/* fxstat using old-style Unix stat system call.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,6 @@ __fxstat (int vers, int fd, struct stat *buf)
int result;
struct kernel_stat kbuf;
-#if __ASSUME_STAT64_SYSCALL > 0
if (vers == _STAT_VER_KERNEL64)
{
result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
@@ -46,22 +45,6 @@ __fxstat (int vers, int fd, struct stat *buf)
__set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
-#elif defined __NR_fstat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
- int errno_out;
- result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
- {
- __set_errno (errno_out);
- return -1;
- }
- __libc_missing_axp_stat64 = 1;
- }
-#endif
result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 417f9d3eab..bd20f86f2c 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,9 +32,6 @@
#ifdef __ASSUME_ATFCTS
# define __have_atfcts 1
#endif
-#ifdef __ASSUME_STAT64_SYSCALL
-# define __libc_missing_axp_stat64 0
-#endif
/* Get information about the file NAME in BUF. */
int
@@ -99,38 +96,14 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
file = buf;
}
-#ifdef __NR_stat64
- if (!__libc_missing_axp_stat64)
- {
- if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
- else
- result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
-
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-# if __ASSUME_STAT64_SYSCALL == 0
- if (errno_out == ENOSYS)
- __libc_missing_axp_stat64 = 1;
- else
-# endif
- goto fail;
- }
-#endif /* __NR_stat64 */
-
- struct kernel_stat kst;
-
if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
+ result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
else
- result = INTERNAL_SYSCALL (stat, err, 2, file, &kst);
-
+ result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return __xstat_conv (vers, &kst, st);
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+ return result;
- fail:
+ errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
__atfct_seterrno (errno_out, fd, buf);
return -1;
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index ec24297b0b..74ad499f6d 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -22,39 +22,29 @@
.text
-LEAF(__ieee_get_fp_control, 16)
-#ifdef PROF
- ldgp gp, 0(pv)
- lda sp, -16(sp)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#elif defined PIC
- lda sp, -16(sp)
- .prologue 0
-#else
- ldgp gp, 0(pv)
+ENTRY(__ieee_get_fp_control)
+ cfi_startproc
+ PSEUDO_PROLOGUE
+
lda sp, -16(sp)
- .prologue 1
-#endif
+ cfi_adjust_cfa_offset(16)
mov sp, a1
ldi a0, GSI_IEEE_FP_CONTROL
ldi v0, __NR_osf_getsysinfo
call_pal PAL_callsys
- bne a3, $error
- ldq v0, 0(sp)
+ ldq t0, 0(sp)
lda sp, 16(sp)
- ret
+ cfi_adjust_cfa_offset(-16)
-$error:
- lda sp, 16(sp)
- SYSCALL_ERROR_HANDLER
+ bne a3, SYSCALL_ERROR_LABEL
+
+ mov t0, v0
+ ret
- END(__ieee_get_fp_control)
+PSEUDO_END(__ieee_get_fp_control)
+ cfi_endproc
libc_hidden_def(__ieee_get_fp_control)
weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 1d425249da..f022b42600 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2003, 2004
- Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
@@ -21,40 +20,27 @@
#include "kernel_sysinfo.h"
-LEAF(__ieee_set_fp_control, 16)
-#ifdef PROF
- ldgp gp, 0(pv)
- lda sp, -16(sp)
- .set noat
- lda AT, _mcount
- jsr AT, (AT), _mcount
- .set at
- .prologue 1
-#elif defined PIC
- lda sp, -16(sp)
- .prologue 0
-#else
- ldgp gp, 0(pv)
+ENTRY(__ieee_set_fp_control)
+ cfi_startproc
+ PSEUDO_PROLOGUE
+
lda sp, -16(sp)
- .prologue 1
-#endif
+ cfi_adjust_cfa_offset(16)
+ ldi v0, __NR_osf_setsysinfo
stq a0, 0(sp)
mov sp, a1
ldi a0, SSI_IEEE_FP_CONTROL
- ldi v0, __NR_osf_setsysinfo
call_pal PAL_callsys
- bne a3, $error
-
lda sp, 16(sp)
- ret
+ cfi_adjust_cfa_offset(-16)
-$error:
- lda sp, 16(sp)
- SYSCALL_ERROR_HANDLER
+ bne a3, SYSCALL_ERROR_LABEL
+ ret
- END(__ieee_set_fp_control)
+PSEUDO_END(__ieee_set_fp_control)
+ cfi_endproc
libc_hidden_def(__ieee_set_fp_control)
weak_alias (__ieee_set_fp_control, ieee_set_fp_control)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 3eaa422b12..9fb53798a0 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -20,24 +20,8 @@
#ifndef _KERNEL_FEATURES_H
#define _KERNEL_FEATURES_H 1
-/* The tgkill syscall was introduced for alpha 2.6.0-test1 which unfortunately
- cannot be distinguished from 2.6.0. */
-#if __LINUX_KERNEL_VERSION >= 132609
-# define __ASSUME_TGKILL 1
-#endif
-
-/* Starting with version 2.6.4, the stat64 syscalls are available. */
-#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
#define __ASSUME_UTIMES 1
-/* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists. */
-#if __LINUX_KERNEL_VERSION >= 0x020609
-# define __ASSUME_IEEE_RAISE_EXCEPTION 1
-#endif
-
/* Support for the O_CLOEXEC flag was added for alpha in 2.6.23. */
#if __LINUX_KERNEL_VERSION >= 0x020617
# define __ASSUME_O_CLOEXEC 1
@@ -98,4 +82,9 @@
#undef __ASSUME_STATFS64
#define __ASSUME_STATFS64 0
+/* Support for fsyncdata was added for alpha after 2.6.21. */
+#if __LINUX_KERNEL_VERSION >= 0x020616
+# define __ASSUME_FDATASYNC 1
+#endif
+
#endif /* _KERNEL_FEATURES_H */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c
index b0f1e81478..4401e6a03f 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c
@@ -1,5 +1,5 @@
/* lxstat using old-style Unix stat system call.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,6 @@ __lxstat (int vers, const char *name, struct stat *buf)
int result;
struct kernel_stat kbuf;
-#if __ASSUME_STAT64_SYSCALL > 0
if (vers == _STAT_VER_KERNEL64)
{
result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
@@ -46,22 +45,6 @@ __lxstat (int vers, const char *name, struct stat *buf)
__set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
-#elif defined __NR_lstat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
- int errno_out;
- result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
- {
- __set_errno (errno_out);
- return -1;
- }
- __libc_missing_axp_stat64 = 1;
- }
-#endif
result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
index f8a3295add..1d0cc7ec31 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/libc.abilist
@@ -1813,6 +1813,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data b/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
index 00700d1e02..6b2e51599c 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
+++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/localplt.data
@@ -1,12 +1,18 @@
libc.so: _OtsAddX ?
+libc.so: _OtsConvertFloatTX ?
libc.so: _OtsConvertFloatXT ?
+libc.so: _OtsCvtQUX ?
libc.so: _OtsCvtQX ?
+libc.so: _OtsCvtXQ ?
libc.so: _OtsDivX ?
libc.so: _OtsEqlX ?
libc.so: _OtsGeqX ?
+libc.so: _OtsGtrX ?
+libc.so: _OtsLeqX ?
libc.so: _OtsLssX ?
libc.so: _OtsMulX ?
libc.so: _OtsNeqX ?
+libc.so: _OtsNintXQ ?
libc.so: _OtsSubX ?
libc.so: _Unwind_Find_FDE
libc.so: calloc ?
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
index ac364dae18..0ef2e7fd38 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h
@@ -259,7 +259,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
index 04c7af472c..e6795d98f6 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h
@@ -23,16 +23,6 @@
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-# ifdef PROF
-# define PSEUDO_PROF \
- .set noat; \
- lda AT, _mcount; \
- jsr AT, (AT), _mcount; \
- .set at
-# else
-# define PSEUDO_PROF
-# endif
-
/* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END
besides "ret". */
@@ -88,7 +78,7 @@ __LABEL($multi_error) \
addq sp, 64, sp; \
cfi_restore(ra); \
cfi_def_cfa_offset(0); \
-__LABEL($syscall_error) \
+ SYSCALL_ERROR_FALLTHRU; \
SYSCALL_ERROR_HANDLER; \
cfi_endproc; \
.previous
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index becc11f94c..99ffd06fad 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -1,5 +1,5 @@
/* Set FP exception mask and rounding mode.
- Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,63 +17,45 @@
<http://www.gnu.org/licenses/>. */
#include <fpu_control.h>
-#include <asm/fpu.h>
+#include <fenv_libc.h>
-extern void __ieee_set_fp_control (unsigned long);
-libc_hidden_proto(__ieee_set_fp_control)
-extern unsigned long __ieee_get_fp_control (void);
-libc_hidden_proto(__ieee_get_fp_control)
-
-static inline unsigned long
-rdfpcr (void)
-{
- unsigned long fpcr;
- asm ("excb; mf_fpcr %0" : "=f"(fpcr));
- return fpcr;
-}
-
-
-static inline void
-wrfpcr (unsigned long fpcr)
-{
- asm volatile ("mt_fpcr %0; excb" : : "f"(fpcr));
-}
+#define convert_bit(M, F, T) \
+ ((T) < (F) \
+ ? ((M) / ((F) / (T))) & (T) \
+ : ((M) & (F)) * ((T) / (F)))
void
__setfpucw (fpu_control_t fpu_control)
{
- unsigned long fpcr = 0, fpcw = 0;
-
- if (!fpu_control)
- fpu_control = _FPU_DEFAULT;
-
- /* first, set dynamic rounding mode: */
-
- fpcr = rdfpcr();
- fpcr &= ~FPCR_DYN_MASK;
- switch (fpu_control & 0xc00)
- {
- case _FPU_RC_NEAREST: fpcr |= FPCR_DYN_NORMAL; break;
- case _FPU_RC_DOWN: fpcr |= FPCR_DYN_MINUS; break;
- case _FPU_RC_UP: fpcr |= FPCR_DYN_PLUS; break;
- case _FPU_RC_ZERO: fpcr |= FPCR_DYN_CHOPPED; break;
- }
- wrfpcr(fpcr);
-
- /* now tell kernel about traps that we like to hear about: */
-
- fpcw = __ieee_get_fp_control();
- fpcw &= ~IEEE_TRAP_ENABLE_MASK;
-
- if (!(fpu_control & _FPU_MASK_IM)) fpcw |= IEEE_TRAP_ENABLE_INV;
- if (!(fpu_control & _FPU_MASK_DM)) fpcw |= IEEE_TRAP_ENABLE_UNF;
- if (!(fpu_control & _FPU_MASK_ZM)) fpcw |= IEEE_TRAP_ENABLE_DZE;
- if (!(fpu_control & _FPU_MASK_OM)) fpcw |= IEEE_TRAP_ENABLE_OVF;
- if (!(fpu_control & _FPU_MASK_PM)) fpcw |= IEEE_TRAP_ENABLE_INE;
-
- __fpu_control = fpu_control; /* update global copy */
-
- __ieee_set_fp_control(fpcw);
+ unsigned long fpcr, swcr, fc = (int)fpu_control;
+
+ /* ??? If this was a real external interface we'd want to read the current
+ exception state with __ieee_get_fp_control. But this is an internal
+ function only called at process startup, so there's no point in trying
+ to preserve exceptions that cannot have been raised yet. Indeed, this
+ entire function is likely to be one big nop unless the user overrides
+ the default __fpu_control variable. */
+
+ /* Convert the rounding mode from fpu_control.h format. */
+ const unsigned long conv_rnd
+ = ( (FE_TOWARDZERO << (_FPU_RC_ZERO >> 8))
+ | (FE_DOWNWARD << (_FPU_RC_DOWN >> 8))
+ | (FE_TONEAREST << (_FPU_RC_NEAREST >> 8))
+ | (FE_UPWARD << (_FPU_RC_UP >> 8)));
+
+ fpcr = ((conv_rnd >> ((fc >> 8) & 3)) & 3) << FPCR_ROUND_SHIFT;
+
+ /* Convert the exception mask from fpu_control.h format. */
+ swcr = convert_bit (~fc, _FPU_MASK_IM, FE_INVALID >> SWCR_ENABLE_SHIFT);
+ swcr |= convert_bit (~fc, _FPU_MASK_DM, FE_UNDERFLOW >> SWCR_ENABLE_SHIFT);
+ swcr |= convert_bit (~fc, _FPU_MASK_ZM, FE_DIVBYZERO >> SWCR_ENABLE_SHIFT);
+ swcr |= convert_bit (~fc, _FPU_MASK_OM, FE_OVERFLOW >> SWCR_ENABLE_SHIFT);
+ swcr |= convert_bit (~fc, _FPU_MASK_PM, FE_INEXACT >> SWCR_ENABLE_SHIFT);
+
+ /* Install everything. */
+ __fpu_control = fc;
+ asm volatile ("mt_fpcr %0" : : "f"(fpcr));
+ __ieee_set_fp_control(swcr);
}
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/syscall.S b/ports/sysdeps/unix/sysv/linux/alpha/syscall.S
index 830b10acb6..5cec3800e7 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/syscall.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/syscall.S
@@ -62,16 +62,9 @@ LEAF(__syscall, 0)
ldq a5,0(sp) /* arg6 -> a5 */
call_pal PAL_callsys /* Invoke system call */
- bne a3, $error
+ bne a3, SYSCALL_ERROR_LABEL
ret
-$error:
-#ifndef PROF
- br gp, 2f
-2: ldgp gp, 0(gp)
-#endif
- SYSCALL_ERROR_HANDLER
-
-END(__syscall)
+PSEUDO_END(__syscall)
weak_alias (__syscall, syscall)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstat.c b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c
index a25431cfc3..fe11e52d51 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/xstat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c
@@ -1,5 +1,5 @@
/* xstat using old-style Unix stat system call.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,6 @@ __xstat (int vers, const char *name, struct stat *buf)
int result;
struct kernel_stat kbuf;
-#if __ASSUME_STAT64_SYSCALL > 0
if (vers == _STAT_VER_KERNEL64)
{
result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
@@ -46,22 +45,6 @@ __xstat (int vers, const char *name, struct stat *buf)
__set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
return -1;
}
-#elif defined __NR_stat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
- int errno_out;
- result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
- {
- __set_errno (errno_out);
- return -1;
- }
- __libc_missing_axp_stat64 = 1;
- }
-#endif
result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index d1dc64fedd..2b27a2de02 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,6 @@
#include <xstatconv.h>
#include <sys/syscall.h>
-
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-int __libc_missing_axp_stat64;
-# endif
-#endif
-
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h
index ea4cbb0274..e8754f9cf2 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h
@@ -1,5 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,10 +19,5 @@
#include <kernel-features.h>
#include <sys/syscall.h>
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-extern int __libc_missing_axp_stat64 attribute_hidden;
-# endif
-#endif
extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
attribute_hidden;
diff --git a/ports/sysdeps/unix/sysv/linux/am33/configure b/ports/sysdeps/unix/sysv/linux/am33/configure
index d4490122b4..870c6a7929 100755..100644
--- a/ports/sysdeps/unix/sysv/linux/am33/configure
+++ b/ports/sysdeps/unix/sysv/linux/am33/configure
@@ -1,4 +1,4 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for am33/sysdeps/unix/sysv/linux/am33
-arch_minimum_kernel=2.4.0
+arch_minimum_kernel=2.6.25
diff --git a/ports/sysdeps/unix/sysv/linux/am33/configure.in b/ports/sysdeps/unix/sysv/linux/am33/configure.in
index a94c370cf1..43e33f74ca 100644
--- a/ports/sysdeps/unix/sysv/linux/am33/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/am33/configure.in
@@ -1,4 +1,4 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for am33/sysdeps/unix/sysv/linux/am33
-arch_minimum_kernel=2.4.0
+arch_minimum_kernel=2.6.25
diff --git a/ports/sysdeps/unix/sysv/linux/am33/getrlimit.c b/ports/sysdeps/unix/sysv/linux/am33/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/ports/sysdeps/unix/sysv/linux/am33/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c b/ports/sysdeps/unix/sysv/linux/arm/arm-features.h
index a802861012..f20a705564 100644
--- a/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/arm-features.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Macros to test for CPU features on ARM. Linux version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,19 +16,15 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <atomic.h>
-#include "pthreadP.h"
+#ifndef _LINUX_ARM_FEATURES_H
+#define _LINUX_ARM_FEATURES_H 1
-int
-pthread_spin_trylock (pthread_spinlock_t *lock)
-{
-#if 0
- volatile unsigned int *a = __ldcw_align (lock);
+#ifndef __ASSEMBLER__
+# include <ldsodefs.h>
- return __ldcw (a) ? 0 : EBUSY;
+# define ARM_HAVE_VFP (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
#endif
- return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
+#include_next <arm-features.h>
-}
+#endif /* arm-features.h */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h
index 4e810a28d6..3374153867 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Atomic operations. ARM/Linux version.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,41 +16,17 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <stdint.h>
-#include <sysdep.h>
-
-
-typedef int8_t atomic8_t;
-typedef uint8_t uatomic8_t;
-typedef int_fast8_t atomic_fast8_t;
-typedef uint_fast8_t uatomic_fast8_t;
-
-typedef int32_t atomic32_t;
-typedef uint32_t uatomic32_t;
-typedef int_fast32_t atomic_fast32_t;
-typedef uint_fast32_t uatomic_fast32_t;
-
-typedef intptr_t atomicptr_t;
-typedef uintptr_t uatomicptr_t;
-typedef intmax_t atomic_max_t;
-typedef uintmax_t uatomic_max_t;
-
-void __arm_link_error (void);
-
-/* Use the atomic builtins provided by GCC in case the backend provides
- a pattern to do this efficiently. */
-
-#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-#define atomic_full_barrier() __sync_synchronize ()
-#elif defined __thumb2__
-#define atomic_full_barrier() \
+/* If the compiler doesn't provide a primitive, we'll use this macro
+ to get assistance from the kernel. */
+#ifdef __thumb2__
+# define __arm_assisted_full_barrier() \
__asm__ __volatile__ \
("movw\tip, #0x0fa0\n\t" \
"movt\tip, #0xffff\n\t" \
"blx\tip" \
: : : "ip", "lr", "cc", "memory");
#else
-#define atomic_full_barrier() \
+# define __arm_assisted_full_barrier() \
__asm__ __volatile__ \
("mov\tip, #0xffff0fff\n\t" \
"mov\tlr, pc\n\t" \
@@ -60,31 +37,28 @@ void __arm_link_error (void);
/* Atomic compare and exchange. This sequence relies on the kernel to
provide a compare and exchange operation which is atomic on the
current architecture, either via cleverness on pre-ARMv6 or via
- ldrex / strex on ARMv6. */
-
-#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
- ({ __arm_link_error (); oldval; })
-
-#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
- ({ __arm_link_error (); oldval; })
+ ldrex / strex on ARMv6.
-#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap ((mem), (oldval), (newval))
-
-/* It doesn't matter what register is used for a_oldval2, but we must
+ It doesn't matter what register is used for a_oldval2, but we must
specify one to work around GCC PR rtl-optimization/21223. Otherwise
- it may cause a_oldval or a_tmp to be moved to a different register. */
-
-#elif defined __thumb2__
+ it may cause a_oldval or a_tmp to be moved to a different register.
+
+ We use the union trick rather than simply using __typeof (...) in the
+ declarations of A_OLDVAL et al because when NEWVAL or OLDVAL is of the
+ form *PTR and PTR has a 'volatile ... *' type, then __typeof (*PTR) has
+ a 'volatile ...' type and this triggers -Wvolatile-register-var to
+ complain about 'register volatile ... asm ("reg")'. */
+#ifdef __thumb2__
/* Thumb-2 has ldrex/strex. However it does not have barrier instructions,
so we still need to use the kernel helper. */
-#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- ({ register __typeof (oldval) a_oldval asm ("r0"); \
- register __typeof (oldval) a_newval asm ("r1") = (newval); \
+# define __arm_assisted_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) };\
+ union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) };\
+ register uint32_t a_oldval asm ("r0"); \
+ register uint32_t a_newval asm ("r1") = newval_arg.v; \
register __typeof (mem) a_ptr asm ("r2") = (mem); \
- register __typeof (oldval) a_tmp asm ("r3"); \
- register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
+ register uint32_t a_tmp asm ("r3"); \
+ register uint32_t a_oldval2 asm ("r4") = oldval_arg.v; \
__asm__ __volatile__ \
("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
"cmp\t%[tmp], %[old2]\n\t" \
@@ -100,14 +74,16 @@ void __arm_link_error (void);
: [new] "r" (a_newval), [ptr] "r" (a_ptr), \
[old2] "r" (a_oldval2) \
: "ip", "lr", "cc", "memory"); \
- a_tmp; })
+ (__typeof (oldval)) a_tmp; })
#else
-#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- ({ register __typeof (oldval) a_oldval asm ("r0"); \
- register __typeof (oldval) a_newval asm ("r1") = (newval); \
+# define __arm_assisted_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) };\
+ union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) };\
+ register uint32_t a_oldval asm ("r0"); \
+ register uint32_t a_newval asm ("r1") = newval_arg.v; \
register __typeof (mem) a_ptr asm ("r2") = (mem); \
- register __typeof (oldval) a_tmp asm ("r3"); \
- register __typeof (oldval) a_oldval2 asm ("r4") = (oldval); \
+ register uint32_t a_tmp asm ("r3"); \
+ register uint32_t a_oldval2 asm ("r4") = oldval_arg.v; \
__asm__ __volatile__ \
("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
"cmp\t%[tmp], %[old2]\n\t" \
@@ -123,8 +99,7 @@ void __arm_link_error (void);
: [new] "r" (a_newval), [ptr] "r" (a_ptr), \
[old2] "r" (a_oldval2) \
: "ip", "lr", "cc", "memory"); \
- a_tmp; })
+ (__typeof (oldval)) a_tmp; })
#endif
-#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- ({ __arm_link_error (); oldval; })
+#include <sysdeps/arm/bits/atomic.h>
diff --git a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
index ef49d5fa2b..f259490ab4 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,133 +20,10 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 040000 /* Must be a directory. */
-# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 0200000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0400000
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-#endif
-#define F_GETLK64 12 /* Get record locking info. */
-#define F_SETLK64 13 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 14 /* Set record locking info (blocking). */
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
+#define __O_DIRECTORY 040000 /* Must be a directory. */
+#define __O_NOFOLLOW 0100000 /* Do not follow links. */
+#define __O_DIRECT 0200000 /* Direct disk access. */
+#define __O_LARGEFILE 0400000
struct flock
{
@@ -174,148 +50,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/ports/sysdeps/unix/sysv/linux/arm/configure b/ports/sysdeps/unix/sysv/linux/arm/configure
index 5b5f4c993a..cb94cc5eb4 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/configure
+++ b/ports/sysdeps/unix/sysv/linux/arm/configure
@@ -1,6 +1,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/arm.
-arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/ports/sysdeps/unix/sysv/linux/arm/configure.in b/ports/sysdeps/unix/sysv/linux/arm/configure.in
index b57c4e37b8..3e67dee425 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/arm/configure.in
@@ -1,6 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/arm.
-arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=no
CFLAGS=${CFLAGS% -fno-unwind-tables}
diff --git a/ports/sysdeps/unix/sysv/linux/arm/dl-machine.h b/ports/sysdeps/unix/sysv/linux/arm/dl-machine.h
new file mode 100644
index 0000000000..68e8be9e61
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/arm/dl-machine.h
@@ -0,0 +1,30 @@
+/* Machine-dependent ELF dynamic relocation inline functions. ARM/Linux version
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef dl_machine_h
+
+/* This definition is Linux-specific. */
+#define CLEAR_CACHE(BEG,END) \
+ INTERNAL_SYSCALL_ARM (cacheflush, , 3, (BEG), (END), 0)
+
+#endif
+
+/* The rest is just machine-specific.
+ This #include is outside the #ifndef because the parts of
+ dl-machine.h used only by dynamic-link.h are outside the guard. */
+#include <sysdeps/arm/dl-machine.h>
diff --git a/ports/sysdeps/unix/sysv/linux/arm/getcontext.S b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
index 116d6e8f35..2281c9eff2 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/getcontext.S
@@ -41,54 +41,56 @@ ENTRY(__getcontext)
/* Save ucontext_t * across the next call. */
mov r4, r0
-
+
/* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
mov r0, #SIG_BLOCK
mov r1, #0
add r2, r4, #UCONTEXT_SIGMASK
bl PLTJMP(__sigprocmask)
-
+
/* Store FP regs. Much of the FP code is copied from arm/setjmp.S. */
#ifdef PIC
- ldr r2, 1f
- ldr r1, Lrtld_global_ro
+ ldr r2, 1f
+ ldr r1, .Lrtld_global_ro
0: add r2, pc, r2
- ldr r2, [r2, r1]
- ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ ldr r2, [r2, r1]
+ ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
#else
- ldr r2, Lhwcap
- ldr r2, [r2, #0]
+ ldr r2, .Lhwcap
+ ldr r2, [r2, #0]
#endif
add r0, r4, #UCONTEXT_REGSPACE
- tst r2, #HWCAP_ARM_VFP
- beq Lno_vfp
-
- /* Store the VFP registers.
- Don't use VFP instructions directly because this code
- is used in non-VFP multilibs. */
- /* Following instruction is vstmia r0!, {d8-d15}. */
- stc p11, cr8, [r0], #64
- /* Store the floating-point status register. */
- /* Following instruction is vmrs r1, fpscr. */
- mrc p10, 7, r1, cr1, cr0, 0
- str r1, [r0], #4
-Lno_vfp:
-
- tst r2, #HWCAP_ARM_IWMMXT
- beq Lno_iwmmxt
-
- /* Save the call-preserved iWMMXt registers. */
- /* Following instructions are wstrd wr10, [r0], #8 (etc.) */
- stcl p1, cr10, [r0], #8
- stcl p1, cr11, [r0], #8
- stcl p1, cr12, [r0], #8
- stcl p1, cr13, [r0], #8
- stcl p1, cr14, [r0], #8
- stcl p1, cr15, [r0], #8
-Lno_iwmmxt:
+#ifdef __SOFTFP__
+ tst r2, #HWCAP_ARM_VFP
+ beq .Lno_vfp
+#endif
+
+ /* Store the VFP registers.
+ Don't use VFP instructions directly because this code
+ is used in non-VFP multilibs. */
+ /* Following instruction is vstmia r0!, {d8-d15}. */
+ stc p11, cr8, [r0], #64
+ /* Store the floating-point status register. */
+ /* Following instruction is vmrs r1, fpscr. */
+ mrc p10, 7, r1, cr1, cr0, 0
+ str r1, [r0], #4
+.Lno_vfp:
+
+ tst r2, #HWCAP_ARM_IWMMXT
+ beq .Lno_iwmmxt
+
+ /* Save the call-preserved iWMMXt registers. */
+ /* Following instructions are wstrd wr10, [r0], #8 (etc.) */
+ stcl p1, cr10, [r0], #8
+ stcl p1, cr11, [r0], #8
+ stcl p1, cr12, [r0], #8
+ stcl p1, cr13, [r0], #8
+ stcl p1, cr14, [r0], #8
+ stcl p1, cr15, [r0], #8
+.Lno_iwmmxt:
/* Restore the clobbered R4 and LR. */
ldr r14, [r4, #MCONTEXT_ARM_LR]
@@ -102,11 +104,11 @@ END(__getcontext)
#ifdef PIC
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
- .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+.Lrtld_global_ro:
+ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
#else
-Lhwcap:
- .long C_SYMBOL_NAME(_dl_hwcap)
+.Lhwcap:
+ .long C_SYMBOL_NAME(_dl_hwcap)
#endif
diff --git a/ports/sysdeps/unix/sysv/linux/arm/getrlimit.c b/ports/sysdeps/unix/sysv/linux/arm/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/ports/sysdeps/unix/sysv/linux/arm/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h b/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
index 9092df7192..e13443dc36 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -18,20 +18,7 @@
<http://www.gnu.org/licenses/>. */
/* The utimes syscall was added before 2.6.1. */
-#if __LINUX_KERNEL_VERSION >= 132609
-# define __ASSUME_UTIMES 1
-#endif
-
-/* On ARM the mmap2/stat64/lstat64/fstat64 syscalls were introduced in
- 2.3.35. */
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
-
-/* Arm got fcntl64 in 2.4.4. */
-#define __ASSUME_FCNTL64 1
-
-/* The vfork syscall on arm was definitely available in 2.4. */
-#define __ASSUME_VFORK_SYSCALL 1
+#define __ASSUME_UTIMES 1
/* The signal frame layout changed in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 132626
diff --git a/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
index 8980bb1996..d958862225 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
@@ -27,10 +27,22 @@
#define EXTRA_OSABI ELFOSABI_ARM_AEABI
+#ifdef __ARM_PCS_VFP
+# define VALID_FLOAT_ABI(x) \
+ ((EF_ARM_EABI_VERSION ((x)) != EF_ARM_EABI_VER5) \
+ || !((x) & EF_ARM_ABI_FLOAT_SOFT))
+#else
+# define VALID_FLOAT_ABI(x) \
+ ((EF_ARM_EABI_VERSION ((x)) != EF_ARM_EABI_VER5) \
+ || !((x) & EF_ARM_ABI_FLOAT_HARD))
+#endif
+
+#undef VALID_ELF_HEADER
#define VALID_ELF_HEADER(hdr,exp,size) \
- (memcmp (hdr, exp, size) == 0 \
- || memcmp (hdr, expected2, size) == 0 \
- || memcmp (hdr, expected3, size) == 0)
+ ((memcmp (hdr, exp, size) == 0 \
+ || memcmp (hdr, expected2, size) == 0 \
+ || memcmp (hdr, expected3, size) == 0) \
+ && VALID_FLOAT_ABI (ehdr->e_flags))
#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \
|| osabi == EXTRA_OSABI \
|| osabi == ELFOSABI_LINUX)
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
index 5523fdd2a3..ceab6b2cd9 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/libc.abilist
@@ -80,6 +80,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.4
GLIBC_2.4 A
diff --git a/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
index b9fa69ce37..5811361e3a 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
@@ -256,7 +256,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
1 - taken by one user
>1 - taken by more users */
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/setcontext.S b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
index d163fc4a4c..64367704b4 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
+++ b/ports/sysdeps/unix/sysv/linux/arm/setcontext.S
@@ -29,40 +29,42 @@ ENTRY(__setcontext)
mov r4, r0
add r0, r0, #UCONTEXT_REGSPACE
- /* Restore the VFP registers. Copied from arm/__longjmp.S. */
+ /* Restore the VFP registers. Copied from arm/__longjmp.S. */
#ifdef PIC
- ldr r2, 1f
- ldr r1, Lrtld_global_ro
+ ldr r2, 1f
+ ldr r1, .Lrtld_global_ro
0: add r2, pc, r2
- ldr r2, [r2, r1]
- ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
+ ldr r2, [r2, r1]
+ ldr r2, [r2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
#else
- ldr r2, Lhwcap
- ldr r2, [r2, #0]
+ ldr r2, .Lhwcap
+ ldr r2, [r2, #0]
#endif
- tst r2, #HWCAP_ARM_VFP
- beq Lno_vfp_sc
-
- /* Following instruction is vldmia r0!, {d8-d15}. */
- ldc p11, cr8, [r0], #64
- /* Restore the floating-point status register. */
- ldr r1, [r0], #4
- /* Following instruction is fmxr fpscr, r1. */
- mcr p10, 7, r1, cr1, cr0, 0
-Lno_vfp_sc:
- tst r2, #HWCAP_ARM_IWMMXT
- beq Lno_iwmmxt_sc
-
- /* Restore the call-preserved iWMMXt registers. */
- /* Following instructions are wldrd wr10, [r0], #8 (etc.) */
- ldcl p1, cr10, [r0], #8
- ldcl p1, cr11, [r0], #8
- ldcl p1, cr12, [r0], #8
- ldcl p1, cr13, [r0], #8
- ldcl p1, cr14, [r0], #8
- ldcl p1, cr15, [r0], #8
-Lno_iwmmxt_sc:
+#ifdef __SOFTFP__
+ tst r2, #HWCAP_ARM_VFP
+ beq .Lno_vfp_sc
+#endif
+
+ /* Following instruction is vldmia r0!, {d8-d15}. */
+ ldc p11, cr8, [r0], #64
+ /* Restore the floating-point status register. */
+ ldr r1, [r0], #4
+ /* Following instruction is fmxr fpscr, r1. */
+ mcr p10, 7, r1, cr1, cr0, 0
+.Lno_vfp_sc:
+ tst r2, #HWCAP_ARM_IWMMXT
+ beq .Lno_iwmmxt_sc
+
+ /* Restore the call-preserved iWMMXt registers. */
+ /* Following instructions are wldrd wr10, [r0], #8 (etc.) */
+ ldcl p1, cr10, [r0], #8
+ ldcl p1, cr11, [r0], #8
+ ldcl p1, cr12, [r0], #8
+ ldcl p1, cr13, [r0], #8
+ ldcl p1, cr14, [r0], #8
+ ldcl p1, cr15, [r0], #8
+.Lno_iwmmxt_sc:
/* Now bring back the signal status. */
mov r0, #SIG_SETMASK
@@ -70,12 +72,12 @@ Lno_iwmmxt_sc:
mov r2, #0
bl PLTJMP(__sigprocmask)
- /* Loading r0-r3 makes makecontext easier. */
- add r14, r4, #MCONTEXT_ARM_R0
- ldmia r14, {r0-r12}
- ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
- add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
- ldmia r14, {r14, pc}
+ /* Loading r0-r3 makes makecontext easier. */
+ add r14, r4, #MCONTEXT_ARM_R0
+ ldmia r14, {r0-r12}
+ ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
+ add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
+ ldmia r14, {r14, pc}
END(setcontext)
weak_alias(__setcontext, setcontext)
@@ -83,19 +85,18 @@ weak_alias(__setcontext, setcontext)
/* Called when a makecontext() context returns. Start the
context in R4 or fall through to exit(). */
ENTRY(__startcontext)
- movs r0, r4
- bne PLTJMP(__setcontext)
+ movs r0, r4
+ bne PLTJMP(__setcontext)
- @ New context was 0 - exit
- b PLTJMP(HIDDEN_JUMPTARGET(_exit))
+ @ New context was 0 - exit
+ b PLTJMP(HIDDEN_JUMPTARGET(_exit))
END(__startcontext)
#ifdef PIC
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - 8
-Lrtld_global_ro:
- .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
+.Lrtld_global_ro:
+ .long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
#else
-Lhwcap:
- .long C_SYMBOL_NAME(_dl_hwcap)
+.Lhwcap:
+ .long C_SYMBOL_NAME(_dl_hwcap)
#endif
-
diff --git a/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h
index a8f20bd0b1..56a914b7eb 100644
--- a/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/generic/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for the generic Linux ABI.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
@@ -21,147 +21,10 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
#include <bits/wordsize.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* Must be a directory. */
-# define O_NOFOLLOW 0400000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# if __WORDSIZE == 64
-# define O_LARGEFILE 0
-# else
-# define O_LARGEFILE 0100000
-# endif
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
#if __WORDSIZE == 64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-/* Not necessary, we always have 64-bit offsets. */
-# define F_GETLK64 5 /* Get record locking info. */
-# define F_SETLK64 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW64 7 /* Set record locking info (blocking). */
-#else
-# ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-# else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-# endif
-# define F_GETLK64 12 /* Get record locking info. */
-# define F_SETLK64 13 /* Set record locking info (non-blocking). */
-# define F_SETLKW64 14 /* Set record locking info (blocking). */
-#endif
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+# define __O_LARGEFILE 0
#endif
struct flock
@@ -189,151 +52,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif /* use GNU */
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
index 948edeb96b..d5799d1851 100644
--- a/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
+++ b/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h
@@ -52,7 +52,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
@@ -62,6 +61,16 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#ifdef __LP64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/Versions b/ports/sysdeps/unix/sysv/linux/hppa/Versions
index 3bff6ec4fc..a62ef195ad 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/ports/sysdeps/unix/sysv/linux/hppa/Versions
@@ -27,6 +27,11 @@ libc {
#errlist-compat 257
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
+ GLIBC_2.17 {
+ #errlist-compat 260
+ _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+ prlimit64;
+ }
}
librt {
GLIBC_2.3 {
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h
index 2487739e35..86a173a668 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/errno.h
@@ -1,5 +1,5 @@
/* Error constants. Linux/HPPA specific version.
- Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,12 +33,16 @@
# define EOWNERDEAD 254
# endif
-# ifndef ENOTRECOVERABLE
+# ifndef ENOTRECOVERABLE
# define ENOTRECOVERABLE 255
# endif
# ifndef ERFKILL
-# define ERFKILL 256
+# define ERFKILL 256
+# endif
+
+# ifndef EHWPOISON
+# define EHWPOISON 257
# endif
# ifndef __ASSEMBLER__
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
index c0e949eea3..47a7ed285c 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995-1999, 2000, 2002, 2004, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,134 +20,41 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
#define O_CREAT 00000400 /* not fcntl */
#define O_EXCL 00002000 /* not fcntl */
#define O_NOCTTY 00400000 /* not fcntl */
-#define O_TRUNC 00001000 /* not fcntl */
#define O_APPEND 00000010
#define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 00100000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-#define O_BLKSEEK 00000100 /* HPUX only */
+#define __O_DSYNC 01000000
+#define __O_RSYNC 02000000 /* HPUX only */
+#define __O_SYNC 01000000
+#define O_SYNC (__O_SYNC|__O_DSYNC)
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 000010000 /* Must be a directory. */
-# define O_NOFOLLOW 000000200 /* Do not follow links. */
-# define O_CLOEXEC 010000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
-# define O_NOATIME 004000000 /* Do not set atime. */
-#endif
+#define O_BLKSEEK 00000100 /* HPUX only */
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 01000000 /* HPUX only */
-# define O_RSYNC 02000000 /* HPUX only */
-#endif
+#define __O_DIRECTORY 000010000 /* Must be a directory. */
+#define __O_NOFOLLOW 000000200 /* Do not follow links. */
+#define __O_CLOEXEC 010000000 /* Set close_on_exec. */
+#define __O_NOATIME 004000000 /* Do not set atime. */
+#define __O_PATH 020000000
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 00004000
-#endif
+#define __O_LARGEFILE 00004000
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-#endif
#define F_GETLK64 8 /* Get record locking info. */
#define F_SETLK64 9 /* Set record locking info (non-blocking). */
#define F_SETLKW64 10 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
-# define F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 13 /* Set number of signal to be sent. */
-# define F_GETSIG 14 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
+#define __F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
+#define __F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
+#define __F_SETSIG 13 /* Set number of signal to be sent. */
+#define __F_GETSIG 14 /* Get number of signal to be sent. */
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
#define F_RDLCK 1 /* Read lock. */
#define F_WRLCK 2 /* Write lock. */
#define F_UNLCK 3 /* Remove lock. */
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
-
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
@@ -174,148 +80,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
index 8dcdfbfabf..fb0e9c999e 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
@@ -1,6 +1,6 @@
/* Set flags signalling availability of kernel features based on given
kernel version number.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,16 +23,11 @@
and expect the final version here. */
#define __ASSUME_32BITUIDS 1
#define __ASSUME_TRUNCATE64_SYSCALL 1
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
#define __ASSUME_IPC64 1
#define __ASSUME_ST_INO_64_BIT 1
-#define __ASSUME_FCNTL64 1
#define __ASSUME_GETDENTS64_SYSCALL 1
/* PA-RISC 2.6.9 kernels had the first LWS CAS support */
-#if __LINUX_KERNEL_VERSION >= 0x020609
-# define __ASSUME_LWS_CAS 1
-#endif
+#define __ASSUME_LWS_CAS 1
#include_next <kernel-features.h>
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure b/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure
deleted file mode 100644
index a418c5469a..0000000000
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/unix/sysv/linux/hppa/nptl.
-
-# Needed for LWS CAS
-arch_minimum_kernel=2.6.9
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure.in b/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure.in
deleted file mode 100644
index 1c7102e260..0000000000
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/configure.in
+++ /dev/null
@@ -1,5 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/unix/sysv/linux/hppa/nptl.
-
-# Needed for LWS CAS
-arch_minimum_kernel=2.6.9
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
index 6d4b13517b..ad601c6833 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
@@ -319,7 +319,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden;
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
deleted file mode 100644
index daf7a0ac36..0000000000
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/pt-initfini.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Special .init and .fini section support for HPPA. NPTL version.
- Copyright (C) 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it
- and/or modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The Lesser General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- The GNU C Library is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <http://www.gnu.org/licenses/>. */
-
-/* This file is compiled into assembly code which is then munged by a sed
- script into two files: crti.s and crtn.s.
-
- * crti.s puts a function prologue at the beginning of the
- .init and .fini sections and defines global symbols for
- those addresses, so they can be called as functions.
-
- * crtn.s puts the corresponding function epilogues
- in the .init and .fini sections. */
-
-/* If we use the standard C version, the linkage table pointer won't
- be properly preserved due to the splitting up of function prologues
- and epilogues. Therefore we write these in assembly to make sure
- they do the right thing. */
-
-__asm__ (
-"#include \"defs.h\"\n"
-"\n"
-"/*@HEADER_ENDS*/\n"
-"\n"
-"/*@_init_PROLOG_BEGINS*/\n"
-" .section .init\n"
-" .align 4\n"
-" .globl _init\n"
-" .type _init,@function\n"
-"_init:\n"
-" stw %rp,-20(%sp)\n"
-" stwm %r4,64(%sp)\n"
-" stw %r19,-32(%sp)\n"
-" bl __pthread_initialize_minimal_internal,%rp\n"
-" copy %r19,%r4 /* delay slot */\n"
-" copy %r4,%r19\n"
-"/*@_init_PROLOG_ENDS*/\n"
-"\n"
-"/*@_init_EPILOG_BEGINS*/\n"
-"/* Here is the tail end of _init. */\n"
-" .section .init\n"
-" ldw -84(%sp),%rp\n"
-" copy %r4,%r19\n"
-" bv %r0(%rp)\n"
-"_end_init:\n"
-" ldwm -64(%sp),%r4\n"
-"\n"
-"/* Our very own unwind info, because the assembler can't handle\n"
-" functions split into two or more pieces. */\n"
-" .section .PARISC.unwind,\"a\",@progbits\n"
-" .extern _init\n"
-" .word _init, _end_init\n"
-" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
-"\n"
-"/*@_init_EPILOG_ENDS*/\n"
-"\n"
-"/*@_fini_PROLOG_BEGINS*/\n"
-" .section .fini\n"
-" .align 4\n"
-" .globl _fini\n"
-" .type _fini,@function\n"
-"_fini:\n"
-" stw %rp,-20(%sp)\n"
-" stwm %r4,64(%sp)\n"
-" stw %r19,-32(%sp)\n"
-" copy %r19,%r4\n"
-"/*@_fini_PROLOG_ENDS*/\n"
-"\n"
-"/*@_fini_EPILOG_BEGINS*/\n"
-" .section .fini\n"
-" ldw -84(%sp),%rp\n"
-" copy %r4,%r19\n"
-" bv %r0(%rp)\n"
-"_end_fini:\n"
-" ldwm -64(%sp),%r4\n"
-"\n"
-" .section .PARISC.unwind,\"a\",@progbits\n"
-" .extern _fini\n"
-" .word _fini, _end_fini\n"
-" .byte 0x08, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08\n"
-"\n"
-"/*@_fini_EPILOG_ENDS*/\n"
-"\n"
-"/*@TRAILER_BEGINS*/\n"
-);
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
index 6a0d953545..0787902cc6 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/nptl/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,6 @@
#include <features.h>
#include <endian.h>
#include <sched.h>
-#define __need_timespec
#include <time.h>
#include <bits/pthreadtypes.h>
@@ -84,7 +83,7 @@ enum
/* Mutex initializers. */
-#if __WORDSIZE == 64
+#ifdef __PTHREAD_MUTEX_HAVE_PREV
# define PTHREAD_MUTEX_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, { 0, 0 } } }
# ifdef __USE_GNU
@@ -119,11 +118,20 @@ enum
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
};
+/* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t
+ has the shared field. All 64-bit architectures have the shared field
+ in pthread_rwlock_t. */
+#ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
+# if __WORDSIZE == 64
+# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
+# endif
+#endif
+
/* Read-write lock initializers. */
# define PTHREAD_RWLOCK_INITIALIZER \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
# ifdef __USE_GNU
-# if __WORDSIZE == 64
+# ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
@@ -651,7 +659,7 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
void *__cancel_arg = (arg); \
int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \
- if (__builtin_expect (__not_first_call, 0)) \
+ if (__glibc_unlikely (__not_first_call)) \
{ \
__cancel_routine (__cancel_arg); \
__pthread_unwind_next (&__cancel_buf); \
@@ -686,7 +694,7 @@ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
void *__cancel_arg = (arg); \
int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \
__cancel_buf.__cancel_jmp_buf, 0); \
- if (__builtin_expect (__not_first_call, 0)) \
+ if (__glibc_unlikely (__not_first_call)) \
{ \
__cancel_routine (__cancel_arg); \
__pthread_unwind_next (&__cancel_buf); \
@@ -723,7 +731,7 @@ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
/* Function used in the macros. */
struct __jmp_buf_tag;
-extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW;
+extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL;
/* Mutex handling. */
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 0f7537c306..f3ff3e7d71 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -35,3 +35,4 @@ socketpair - socketpair i:iiif __socketpair socketpair
setrlimit - setrlimit i:ip __setrlimit setrlimit
getrlimit - getrlimit i:ip __getrlimit getrlimit
+prlimit64 EXTRA prlimit64 i:iipp __prlimit64 prlimit64@@GLIBC_2.17
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 83dd599c68..1825d315b6 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -1,6 +1,5 @@
/* Assembler macros for PA-RISC.
- Copyright (C) 1999, 2001, 2002, 2003, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
@@ -21,7 +20,6 @@
#include <asm/unistd.h>
#include <sysdeps/generic/sysdep.h>
-#include <sys/syscall.h>
/* In order to get __set_errno() definition in INLINE_SYSCALL. */
#ifndef __ASSEMBLER__
@@ -29,37 +27,33 @@
#endif
#undef ASM_LINE_SEP
-#define ASM_LINE_SEP !
+#define ASM_LINE_SEP !
#undef SYS_ify
#define SYS_ify(syscall_name) (__NR_##syscall_name)
-/* WARNING: TREG must be a callee saves register so
- that it doesn't have to be restored after a call
+/* The vfork, fork, and clone syscalls clobber r19
+ * and r21. We list r21 as either clobbered or as an
+ * input to a 6-argument syscall. We must save and
+ * restore r19 in both PIC and non-PIC cases.
+ */
+/* WARNING: TREG must be a callee saves register so
+ that it doesn't have to be restored after a call
to another function */
-#ifdef PIC
-# define TREG %r3
-# define SAVE_PIC(SREG) copy %r19, SREG ASM_LINE_SEP
-# define LOAD_PIC(LREG) copy LREG, %r19 ASM_LINE_SEP
+#define TREG 4
+#define SAVE_PIC(SREG) \
+ copy %r19, SREG ASM_LINE_SEP \
+ .cfi_register 19, SREG
+#define LOAD_PIC(LREG) \
+ copy LREG , %r19 ASM_LINE_SEP \
+ .cfi_restore 19
/* Inline assembly defines */
-# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
-# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
-# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
-# define CLOB_TREG TREG_ASM ,
-# define PIC_REG_DEF register unsigned long __r19 asm("r19");
-# define PIC_REG_USE , "r" (__r19)
-#else
-# define TREG %r3
-# define SAVE_PIC(SREG) nop ASM_LINE_SEP
-# define LOAD_PIC(LREG) nop ASM_LINE_SEP
-/* Inline assembly defines */
-# define TREG_ASM
-# define SAVE_ASM_PIC "nop \n"
-# define LOAD_ASM_PIC "nop \n"
-# define CLOB_TREG
-# define PIC_REG_DEF
-# define PIC_REG_USE
-#endif
+#define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
+#define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
+#define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
+#define CLOB_TREG TREG_ASM ,
+#define PIC_REG_DEF register unsigned long __r19 asm("r19");
+#define PIC_REG_USE , "r" (__r19)
#ifdef __ASSEMBLER__
@@ -126,12 +120,14 @@
.align ALIGNARG(4) ASM_LINE_SEP \
.export C_SYMBOL_NAME(name) ASM_LINE_SEP \
.type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ cfi_startproc ASM_LINE_SEP \
C_LABEL(name) ASM_LINE_SEP \
.PROC ASM_LINE_SEP \
.CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
.ENTRY ASM_LINE_SEP \
/* SAVE_RP says we do */ ASM_LINE_SEP \
stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 2, -20 ASM_LINE_SEP \
/*FIXME: Call mcount? (carefull with stack!) */
/* Some syscall wrappers do not call other functions, and
@@ -141,22 +137,25 @@
.align ALIGNARG(4) ASM_LINE_SEP \
.export C_SYMBOL_NAME(name) ASM_LINE_SEP \
.type C_SYMBOL_NAME(name),@function ASM_LINE_SEP \
+ cfi_startproc ASM_LINE_SEP \
C_LABEL(name) ASM_LINE_SEP \
.PROC ASM_LINE_SEP \
.CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3 ASM_LINE_SEP \
.ENTRY ASM_LINE_SEP \
/* SAVE_RP says we do */ ASM_LINE_SEP \
stw %rp, -20(%sr0,%sp) ASM_LINE_SEP \
+ .cfi_offset 2, -20 ASM_LINE_SEP \
/*FIXME: Call mcount? (carefull with stack!) */
#undef END
#define END(name) \
.EXIT ASM_LINE_SEP \
.PROCEND ASM_LINE_SEP \
+ cfi_endproc ASM_LINE_SEP \
.size C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name) ASM_LINE_SEP
-/* If compiled for profiling, call `mcount' at the start
- of each function. No, don't bother. gcc will put the
+/* If compiled for profiling, call `mcount' at the start
+ of each function. No, don't bother. gcc will put the
call in for us. */
#define CALL_MCOUNT /* Do nothing. */
@@ -169,9 +168,7 @@
which means
ENTRY(name)
DO_CALL(...)
- nop
- bv 0(2)
- nop
+ bv,n 0(2)
*/
#define PSEUDO(name, syscall_name, args) \
@@ -179,8 +176,7 @@
/* If necc. load args from stack */ ASM_LINE_SEP \
DOARGS_##args ASM_LINE_SEP \
DO_CALL (syscall_name, args) ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ UNDOARGS_##args ASM_LINE_SEP
#define ret \
/* Return value set by ERRNO code */ ASM_LINE_SEP \
@@ -195,8 +191,7 @@
ENTRY_LEAF (name) ASM_LINE_SEP \
DOARGS_##args ASM_LINE_SEP \
DO_CALL_NOERRNO (syscall_name, args) ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ UNDOARGS_##args ASM_LINE_SEP
#define ret_NOERRNO ret
@@ -210,8 +205,7 @@
ENTRY_LEAF (name) ASM_LINE_SEP \
DOARGS_##args ASM_LINE_SEP \
DO_CALL_ERRVAL (syscall_name, args) ASM_LINE_SEP \
- UNDOARGS_##args ASM_LINE_SEP \
- nop ASM_LINE_SEP
+ UNDOARGS_##args ASM_LINE_SEP
#define ret_ERRVAL ret
@@ -289,8 +283,12 @@
#define DO_CALL(syscall_name, args) \
/* Create a frame */ ASM_LINE_SEP \
stwm TREG, 64(%sp) ASM_LINE_SEP \
+ .cfi_offset TREG, 0 ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset 64 ASM_LINE_SEP \
stw %sp, -4(%sp) ASM_LINE_SEP \
+ .cfi_offset 30, -4 ASM_LINE_SEP \
stw %r19, -32(%sp) ASM_LINE_SEP \
+ .cfi_offset 19, -32 ASM_LINE_SEP \
/* Save r19 */ ASM_LINE_SEP \
SAVE_PIC(TREG) ASM_LINE_SEP \
/* Do syscall, delay loads # */ ASM_LINE_SEP \
@@ -313,8 +311,10 @@
L(pre_end): ASM_LINE_SEP \
/* Restore our frame, restoring TREG */ ASM_LINE_SEP \
ldwm -64(%sp), TREG ASM_LINE_SEP \
+ .cfi_adjust_cfa_offset -64 ASM_LINE_SEP \
/* Restore return pointer */ ASM_LINE_SEP \
- ldw -20(%sp),%rp ASM_LINE_SEP
+ ldw -20(%sp),%rp ASM_LINE_SEP \
+ .cfi_restore 2 ASM_LINE_SEP
/* We do nothing with the return, except hand it back to someone else */
#undef DO_CALL_NOERRNO
@@ -386,13 +386,13 @@ L(pre_end): ASM_LINE_SEP \
/* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
value to use within the context of the syscall
INTERNAL_SYSCALL_ERROR_P - Returns 0 if it wasn't an error, 1 otherwise
- You are allowed to use the syscall result (val) and the DECL error
+ You are allowed to use the syscall result (val) and the DECL error
variable to determine what went wrong.
INTERLAL_SYSCALL_ERRNO - Munges the val/err pair into the error number.
In our case we just flip the sign. */
#undef INTERNAL_SYSCALL_DECL
-#define INTERNAL_SYSCALL_DECL(err)
+#define INTERNAL_SYSCALL_DECL(err)
#undef INTERNAL_SYSCALL_ERROR_P
#define INTERNAL_SYSCALL_ERROR_P(val, err) \
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
index 51965b7108..990ae73bce 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/IA64.
- Copyright (C) 1999, 2000, 2004, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,132 +20,14 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* must be a directory */
-# define O_NOFOLLOW 0400000 /* don't follow links */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-#ifdef __USE_LARGEFILE64
/* Not necessary, files are always with 64bit off_t. */
-# define O_LARGEFILE 0
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#define F_GETLK 5 /* Get record locking info. */
-#define F_SETLK 6 /* Set record locking info (non-blocking). */
-#define F_SETLKW 7 /* Set record locking info (blocking). */
+#define __O_LARGEFILE 0
/* Not necessary, we always have 64-bit offsets. */
#define F_GETLK64 5 /* Get record locking info. */
#define F_SETLK64 6 /* Set record locking info (non-blocking). */
#define F_SETLKW64 7 /* Set record locking info (blocking). */
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
-
/* We don't need to support __USE_FILE_OFFSET64. */
struct flock
{
@@ -168,152 +49,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/configure b/ports/sysdeps/unix/sysv/linux/ia64/configure
index 3d025f9dda..71323718af 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/configure
+++ b/ports/sysdeps/unix/sysv/linux/ia64/configure
@@ -1,10 +1,4 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/ia64
-# There are several bits that no longer compile cleanly without
-# realtime signal support (ver 2.2.0). Given that we also now
-# require TLS (ver 2.6.0), it seems pointless to fix them.
-# ??? Surely this should now be the generic default.
-arch_minimum_kernel=2.6.0
-
ldd_rewrite_script=$dir/ldd-rewrite.sed
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/configure.in b/ports/sysdeps/unix/sysv/linux/ia64/configure.in
index 99057b8bd1..4fb564721b 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/ia64/configure.in
@@ -1,10 +1,4 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/ia64
-# There are several bits that no longer compile cleanly without
-# realtime signal support (ver 2.2.0). Given that we also now
-# require TLS (ver 2.6.0), it seems pointless to fix them.
-# ??? Surely this should now be the generic default.
-arch_minimum_kernel=2.6.0
-
ldd_rewrite_script=$dir/ldd-rewrite.sed
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c b/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c
index 4c1777a516..cb8025ebe0 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c
+++ b/ports/sysdeps/unix/sysv/linux/ia64/get_clockfreq.c
@@ -1,5 +1,5 @@
/* Get frequency of the system processor. IA-64/Linux version.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@ __get_clockfreq (void)
if (result != 0)
return result;
- fd = open ("/proc/cpuinfo", O_RDONLY);
+ fd = __open ("/proc/cpuinfo", O_RDONLY);
if (__builtin_expect (fd != -1, 1))
{
/* XXX AFAIK the /proc filesystem can generate "files" only up
@@ -45,7 +45,7 @@ __get_clockfreq (void)
char buf[4096];
ssize_t n;
- n = read (fd, buf, sizeof buf);
+ n = __read (fd, buf, sizeof buf);
if (__builtin_expect (n, 1) > 0)
{
char *mhz = memmem (buf, n, "itc MHz", 7);
@@ -81,7 +81,7 @@ __get_clockfreq (void)
}
}
- close (fd);
+ __close (fd);
}
return result;
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h b/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h
index f8dc4812cf..bd3e37777d 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/kernel-features.h
@@ -20,12 +20,6 @@
#ifndef _KERNEL_FEATURES_H
#define _KERNEL_FEATURES_H 1
-/* The late 2.5 kernels saw a lot of new CLONE_* flags. Summarize
- their availability with one define. */
-#if __LINUX_KERNEL_VERSION >= 132416
-# define __ASSUME_CLONE_THREAD_FLAGS 1
-#endif
-
/* The utimes syscall has been available for some architectures
forever. */
#define __ASSUME_UTIMES 1
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h
index e30e33d2bc..0962129b1f 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/dl-sysdep.h
@@ -1,5 +1,5 @@
/* System-specific settings for dynamic linker code. IA-64 version.
- Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -65,9 +65,7 @@ extern int _dl_sysinfo_break attribute_hidden;
#define DL_ARGV_NOT_RELRO 1
-/* The _dl_discover_osversion function is so far only needed in sysconf
- to check for kernels later than 2.6.23. */
-#if !defined __ASSEMBLER__ && __LINUX_KERNEL_VERSION < 0x020617
+#ifndef __ASSEMBLER__
/* Get version of the OS. */
extern int _dl_discover_osversion (void) attribute_hidden;
# define HAVE_DL_DISCOVER_OSVERSION 1
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
index b73f5ca8f7..b3510fe2a2 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist
@@ -80,6 +80,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h
index 24ed47e226..e36ff26536 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h
@@ -267,7 +267,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-/* The kernel notifies a process with uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/system.c b/ports/sysdeps/unix/sysv/linux/ia64/system.c
index f02a99e9eb..6970a1f899 100644
--- a/ports/sysdeps/unix/sysv/linux/ia64/system.c
+++ b/ports/sysdeps/unix/sysv/linux/ia64/system.c
@@ -25,10 +25,8 @@
return. It might still be in the kernel when the cancellation
request comes. Therefore we have to use the clone() calls ability
to have the kernel write the PID into the user-level variable. */
-#ifdef __ASSUME_CLONE_THREAD_FLAGS
-# define FORK() \
+#define FORK() \
INLINE_SYSCALL (clone2, 6, CLONE_PARENT_SETTID | SIGCHLD, NULL, 0, \
&pid, NULL, NULL)
-#endif
#include <sysdeps/unix/sysv/linux/system.c>
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
index 946cfa2ca7..04f8a1c1be 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000, 2004, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,133 +20,10 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 040000 /* Must be a directory. */
-# define O_NOFOLLOW 0100000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 0200000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0400000
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-#endif
-#define F_GETLK64 12 /* Get record locking info. */
-#define F_SETLK64 13 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 14 /* Set record locking info (blocking). */
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
-# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
+#define __O_DIRECTORY 040000 /* Must be a directory. */
+#define __O_NOFOLLOW 0100000 /* Do not follow links. */
+#define __O_DIRECT 0200000 /* Direct disk access. */
+#define __O_LARGEFILE 0400000
struct flock
{
@@ -173,148 +50,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
index b088a7247c..23ef447ff3 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/bits/atomic.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -42,8 +42,8 @@ typedef uintmax_t uatomic_max_t;
#ifdef SHARED
# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
({ \
- /* Use temporary variables to workaround call-clobberness of */ \
- /* the registers. */ \
+ /* Use temporary variables to workaround call-clobberness of \
+ the registers. */ \
__typeof (mem) _mem = mem; \
__typeof (oldval) _oldval = oldval; \
__typeof (newval) _newval = newval; \
@@ -65,13 +65,13 @@ typedef uintmax_t uatomic_max_t;
#else
# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
({ \
- /* Use temporary variables to workaround call-clobberness of */ \
- /* the registers. */ \
+ /* Use temporary variables to workaround call-clobberness of \
+ the registers. */ \
__typeof (mem) _mem = mem; \
__typeof (oldval) _oldval = oldval; \
__typeof (newval) _newval = newval; \
register __typeof (oldval) _d0 asm ("d0") \
- = SYS_ify (atomic_cmpxchg_32); \
+ = (__typeof (oldval)) SYS_ify (atomic_cmpxchg_32); \
register __typeof (mem) _a0 asm ("a0") = _mem; \
register __typeof (oldval) _d2 asm ("d2") = _oldval; \
register __typeof (newval) _d1 asm ("d1") = _newval; \
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
index 9a924571e8..3c40379aac 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist
@@ -81,6 +81,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.4
GLIBC_2.4 A
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/configure b/ports/sysdeps/unix/sysv/linux/m68k/configure
index a2fd833321..a704dacee6 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/configure
+++ b/ports/sysdeps/unix/sysv/linux/m68k/configure
@@ -1,7 +1,6 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
case $machine in
m68k/coldfire)
- arch_minimum_kernel=2.6.10
;;
*)
libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/configure.in b/ports/sysdeps/unix/sysv/linux/m68k/configure.in
index 6e91ef96f3..c21ca9dd47 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/m68k/configure.in
@@ -2,7 +2,6 @@ sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
case $machine in
m68k/coldfire)
- arch_minimum_kernel=2.6.10
;;
*)
libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c b/ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/ports/sysdeps/unix/sysv/linux/m68k/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/init-first.c b/ports/sysdeps/unix/sysv/linux/m68k/init-first.c
index ec311ec427..713ab86b16 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/init-first.c
+++ b/ports/sysdeps/unix/sysv/linux/m68k/init-first.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Initialization code run first thing by the ELF startup code. Linux/m68k.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
@@ -70,4 +71,4 @@ _libc_vdso_platform_setup (void)
#endif /* SHARED */
-#include <sysdeps/unix/sysv/linux/init-first.c>
+#include <csu/init-first.c>
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 3b0b441aa4..dbc77247e3 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -17,18 +17,8 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-/* These features were surely available with 2.4.12. */
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
-#define __ASSUME_FCNTL64 1
-#define __ASSUME_VFORK_SYSCALL 1
-
/* Many syscalls were added in 2.6.10 for m68k. */
-#if __LINUX_KERNEL_VERSION >= 132618
-# define __ASSUME_TGKILL 1
-# define __ASSUME_UTIMES 1
-# define __ASSUME_FADVISE64_64_SYSCALL 1
-#endif
+#define __ASSUME_UTIMES 1
#include_next <kernel-features.h>
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
index fbcd20897b..f998b1b276 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libc.abilist
@@ -1769,6 +1769,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
index fed152ae34..4dbed8d378 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h
@@ -254,7 +254,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
1 - taken by one user
>1 - taken by more users */
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/ports/sysdeps/unix/sysv/linux/m68k/vfork.S b/ports/sysdeps/unix/sysv/linux/m68k/vfork.S
index 24e0c9037c..d3e20d4067 100644
--- a/ports/sysdeps/unix/sysv/linux/m68k/vfork.S
+++ b/ports/sysdeps/unix/sysv/linux/m68k/vfork.S
@@ -36,8 +36,6 @@
ENTRY (__vfork)
-#ifdef __NR_vfork
-
/* SAVE_PID clobbers call-clobbered registers and
saves data in D1 and A1. */
@@ -66,27 +64,8 @@ ENTRY (__vfork)
cfi_adjust_cfa_offset (4)
cfi_rel_offset (%pc, 0)
-# ifdef __ASSUME_VFORK_SYSCALL
-# ifndef PIC
+#ifndef PIC
jbra SYSCALL_ERROR_LABEL
-# endif
-# else
- /* Check if vfork syscall is known at all. */
- movel #-ENOSYS,%d1
- cmpl %d0,%d1
- jne SYSCALL_ERROR_LABEL
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
- /* If we don't have vfork, fork is close enough. */
-
- movel #SYS_ify (fork), %d0
- trap #0
- tstl %d0
- jmi SYSCALL_ERROR_LABEL
- rts
#endif
PSEUDO_END (__vfork)
diff --git a/ports/sysdeps/unix/sysv/linux/mips/Makefile b/ports/sysdeps/unix/sysv/linux/mips/Makefile
index 99c554ff67..66ba621dae 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/ports/sysdeps/unix/sysv/linux/mips/Makefile
@@ -8,15 +8,42 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set
sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
endif
-# _MIPS_SIM_ABI32 == 1, _MIPS_SIM_NABI32 == 2, _MIPS_SIM_ABI64 == 3
-abi-variants := o32 n32 n64
+# Get value of default-abi.
+include $(common-objpfx)default-abi.make
+
+abi-variants := o32_soft o32_hard n32_soft n32_hard n64_soft n64_hard
+
+ifeq (,$(filter $(default-abi),$(abi-variants)))
+Unknown ABI, must be one of $(abi-variants)
+endif
+
abi-includes := sgidefs.h
-abi-o32-options := -D_MIPS_SIM=1
-abi-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32
-abi-n32-options := -D_MIPS_SIM=2
-abi-n32-condition := _MIPS_SIM == _MIPS_SIM_NABI32
-abi-n64-options := -D_MIPS_SIM=3
-abi-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64
+
+# _MIPS_SIM_ABI32 == 1, _MIPS_SIM_NABI32 == 2, _MIPS_SIM_ABI64 == 3
+abi-o32_soft-options := -U_MIPS_SIM -D_MIPS_SIM=1 \
+ -D__mips_soft_float -U__mips_hard_float
+abi-o32_soft-condition := defined(__mips_soft_float) \
+ && (_MIPS_SIM == _MIPS_SIM_ABI32)
+abi-o32_hard-options := -U_MIPS_SIM -D_MIPS_SIM=1 \
+ -D__mips_hard_float -U__mips_soft_float
+abi-o32_hard-condition := defined(__mips_hard_float) \
+ && (_MIPS_SIM == _MIPS_SIM_ABI32)
+abi-n32_soft-options := -U_MIPS_SIM -D_MIPS_SIM=2 \
+ -D__mips_soft_float -U__mips_hard_float
+abi-n32_soft-condition := defined(__mips_soft_float) \
+ && (_MIPS_SIM == _MIPS_SIM_NABI32)
+abi-n32_hard-options := -U_MIPS_SIM -D_MIPS_SIM=2 \
+ -D__mips_hard_float -U__mips_soft_float
+abi-n32_hard-condition := defined(__mips_hard_float) \
+ && (_MIPS_SIM == _MIPS_SIM_NABI32)
+abi-n64_soft-options := -U_MIPS_SIM -D_MIPS_SIM=3 \
+ -D__mips_soft_float -U__mips_hard_float
+abi-n64_soft-condition := defined(__mips_soft_float) \
+ && (_MIPS_SIM == _MIPS_SIM_ABI64)
+abi-n64_hard-options := -U_MIPS_SIM -D_MIPS_SIM=3 \
+ -D__mips_hard_float -U__mips_soft_float
+abi-n64_hard-condition := defined(__mips_hard_float) \
+ && (_MIPS_SIM == _MIPS_SIM_ABI64)
ifeq ($(subdir),elf)
ifeq ($(build-shared),yes)
diff --git a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
index 9645b36639..d22501c4d0 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006,
- 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,58 +21,26 @@
#endif
#include <sgidefs.h>
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on an ext2 file system */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
#define O_APPEND 0x0008
#define O_SYNC 0x4010
#define O_NONBLOCK 0x0080
-#define O_NDELAY O_NONBLOCK
#define O_CREAT 0x0100 /* not fcntl */
#define O_TRUNC 0x0200 /* not fcntl */
#define O_EXCL 0x0400 /* not fcntl */
#define O_NOCTTY 0x0800 /* not fcntl */
-#define O_FSYNC O_SYNC
#define O_ASYNC 0x1000
-#ifdef __USE_XOPEN2K8
-# define O_NOFOLLOW 0x20000 /* Do not follow links. */
-# define O_DIRECTORY 0x10000 /* Must be a directory. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 0x8000 /* Direct disk access hint. */
-# define O_NOATIME 0x40000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has no synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 0x0010 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
+#define __O_DIRECT 0x8000 /* Direct disk access hint. */
+#define __O_DSYNC 0x0010 /* Synchronize data. */
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0x2000 /* Allow large file opens. */
+#if _MIPS_SIM == _ABI64
+/* Not necessary, files are always with 64bit off_t. */
+# define __O_LARGEFILE 0
+#else
+# define __O_LARGEFILE 0x2000 /* Allow large file opens. */
#endif
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 14 /* Get record locking info. */
# define F_SETLK 6 /* Set record locking info (non-blocking). */
@@ -84,72 +51,18 @@
# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
#endif
-#define F_GETLK64 33 /* Get record locking info. */
-#define F_SETLK64 34 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 35 /* Set record locking info (blocking). */
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 24 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 23 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#if _MIPS_SIM != _ABI64
+# define F_GETLK64 33 /* Get record locking info. */
+# define F_SETLK64 34 /* Set record locking info (non-blocking). */
+# define F_SETLKW64 35 /* Set record locking info (blocking). */
+#else
+# define F_GETLK64 14 /* Get record locking info. */
+# define F_SETLK64 6 /* Set record locking info (non-blocking).*/
+# define F_SETLKW64 7 /* Set record locking info (blocking). */
#endif
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
+#define __F_SETOWN 24 /* Get owner (process receiving SIGIO). */
+#define __F_GETOWN 23 /* Set owner (process receiving SIGIO). */
struct flock
{
@@ -187,148 +100,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/configure b/ports/sysdeps/unix/sysv/linux/mips/configure
index 099014fdc7..36757e880b 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/configure
+++ b/ports/sysdeps/unix/sysv/linux/mips/configure
@@ -1,6 +1,112 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/mips.
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if (_MIPS_SIM != _ABIO32)
+ #error Not O32 ABI
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_mips_abi=o32
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if (_MIPS_SIM != _ABIN32)
+ #error Not N32 ABI
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_mips_abi=n32
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if (_MIPS_SIM != _ABI64)
+ #error Not 64 ABI
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_mips_abi=n64
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test -z "$libc_mips_abi"; then
+ as_fn_error "could not determine what ABI the compiler is using" "$LINENO" 5
+fi
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if !defined(__mips_soft_float)
+ #error Not soft ABI
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_mips_float=soft
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #if !defined(__mips_hard_float)
+ #error Not hard ABI
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ libc_mips_float=hard
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test -z "$libc_mips_float"; then
+ as_fn_error "could not determine if compiler is using hard or soft floating point ABI" "$LINENO" 5
+fi
+
+echo "default-abi := ${libc_mips_abi}_${libc_mips_float}" > default-abi.make
+
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
@@ -30,7 +136,4 @@ case "$prefix" in
esac
esac
-if test -z "$arch_minimum_kernel"; then
- arch_minimum_kernel=2.6.12
- libc_cv_gcc_unwind_find_fde=yes
-fi
+libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/mips/configure.in b/ports/sysdeps/unix/sysv/linux/mips/configure.in
index 466a349fc5..167779eaf9 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/configure.in
+++ b/ports/sysdeps/unix/sysv/linux/mips/configure.in
@@ -2,6 +2,50 @@ sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/unix/sysv/linux/mips.
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+ #if (_MIPS_SIM != _ABIO32)
+ #error Not O32 ABI
+ #endif])],
+ [libc_mips_abi=o32],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+ #if (_MIPS_SIM != _ABIN32)
+ #error Not N32 ABI
+ #endif])],
+ [libc_mips_abi=n32],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+ #if (_MIPS_SIM != _ABI64)
+ #error Not 64 ABI
+ #endif])],
+ [libc_mips_abi=n64],
+ [])])])
+
+if test -z "$libc_mips_abi"; then
+ AC_MSG_ERROR([could not determine what ABI the compiler is using])
+fi
+
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+ #if !defined(__mips_soft_float)
+ #error Not soft ABI
+ #endif])],
+ [libc_mips_float=soft],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
+ #if !defined(__mips_hard_float)
+ #error Not hard ABI
+ #endif])],
+ [libc_mips_float=hard],
+ [])])
+
+if test -z "$libc_mips_float"; then
+ AC_MSG_ERROR([could not determine if compiler is using hard or soft floating point ABI])
+fi
+
+echo "default-abi := ${libc_mips_abi}_${libc_mips_float}" > default-abi.make
+
case "$prefix" in
/usr | /usr/)
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
@@ -31,7 +75,4 @@ case "$prefix" in
esac
esac
-if test -z "$arch_minimum_kernel"; then
- arch_minimum_kernel=2.6.12
- libc_cv_gcc_unwind_find_fde=yes
-fi
+libc_cv_gcc_unwind_find_fde=yes
diff --git a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
index 70f1fc1ed4..62c1604e9f 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -22,9 +22,8 @@
/* MIPS platforms had IPC64 all along. */
#define __ASSUME_IPC64 1
-#if _MIPS_SIM == _ABIN32
-# define __ASSUME_FCNTL64 1
-#endif
+/* MIPS had the utimes syscall by 2.6.0. */
+#define __ASSUME_UTIMES 1
/* Support for the eventfd2 and signalfd4 syscalls was added in 2.6.27. */
#if __LINUX_KERNEL_VERSION >= 0x02061c
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips32/Makefile
deleted file mode 100644
index 77e91218a8..0000000000
--- a/ports/sysdeps/unix/sysv/linux/mips/mips32/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-default-abi := o32
diff --git a/ports/sysdeps/unix/sysv/linux/mips/fcntl.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/fcntl.c
index ea951bc4f9..ea951bc4f9 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/fcntl.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/fcntl.c
diff --git a/ports/sysdeps/unix/sysv/linux/mips/lockf64.c b/ports/sysdeps/unix/sysv/linux/mips/mips32/lockf64.c
index a88f5a784a..a88f5a784a 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/lockf64.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/lockf64.c
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
index 54e8d1a94e..7378869236 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist
@@ -2244,4 +2244,9 @@ _gp_disp
_gp_disp A
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
diff --git a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
index e18f9de094..24b517e438 100644
--- a/sysdeps/unix/sysv/linux/i386/getrlimit.c
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
+/* fxstat64 using 64-bit MIPS fstat system call.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,23 +17,29 @@
<http://www.gnu.org/licenses/>. */
#include <errno.h>
-#include <sys/resource.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
#include <sysdep.h>
#include <sys/syscall.h>
-#include <shlib-compat.h>
#include <bp-checks.h>
-extern int __new_getrlimit (enum __rlimit_resource resource,
- struct rlimit *__unbounded rlimits);
+#include <xstatconv.h>
-/* Consider moving to syscalls.list. */
+/* Get information about the file FD in BUF. */
int
-__new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
+__fxstat64 (int vers, int fd, struct stat64 *buf)
{
- return INLINE_SYSCALL (ugetrlimit, 2, resource, CHECK_1 (rlimits));
+ int result;
+ struct kernel_stat kbuf;
+
+ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
}
-weak_alias (__new_getrlimit, __getrlimit);
-versioned_symbol (libc, __new_getrlimit, getrlimit, GLIBC_2_2);
+hidden_def (__fxstat64)
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
new file mode 100644
index 0000000000..71123f2bf9
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
@@ -0,0 +1,44 @@
+/* lxstat64 using 64-bit MIPS lstat system call.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <xstatconv.h>
+
+/* Get information about the file NAME in BUF. */
+int
+__lxstat64 (int vers, const char *name, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat kbuf;
+
+ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+}
+
+hidden_def (__lxstat64)
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile
deleted file mode 100644
index 2368c40385..0000000000
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-default-abi := n32
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c
new file mode 100644
index 0000000000..ea951bc4f9
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/fcntl.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c
new file mode 100644
index 0000000000..a88f5a784a
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/lockf64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/lockf64.c>
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile
deleted file mode 100644
index fed17ba64a..0000000000
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-default-abi := n64
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
index 0e21194ac1..22b3068d8f 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libc.abilist
@@ -1390,6 +1390,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c b/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
new file mode 100644
index 0000000000..b5bb936143
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
@@ -0,0 +1,45 @@
+/* xstat64 using 64-bit MIPS stat system call.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <xstatconv.h>
+
+/* Get information about the file NAME in BUF. */
+
+int
+__xstat64 (int vers, const char *name, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat kbuf;
+
+ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+}
+
+hidden_def (__xstat64)
diff --git a/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
index 88b601eadd..9c1701167d 100644
--- a/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
@@ -1,5 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008,
- 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -269,7 +268,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
1 - taken by one user
>1 - taken by more users */
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
@@ -291,4 +290,40 @@ extern int __lll_timedwait_tid (int *, const struct timespec *)
__res; \
})
+/* Implement __libc_lock_lock using exchange_and_add, which expands into
+ a single instruction on XLP processors. We enable this for all MIPS
+ processors as atomic_exchange_and_add_acq and
+ atomic_compare_and_exchange_acq take the same time to execute.
+ This is a simplified expansion of ({ lll_lock (NAME, LLL_PRIVATE); 0; }).
+
+ Note: __lll_lock_wait_private() resets lock value to '2', which prevents
+ unbounded increase of the lock value and [with billions of threads]
+ overflow. */
+#define __libc_lock_lock(NAME) \
+ ({ \
+ int *__futex = &(NAME); \
+ if (__builtin_expect (atomic_exchange_and_add_acq (__futex, 1), 0)) \
+ __lll_lock_wait_private (__futex); \
+ 0; \
+ })
+
+#ifdef _MIPS_ARCH_XLP
+/* The generic version using a single atomic_compare_and_exchange_acq takes
+ less time for non-XLP processors, so we use below for XLP only. */
+# define __libc_lock_trylock(NAME) \
+ ({ \
+ int *__futex = &(NAME); \
+ int __result = atomic_exchange_and_add_acq (__futex, 1); \
+ /* If __result == 0, we succeeded in acquiring the lock. \
+ If __result == 1, we switched the lock to 'contended' state, which \
+ will cause a [possibly unnecessary] call to lll_futex_wait. This is \
+ unlikely, so we accept the possible inefficiency. \
+ If __result >= 2, we need to set the lock to 'contended' state to avoid \
+ unbounded increase from subsequent trylocks. */ \
+ if (__result >= 2) \
+ __result = atomic_exchange_acq (__futex, 2); \
+ __result; \
+ })
+#endif
+
#endif /* lowlevellock.h */
diff --git a/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
index 11ad6a525d..0efc6b55c4 100644
--- a/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist
@@ -1774,6 +1774,12 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ __ppc_get_timebase_freq F
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/ports/sysdeps/unix/sysv/linux/tile/Makefile b/ports/sysdeps/unix/sysv/linux/tile/Makefile
index 0cbfdd0e39..1c0c968dc1 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/Makefile
+++ b/ports/sysdeps/unix/sysv/linux/tile/Makefile
@@ -13,3 +13,7 @@ sysdep_headers += sys/dataplane.h
sysdep_routines += set_dataplane
endif
+
+ifeq ($(subdir),elf)
+sysdep_routines += dl-vdso
+endif
diff --git a/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c b/ports/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h
index f4b0c0d0a3..b972720b3a 100644
--- a/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c
+++ b/ports/sysdeps/unix/sysv/linux/tile/bits/libc-vdso.h
@@ -1,6 +1,6 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Resolve function pointers to VDSO functions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,12 +16,15 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <errno.h>
-#include <atomic.h>
-#include "pthreadP.h"
-int
-pthread_spin_trylock (pthread_spinlock_t *lock)
-{
- return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
-}
+#ifndef _LIBC_VDSO_H
+#define _LIBC_VDSO_H
+
+#ifdef SHARED
+
+extern long int (*__vdso_gettimeofday) (struct timeval *, void *)
+ attribute_hidden;
+
+#endif
+
+#endif /* _LIBC_VDSO_H */
diff --git a/ports/sysdeps/unix/sysv/linux/tile/gettimeofday.c b/ports/sysdeps/unix/sysv/linux/tile/gettimeofday.c
new file mode 100644
index 0000000000..92136d54b6
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/tile/gettimeofday.c
@@ -0,0 +1,37 @@
+/* Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#include <stddef.h>
+#include <sys/time.h>
+#include <time.h>
+#include <bits/libc-vdso.h>
+
+int
+__gettimeofday (struct timeval *tv, struct timezone *tz)
+{
+#ifdef SHARED
+ /* If the vDSO is available we use it. */
+ if (__vdso_gettimeofday != NULL)
+ return __vdso_gettimeofday (tv, tz);
+#endif
+ return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
+}
+
+libc_hidden_def (__gettimeofday)
+weak_alias (__gettimeofday, gettimeofday)
+libc_hidden_weak (gettimeofday)
diff --git a/ports/sysdeps/mips/nptl/pthread_spin_trylock.S b/ports/sysdeps/unix/sysv/linux/tile/init-first.c
index 95b55c3d4e..9ff63c1d18 100644
--- a/ports/sysdeps/mips/nptl/pthread_spin_trylock.S
+++ b/ports/sysdeps/unix/sysv/linux/tile/init-first.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,26 +15,20 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <sys/asm.h>
-#include <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <sgidefs.h>
+#ifdef SHARED
+#include <dl-vdso.h>
+#include <bits/libc-vdso.h>
-ENTRY (pthread_spin_trylock)
- .set push
-#if _MIPS_SIM == _ABIO32
- .set mips2
+long int (*__vdso_gettimeofday) (struct timeval *, void *) attribute_hidden;
+
+static inline void
+_libc_vdso_platform_setup (void)
+{
+ PREPARE_VERSION (linux26, "LINUX_2.6", 61765110);
+ __vdso_gettimeofday = _dl_vdso_vsym ("__vdso_gettimeofday", &linux26);
+}
+
+#define VDSO_SETUP _libc_vdso_platform_setup
#endif
- ll a2, 0(a0)
- li a1, 1
- bnez a2, 1f
- sc a1, 0(a0)
- beqz a1, 1f
- MIPS_SYNC
- .set pop
- li v0, 0
- ret
-1: li v0, EBUSY
- ret
-PSEUDO_END (pthread_spin_trylock)
+
+#include <csu/init-first.c>
diff --git a/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h b/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
index 89929d2bc9..106af62399 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
@@ -18,13 +18,7 @@
/* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
-#define __ASSUME_FCNTL64 1
-#define __ASSUME_CLONE_THREAD_FLAGS 1
-#define __ASSUME_TGKILL 1
#define __ASSUME_UTIMES 1
-#define __ASSUME_FADVISE64_64_SYSCALL 1
#define __ASSUME_O_CLOEXEC 1
#define __ASSUME_SOCK_CLOEXEC 1
#define __ASSUME_IN_NONBLOCK 1
diff --git a/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h b/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h
index 8690c7be4a..0e0d48ed06 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h
@@ -255,7 +255,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime,
#define LLL_LOCK_INITIALIZER_LOCKED (1)
-/* The kernel notifies a process which uses CLONE_CLEARTID via futex
+/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex
wakeup when the clone terminates. The memory location contains the
thread ID while the clone is running and is reset to zero
afterwards. */
diff --git a/ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h b/ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h
index 295ae50aa6..f533eb1f10 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h
+++ b/ports/sysdeps/unix/sysv/linux/tile/sys/procfs.h
@@ -113,7 +113,7 @@ typedef void *psaddr_t;
typedef elf_gregset_t prgregset_t;
/* Provide dummy declaration here; we don't have FP registers. */
-typedef int prfpregset_t;
+typedef elf_fpregset_t prfpregset_t;
/* We don't have any differences between processes and threads,
therefore have only one PID type. */
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/sched_getcpu.c b/ports/sysdeps/unix/sysv/linux/tile/tilegx/sched_getcpu.c
new file mode 100644
index 0000000000..e9c5bd282e
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/sched_getcpu.c
@@ -0,0 +1,87 @@
+/* Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sched.h>
+#include <sysdep.h>
+#include <arch/spr_def.h>
+
+
+/* The count of cores horizontally (X dimension) on the chip. */
+static int chip_width;
+
+/* Read the chip "width" from the /sys filesystem. */
+static int
+initialize_chip_width (void)
+{
+ int w = 0;
+ int fd;
+
+ fd = __open ("/sys/devices/system/cpu/chip_width", O_RDONLY);
+ if (fd >= 0)
+ {
+ char buf[64];
+ ssize_t n;
+ int i;
+
+ n = __read (fd, buf, sizeof (buf));
+ __close (fd);
+
+ for (i = 0; i < n; ++i)
+ {
+ if (buf[i] < '0' || buf[i] > '9')
+ break;
+ w = (w * 10) + (buf[i] - '0');
+ }
+ }
+
+ /* Store a negative value so we don't try again. */
+ if (w == 0)
+ w = -1;
+
+ /* Using an atomic idempotent write here makes this thread-safe. */
+ chip_width = w;
+ return w;
+}
+
+int
+sched_getcpu (void)
+{
+ unsigned int coord;
+ int w = chip_width;
+
+ if (__builtin_expect (w <= 0, 0))
+ {
+ if (w == 0)
+ w = initialize_chip_width ();
+ if (w < 0)
+ {
+ unsigned int cpu;
+ int r = INLINE_SYSCALL (getcpu, 3, &cpu, NULL, NULL);
+ return r == -1 ? r : cpu;
+ }
+ }
+
+ /* Assign 64-bit value to a 32-bit variable to ensure 32-bit multiply. */
+ coord = __insn_mfspr (SPR_TILE_COORD);
+
+ /* Extract Y coord from bits 7..10 and X coord from bits 18..21. */
+ return ((coord >> 7) & 0xf) * w + ((coord >> 18) & 0xf);
+}
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
index 48f0c69eb8..d79b2df55d 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libc.abilist
@@ -2082,4 +2082,9 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
index 3aa70a1004..f617405675 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libc.abilist
@@ -2082,4 +2082,9 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
diff --git a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
index 48f0c69eb8..d79b2df55d 100644
--- a/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
+++ b/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libc.abilist
@@ -2082,4 +2082,9 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
diff --git a/posix/Makefile b/posix/Makefile
index 922f9c0884..853152ea99 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2007,2009,2010,2011,2012 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -112,16 +112,15 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
include ../Rules
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
# globtest and wordexp-test currently only works with shared libraries
ifeq (yes,$(build-shared))
tests: $(objpfx)globtest.out $(objpfx)wordexp-tst.out
$(objpfx)globtest.out: globtest.sh $(objpfx)globtest
- $(SHELL) -e globtest.sh $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name)
+ $(SHELL) $< $(common-objpfx) '$(run-via-rtld-prefix)' \
+ '$(test-wrapper)' '$(test-wrapper-env)'
$(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
- $(SHELL) -e wordexp-tst.sh $(common-objpfx) $(elf-objpfx) \
- $(rtld-installed-name)
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
endif
@@ -129,12 +128,13 @@ endif
# it will say by examining the system, and write the results in config-name.h.
uname.c: $(objpfx)config-name.h
$(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
+ $(make-target-directory)
$< '$(config-os)' '$(config-release)' \
'$(config-machine)-$(config-vendor)' > $@.new
mv -f $@.new $@
CFLAGS-regex.c = -Wno-strict-prototypes
-CFLAGS-getaddrinfo.c = -DRESOLVER -fexceptions -DUSE_NSCD
+CFLAGS-getaddrinfo.c = -DRESOLVER -fexceptions
CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-pread64.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-pwrite.c = -fexceptions -fasynchronous-unwind-tables
@@ -170,8 +170,8 @@ CFLAGS-execlp.os = -fomit-frame-pointer
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
--none random --col --color --colour
-tst-exec-ARGS = -- $(built-program-cmd)
-tst-spawn-ARGS = -- $(built-program-cmd)
+tst-exec-ARGS = -- $(host-built-program-cmd)
+tst-spawn-ARGS = -- $(host-built-program-cmd)
tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
tst-chmod-ARGS = $(objdir)
tst-vfork3-ARGS = --test-dir=$(objpfx)
@@ -212,7 +212,7 @@ ptestcases.h: PTESTS PTESTS2C.sed
# Run a test on the header files we use.
# XXX Please note that for now we ignore the result of this test.
tests: $(objpfx)annexc.out
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)bug-regex2-mem $(objpfx)bug-regex14-mem \
$(objpfx)bug-regex21-mem $(objpfx)bug-regex31-mem $(objpfx)tst-rxspencer-mem\
$(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem $(objpfx)tst-getconf.out \
@@ -276,15 +276,7 @@ $(objpfx)tst-boost-mem: $(objpfx)tst-boost.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@
$(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
- $(SHELL) -e $< $(common-objpfx) $(elf-objpfx) $(rtld-installed-name)
-
-ifeq (yes,$(build-shared))
-$(objpfx)tst-regex: $(common-objpfx)rt/librt.so
-$(objpfx)tst-regex2: $(common-objpfx)rt/librt.so
-else
-$(objpfx)tst-regex: $(common-objpfx)rt/librt.a
-$(objpfx)tst-regex2: $(common-objpfx)rt/librt.a
-endif
+ $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
$(objpfx)bug-ga2-mem: $(objpfx)bug-ga2.out
$(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace > $@
diff --git a/posix/gai.conf b/posix/gai.conf
index 195287e1c8..4616ed005b 100644
--- a/posix/gai.conf
+++ b/posix/gai.conf
@@ -55,23 +55,11 @@
#
# scopev4 <mask> <value>
-# Add another rule to the RFC 3484 scope table for IPv4 addresses.
-# By default the scope IDs described in section 3.2 in RFC 3484 are
+# Add another rule to the RFC 6724 scope table for IPv4 addresses.
+# By default the scope IDs described in section 3.2 in RFC 6724 are
# used. Changing these defaults should hardly ever be necessary.
# The defaults are equivalent to:
#
#scopev4 ::ffff:169.254.0.0/112 2
#scopev4 ::ffff:127.0.0.0/104 2
-#scopev4 ::ffff:10.0.0.0/104 5
-#scopev4 ::ffff:172.16.0.0/108 5
-#scopev4 ::ffff:192.168.0.0/112 5
-#scopev4 ::ffff:0.0.0.0/96 14
-#
-# For sites which use site-local IPv4 addresses behind NAT there is
-# the problem that even if IPv4 addresses are preferred they do not
-# have the same scope and are therefore not sorted first. To change
-# this use only these rules:
-#
-#scopev4 ::ffff:169.254.0.0/112 2
-#scopev4 ::ffff:127.0.0.0/104 2
#scopev4 ::ffff:0.0.0.0/96 14
diff --git a/posix/glob.c b/posix/glob.c
index 68ea2055da..87d4f1bd2a 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -217,7 +217,7 @@ static int collated_compare (const void *, const void *) __THROW;
static const char *
next_brace_sub (const char *cp, int flags)
{
- unsigned int depth = 0;
+ size_t depth = 0;
while (*cp != '\0')
if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\')
{
@@ -960,7 +960,7 @@ glob (pattern, flags, errfunc, pglob)
&& S_ISDIR (st.st_mode))
: (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode)))))
{
- int newcount = pglob->gl_pathc + pglob->gl_offs;
+ size_t newcount = pglob->gl_pathc + pglob->gl_offs;
char **new_gl_pathv;
if (newcount > UINTPTR_MAX - (1 + 1)
@@ -1059,7 +1059,7 @@ glob (pattern, flags, errfunc, pglob)
appending the results to PGLOB. */
for (i = 0; i < dirs.gl_pathc; ++i)
{
- int old_pathc;
+ size_t old_pathc;
#ifdef SHELL
{
@@ -1114,7 +1114,7 @@ glob (pattern, flags, errfunc, pglob)
/* No matches. */
if (flags & GLOB_NOCHECK)
{
- int newcount = pglob->gl_pathc + pglob->gl_offs;
+ size_t newcount = pglob->gl_pathc + pglob->gl_offs;
char **new_gl_pathv;
if (newcount > UINTPTR_MAX - 2
@@ -1158,7 +1158,7 @@ glob (pattern, flags, errfunc, pglob)
}
else
{
- int old_pathc = pglob->gl_pathc;
+ size_t old_pathc = pglob->gl_pathc;
int orig_flags = flags;
if (meta & 2)
diff --git a/posix/globtest.sh b/posix/globtest.sh
index 9b9021d690..121be85961 100755
--- a/posix/globtest.sh
+++ b/posix/globtest.sh
@@ -1,8 +1,29 @@
#! /bin/bash
+# Test for glob(3).
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
-elf_objpfx=$1; shift
-rtld_installed_name=$1; shift
+run_via_rtld_prefix=$1; shift
+test_wrapper=$1; shift
+test_wrapper_env=$1; shift
+run_program_prefix="${test_wrapper} ${run_via_rtld_prefix}"
logfile=$common_objpfx/posix/globtest.out
#CMP=cmp
@@ -17,9 +38,6 @@ case "$common_objpfx" in
;;
esac
-# We have to find the libc and the NSS modules.
-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod
-
# Since we use `sort' we must make sure to use the same locale everywhere.
LC_ALL=C
export LC_ALL
@@ -27,9 +45,10 @@ LANG=C
export LANG
# Create the arena
-: ${TMPDIR=/tmp}
-testdir=$(mktemp -d $TMPDIR/globtest-dir.XXXXXX)
-testout=$(mktemp $TMPDIR/globtest-out.XXXXXX)
+testdir=${common_objpfx}posix/globtest-dir
+testout=${common_objpfx}posix/globtest-out
+rm -rf $testdir $testout
+mkdir $testdir
trap 'chmod 777 $testdir/noread; rm -fr $testdir $testout' 1 2 3 15
@@ -59,7 +78,7 @@ rm -f $logfile
# Normal test
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -86,7 +105,7 @@ fi
# Don't let glob sort it
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -s "$testdir" "*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -113,7 +132,7 @@ fi
# Mark directories
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -m "$testdir" "*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -140,7 +159,7 @@ fi
# Find files starting with .
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -p "$testdir" "*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -170,7 +189,7 @@ fi
# Test braces
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b "$testdir" "file{1,2}" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -183,7 +202,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b "$testdir" "{file{1,2},-file3}" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -197,7 +216,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b "$testdir" "{" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -210,7 +229,7 @@ fi
# Test NOCHECK
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -c "$testdir" "abc" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -223,7 +242,7 @@ fi
# Test NOMAGIC without magic characters
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -g "$testdir" "abc" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -236,7 +255,7 @@ fi
# Test NOMAGIC with magic characters
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -g "$testdir" "abc*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -249,7 +268,7 @@ fi
# Test NOMAGIC for subdirs
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -g "$testdir" "*/does-not-exist" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -262,7 +281,7 @@ fi
# Test subdirs correctly
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -278,7 +297,7 @@ fi
# Test subdirs for invalid names
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/1" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -291,7 +310,7 @@ fi
# Test subdirs with wildcard
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/*1_1" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -305,7 +324,7 @@ fi
# Test subdirs with ?
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/*?_?" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -320,7 +339,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/file1_1" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -333,7 +352,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*-/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -345,7 +364,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*-" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -358,7 +377,7 @@ fi
# Test subdirs with ?
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/*?_?" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -374,7 +393,7 @@ fi
# Test subdirs with [ .. ]
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "*/file1_[12]" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -390,7 +409,7 @@ fi
# Test ']' inside bracket expression
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "dir1/file1_[]12]" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -404,7 +423,7 @@ fi
# Test tilde expansion
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -q -t "$testdir" "~" |
sort >$testout
echo ~ | $CMP - $testout >> $logfile || failed=1
@@ -419,7 +438,7 @@ fi
# Test tilde expansion with trailing slash
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -q -t "$testdir" "~/" |
sort > $testout
# Some shell incorrectly(?) convert ~/ into // if ~ expands to /.
@@ -439,7 +458,7 @@ fi
# Test tilde expansion with username
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER |
sort > $testout
eval echo ~$USER | $CMP - $testout >> $logfile || failed=1
@@ -454,7 +473,7 @@ fi
# Tilde expansion shouldn't match a file
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -T "$testdir" "~file4" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -467,7 +486,7 @@ fi
# Matching \** should only find *file6
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "\**" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -481,7 +500,7 @@ fi
# ... unless NOESCAPE is used, in which case it should entries with a
# leading \.
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -e "$testdir" "\**" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -496,7 +515,7 @@ fi
# Matching \*file6 should find *file6
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "\*file6" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -509,7 +528,7 @@ fi
# GLOB_BRACE alone
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b "$testdir" '\{file7\,\}' |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -522,7 +541,7 @@ fi
# GLOB_BRACE and GLOB_NOESCAPE
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b -e "$testdir" '\{file9\,file9b\}' |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -535,7 +554,7 @@ fi
# Escaped comma
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b "$testdir" '{filea\,}' |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -548,7 +567,7 @@ fi
# Escaped closing brace
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -b "$testdir" '{fileb\}c}' |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -561,7 +580,7 @@ fi
# Try a recursive failed search
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -e "$testdir" "a*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -574,7 +593,7 @@ fi
# ... with GLOB_ERR
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -E "$testdir" "a*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -587,7 +606,7 @@ fi
# Try a recursive search in unreadable directory
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "noread/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -599,7 +618,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "noread*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -617,14 +636,14 @@ if test -z "$user"; then
fi
if test "$user" != root; then
# ... with GLOB_ERR
- ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+ ${run_program_prefix} \
${common_objpfx}posix/globtest -E "$testdir" "noread/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
GLOB_ABORTED
EOF
- ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+ ${run_program_prefix} \
${common_objpfx}posix/globtest -E "$testdir" "noread*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -638,7 +657,7 @@ fi # not run as root
# Try multiple patterns (GLOB_APPEND)
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" "file1" "*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -655,7 +674,7 @@ fi
# Try multiple patterns (GLOB_APPEND) with offset (GLOB_DOOFFS)
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -o "$testdir" "file1" "*/*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -673,7 +692,7 @@ fi
# Test NOCHECK with non-existing file in subdir.
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -c "$testdir" "*/blahblah" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -686,7 +705,7 @@ fi
# Test [[:punct:]] not matching leading period.
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -c "$testdir" "[[:punct:]]*" |
sort > $testout
cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
@@ -715,10 +734,10 @@ mkdir $testdir/dir6
echo 6 > $testdir/dir6/'file1[a'
echo 7 > $testdir/dir6/'file1[ab]'
failed=0
-v=`${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+v=`${run_program_prefix} \
${common_objpfx}posix/globtest "$testdir" 'dir3\*/file2'`
test "$v" != 'GLOB_NOMATCH' && echo "$v" >> $logfile && failed=1
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_program_prefix} \
${common_objpfx}posix/globtest -c "$testdir" \
'dir3\*/file1' 'dir3\*/file2' 'dir1/file\1_1' 'dir1/file\1_9' \
'dir2\/' 'nondir\/' 'dir4[a/fil*1' 'di*r4[a/file2' 'dir5[ab]/file[12]' \
@@ -742,8 +761,9 @@ cat <<"EOF" | $CMP - $testout >> $logfile || failed=1
`dir6/file1[ab]'
`nondir\/'
EOF
+${test_wrapper_env} \
HOME="$testdir" \
-${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+${run_via_rtld_prefix} \
${common_objpfx}posix/globtest -ct "$testdir" \
'~/dir1/file1_1' '~/dir1/file1_9' '~/dir3\*/file1' '~/dir3\*/file2' \
'~\/dir1/file1_2' |
@@ -758,15 +778,15 @@ EOF
if eval test -d ~"$USER"/; then
user=`echo "$USER" | sed -n -e 's/^\([^\\]\)\([^\\][^\\]*\)$/~\1\\\\\2/p'`
if test -n "$user"; then
- ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+ ${run_program_prefix} \
${common_objpfx}posix/globtest -ctq "$testdir" "$user/" |
sort > $testout
eval echo ~$USER/ | $CMP - $testout >> $logfile || failed=1
- ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+ ${run_program_prefix} \
${common_objpfx}posix/globtest -ctq "$testdir" "$user\\/" |
sort > $testout
eval echo ~$USER/ | $CMP - $testout >> $logfile || failed=1
- ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
+ ${run_program_prefix} \
${common_objpfx}posix/globtest -ctq "$testdir" "$user" |
sort > $testout
eval echo ~$USER | $CMP - $testout >> $logfile || failed=1
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 373a52ecff..e85b235145 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -932,8 +932,12 @@ init_word_char (re_dfa_t *dfa)
{
if (sizeof (dfa->word_char[0]) == 8)
{
- dfa->word_char[0] = UINT64_C (0x03ff000000000000);
- dfa->word_char[1] = UINT64_C (0x07fffffe87fffffe);
+ /* The extra temporaries here avoid "implicitly truncated"
+ warnings in the case when this is dead code, i.e. 32-bit. */
+ const uint64_t wc0 = UINT64_C (0x03ff000000000000);
+ const uint64_t wc1 = UINT64_C (0x07fffffe87fffffe);
+ dfa->word_char[0] = wc0;
+ dfa->word_char[1] = wc1;
i = 2;
}
else if (sizeof (dfa->word_char[0]) == 4)
diff --git a/posix/regex.c b/posix/regex.c
index 6d0a8976ac..3ab9a6adcb 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -56,6 +56,9 @@
#undefs RE_DUP_MAX and sets it to the right value. */
#include <limits.h>
+/* This header defines the MIN and MAX macros. */
+#include <sys/param.h>
+
#include <regex.h>
#include "regex_internal.h"
diff --git a/posix/tst-getconf.sh b/posix/tst-getconf.sh
index 9630ebf4ef..701164b4a0 100644
--- a/posix/tst-getconf.sh
+++ b/posix/tst-getconf.sh
@@ -1,18 +1,26 @@
#! /bin/sh
+# Test for getconf(1).
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
common_objpfx=$1; shift
-elf_objpfx=$1; shift
-if [ $# -eq 0 ]; then
- # Static case.
- runit() {
- "$@"
- }
-else
- rtld_installed_name=$1; shift
- runit() {
- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
- }
-fi
+run_getconf=$1; shift
logfile=$common_objpfx/posix/tst-getconf.out
@@ -26,7 +34,7 @@ rm -f $logfile
result=0
while read name; do
echo -n "getconf $name: " >> $logfile
- runit ${common_objpfx}posix/getconf "$name" 2>> $logfile >> $logfile
+ ${run_getconf} "$name" < /dev/null 2>> $logfile >> $logfile
if test $? -ne 0; then
echo "*** $name FAILED" >> $logfile
result=1
@@ -204,7 +212,7 @@ EOF
while read name; do
echo -n "getconf $name /: " >> $logfile
- runit ${common_objpfx}posix/getconf "$name" / 2>> $logfile >> $logfile
+ ${run_getconf} "$name" / < /dev/null 2>> $logfile >> $logfile
if test $? -ne 0; then
echo "*** $name FAILED" >> $logfile
result=1
diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
index 298fe6695c..a37be36e6a 100644
--- a/posix/tst-rfc3484-2.c
+++ b/posix/tst-rfc3484-2.c
@@ -53,6 +53,7 @@ _res_hconf_init (void)
{
}
+#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"
service_user *__nss_hosts_database attribute_hidden;
diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
index 701f534bb1..493e76015c 100644
--- a/posix/tst-rfc3484-3.c
+++ b/posix/tst-rfc3484-3.c
@@ -53,6 +53,7 @@ _res_hconf_init (void)
{
}
+#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"
service_user *__nss_hosts_database attribute_hidden;
diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
index f77dc4c2cb..db3ae1b7bb 100644
--- a/posix/tst-rfc3484.c
+++ b/posix/tst-rfc3484.c
@@ -53,6 +53,7 @@ _res_hconf_init (void)
{
}
+#undef USE_NSCD
#include "../sysdeps/posix/getaddrinfo.c"
service_user *__nss_hosts_database attribute_hidden;
@@ -70,6 +71,9 @@ service_user *__nss_hosts_database attribute_hidden;
struct sockaddr_in addrs[] =
{
+ { .sin_family = AF_INET, .sin_addr = { h (0x0aa85f19) } },
+ { .sin_family = AF_INET, .sin_addr = { h (0xac105f19) } },
+ { .sin_family = AF_INET, .sin_addr = { h (0xc0000219) } },
{ .sin_family = AF_INET, .sin_addr = { h (0xc0a86d1d) } },
{ .sin_family = AF_INET, .sin_addr = { h (0xc0a85d03) } },
{ .sin_family = AF_INET, .sin_addr = { h (0xc0a82c3d) } },
@@ -85,7 +89,7 @@ static size_t order[naddrs];
static int expected[naddrs] =
{
- 6, 1, 0, 3, 2, 4, 5
+ 9, 4, 3, 6, 5, 7, 8, 2, 0, 1
};
diff --git a/posix/unistd.h b/posix/unistd.h
index 9839761b52..88d711ad3e 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -719,34 +719,34 @@ extern int group_member (__gid_t __gid) __THROW;
If the calling process is the super-user, set the real
and effective user IDs, and the saved set-user-ID to UID;
if not, the effective user ID is set to UID. */
-extern int setuid (__uid_t __uid) __THROW;
+extern int setuid (__uid_t __uid) __THROW __wur;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Set the real user ID of the calling process to RUID,
and the effective user ID of the calling process to EUID. */
-extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW;
+extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW __wur;
#endif
#if defined __USE_BSD || defined __USE_XOPEN2K
/* Set the effective user ID of the calling process to UID. */
-extern int seteuid (__uid_t __uid) __THROW;
+extern int seteuid (__uid_t __uid) __THROW __wur;
#endif /* Use BSD. */
/* Set the group ID of the calling process to GID.
If the calling process is the super-user, set the real
and effective group IDs, and the saved set-group-ID to GID;
if not, the effective group ID is set to GID. */
-extern int setgid (__gid_t __gid) __THROW;
+extern int setgid (__gid_t __gid) __THROW __wur;
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Set the real group ID of the calling process to RGID,
and the effective group ID of the calling process to EGID. */
-extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW;
+extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW __wur;
#endif
#if defined __USE_BSD || defined __USE_XOPEN2K
/* Set the effective group ID of the calling process to GID. */
-extern int setegid (__gid_t __gid) __THROW;
+extern int setegid (__gid_t __gid) __THROW __wur;
#endif /* Use BSD. */
#ifdef __USE_GNU
@@ -763,12 +763,12 @@ extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
/* Set the real user ID, effective user ID, and saved-set user ID,
of the calling process to RUID, EUID, and SUID, respectively. */
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
- __THROW;
+ __THROW __wur;
/* Set the real group ID, effective group ID, and saved-set group ID,
of the calling process to RGID, EGID, and SGID, respectively. */
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
- __THROW;
+ __THROW __wur;
#endif
diff --git a/posix/wordexp-tst.sh b/posix/wordexp-tst.sh
index 9654457f5a..f669195cbd 100755
--- a/posix/wordexp-tst.sh
+++ b/posix/wordexp-tst.sh
@@ -1,12 +1,30 @@
-#!/bin/sh
+#! /bin/sh
+# Test for wordexp(3).
+# Copyright (C) 1998-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
# Some of these tests may look a little weird.
# The first parameter to wordexp-test is what it gives to wordexp.
# The others are just there to be parameters.
common_objpfx=$1; shift
-elf_objpfx=$1; shift
-rtld_installed_name=$1; shift
+run_program_prefix=$1; shift
logfile=${common_objpfx}posix/wordexp-tst.out
testout=${common_objpfx}posix/wordexp-test-result
@@ -20,7 +38,7 @@ IFS=" \
export IFS
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$*' > ${testout}1
cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1
wordexp returned 0
@@ -32,7 +50,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '${*}' unquoted > ${testout}2
cat <<"EOF" | cmp - ${testout}2 >> $logfile || failed=1
wordexp returned 0
@@ -45,7 +63,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$@' unquoted > ${testout}3
cat <<"EOF" | cmp - ${testout}3 >> $logfile || failed=1
wordexp returned 0
@@ -58,7 +76,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '"$* quoted"' param > ${testout}4
cat <<"EOF" | cmp - ${testout}4 >> $logfile || failed=1
wordexp returned 0
@@ -70,7 +88,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '"$@ quoted"' param > ${testout}5
cat <<"EOF" | cmp - ${testout}5 >> $logfile || failed=1
wordexp returned 0
@@ -84,7 +102,7 @@ fi
# Why? Because bash does it that way..
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$#' 2 3 4 5 > ${testout}6
cat <<"EOF" | cmp - ${testout}6 >> $logfile || failed=1
wordexp returned 0
@@ -96,7 +114,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '$2 ${3} $4' 2nd 3rd "4 th" > ${testout}7
cat <<"EOF" | cmp - ${testout}7 >> $logfile || failed=1
wordexp returned 0
@@ -111,7 +129,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '${11}' 2 3 4 5 6 7 8 9 10 11 > ${testout}8
cat <<"EOF" | cmp - ${testout}8 >> $logfile || failed=1
wordexp returned 0
@@ -123,7 +141,7 @@ if test $failed -ne 0; then
fi
failed=0
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '"a $@ b"' c d > ${testout}9
cat <<"EOF" | cmp - ${testout}9 >> $logfile || failed=1
wordexp returned 0
@@ -136,7 +154,7 @@ if test $failed -ne 0; then
status=1
fi
-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
+${run_program_prefix} \
${common_objpfx}posix/wordexp-test '${#@} ${#2} *$**' two 3 4 > ${testout}10
cat <<"EOF" | cmp - ${testout}10 || failed=1
wordexp returned 0
diff --git a/posix/wordexp.c b/posix/wordexp.c
index 5ace13720b..d5a282049b 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -1,5 +1,5 @@
/* POSIX.2 wordexp implementation.
- Copyright (C) 1997-2003,2005,2006,2008,2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Tim Waugh <tim@cyberelk.demon.co.uk>.
@@ -27,6 +27,7 @@
#include <paths.h>
#include <pwd.h>
#include <signal.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/pwd/Makefile b/pwd/Makefile
index 1da4059cb7..ec06c8e94d 100644
--- a/pwd/Makefile
+++ b/pwd/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,1996-1999,2003,2004 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -31,11 +31,9 @@ include ../Rules
ifeq ($(have-thread-library),yes)
-CFLAGS-getpwuid_r.c = -DUSE_NSCD=1
-CFLAGS-getpwnam_r.c = -DUSE_NSCD=1
CFLAGS-getpwent_r.c = -fexceptions
CFLAGS-getpwent.c = -fexceptions
CFLAGS-getpw.c = -fexceptions
-CFLAGS-fgetpwent_r.c = -D_IO_MTSAFE_IO
+CFLAGS-fgetpwent_r.c = $(libio-mtsafe)
endif
diff --git a/resolv/Makefile b/resolv/Makefile
index 4777317b17..a398694772 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -108,7 +108,7 @@ $(objpfx)tst-leaks: $(objpfx)libresolv.so
tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
$(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-leaks
endif
@@ -117,7 +117,7 @@ endif
tst-leaks2-ENV = MALLOC_TRACE=$(objpfx)tst-leaks2.mtrace
$(objpfx)mtrace-tst-leaks2: $(objpfx)tst-leaks2.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
ifneq (no,$(PERL))
xtests: $(objpfx)mtrace-tst-leaks2
endif
diff --git a/rt/Makefile b/rt/Makefile
index 941c471688..4805f8b5b7 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -36,9 +36,12 @@ mq-routines := mq_open mq_close mq_unlink mq_getattr mq_setattr \
mq_notify mq_send mq_receive mq_timedsend \
mq_timedreceive
+routines = $(clock-routines)
+
librt-routines = $(aio-routines) \
- $(clock-routines) $(timer-routines) \
- $(shm-routines) $(mq-routines)
+ $(timer-routines) \
+ $(shm-routines) $(mq-routines) \
+ clock-compat
tests := tst-shm tst-clock tst-clock_nanosleep tst-timer tst-timer2 \
tst-aio tst-aio64 tst-aio2 tst-aio3 tst-aio4 tst-aio5 tst-aio6 \
@@ -77,4 +80,4 @@ ifeq (yes,$(build-bounded))
$(tests:%=$(objpfx)%-bp): $(objpfx)librt_b.a $(bounded-thread-library)
endif
-tst-mqueue7-ARGS = -- $(built-program-cmd)
+tst-mqueue7-ARGS = -- $(host-built-program-cmd)
diff --git a/rt/Versions b/rt/Versions
index 2921c9c8ab..91e3fd2a20 100644
--- a/rt/Versions
+++ b/rt/Versions
@@ -1,3 +1,15 @@
+libc {
+ GLIBC_2.17 {
+ # c*
+ clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
+ clock_nanosleep;
+ }
+ GLIBC_PRIVATE {
+ __clock_getres; __clock_gettime; __clock_settime; __clock_getcpuclockid;
+ __clock_nanosleep;
+ }
+}
+
librt {
GLIBC_2.1 {
# AIO functions.
@@ -6,7 +18,7 @@ librt {
aio_suspend64; aio_write; aio_write64; lio_listio; lio_listio64;
}
GLIBC_2.2 {
- # c*
+ # These have moved to libc and are still here only for compatibility.
clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
clock_nanosleep;
diff --git a/rt/clock-compat.c b/rt/clock-compat.c
new file mode 100644
index 0000000000..16e4109210
--- /dev/null
+++ b/rt/clock-compat.c
@@ -0,0 +1,65 @@
+/* ABI compatibility redirects for clock_* symbols in librt.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <shlib-compat.h>
+
+/* The clock_* symbols were originally defined in librt and so
+ are part of its ABI. As of 2.17, they have moved to libc.
+ So we supply definitions for librt that just redirect to
+ their libc counterparts. */
+
+#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_17)
+
+#include <time.h>
+
+#ifdef HAVE_IFUNC
+# define COMPAT_REDIRECT(name, proto, arglist) \
+ __typeof (name) *name##_ifunc (void) asm (#name); \
+ __typeof (name) *name##_ifunc (void) \
+ { \
+ return &__##name; \
+ } \
+ asm (".type " #name ", %gnu_indirect_function");
+#else
+# define COMPAT_REDIRECT(name, proto, arglist) \
+ int \
+ name proto \
+ { \
+ return __##name arglist; \
+ }
+#endif
+
+COMPAT_REDIRECT (clock_getres,
+ (clockid_t clock_id, struct timespec *res),
+ (clock_id, res))
+COMPAT_REDIRECT (clock_gettime,
+ (clockid_t clock_id, struct timespec *tp),
+ (clock_id, tp))
+COMPAT_REDIRECT (clock_settime,
+ (clockid_t clock_id, const struct timespec *tp),
+ (clock_id, tp))
+COMPAT_REDIRECT (clock_getcpuclockid,
+ (pid_t pid, clockid_t *clock_id),
+ (pid, clock_id))
+COMPAT_REDIRECT (clock_nanosleep,
+ (clockid_t clock_id, int flags,
+ const struct timespec *req,
+ struct timespec *rem),
+ (clock_id, flags, req, rem))
+
+#endif
diff --git a/rt/clock_getcpuclockid.c b/rt/clock_getcpuclockid.c
index 08972f54fd..4bead25685 100644
--- a/rt/clock_getcpuclockid.c
+++ b/rt/clock_getcpuclockid.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Get a clockid_t for the process CPU clock of a given process. Generic.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,3 +37,4 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
return ENOENT;
#endif
}
+strong_alias (clock_getcpuclockid, __clock_getcpuclockid)
diff --git a/rt/clock_getres.c b/rt/clock_getres.c
index 576c9bf738..162c8a5697 100644
--- a/rt/clock_getres.c
+++ b/rt/clock_getres.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Get the resolution of a clock. Stub version.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +26,6 @@ clock_getres (clockid_t clock_id, struct timespec *res)
__set_errno (ENOSYS);
return -1;
}
+strong_alias (clock_getres, __clock_getres)
stub_warning (clock_getres)
#include <stub-tag.h>
diff --git a/rt/clock_gettime.c b/rt/clock_gettime.c
index 1203f01179..5139e8724c 100644
--- a/rt/clock_gettime.c
+++ b/rt/clock_gettime.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Get the current value of a clock. Stub version.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +26,6 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
__set_errno (ENOSYS);
return -1;
}
-librt_hidden_def (clock_gettime)
+strong_alias (clock_gettime, __clock_gettime)
stub_warning (clock_gettime)
#include <stub-tag.h>
diff --git a/rt/clock_nanosleep.c b/rt/clock_nanosleep.c
index 954a615018..d9a0e92d4b 100644
--- a/rt/clock_nanosleep.c
+++ b/rt/clock_nanosleep.c
@@ -1,5 +1,5 @@
/* High-resolution sleep with the specified clock. Stub version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,8 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <errno.h>
-#include <sys/time.h>
-
+#include <time.h>
int
clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
@@ -34,5 +33,6 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
/* Not implemented. */
return ENOSYS;
}
+strong_alias (clock_nanosleep, __clock_nanosleep)
stub_warning (clock_nanosleep)
#include <stub-tag.h>
diff --git a/rt/clock_settime.c b/rt/clock_settime.c
index 3b3c3c48d5..6f7cdd6edc 100644
--- a/rt/clock_settime.c
+++ b/rt/clock_settime.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1999 Free Software Foundation, Inc.
+/* Set a clock to a given value. Stub version.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,5 +26,6 @@ clock_settime (clockid_t clock_id, const struct timespec *tp)
__set_errno (ENOSYS);
return -1;
}
+strong_alias (clock_settime, __clock_settime)
stub_warning (clock_settime)
#include <stub-tag.h>
diff --git a/rt/tst-aio2.c b/rt/tst-aio2.c
index 897d37d8bd..01a94fe270 100644
--- a/rt/tst-aio2.c
+++ b/rt/tst-aio2.c
@@ -1,5 +1,5 @@
/* Test for notification mechanism in lio_listio.
- Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
+#include <pthread.h>
static pthread_barrier_t b;
diff --git a/rt/tst-aio3.c b/rt/tst-aio3.c
index 4d1fe8e979..133e386cd3 100644
--- a/rt/tst-aio3.c
+++ b/rt/tst-aio3.c
@@ -1,5 +1,5 @@
/* Test for notification mechanism in lio_listio.
- Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
+#include <pthread.h>
static pthread_barrier_t b;
diff --git a/rt/tst-shm.c b/rt/tst-shm.c
index 92593bd273..457b075a38 100644
--- a/rt/tst-shm.c
+++ b/rt/tst-shm.c
@@ -73,7 +73,7 @@ worker (int write_now)
error (EXIT_FAILURE, 0, "size incorrect");
mem = mmap (NULL, 4000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- if (mem == NULL)
+ if (mem == MAP_FAILED)
error (EXIT_FAILURE, 0, "mmap failed");
ts.tv_sec = 0;
diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
index 08ed880c5d..e914c4bbd4 100755
--- a/scripts/check-local-headers.sh
+++ b/scripts/check-local-headers.sh
@@ -1,5 +1,5 @@
#! /bin/bash
-# Copyright (C) 2005,2007,2009,2011 Free Software Foundation, Inc.
+# Copyright (C) 2005-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,13 +22,17 @@ objpfx="$2"
# To avoid long paths.
cd "$objpfx"
+# OK if *.os is missing.
+shopt -s nullglob
+
# Search all dependency files for file names in the include directory.
# There are a few system headers we are known to use.
+# These include Linux kernel headers (asm*, arch, and linux).
exec ${AWK} -v includedir="$includedir" '
BEGIN {
status = 0
exclude = "^" includedir \
- "/(.*-.*-.*/|)(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
+ "/(.*-.*-.*/|)(asm[-/]|arch|linux/|selinux/|gd|nss3/|sys/(capability|sdt(|-config))\\.h|libaudit\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{
diff --git a/scripts/config.guess b/scripts/config.guess
index 49ba16f15c..872b96a161 100755
--- a/scripts/config.guess
+++ b/scripts/config.guess
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-01-01'
+timestamp='2012-09-25'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,9 +17,7 @@ timestamp='2012-01-01'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -202,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +306,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -803,6 +805,9 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -863,6 +868,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -1196,6 +1208,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1251,7 +1266,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1320,11 +1335,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff --git a/scripts/config.sub b/scripts/config.sub
index b6f695a83b..bdda9e4a32 100755
--- a/scripts/config.sub
+++ b/scripts/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-01-28'
+timestamp='2012-08-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@ timestamp='2012-01-28'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -125,7 +123,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
@@ -227,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -251,6 +255,7 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
@@ -362,6 +367,7 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
@@ -785,6 +791,10 @@ case $basic_machine in
microblaze)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1346,15 +1356,15 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1537,6 +1547,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
diff --git a/scripts/cross-test-ssh.sh b/scripts/cross-test-ssh.sh
new file mode 100755
index 0000000000..f09c98ec11
--- /dev/null
+++ b/scripts/cross-test-ssh.sh
@@ -0,0 +1,148 @@
+#! /bin/bash
+# Run a testcase on a remote system, via ssh.
+# Copyright (C) 2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+# usage: cross-test-ssh.sh [--ssh SSH] HOST COMMAND ...
+# Run with --help flag to get more detailed help.
+
+progname="$(basename $0)"
+env_blacklist='HOME LOGNAME MAIL PATH SHELL SHLVL SSH_CLIENT SSH_CONNECTION
+USER TERM TERMCAP PWD'
+
+usage="usage: ${progname} [--ssh SSH] HOST COMMAND ..."
+help="Run a glibc test COMMAND on the remote machine HOST, via ssh,
+passing environment variables, preserving the current working directory,
+and respecting quoting.
+
+If the '--ssh SSH' flag is present, use SSH as the SSH command,
+instead of ordinary 'ssh'.
+
+To use this to run glibc tests, invoke the tests as follows:
+
+ $ make test-wrapper='ABSPATH/cross-test-ssh.sh HOST' tests
+
+where ABSPATH is the absolute path to this script, and HOST is the
+name of the machine to connect to via ssh.
+
+If you need to connect to the test machine as a different user, you
+may specify that just as you would to SSH:
+
+ $ make test-wrapper='ABSPATH/cross-test-ssh.sh USER@HOST' tests
+
+Naturally, the remote user must have an appropriate public key, and
+you will want to ensure that SSH does not prompt interactively for a
+password on each connection.
+
+HOST and the build machines (on which 'make check' is being run) must
+share a filesystem; all files needed by the tests must be visible at
+the same paths on both machines.
+
+${progname} runs COMMAND in the same directory on the HOST that
+${progname} itself is run in on the build machine.
+
+The command and arguments are passed to the remote host in a way that
+avoids any further shell substitution or expansion, on the assumption
+that the shell on the build machine has already done them
+appropriately.
+
+${progname} propagates the values all environment variables through to
+the remote target, except the following:
+${env_blacklist}"
+
+ssh='ssh'
+while [ $# -gt 0 ]; do
+ case "$1" in
+
+ "--ssh")
+ shift
+ if [ $# -lt 1 ]; then
+ break
+ fi
+ ssh="$1"
+ ;;
+
+ "--help")
+ echo "$usage"
+ echo "$help"
+ exit 0
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+if [ $# -lt 1 ]; then
+ echo "$usage" >&2
+ echo "Type '${progname} --help' for more detailed help." >&2
+ exit 1
+fi
+
+host="$1"; shift
+
+# Print the sequence of arguments as strings properly quoted for the
+# Bourne shell, separated by spaces.
+bourne_quote ()
+{
+ local arg qarg
+ for arg in "$@"; do
+ qarg=${arg//\'/\'\\\'\'}
+ echo -n "'$qarg' "
+ done
+}
+
+# Remove unnecessary newlines from a Bourne shell command sequence.
+remove_newlines ()
+{
+ sed -n \
+ -e '1h' \
+ -e '2,$H' \
+ -e '${g
+ s/\([^\]\)\n/\1; /g
+ p
+ }'
+}
+
+# Unset all variables from the blacklist. Then echo all exported
+# variables. The 'export -p' command adds backslashes for environment
+# variables which contain newlines.
+blacklist_exports ()
+{
+ (unset ${env_blacklist}; export -p) | remove_newlines
+}
+
+# Produce properly quoted Bourne shell arguments for 'env' to carry
+# over the current environment, less blacklisted variables.
+exports="$(blacklist_exports)"
+exports="${exports:+${exports}; }"
+
+# Transform the current argument list into a properly quoted Bourne shell
+# command string.
+command="$(bourne_quote "$@")"
+
+# Add commands to set environment variables and the current directory.
+command="${exports}cd $PWD; ${command}"
+
+# HOST's sshd simply concatenates its arguments with spaces and
+# passes them to some shell. We want to force the use of /bin/sh,
+# so we need to re-quote the whole command to ensure it appears as
+# the sole argument of the '-c' option.
+full_command="$(bourne_quote "${command}")"
+$ssh "$host" /bin/sh -c "$full_command"
diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl
index 1b22086bf9..0700770858 100755
--- a/scripts/test-installation.pl
+++ b/scripts/test-installation.pl
@@ -25,6 +25,11 @@ if ($ENV{CC}) {
} else {
$CC= "gcc";
}
+if ($ENV{LD_SO}) {
+ $LD_SO = $ENV{LD_SO};
+} else {
+ $LD_SO = "";
+}
sub usage {
print "Usage: test-installation [soversions.mk]\n";
@@ -112,6 +117,8 @@ while (<SOVERSIONS>) {
$link_libs .= " -l$name";
$versions{$name} = $version;
}
+ } elsif ($LD_SO ne "") {
+ ($ld_so_name, $ld_so_version) = split ('\.so\.', $LD_SO);
} else {
if (/^ld\.so/) {
($ld_so_name, $ld_so_version)= /=(.*)\.so\.(.*)$/;
diff --git a/shadow/Makefile b/shadow/Makefile
index 7c17a7f9be..4b17b29d10 100644
--- a/shadow/Makefile
+++ b/shadow/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -30,8 +30,8 @@ tests = tst-shadow
CFLAGS-getspent_r.c = -fexceptions
CFLAGS-getspent.c = -fexceptions
CFLAGS-fgetspent.c = -fexceptions
-CFLAGS-fgetspent_r.c = -fexceptions -D_IO_MTSAFE_IO
-CFLAGS-putspent.c = -fexceptions -D_IO_MTSAFE_IO
+CFLAGS-fgetspent_r.c = -fexceptions $(libio-mtsafe)
+CFLAGS-putspent.c = -fexceptions $(libio-mtsafe)
CFLAGS-getspnam.c = -fexceptions
CFLAGS-getspnam_r.c = -fexceptions
diff --git a/shadow/getspent.c b/shadow/getspent.c
index 50dfcd332d..d2a1db67c9 100644
--- a/shadow/getspent.c
+++ b/shadow/getspent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define DATABASE_NAME shadow
#define BUFLEN 1024
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXent.c"
diff --git a/shadow/getspent_r.c b/shadow/getspent_r.c
index 6292781dc3..27cb5e8515 100644
--- a/shadow/getspent_r.c
+++ b/shadow/getspent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define DATABASE_NAME shadow
#define BUFLEN 1024
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXent_r.c"
diff --git a/shadow/getspnam.c b/shadow/getspnam.c
index beb0570645..59ed79daa7 100644
--- a/shadow/getspnam.c
+++ b/shadow/getspnam.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES name
#define BUFLEN 1024
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY.c"
diff --git a/shadow/getspnam_r.c b/shadow/getspnam_r.c
index 99c04f9f46..e1b652469c 100644
--- a/shadow/getspnam_r.c
+++ b/shadow/getspnam_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -26,4 +26,7 @@
#define ADD_VARIABLES name
#define BUFLEN 1024
+/* There is no nscd support for the shadow file. */
+#undef USE_NSCD
+
#include "../nss/getXXbyYY_r.c"
diff --git a/socket/accept4.c b/socket/accept4.c
index 7c7e2dd9a4..fad2cc696f 100644
--- a/socket/accept4.c
+++ b/socket/accept4.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@
new socket's descriptor, or -1 for errors. The operation can be influenced
by the FLAGS parameter. */
int
-accept4 (fd, addr, addr_len, flags)
+__libc_accept4 (fd, addr, addr_len, flags)
int fd;
__SOCKADDR_ARG addr;
socklen_t *addr_len;
@@ -34,7 +34,7 @@ accept4 (fd, addr, addr_len, flags)
__set_errno (ENOSYS);
return -1;
}
-libc_hidden_def (accept4)
+weak_alias (__libc_accept4, accept4)
stub_warning (accept4)
diff --git a/socket/have_sock_cloexec.c b/socket/have_sock_cloexec.c
index d57cbcfaad..8cf0959462 100644
--- a/socket/have_sock_cloexec.c
+++ b/socket/have_sock_cloexec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,9 +15,18 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <fcntl.h>
#include <sys/socket.h>
#include <kernel-features.h>
#if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC
int __have_sock_cloexec;
#endif
+
+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2
+int __have_pipe2;
+#endif
+
+#if defined O_CLOEXEC && !defined __ASSUME_DUP3
+int __have_dup3;
+#endif
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index a29924bc7c..f7f152c2d7 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2009, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -57,23 +57,23 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \
- bug25
+ bug25 tst-printf-round
test-srcs = tst-unbputc tst-printf
include ../Rules
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
.PHONY: do-tst-unbputc do-tst-printf
tests: do-tst-unbputc do-tst-printf
do-tst-unbputc: $(objpfx)tst-unbputc.out
-$(objpfx)tst-unbputc.out: $(objpfx)tst-unbputc tst-unbputc.sh
- $(SHELL) -e tst-unbputc.sh $(common-objpfx) '$(run-program-prefix)'
+$(objpfx)tst-unbputc.out: tst-unbputc.sh $(objpfx)tst-unbputc
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
do-tst-printf: $(objpfx)tst-printf.out
-$(objpfx)tst-printf.out: $(objpfx)tst-printf tst-printf.sh
- $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)'
+$(objpfx)tst-printf.out: tst-printf.sh $(objpfx)tst-printf
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)'
endif
CFLAGS-vfprintf.c = -Wno-uninitialized
@@ -116,6 +116,7 @@ CFLAGS-scanf17.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
# We know the test has a format string problem.
CFLAGS-tst-sprintf.c = -Wno-format
+tst-sprintf-ENV = LOCPATH=$(common-objpfx)localedata
tst-sscanf-ENV = LOCPATH=$(common-objpfx)localedata
tst-swprintf-ENV = LOCPATH=$(common-objpfx)localedata
test-vfprintf-ENV = LOCPATH=$(common-objpfx)localedata
@@ -123,10 +124,15 @@ scanf13-ENV = LOCPATH=$(common-objpfx)localedata
bug14-ENV = LOCPATH=$(common-objpfx)localedata
tst-grouping-ENV = LOCPATH=$(common-objpfx)localedata
-ifneq (,$(filter %REENTRANT, $(defines)))
-CPPFLAGS += -D_IO_MTSAFE_IO
-endif
+CPPFLAGS += $(libio-mtsafe)
$(objpfx)tst-setvbuf1.out: tst-setvbuf1.expect $(objpfx)tst-setvbuf1
$(built-program-cmd) > $@ 2>&1
cmp tst-setvbuf1.expect $@
+
+ifeq ($(build-shared),yes)
+link-libm = $(common-objpfx)math/libm.so
+else
+link-libm = $(common-objpfx)math/libm.a
+endif
+$(objpfx)tst-printf-round: $(link-libm)
diff --git a/stdio-common/_i18n_number.h b/stdio-common/_i18n_number.h
index f18b152852..17d99112fb 100644
--- a/stdio-common/_i18n_number.h
+++ b/stdio-common/_i18n_number.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 2000.
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#include <stdbool.h>
#include <wchar.h>
#include <wctype.h>
diff --git a/stdio-common/_itoa.c b/stdio-common/_itoa.c
index ebb3e857c6..6759231886 100644
--- a/stdio-common/_itoa.c
+++ b/stdio-common/_itoa.c
@@ -206,7 +206,7 @@ _itoa (value, buflim, base, upper_case)
{
# define RUN_2N(BITS) \
do \
- { \
+ { \
/* `unsigned long long int' always has 64 bits. */ \
mp_limb_t work_hi = value >> (64 - BITS_PER_MP_LIMB); \
\
@@ -264,7 +264,8 @@ _itoa (value, buflim, base, upper_case)
if (brec->flag)
while (value != 0)
{
- mp_limb_t quo, rem, x, dummy;
+ mp_limb_t quo, rem, x;
+ mp_limb_t dummy __attribute__ ((unused));
umul_ppmm (x, dummy, value, base_multiplier);
quo = (x + ((value - x) >> 1)) >> (brec->post_shift - 1);
@@ -275,7 +276,8 @@ _itoa (value, buflim, base, upper_case)
else
while (value != 0)
{
- mp_limb_t quo, rem, x, dummy;
+ mp_limb_t quo, rem, x;
+ mp_limb_t dummy __attribute__ ((unused));
umul_ppmm (x, dummy, value, base_multiplier);
quo = x >> brec->post_shift;
@@ -401,7 +403,8 @@ _itoa (value, buflim, base, upper_case)
if (brec->flag)
while (ti != 0)
{
- mp_limb_t quo, rem, x, dummy;
+ mp_limb_t quo, rem, x;
+ mp_limb_t dummy __attribute__ ((unused));
umul_ppmm (x, dummy, ti, base_multiplier);
quo = (x + ((ti - x) >> 1)) >> (brec->post_shift - 1);
@@ -413,7 +416,8 @@ _itoa (value, buflim, base, upper_case)
else
while (ti != 0)
{
- mp_limb_t quo, rem, x, dummy;
+ mp_limb_t quo, rem, x;
+ mp_limb_t dummy __attribute__ ((unused));
umul_ppmm (x, dummy, ti, base_multiplier);
quo = x >> brec->post_shift;
diff --git a/stdio-common/_itowa.c b/stdio-common/_itowa.c
index 9381d33b6c..6561ee1585 100644
--- a/stdio-common/_itowa.c
+++ b/stdio-common/_itowa.c
@@ -1,5 +1,5 @@
/* Internal function for converting integers to ASCII.
- Copyright (C) 1994-1996,1999,2000,2002,2007 Free Software Foundation, Inc.
+ Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund <tege@matematik.su.se>
and Ulrich Drepper <drepper@gnu.org>.
@@ -102,7 +102,7 @@ _itowa (value, buflim, base, upper_case)
{
# define RUN_2N(BITS) \
do \
- { \
+ { \
/* `unsigned long long int' always has 64 bits. */ \
mp_limb_t work_hi = value >> (64 - BITS_PER_MP_LIMB); \
\
@@ -296,7 +296,8 @@ _itowa (value, buflim, base, upper_case)
if (brec->flag)
while (ti != 0)
{
- mp_limb_t quo, rem, x, dummy;
+ mp_limb_t quo, rem, x;
+ mp_limb_t dummy __attribute__ ((unused));
umul_ppmm (x, dummy, ti, base_multiplier);
quo = (x + ((ti - x) >> 1)) >> (brec->post_shift - 1);
@@ -308,7 +309,8 @@ _itowa (value, buflim, base, upper_case)
else
while (ti != 0)
{
- mp_limb_t quo, rem, x, dummy;
+ mp_limb_t quo, rem, x;
+ mp_limb_t dummy __attribute__ ((unused));
umul_ppmm (x, dummy, ti, base_multiplier);
quo = x >> brec->post_shift;
diff --git a/stdio-common/isoc99_scanf.c b/stdio-common/isoc99_scanf.c
index 2e04e700e4..2bd1e512c1 100644
--- a/stdio-common/isoc99_scanf.c
+++ b/stdio-common/isoc99_scanf.c
@@ -28,13 +28,17 @@ __isoc99_scanf (const char *format, ...)
va_list arg;
int done;
+#ifdef _IO_MTSAFE_IO
_IO_acquire_lock_clear_flags2 (stdin);
+#endif
stdin->_flags2 |= _IO_FLAGS2_SCANF_STD;
va_start (arg, format);
done = _IO_vfscanf (stdin, format, arg, NULL);
va_end (arg);
+#ifdef _IO_MTSAFE_IO
_IO_release_lock (stdin);
+#endif
return done;
}
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index 5f3c904254..6e2b57c039 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -39,6 +39,8 @@
#include <unistd.h>
#include <stdlib.h>
#include <wchar.h>
+#include <stdbool.h>
+#include <rounding-mode.h>
#ifdef COMPILE_WPRINTF
# define CHAR_T wchar_t
@@ -197,9 +199,6 @@ ___printf_fp (FILE *fp,
/* Temporary bignum value. */
MPN_VAR(tmp);
- /* Digit which is result of last hack_digit() call. */
- wchar_t digit;
-
/* The type of output format that will be used: 'e'/'E' or 'f'. */
int type;
@@ -955,34 +954,31 @@ ___printf_fp (FILE *fp,
}
/* Do rounding. */
- digit = hack_digit ();
- if (digit > L'4')
+ wchar_t last_digit = wcp[-1] != decimalwc ? wcp[-1] : wcp[-2];
+ wchar_t next_digit = hack_digit ();
+ bool more_bits;
+ if (next_digit != L'0' && next_digit != L'5')
+ more_bits = true;
+ else if (fracsize == 1 && frac[0] == 0)
+ /* Rest of the number is zero. */
+ more_bits = false;
+ else if (scalesize == 0)
+ {
+ /* Here we have to see whether all limbs are zero since no
+ normalization happened. */
+ size_t lcnt = fracsize;
+ while (lcnt >= 1 && frac[lcnt - 1] == 0)
+ --lcnt;
+ more_bits = lcnt > 0;
+ }
+ else
+ more_bits = true;
+ int rounding_mode = get_rounding_mode ();
+ if (round_away (is_neg, (last_digit - L'0') & 1, next_digit >= L'5',
+ more_bits, rounding_mode))
{
wchar_t *wtp = wcp;
- if (digit == L'5'
- && ((*(wcp - 1) != decimalwc && (*(wcp - 1) & 1) == 0)
- || ((*(wcp - 1) == decimalwc && (*(wcp - 2) & 1) == 0))))
- {
- /* This is the critical case. */
- if (fracsize == 1 && frac[0] == 0)
- /* Rest of the number is zero -> round to even.
- (IEEE 754-1985 4.1 says this is the default rounding.) */
- goto do_expo;
- else if (scalesize == 0)
- {
- /* Here we have to see whether all limbs are zero since no
- normalization happened. */
- size_t lcnt = fracsize;
- while (lcnt >= 1 && frac[lcnt - 1] == 0)
- --lcnt;
- if (lcnt == 0)
- /* Rest of the number is zero -> round to even.
- (IEEE 754-1985 4.1 says this is the default rounding.) */
- goto do_expo;
- }
- }
-
if (fracdig_no > 0)
{
/* Process fractional digits. Terminate if not rounded or
@@ -1076,7 +1072,6 @@ ___printf_fp (FILE *fp,
}
}
- do_expo:
/* Now remove unnecessary '0' at the end of the string. */
while (fracdig_no > fracdig_min + added_zeros && *(wcp - 1) == L'0')
{
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index 13491455d1..2224196b24 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -28,6 +28,8 @@
#include <_itoa.h>
#include <_itowa.h>
#include <locale/localeinfo.h>
+#include <stdbool.h>
+#include <rounding-mode.h>
/* #define NDEBUG 1*/ /* Undefine this for debugging assertions. */
#include <assert.h>
@@ -343,21 +345,33 @@ __printf_fphex (FILE *fp,
--numend;
}
+ bool do_round_away = false;
+
+ if (precision != -1 && precision < numend - numstr)
+ {
+ char last_digit = precision > 0 ? numstr[precision - 1] : leading;
+ char next_digit = numstr[precision];
+ int last_digit_value = (last_digit >= 'A' && last_digit <= 'F'
+ ? last_digit - 'A' + 10
+ : (last_digit >= 'a' && last_digit <= 'f'
+ ? last_digit - 'a' + 10
+ : last_digit - '0'));
+ int next_digit_value = (next_digit >= 'A' && next_digit <= 'F'
+ ? next_digit - 'A' + 10
+ : (next_digit >= 'a' && next_digit <= 'f'
+ ? next_digit - 'a' + 10
+ : next_digit - '0'));
+ bool more_bits = ((next_digit_value & 7) != 0
+ || precision + 1 < numend - numstr);
+ int rounding_mode = get_rounding_mode ();
+ do_round_away = round_away (negative, last_digit_value & 1,
+ next_digit_value >= 8, more_bits,
+ rounding_mode);
+ }
+
if (precision == -1)
precision = numend - numstr;
- else if (precision < numend - numstr
- && (numstr[precision] > '8'
- || (('A' < '0' || 'a' < '0')
- && numstr[precision] < '0')
- || (numstr[precision] == '8'
- && (precision + 1 < numend - numstr
- /* Round to even. */
- || (precision > 0
- && ((numstr[precision - 1] & 1)
- ^ (isdigit (numstr[precision - 1]) == 0)))
- || (precision == 0
- && ((leading & 1)
- ^ (isdigit (leading) == 0)))))))
+ else if (do_round_away)
{
/* Round up. */
int cnt = precision;
diff --git a/stdio-common/reg-modifier.c b/stdio-common/reg-modifier.c
index dcfd3a812a..697a408f83 100644
--- a/stdio-common/reg-modifier.c
+++ b/stdio-common/reg-modifier.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <errno.h>
#include <limits.h>
#include <printf.h>
+#include <stdlib.h>
#include <wchar.h>
#include <bits/libc-lock.h>
diff --git a/stdio-common/tmpfile.c b/stdio-common/tmpfile.c
index c6da9acb0b..6a4d48e7be 100644
--- a/stdio-common/tmpfile.c
+++ b/stdio-common/tmpfile.c
@@ -58,6 +58,10 @@ tmpfile (void)
return f;
}
+#if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (__new_tmpfile, tmpfile64)
+#endif
+
#ifndef FLAGS /* Not for tmpfile64. */
# undef tmpfile
# include <shlib-compat.h>
diff --git a/stdio-common/tmpfile64.c b/stdio-common/tmpfile64.c
index ead3f50fba..e8ce8930c1 100644
--- a/stdio-common/tmpfile64.c
+++ b/stdio-common/tmpfile64.c
@@ -1,3 +1,28 @@
-#define FLAGS O_LARGEFILE
-#define tmpfile tmpfile64
-#include <tmpfile.c>
+/* Open a stdio stream on an anonymous, large temporary file. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fcntl.h>
+
+/* If there is no O_LARGEFILE, then the plain tmpfile definition
+ does the job and it gets tmpfile64 as an alias. */
+
+#if defined O_LARGEFILE && O_LARGEFILE != 0
+# define FLAGS O_LARGEFILE
+# define tmpfile tmpfile64
+# include <tmpfile.c>
+#endif
diff --git a/stdio-common/tst-printf-round.c b/stdio-common/tst-printf-round.c
new file mode 100644
index 0000000000..7cc19c5645
--- /dev/null
+++ b/stdio-common/tst-printf-round.c
@@ -0,0 +1,234 @@
+/* Test for correct rounding of printf floating-point output.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fenv.h>
+#include <stdio.h>
+#include <string.h>
+
+struct dec_test {
+ double d;
+ const char *fmt;
+ const char *rd, *rn, *rz, *ru;
+};
+
+static const struct dec_test dec_tests[] = {
+ { 1.5, "%.0f", "1", "2", "1", "2" },
+ { -1.5, "%.0f", "-2", "-2", "-1", "-1" },
+ { 2.5, "%.0f", "2", "2", "2", "3" },
+ { -2.5, "%.0f", "-3", "-2", "-2", "-2" },
+ { 1.4999, "%.0f", "1", "1", "1", "2" },
+ { -1.4999, "%.0f", "-2", "-1", "-1", "-1" },
+ { 1.5001, "%.0f", "1", "2", "1", "2" },
+ { -1.5001, "%.0f", "-2", "-2", "-1", "-1" },
+ { 2.4999, "%.0f", "2", "2", "2", "3" },
+ { -2.4999, "%.0f", "-3", "-2", "-2", "-2" },
+ { 2.5001, "%.0f", "2", "3", "2", "3" },
+ { -2.5001, "%.0f", "-3", "-3", "-2", "-2" },
+ { 1.0 / 3.0, "%f", "0.333333", "0.333333", "0.333333", "0.333334" },
+ { -1.0 / 3.0, "%f", "-0.333334", "-0.333333", "-0.333333", "-0.333333" },
+ { 0.2500001, "%.2e", "2.50e-01", "2.50e-01", "2.50e-01", "2.51e-01" },
+ { -0.2500001, "%.2e", "-2.51e-01", "-2.50e-01", "-2.50e-01", "-2.50e-01" },
+ { 1000001.0, "%.1e", "1.0e+06", "1.0e+06", "1.0e+06", "1.1e+06" },
+ { -1000001.0, "%.1e", "-1.1e+06", "-1.0e+06", "-1.0e+06", "-1.0e+06" },
+};
+
+static int
+test_dec_in_one_mode (double d, const char *fmt, const char *expected,
+ const char *mode_name)
+{
+ char buf[100];
+ int ret = snprintf (buf, sizeof buf, fmt, d);
+ if (ret <= 0 || ret >= (int) sizeof buf)
+ {
+ printf ("snprintf for %a returned %d\n", d, ret);
+ return 1;
+ }
+ if (strcmp (buf, expected) == 0)
+ return 0;
+ else
+ {
+ printf ("snprintf (\"%s\", %a) returned \"%s\" not \"%s\" (%s)\n",
+ fmt, d, buf, expected, mode_name);
+ return 1;
+ }
+}
+
+struct hex_test
+{
+ double d;
+ const char *fmt;
+ const char *rd[4], *rn[4], *rz[4], *ru[4];
+};
+
+static const struct hex_test hex_tests[] =
+ {
+ {
+ 0x1.fffffp+4, "%.1a",
+ { "0x1.fp+4", "0x3.fp+3", "0x7.fp+2", "0xf.fp+1" },
+ { "0x2.0p+4", "0x4.0p+3", "0x8.0p+2", "0x1.0p+5" },
+ { "0x1.fp+4", "0x3.fp+3", "0x7.fp+2", "0xf.fp+1" },
+ { "0x2.0p+4", "0x4.0p+3", "0x8.0p+2", "0x1.0p+5" }
+ },
+ {
+ -0x1.fffffp+4, "%.1a",
+ { "-0x2.0p+4", "-0x4.0p+3", "-0x8.0p+2", "-0x1.0p+5" },
+ { "-0x2.0p+4", "-0x4.0p+3", "-0x8.0p+2", "-0x1.0p+5" },
+ { "-0x1.fp+4", "-0x3.fp+3", "-0x7.fp+2", "-0xf.fp+1" },
+ { "-0x1.fp+4", "-0x3.fp+3", "-0x7.fp+2", "-0xf.fp+1" }
+ },
+ {
+ 0x1.88p+4, "%.1a",
+ { "0x1.8p+4", "0x3.1p+3", "0x6.2p+2", "0xc.4p+1" },
+ { "0x1.8p+4", "0x3.1p+3", "0x6.2p+2", "0xc.4p+1" },
+ { "0x1.8p+4", "0x3.1p+3", "0x6.2p+2", "0xc.4p+1" },
+ { "0x1.9p+4", "0x3.1p+3", "0x6.2p+2", "0xc.4p+1" }
+ },
+ {
+ -0x1.88p+4, "%.1a",
+ { "-0x1.9p+4", "-0x3.1p+3", "-0x6.2p+2", "-0xc.4p+1" },
+ { "-0x1.8p+4", "-0x3.1p+3", "-0x6.2p+2", "-0xc.4p+1" },
+ { "-0x1.8p+4", "-0x3.1p+3", "-0x6.2p+2", "-0xc.4p+1" },
+ { "-0x1.8p+4", "-0x3.1p+3", "-0x6.2p+2", "-0xc.4p+1" }
+ },
+ {
+ 0x1.78p+4, "%.1a",
+ { "0x1.7p+4", "0x2.fp+3", "0x5.ep+2", "0xb.cp+1" },
+ { "0x1.8p+4", "0x2.fp+3", "0x5.ep+2", "0xb.cp+1" },
+ { "0x1.7p+4", "0x2.fp+3", "0x5.ep+2", "0xb.cp+1" },
+ { "0x1.8p+4", "0x2.fp+3", "0x5.ep+2", "0xb.cp+1" }
+ },
+ {
+ -0x1.78p+4, "%.1a",
+ { "-0x1.8p+4", "-0x2.fp+3", "-0x5.ep+2", "-0xb.cp+1" },
+ { "-0x1.8p+4", "-0x2.fp+3", "-0x5.ep+2", "-0xb.cp+1" },
+ { "-0x1.7p+4", "-0x2.fp+3", "-0x5.ep+2", "-0xb.cp+1" },
+ { "-0x1.7p+4", "-0x2.fp+3", "-0x5.ep+2", "-0xb.cp+1" }
+ },
+ {
+ 64.0 / 3.0, "%.1a",
+ { "0x1.5p+4", "0x2.ap+3", "0x5.5p+2", "0xa.ap+1" },
+ { "0x1.5p+4", "0x2.bp+3", "0x5.5p+2", "0xa.bp+1" },
+ { "0x1.5p+4", "0x2.ap+3", "0x5.5p+2", "0xa.ap+1" },
+ { "0x1.6p+4", "0x2.bp+3", "0x5.6p+2", "0xa.bp+1" }
+ },
+ {
+ -64.0 / 3.0, "%.1a",
+ { "-0x1.6p+4", "-0x2.bp+3", "-0x5.6p+2", "-0xa.bp+1" },
+ { "-0x1.5p+4", "-0x2.bp+3", "-0x5.5p+2", "-0xa.bp+1" },
+ { "-0x1.5p+4", "-0x2.ap+3", "-0x5.5p+2", "-0xa.ap+1" },
+ { "-0x1.5p+4", "-0x2.ap+3", "-0x5.5p+2", "-0xa.ap+1" }
+ },
+ };
+
+static int
+test_hex_in_one_mode (double d, const char *fmt, const char *expected[4],
+ const char *mode_name)
+{
+ char buf[100];
+ int ret = snprintf (buf, sizeof buf, fmt, d);
+ if (ret <= 0 || ret >= (int) sizeof buf)
+ {
+ printf ("snprintf for %a returned %d\n", d, ret);
+ return 1;
+ }
+ if (strcmp (buf, expected[0]) == 0
+ || strcmp (buf, expected[1]) == 0
+ || strcmp (buf, expected[2]) == 0
+ || strcmp (buf, expected[3]) == 0)
+ return 0;
+ else
+ {
+ printf ("snprintf (\"%s\", %a) returned \"%s\" not "
+ "\"%s\" or \"%s\" or \"%s\" or \"%s\" (%s)\n",
+ fmt, d, buf, expected[0], expected[1], expected[2], expected[3],
+ mode_name);
+ return 1;
+ }
+}
+
+static int
+do_test (void)
+{
+ int save_round_mode = fegetround ();
+ int result = 0;
+
+ for (size_t i = 0; i < sizeof (dec_tests) / sizeof (dec_tests[0]); i++)
+ {
+ result |= test_dec_in_one_mode (dec_tests[i].d, dec_tests[i].fmt,
+ dec_tests[i].rn, "default rounding mode");
+#ifdef FE_DOWNWARD
+ if (!fesetround (FE_DOWNWARD))
+ {
+ result |= test_dec_in_one_mode (dec_tests[i].d, dec_tests[i].fmt,
+ dec_tests[i].rd, "FE_DOWNWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_TOWARDZERO
+ if (!fesetround (FE_TOWARDZERO))
+ {
+ result |= test_dec_in_one_mode (dec_tests[i].d, dec_tests[i].fmt,
+ dec_tests[i].rz, "FE_TOWARDZERO");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_UPWARD
+ if (!fesetround (FE_UPWARD))
+ {
+ result |= test_dec_in_one_mode (dec_tests[i].d, dec_tests[i].fmt,
+ dec_tests[i].ru, "FE_UPWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+ }
+
+ for (size_t i = 0; i < sizeof (hex_tests) / sizeof (hex_tests[0]); i++)
+ {
+ result |= test_hex_in_one_mode (hex_tests[i].d, hex_tests[i].fmt,
+ hex_tests[i].rn, "default rounding mode");
+#ifdef FE_DOWNWARD
+ if (!fesetround (FE_DOWNWARD))
+ {
+ result |= test_hex_in_one_mode (hex_tests[i].d, hex_tests[i].fmt,
+ hex_tests[i].rd, "FE_DOWNWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_TOWARDZERO
+ if (!fesetround (FE_TOWARDZERO))
+ {
+ result |= test_hex_in_one_mode (hex_tests[i].d, hex_tests[i].fmt,
+ hex_tests[i].rz, "FE_TOWARDZERO");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_UPWARD
+ if (!fesetround (FE_UPWARD))
+ {
+ result |= test_hex_in_one_mode (hex_tests[i].d, hex_tests[i].fmt,
+ hex_tests[i].ru, "FE_UPWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+ }
+
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdio-common/tst-printf.sh b/stdio-common/tst-printf.sh
index 43e42a8fdd..d39b55179b 100644
--- a/stdio-common/tst-printf.sh
+++ b/stdio-common/tst-printf.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing of printf.
-# Copyright (C) 2000, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
run_program_prefix=$1; shift
diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c
index c04fef18f4..c4e911fe94 100644
--- a/stdio-common/tst-sprintf.c
+++ b/stdio-common/tst-sprintf.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <locale.h>
#include <string.h>
@@ -58,5 +59,17 @@ main (void)
result = 1;
}
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+ {
+ puts ("cannot set locale");
+ result = 1;
+ }
+ else if (sprintf (buf, "%.8s\n", "Foo: \277") != 7
+ || strcmp (buf, "Foo: \277\n") != 0)
+ {
+ printf ("sprintf (buf, \"%%.8s\\n\", \"Foo: \\277\") produced '%s' output\n", buf);
+ result = 1;
+ }
+
return result;
}
diff --git a/stdio-common/tst-unbputc.sh b/stdio-common/tst-unbputc.sh
index fd650d4838..1f28d4d240 100755
--- a/stdio-common/tst-unbputc.sh
+++ b/stdio-common/tst-unbputc.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Testing the stdio implementation
-# Copyright (C) 2000 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1; shift
run_program_prefix=$1; shift
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index d569034253..17d3f42a97 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1168,42 +1168,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
else if (!is_long && spec != L_('S')) \
{ \
if (prec != -1) \
- { \
- /* Search for the end of the string, but don't search past \
- the length (in bytes) specified by the precision. Also \
- don't use incomplete characters. */ \
- if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MB_CUR_MAX) == 1) \
- len = __strnlen (string, prec); \
- else \
- { \
- /* In case we have a multibyte character set the \
- situation is more complicated. We must not copy \
- bytes at the end which form an incomplete character. */\
- size_t ignore_size = (unsigned) prec > 1024 ? 1024 : prec;\
- wchar_t ignore[ignore_size]; \
- const char *str2 = string; \
- const char *strend = string + prec; \
- if (strend < string) \
- strend = (const char *) UINTPTR_MAX; \
- \
- mbstate_t ps; \
- memset (&ps, '\0', sizeof (ps)); \
- \
- while (str2 != NULL && str2 < strend) \
- if (__mbsnrtowcs (ignore, &str2, strend - str2, \
- ignore_size, &ps) == (size_t) -1) \
- { \
- /* Conversion function has set errno. */ \
- done = -1; \
- goto all_done; \
- } \
- \
- if (str2 == NULL) \
- len = strlen (string); \
- else \
- len = str2 - string - (ps.__count & 7); \
- } \
- } \
+ /* Search for the end of the string, but don't search past \
+ the length (in bytes) specified by the precision. */ \
+ len = __strnlen (string, prec); \
else \
len = strlen (string); \
} \
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 23a8ac7694..43f25caa6f 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -20,6 +20,7 @@
#include <limits.h>
#include <ctype.h>
#include <stdarg.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 10674f2cd7..57830a8cb9 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2009, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1991-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -69,7 +69,8 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 \
tst-makecontext2 tst-strtod6 tst-unsetenv1 \
tst-makecontext3 bug-getcontext bug-fmtmsg1 \
- tst-secure-getenv
+ tst-secure-getenv tst-strtod-overflow tst-strtod-round \
+ tst-tininess tst-strtod-underflow
tests-static := tst-secure-getenv
include ../Makeconfig
@@ -100,10 +101,8 @@ CFLAGS-system.c = -fexceptions
CFLAGS-system.os = -fomit-frame-pointer
CFLAGS-fmtmsg.c = -fexceptions
-ifneq (,$(filter %REENTRANT, $(defines)))
-CFLAGS-strfmon.c = -D_IO_MTSAFE_IO
-CFLAGS-strfmon_l.c = -D_IO_MTSAFE_IO
-endif
+CFLAGS-strfmon.c = $(libio-mtsafe)
+CFLAGS-strfmon_l.c = $(libio-mtsafe)
CFLAGS-tst-bsearch.c = $(stack-align-test-flags)
CFLAGS-tst-qsort.c = $(stack-align-test-flags)
@@ -124,7 +123,7 @@ bug-fmtmsg1-ENV = SEV_LEVEL=foo,11,newsev
# Run a test on the header files we use.
tests: $(objpfx)isomac.out
-ifeq (no,$(cross-compiling))
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-fmtmsg.out
endif
@@ -137,7 +136,7 @@ $(objpfx)isomac: isomac.c
$(native-compile)
$(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
+ $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/
$(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so
LDFLAGS-tst-putenv = $(no-as-needed)
@@ -152,3 +151,6 @@ else
link-libm = $(common-objpfx)math/libm.a
endif
$(objpfx)bug-getcontext: $(link-libm)
+$(objpfx)tst-strtod-round: $(link-libm)
+$(objpfx)tst-tininess: $(link-libm)
+$(objpfx)tst-strtod-underflow: $(link-libm)
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
index 876b482cf9..aeff804c10 100644
--- a/stdlib/canonicalize.c
+++ b/stdlib/canonicalize.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2002,2004,2005,2006,2008 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,11 @@
#include <string.h>
#include <unistd.h>
#include <limits.h>
-#include <sys/param.h>
#include <sys/stat.h>
#include <errno.h>
#include <stddef.h>
+#include <eloop-threshold.h>
#include <shlib-compat.h>
/* Return the canonical absolute name of file NAME. A canonical name
@@ -166,7 +166,7 @@ __realpath (const char *name, char *resolved)
char *buf = __alloca (path_max);
size_t len;
- if (++num_links > MAXSYMLINKS)
+ if (++num_links > __eloop_threshold ())
{
__set_errno (ELOOP);
goto error;
diff --git a/stdlib/divmod_1.c b/stdlib/divmod_1.c
index b11fd7bf8c..4e6966bc91 100644
--- a/stdlib/divmod_1.c
+++ b/stdlib/divmod_1.c
@@ -6,7 +6,7 @@
QUOT_PTR and DIVIDEND_PTR might point to the same limb.
-Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc.
+Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -54,7 +54,7 @@ mpn_divmod_1 (quot_ptr, dividend_ptr, dividend_size, divisor_limb)
{
mp_size_t i;
mp_limb_t n1, n0, r;
- mp_limb_t dummy;
+ mp_limb_t dummy __attribute__ ((unused));
/* ??? Should this be handled at all? Rely on callers? */
if (dividend_size == 0)
diff --git a/stdlib/fpioconst.c b/stdlib/fpioconst.c
index 4dd54a940b..6a0ef8b0ae 100644
--- a/stdlib/fpioconst.c
+++ b/stdlib/fpioconst.c
@@ -1,6 +1,5 @@
/* Table of MP integer constants 10^(2^i), used for floating point <-> decimal.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +22,9 @@
/* First page : 32-bit limbs
Second page : 64-bit limbs
Last page : table of pointers
+
+ The tables (apart from internal #if conditions) may be generated
+ with gen-fpioconst.c.
*/
#if BITS_PER_MP_LIMB == 32
@@ -75,9 +77,8 @@ const mp_limb_t __tens[] =
0x26b2716e, 0xadc666b0, 0x1d153624, 0x3c42d35a, 0x63ff540e, 0xcc5573c0,
0x65f9ef17, 0x55bc28f2, 0x80dcc7f7, 0xf46eeddc, 0x5fdcefce, 0x000553f7,
-#ifndef __NO_LONG_DOUBLE_MATH
-# define TENS_P9_IDX (TENS_P8_IDX + TENS_P8_SIZE)
-# define TENS_P9_SIZE 56
+#define TENS_P9_IDX (TENS_P8_IDX + TENS_P8_SIZE)
+#define TENS_P9_SIZE 56
[TENS_P9_IDX] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -89,8 +90,8 @@ const mp_limb_t __tens[] =
0xb099bc81, 0x45a71d46, 0xa2699748, 0x8cb07303, 0x8a0b1f13, 0x8cab8a97,
0xc1d238d9, 0x633415d4, 0x0000001c,
-# define TENS_P10_IDX (TENS_P9_IDX + TENS_P9_SIZE)
-# define TENS_P10_SIZE 109
+#define TENS_P10_IDX (TENS_P9_IDX + TENS_P9_SIZE)
+#define TENS_P10_SIZE 109
[TENS_P10_IDX] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -111,6 +112,7 @@ const mp_limb_t __tens[] =
0xd2db49ef, 0x926c3f5b, 0xae6209d4, 0x2d433949, 0x34f4a3c6, 0xd4305d94,
0xd9d61a05, 0x00000325,
+#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
# define TENS_P11_IDX (TENS_P10_IDX + TENS_P10_SIZE)
# define TENS_P11_SIZE 215
[TENS_P11_IDX] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -223,7 +225,440 @@ const mp_limb_t __tens[] =
0x35fcb457, 0x1bb6c6e4, 0xf74eb928, 0x3d5d0b54, 0x87cc1d21, 0x4964046f,
0x18ae4240, 0xd868b275, 0x8bd2b496, 0x1c5563f4, 0xc234d8f5, 0xf868e970,
0xf9151fff, 0xae7be4a2, 0x271133ee, 0xbb0fd922, 0x25254932, 0xa60a9fc0,
- 0x104bcd64, 0x30290145, 0x00000062
+ 0x104bcd64, 0x30290145, 0x00000062,
+
+# define TENS_P13_IDX (TENS_P12_IDX + TENS_P12_SIZE)
+# define TENS_P13_SIZE 853
+ [TENS_P13_IDX] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x64cf8001, 0x9f345226, 0x644963e5, 0x7b8d5053, 0x49f0aa29,
+ 0xb945c82f, 0x430ff478, 0x933b6bb8, 0x5ff82d0a, 0x64c501d4, 0x73bbf174,
+ 0x9ec1e1b3, 0x3bfbe803, 0xe9010689, 0xf7390d8e, 0x3fef8d80, 0xf31d1325,
+ 0x2c73446b, 0xf5ca7a92, 0x1c19e379, 0x270af2be, 0xf52d9d9c, 0xeb2bed48,
+ 0x3abf72e1, 0x4ac4ffc2, 0x7ecf3508, 0x22019a82, 0x38597a5a, 0xbe6a7b3c,
+ 0x9a51ff6e, 0xa2d28437, 0x0c0abe9d, 0x7c9ec6ea, 0xc79887ff, 0x5851c899,
+ 0x436420d0, 0xefead581, 0x72b5547f, 0x99b1d2b5, 0x077ad8f8, 0x5cddbf5b,
+ 0x3b4305ed, 0xe3861ac7, 0x2d88f3fd, 0x3d6b43be, 0x393220aa, 0xe5382405,
+ 0x1cd62095, 0x61a10c96, 0x87a0d1e1, 0xca95a55d, 0x68c933e6, 0x9ee082e2,
+ 0x778089bb, 0x41429ee9, 0xfbb6d8d4, 0xc529500d, 0x26cf5471, 0x68b9be29,
+ 0xd6c9b140, 0x07be635a, 0x84151852, 0xb5572182, 0x83730335, 0xeb2300b4,
+ 0xdd312d31, 0x05d6dd9b, 0x488da59c, 0x37784d25, 0xda2c2e40, 0x6a8d92fa,
+ 0x6a57d720, 0x950b41ac, 0xf07a8632, 0xcd55f062, 0x2ecad06a, 0xe6a3dfe7,
+ 0x34c98bb0, 0x9c767d8f, 0xb60521b1, 0x752aafd1, 0xe87d16be, 0x9de1d728,
+ 0xe58a8b0c, 0xc6013830, 0x2fa2c119, 0x3c4f9156, 0x519b40c8, 0x5058fc8f,
+ 0xab78701b, 0xadc59c47, 0xc502a554, 0x0fb3286f, 0x6647f04c, 0x9db4076e,
+ 0x5ea495c8, 0x9c74fab1, 0xb4f00f8b, 0x897c7a3c, 0xd092b4c6, 0x283e0340,
+ 0x32f31fa8, 0xeeb708cc, 0x67b63de2, 0x4f7b3c8b, 0xef2bc02b, 0xda14bfe3,
+ 0xc49344c0, 0xaabc85be, 0xb6c4e69e, 0x2ece8aa6, 0x63a11016, 0x19cfba4d,
+ 0x726ae4d9, 0x0fc90b42, 0xee6ae707, 0x4290b04a, 0x4d9aabc5, 0xfb2b070e,
+ 0xf34906cd, 0x1ff54b0a, 0x52ca9709, 0x0b42bfe1, 0x16431570, 0x980f3076,
+ 0x6b5565bb, 0xeb8c4c4a, 0x9ce63c76, 0xb9e4c771, 0x3da24c53, 0x6f0266fa,
+ 0xb50e3c66, 0x76e34f79, 0x01bb4b96, 0x9948cf3e, 0x0fbea124, 0x86bead12,
+ 0xa1fa4edc, 0xd11e901c, 0xc3b97bf9, 0x71730e03, 0x370ca58e, 0x48b19715,
+ 0x886467e2, 0xdb237497, 0x3c727e24, 0x2116ccd2, 0x8e67d76e, 0xf973aecf,
+ 0x34bdedd3, 0x31d680ec, 0xb042ab05, 0x770e96a0, 0xfc5c3c17, 0xab6f1874,
+ 0xb8204ece, 0x5843f3a5, 0x416c0ced, 0x11dd112f, 0x95780183, 0xb1c74bd8,
+ 0x7e0e8613, 0x96c6453b, 0xa79ffc10, 0xb2157651, 0xfcd6da0a, 0x836a34a7,
+ 0x3dd0ccac, 0x316e5a36, 0x496049ed, 0x0322bcb2, 0xdea1a97d, 0xcdf2aa5a,
+ 0x39578d53, 0x1d1aa931, 0x030565c9, 0xd198cbed, 0x324e0a27, 0x5db83e8a,
+ 0x28432534, 0x90bf23e8, 0x5cb134c0, 0xdd0adab6, 0x009e5051, 0xf8ad61da,
+ 0x7e36a6d7, 0x84c75e57, 0xbdffe6aa, 0xb5d5532e, 0x138d680e, 0xbd84ddac,
+ 0x4a5f74a1, 0xccff00d1, 0x55538cfa, 0xb0948b8c, 0x48528011, 0xe345f82e,
+ 0x9e047ad7, 0x6ee770ff, 0xea77bef0, 0x0fc13669, 0x2f162567, 0x869426ac,
+ 0x0614686c, 0x3a3ff464, 0x4263ed82, 0xb3589b47, 0x57205a7a, 0x213f24ad,
+ 0xae6fc46b, 0x3de03e4e, 0xd92b133f, 0x315a589b, 0x1b49c24a, 0x73381bcb,
+ 0x1641c138, 0x7bc99425, 0xbc680ada, 0xa5cfbc9a, 0x962e9884, 0x0a960d70,
+ 0xfc8d12f6, 0xed18ef4c, 0x60acc868, 0x9aea5d14, 0x13113036, 0xc747c87e,
+ 0x2d99a5b0, 0x3a369bb3, 0x006b3658, 0x118a5135, 0xe43fa6e6, 0xb4947190,
+ 0xa13dc05e, 0xd7733db8, 0x0dbd7170, 0xc3fb67d1, 0x117ed7e7, 0xe2d72a49,
+ 0xc05fe99e, 0x9638db40, 0xd971a25b, 0x4239d468, 0x1a159559, 0x850a223c,
+ 0xc1117392, 0x22d2dbd8, 0x567b5fc0, 0x92c5b4eb, 0xc051007a, 0x11cc0099,
+ 0xfb355720, 0x6907810d, 0x39848161, 0x5e8534f4, 0x61d19ef2, 0x2ee8c466,
+ 0x8a0ab03c, 0xc234af76, 0x879aa514, 0x9774a235, 0x59e5da57, 0x9bc466b3,
+ 0xf339bd5a, 0x44ab026d, 0xbbb5fd67, 0x2b977202, 0x3685c9f2, 0x03e5dc00,
+ 0x7054359e, 0x5239cfb0, 0x9ba11f08, 0xf8237562, 0x9c258687, 0xa3b510dd,
+ 0x52c7bf8f, 0xb31ed0cf, 0x3245e079, 0xff9ff8d3, 0xbaee38c7, 0xf17d5562,
+ 0xf702b3b9, 0xcc4c8563, 0xcbca275d, 0xe005d9d1, 0xe817dbac, 0x05c6920a,
+ 0x62cee350, 0x0f1deac0, 0x19e049b9, 0x59599f74, 0xb2a27a16, 0xf0911d5a,
+ 0x7dcef00d, 0x3603dd66, 0x37552251, 0x97813735, 0x5fa022da, 0x0d849416,
+ 0xefbe57c2, 0x30a0e592, 0x57619296, 0xc953cc47, 0x11735043, 0xa83526ad,
+ 0xc0444be0, 0xb5f8463c, 0x16ff5136, 0x2a0a6631, 0xf037572c, 0xd30464da,
+ 0xb1bf8daa, 0x7f5718f7, 0x0f3e9e7e, 0xe5a4cfe7, 0xc26f2624, 0x8c9b5ae4,
+ 0xdfe8f485, 0xf6fa82e3, 0xc64a1509, 0xacb24aea, 0x3024b220, 0xddb02ac0,
+ 0xddcdfedd, 0xd834c574, 0x384c86c3, 0xd904e099, 0xdd48a571, 0x4550a05f,
+ 0x77b35c74, 0x81e85f71, 0xaaebdc6d, 0x0f9bb0b1, 0xd4cdc054, 0x7af4df85,
+ 0x845786af, 0xe5e53887, 0xdf2a91ca, 0xf6a58211, 0x5689a3c4, 0x8cf6aa15,
+ 0xa705983a, 0x9fbf2f52, 0x2ce7fef0, 0x48e84a62, 0x4a3b5365, 0xf8281a47,
+ 0xd48a0872, 0x8423dcf6, 0xf0929c3e, 0x044a5049, 0xe9ec071b, 0x17decc36,
+ 0x20e30c1b, 0x45fc2813, 0x3342196a, 0x46afb7f9, 0x6601e337, 0x30754439,
+ 0xf18094d1, 0xd38b4112, 0x61410dd1, 0xd8796b36, 0xd97d4dd8, 0x47e9bc0b,
+ 0x80805191, 0x1584e2da, 0xcde438c1, 0x955d24f1, 0x409659a1, 0x1b0950b1,
+ 0x5a09635f, 0x65b1febe, 0x615472b9, 0x525dc00a, 0x6308e067, 0x4089e2d4,
+ 0xd4e705a4, 0x43fc9209, 0x32c18b26, 0x4447a5fa, 0xaf271153, 0x3617cadc,
+ 0x4dc4f0d2, 0x692eb386, 0x6aa116ef, 0x655991bc, 0x0641dc0b, 0x54469597,
+ 0xc6559664, 0x749c0fe8, 0x4bdc0d1a, 0xa7d3381e, 0xc5292a61, 0x4eb65fdc,
+ 0x42474cc2, 0xf2c6b173, 0x19dfc9ee, 0x0a19a199, 0xbece2ee3, 0xc68b778d,
+ 0xaa03aa7c, 0xc8db86f0, 0xae54d2be, 0xb92a01e0, 0xdee3f48f, 0x6023c0a9,
+ 0xf6ae2852, 0xa233763b, 0xa441cb9e, 0x3246dddd, 0x3a8bb4b7, 0x44faa3c3,
+ 0x308ef2c8, 0xfd1c8516, 0xd2862534, 0x3b25ebe7, 0x62336f6f, 0x0c336a45,
+ 0x0b8e2ce6, 0xe867f171, 0x11eea1f2, 0x523972ec, 0x68df4903, 0x50c05824,
+ 0x51ef4cb7, 0xcb4df2a8, 0x3ffae115, 0xb51aca2f, 0x3ed1635f, 0xd6ff1cc6,
+ 0x0a5ac09f, 0xde8ed9d6, 0x0a3dc76f, 0x5dc2d8dd, 0x37991dde, 0xf95bacb2,
+ 0x80ad6e13, 0x163005ee, 0xd4f8c7a6, 0x3225d180, 0xa4760f08, 0x5fff004d,
+ 0x9b2b1a87, 0xe7ea8576, 0x5cd00b66, 0xec478452, 0x285dd80d, 0x20112439,
+ 0x4301b3a1, 0xff879fc8, 0xfacbb68c, 0xaf6af6b8, 0xb17fdf84, 0xc208d9f1,
+ 0xf4489576, 0x8794a6e9, 0xadcc862c, 0x0e83e54c, 0x931685a4, 0xab01c580,
+ 0x1e40293b, 0xcad784fa, 0x1f1ddf7f, 0x6b856084, 0xcee722b2, 0x1c39938b,
+ 0x74254eb4, 0xc7ccebf4, 0xb9c26d9a, 0x6b08dfb9, 0x2e3ece24, 0x981455ec,
+ 0xdff60410, 0xbc804e2b, 0xe06fa38b, 0xb534540c, 0x72e53c52, 0x02dfb2ef,
+ 0xb2a5c05a, 0x5002a2a5, 0x97313338, 0x597c53ff, 0xd61df455, 0x34e5261a,
+ 0x39ac2ec5, 0xc6bc0cab, 0x388b7539, 0x3f732fc0, 0x00eac704, 0x92fb21d9,
+ 0xc089971e, 0xb4ffa503, 0x7af93f8f, 0x72e353b6, 0xa8311b23, 0x8266c9af,
+ 0x1de496ca, 0xdbdb16b0, 0xd6fa0b51, 0x9991a5ef, 0xbd563089, 0x168cbe0f,
+ 0x0954a1e3, 0x537b9245, 0x53d09723, 0x2867272d, 0x86558cb9, 0x0b83f026,
+ 0xfac85d10, 0xf8562951, 0x1e5ddb95, 0xad3668c8, 0x48d27b92, 0xc930b7e6,
+ 0x19b58a99, 0xa3de74e3, 0xa9cda917, 0xcb6e35ee, 0x7a4dd16e, 0x4c80e9d5,
+ 0x4d84073f, 0x74a95ba8, 0x9cffcfc0, 0xd28485eb, 0x15796372, 0x5717e9cd,
+ 0x77eda8df, 0xab473c4e, 0xadb965e1, 0xffad6959, 0x5bc05659, 0x6ed63880,
+ 0xfb240227, 0x2014850b, 0xd15fdddf, 0xfdd74592, 0xb538f37d, 0x3a8e2e82,
+ 0x1473396f, 0xf6a5edf8, 0x3ce41a21, 0x0cc4351a, 0x754e8264, 0xaab95e73,
+ 0xc7821b96, 0xf42ff463, 0xc242faaa, 0xdd00ac65, 0x087e260e, 0x17d193f5,
+ 0x0dbe0328, 0x844a63c9, 0xf9d10f96, 0x85aa91dd, 0xbaf127ec, 0x0ab6dabb,
+ 0xce85e6a5, 0x1af5d24f, 0xe7b56a16, 0xcd6c5a19, 0x57d1d79f, 0x5dfc2b28,
+ 0xec4dd2f0, 0x18fe64a1, 0x8d72216a, 0x5f222077, 0x72f14a08, 0xd8b09b11,
+ 0x3bf038ab, 0xc6cf1f44, 0xc4265d7c, 0xdab1b0e7, 0x46398d2c, 0x7dcfdc68,
+ 0xb6e705d3, 0x4aafd1e6, 0x362c1183, 0xd8701107, 0xf6ac98b7, 0xad114d7e,
+ 0xd6649424, 0xc40ab551, 0xddd1c6e4, 0xa132030f, 0xc9d284c8, 0xdb1f662a,
+ 0x824069ee, 0x4157904b, 0xc846b3ad, 0xd38481ca, 0x0a248c17, 0xc846831f,
+ 0xe8745feb, 0x000025a8,
+
+# define TENS_P14_IDX (TENS_P13_IDX + TENS_P13_SIZE)
+# define TENS_P14_SIZE 1703
+ [TENS_P14_IDX] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x099f0001,
+ 0x41b5687d, 0xcbfd1b6e, 0x8c75ee63, 0x4b191cea, 0xd75296ad, 0x2394d80a,
+ 0x1eb5da9b, 0x18a004ed, 0x5c79fed9, 0x37e3b01c, 0xed67a1b8, 0x78d9a714,
+ 0x2a1a34d5, 0x8fbe7f0d, 0x6b1d3516, 0xe57c43ea, 0xa7825681, 0xc81d32e8,
+ 0xd3e716e1, 0x58860b00, 0xa6d93d65, 0x83159c97, 0x0113232f, 0xd6122269,
+ 0x7321c3a0, 0xbe6a92f3, 0xca4ca9d3, 0xd1e276a5, 0xc0e55163, 0xb05915d6,
+ 0x7b7a78c1, 0x0fae0ca4, 0x62a3df4b, 0x08abec6f, 0x13030d11, 0xd446338a,
+ 0x60dcc8f2, 0x5f05d1d5, 0x25e1f9f6, 0x04a40bee, 0x7f8c7113, 0x88f47ec0,
+ 0x589ff59a, 0x308c3661, 0xea5068a1, 0x95fb108f, 0x06e87dff, 0x1559e741,
+ 0xd4d4abdc, 0x01e092e4, 0xee16907c, 0x5a7b78e6, 0xe73aabcb, 0x146bb7e0,
+ 0xad372889, 0x4f6b43c5, 0xfd49fc1d, 0x0f29f589, 0xd3739253, 0xc4745a56,
+ 0xe2acfcc2, 0xd75ccbc7, 0xedd016cd, 0xac5a63e0, 0xef82ccd3, 0xb352496e,
+ 0x2bdabfc4, 0x5b3d0401, 0x01b0197f, 0xade96d3c, 0x29d9253d, 0x19bebdba,
+ 0x73c56b1b, 0x255e7b25, 0x1f2b7f1e, 0xa56a457e, 0x6299c836, 0x5c63cc78,
+ 0xa2ca74c6, 0x5c85fe93, 0xee571bea, 0x508e2561, 0x2db5f1d0, 0xb1fde6a9,
+ 0xa9b87b99, 0x4fb90a37, 0xf7260f07, 0xff58c5fd, 0x56ee7e97, 0xbab9fa46,
+ 0x42e6f9ce, 0x78816f73, 0x1b76d267, 0xfdb2c728, 0x4566519c, 0xae17dd8d,
+ 0xb9f6a95f, 0x1cd533a1, 0x67160dea, 0x14534bac, 0xfcd8f8f9, 0xf3f2901d,
+ 0x708b1f0a, 0x8829063b, 0x9457a1df, 0x8f872aa1, 0x36bb9335, 0xb5672c0e,
+ 0xd889d109, 0x7ec63a6a, 0x93306672, 0x39b6d457, 0x8239ab68, 0xef2e2506,
+ 0xbe0d7a1f, 0x4251b635, 0x05f65522, 0x0ef0bd55, 0x03286891, 0x2c42b664,
+ 0x9815fbac, 0x471fd611, 0x814e379c, 0x7dd8349d, 0xa4a25bda, 0x9886b84c,
+ 0x01b9e39d, 0x5a7ce1a2, 0xae31cbc9, 0x86d07f32, 0x83ef8faf, 0xb66b5b76,
+ 0x58470fdf, 0x96d59b73, 0x51618889, 0xdc400cf7, 0xfc8e0fc6, 0xaf693670,
+ 0x09a08e56, 0x91737de6, 0x74f682e1, 0x0e03923f, 0x7f8ac56d, 0x7400cfd4,
+ 0x8e05e49a, 0x4cebea3c, 0x384e1164, 0xb2e43d8c, 0xb50ae05e, 0x0f0b3ed9,
+ 0xa4006123, 0x64137137, 0x4e9a1934, 0x05404100, 0xd9621be6, 0x9329a255,
+ 0x5c347ebb, 0x75cbeb1b, 0xe684346b, 0x840fee55, 0xba6a9753, 0xf43836f6,
+ 0x60505b7b, 0x334a9278, 0xfd6d475d, 0x5db94761, 0x267375aa, 0xc110e160,
+ 0x024f6d63, 0x2ec96610, 0xa99b4c19, 0xb915c9f4, 0x338cfd90, 0xf02ea846,
+ 0xb9e51a09, 0xae928fb1, 0xfae31d88, 0x1a3db721, 0x8475dd26, 0x5769489d,
+ 0x7ad4c407, 0x0a49e9f0, 0x34e275c8, 0x3d075d83, 0x1d63114a, 0x72a96415,
+ 0x6b98e947, 0x1d500b5f, 0xd50fdc36, 0x141e5085, 0x87751275, 0xe7843834,
+ 0x2278809e, 0xb15c52ee, 0x947aead2, 0xfedb7b02, 0x5197b744, 0x64e09ba8,
+ 0x8849d0a6, 0x23beaa85, 0x11ecb913, 0x0f7ed667, 0x5d984848, 0x9f6331ea,
+ 0x588290e9, 0xa24d64d1, 0x7e09e9e5, 0x32592033, 0x03a501df, 0x27c270a6,
+ 0xbb3df738, 0x3c7c5a70, 0x4190833c, 0x7d4bf9f4, 0x80e5d89b, 0xa7fc6194,
+ 0xfaefb663, 0x62e52b49, 0xd3b6adcd, 0x809646fc, 0x1f2cf73a, 0xb765ed4f,
+ 0x531e4bfb, 0x92cd05f2, 0xaf12d1a6, 0x22ee30f3, 0x38da1074, 0xed6447bb,
+ 0x1a725608, 0xaff222d3, 0x7a3c6f54, 0xbca79a56, 0x7b0e8d12, 0x1c4660c5,
+ 0x6e34d6fb, 0x6f481a9f, 0xfe9dc99c, 0xf888db82, 0xd8489ea0, 0x84b4c0fa,
+ 0xc0dea281, 0x977a8583, 0xae30e887, 0x8c1cbcec, 0x1d4848cb, 0x0ee0d137,
+ 0xd011b0fc, 0x94b5fd49, 0x478d7dd4, 0x3d67f2e7, 0xacab62ad, 0x0ab4e62a,
+ 0x1dfc7df5, 0xd22e4553, 0x870b0e75, 0x49b7b001, 0x1b73bf6d, 0x12807ffd,
+ 0xdc9f0737, 0x6f3e5852, 0xc0e2f250, 0x93e62e4a, 0x4d96a55a, 0xc1d0e185,
+ 0x83a126db, 0x190b917b, 0xefbfd043, 0xc7df1669, 0x8f25b6dd, 0x2062eac9,
+ 0x476c17a6, 0xcb60f278, 0x25460383, 0x0e85e996, 0xda8c05be, 0x6f678a34,
+ 0x69206234, 0xf59be929, 0x1947b69a, 0x0ebfa11b, 0x90fd8322, 0x15c1e9bf,
+ 0xd699b1ec, 0xb2f0343f, 0x7001d002, 0xcf76eaaa, 0xc0778ab5, 0x5173eda8,
+ 0xb7b008e2, 0x4e00e4c6, 0x505d3f4d, 0x99dd341a, 0x1c9d4e12, 0x4ffb6978,
+ 0x474c5e95, 0x6e9ca6dd, 0xda19f938, 0xe2dda6e0, 0x98dc318e, 0xda455e54,
+ 0x3f67b836, 0x21e4181c, 0xa97e9a64, 0x1e17f655, 0x527a08bb, 0x1712dc21,
+ 0x682972ad, 0x0042d256, 0xccbeadf1, 0xca497b96, 0x861e99e0, 0x0d8aa585,
+ 0xeeb0f650, 0xdcc3c3da, 0x506af77e, 0x5deb9768, 0x7c9d60be, 0xe9d978b7,
+ 0x37b37e95, 0x77ad0b94, 0x42747f75, 0x07be42c4, 0x6d5fd2fe, 0x4c8c5da9,
+ 0x0d8fc27d, 0x0f2fd50f, 0x0ccf6023, 0x5b56053f, 0x3b1101bd, 0x56d34906,
+ 0xc0feca27, 0x7602a150, 0xc4888da4, 0x419abe54, 0x56d10633, 0xc76120ed,
+ 0x8db14123, 0xb656e675, 0x741e8f76, 0xd297b94e, 0x96be6f21, 0x3662439d,
+ 0x9b409e27, 0x6626574d, 0x35fff92a, 0xbf558205, 0x69e02439, 0xbe6838b7,
+ 0x6400fd4c, 0xa00f64ca, 0x1f4b158a, 0x9e2052ae, 0x04cca558, 0xfb5ee69e,
+ 0x58da644c, 0x96f26e1f, 0x8ab19401, 0xbee1e16b, 0xed8bf908, 0x2f2809a4,
+ 0xd50babab, 0x6e57f7e6, 0x6b0a8929, 0xf7356431, 0xb54a4cfc, 0x9a1d0ac4,
+ 0x6f9fd6cb, 0x836bfbf8, 0x3b42f469, 0x8bd32129, 0x40111b6b, 0x7c278fb1,
+ 0xb345d955, 0xff1fd188, 0xd32cd13c, 0xf7ec3aa0, 0x3789f792, 0xab707fa4,
+ 0x4d79a4bf, 0xb3a28ceb, 0xd9c24d8e, 0x7134dadc, 0x06e2eb3e, 0xd7c04f76,
+ 0xb379d811, 0x2b3b0ebc, 0x8c94fc33, 0xa28b53ab, 0xc06c5d01, 0xd900432a,
+ 0x7fea91ca, 0x6d30b008, 0x64845f08, 0x796f5349, 0xfde4687d, 0xf888fe67,
+ 0xe0046c56, 0xae482177, 0xce98cb11, 0x84590c46, 0x1feb4400, 0x6e1ba29b,
+ 0xff2f1611, 0xf73f3e9c, 0x3159ca8c, 0x34845918, 0x56f0ed46, 0xb7d10c32,
+ 0xd9a16a01, 0x405b9e91, 0x3cee3e24, 0x8739e4a6, 0x2ab396b4, 0x3f1b7871,
+ 0x09835dfd, 0x8c7a489f, 0x1592b74a, 0x05df7c81, 0x0e8d3f37, 0xa61ff273,
+ 0x68b29622, 0x259cd337, 0x43ff84a6, 0x81cf8fe9, 0x566ed883, 0x48427fc6,
+ 0x35c79428, 0xcfd2fb59, 0xa97e8c8b, 0x750aaed8, 0x32ddca23, 0xaa8108ef,
+ 0x96fbfff9, 0xa1d039aa, 0xe3cdf588, 0x47e77e00, 0xcd6b3fdb, 0xe72a9a80,
+ 0x9a522152, 0xeda06283, 0xef175610, 0xa670cfa1, 0x339fe6c4, 0x2dfbf3ee,
+ 0xc2d7f53b, 0x92a44e27, 0xcc47e4b0, 0xdfa212bc, 0xd64f83c9, 0x997e5475,
+ 0xb51319bf, 0x9fffe599, 0x1fc2c7b6, 0xef5605e7, 0x832169dd, 0xfeb6be4e,
+ 0xbf921dc8, 0x60bdfb1d, 0x72759f8d, 0x3546efa0, 0x020eebed, 0xcaab3d64,
+ 0xdb20a2fe, 0xba1218f6, 0xb2b62bdd, 0x3101eff0, 0x8fde5cfa, 0x2e319213,
+ 0xa52114d2, 0x87eead3f, 0xdf08b1dd, 0xa5387642, 0x746f34d0, 0xd76c4844,
+ 0x4cc40317, 0xe4f689c9, 0xb7d76071, 0x5fe0b4a2, 0x6e1c7915, 0xc7d43f53,
+ 0x3efb7d71, 0x068dd906, 0x35a75f5f, 0x652d7770, 0x750f4607, 0x64a1656c,
+ 0x36c2cf8e, 0x214d758b, 0x9348ef93, 0xe4058978, 0x9674b7f3, 0x10570b0b,
+ 0xbdfaba8f, 0xcef09dd7, 0xa92b261f, 0x071c21b6, 0xcbebb81f, 0xf427ed6c,
+ 0x44228cd6, 0x65e56fcf, 0x5036c460, 0xad919def, 0xccfd848b, 0x61d158a6,
+ 0x7527dca3, 0x4cf30459, 0x50855075, 0xa70dfd09, 0x3540f5aa, 0x35577adb,
+ 0xb5ba3d4e, 0x35736c4f, 0xcdfb689f, 0xefe8fa82, 0x97ab0dca, 0x51bd2ff3,
+ 0x77a7fe9c, 0x3107846c, 0x3d618b81, 0xbca797a4, 0xfc5e9651, 0xe2e08fbc,
+ 0xf7e8791f, 0x772f1cc0, 0x7c426f9d, 0x08d56f88, 0x0080c3ab, 0x0deea663,
+ 0xe6d46ec6, 0x7dca4eb7, 0x6b681d9d, 0xda06730b, 0x4af0e0f2, 0x038bf468,
+ 0x52097463, 0xca19d302, 0xbc09bb9a, 0xaa55aeb1, 0x3ded4433, 0xf27938ba,
+ 0x3e4b7865, 0x28296be7, 0x7ef96314, 0x7a1d55cc, 0xdf0b6b47, 0xcde11852,
+ 0xcedda5bd, 0xf00a0eb3, 0x72ca1a8b, 0x5241b572, 0xb002fdcc, 0xff8898b3,
+ 0xc4878862, 0xb3e85372, 0xbf4bca29, 0x7e1fef45, 0xf2d83189, 0x0f5427af,
+ 0x3cdf9e05, 0x75bae885, 0xf65c06ac, 0x9c71a700, 0xa3145eac, 0xde63bab2,
+ 0x76255bbf, 0x6e817be6, 0x4c6ad3d0, 0x25ab9935, 0xe95ef2f8, 0x11cd095a,
+ 0xd54f78de, 0xa001ae7e, 0xb3829dcb, 0x5abd18bd, 0x18eb9c9e, 0xada3c504,
+ 0xe3e3556c, 0xd35479aa, 0x5191ac5f, 0x221821ac, 0xc8d1d9d3, 0x313a8c51,
+ 0x088c3fc8, 0xc146a264, 0xb154abed, 0x92755bc5, 0x349ec093, 0xf94aba57,
+ 0x41d5886c, 0x0a5ad8b2, 0x36aba94b, 0x883a6758, 0xa9ad229f, 0x5d64069a,
+ 0x0546172f, 0x0366da16, 0xc3808ea4, 0x0b172403, 0x70f0a235, 0xfa816e66,
+ 0x4fceb827, 0xa65fcfea, 0x167b56d5, 0xfe2b9fb2, 0xfec36bcd, 0xa84c4cc9,
+ 0xcd96320f, 0x3e128584, 0x09eda8b8, 0x91eca525, 0x7ec7e17b, 0xbc45bedc,
+ 0xc14032f4, 0x9be689a7, 0x2eb20bc0, 0xffdf1efc, 0x14ef835f, 0xc6966c59,
+ 0xcd778dd8, 0x5feb0f3b, 0x23d47715, 0xd64b87c8, 0x5722a550, 0x62883198,
+ 0x315a1a8b, 0x648e17e6, 0x4b7e9d7a, 0x2ba43d28, 0x67caca84, 0x741f0398,
+ 0x6e660159, 0x3e16e1a9, 0x3dde3c45, 0xa53e56ae, 0xc7eb0aef, 0x3f39f33e,
+ 0x78751d73, 0x45816df8, 0x626770f7, 0xcb17d28d, 0x909e87f4, 0x93a86aba,
+ 0xc1dcf328, 0x1a1e4ce2, 0xd895d042, 0xb9f6dd69, 0xbb00eaf5, 0xacc37687,
+ 0xca609578, 0x5b490d39, 0xf8b86d4c, 0xf2737ef0, 0x39419f6d, 0x69267bc0,
+ 0x72524a03, 0x6eb060c4, 0xdbc01e93, 0x291035b1, 0x83984d54, 0xf673ad85,
+ 0xe08cbc20, 0x1fb24915, 0x584803a6, 0xe15bbcd7, 0x4088ddb5, 0xd4c22542,
+ 0x2c18041a, 0xa51372d1, 0xb2ba69b4, 0x2299283f, 0xcd11c296, 0x25dcd6f3,
+ 0xac54df23, 0x24a3a55e, 0x77e16e1d, 0xb3cd415b, 0xb99d85c0, 0x497befc7,
+ 0xe91154e3, 0x7365cd8b, 0xb55100aa, 0x0ee699eb, 0xfc0927a6, 0xefb374de,
+ 0x8acaa910, 0x83b40e3d, 0xda3f0006, 0x8590a089, 0xc6ce1b75, 0x54f6ff20,
+ 0xfda2f7f3, 0xd2ab58f6, 0xd0763b6d, 0x6caf2515, 0x2519622d, 0xc3714057,
+ 0x9863638f, 0xea00bb4f, 0x09ea4a4d, 0xe69de96d, 0x6b01fe5f, 0x960161a5,
+ 0x529e32ec, 0xf8260ae9, 0x01a37eea, 0x69710577, 0x5aa0716f, 0xcb3fb1da,
+ 0x4260feda, 0xa33fb790, 0x76012f75, 0x24c0e5be, 0x130f09ae, 0x2e8323dc,
+ 0x5c8ecb76, 0x17cb8f12, 0x401b5f5c, 0x5f0a63e0, 0x47e1560a, 0xdc57a786,
+ 0xee1377d4, 0x228e7ee5, 0x0aa294b9, 0xaea6c534, 0x55b0fe2f, 0x922d318a,
+ 0xf108b772, 0xf15bddf6, 0xdfb69702, 0xcd438a4e, 0x90e1db66, 0x584ce4a1,
+ 0x568ef6cb, 0x69e55f9d, 0x6da376ba, 0x5ca6c109, 0x45c7e294, 0xc977b3e9,
+ 0xcf5b6c0c, 0x1d694499, 0x11b487ae, 0xcf8339ac, 0xbcb3cc6e, 0x50b828e0,
+ 0x046b1071, 0x5703ed0d, 0x2c615946, 0x720d1610, 0xa908dbd0, 0x742bbe33,
+ 0x22c076e2, 0x48966a66, 0x1d0cefa4, 0x1dde819f, 0x601352bf, 0xb9370c39,
+ 0xa585cc4a, 0xeb857f94, 0x5a2f7206, 0x3fae6b58, 0x49cd0f1f, 0x78e5fb3d,
+ 0x1b89d476, 0x74e9e65b, 0xed82945b, 0xb74e6483, 0x2941c4d9, 0x7e087acc,
+ 0x565c18dc, 0x1a09f2e5, 0xbf4ccd3d, 0xd304e977, 0xa522631d, 0x6123378e,
+ 0x4517109b, 0xb7e4285a, 0x4bf1a506, 0x625803c2, 0x683172f8, 0xc84e7354,
+ 0x3f8a2b11, 0x7dd12b89, 0xed420491, 0x8c698b0b, 0x9853fb97, 0x9631777b,
+ 0xb697e1c9, 0x5f028f05, 0x51038110, 0x9055f055, 0x30e255e3, 0xe2d0c1b6,
+ 0xb990321e, 0xa8fdf4d1, 0xff4dc144, 0x521a3056, 0x148999e0, 0xa8111c66,
+ 0xa9c96852, 0x8157f508, 0x4b394a94, 0xa0dc4df1, 0x94ec2e93, 0x6e6afa56,
+ 0x8fc28377, 0xf72ffa04, 0xc435186f, 0xf91488b7, 0x8d037f6f, 0xa899ec1e,
+ 0x48757727, 0x4101b612, 0xb8cf377d, 0xa5a54e68, 0xb4570569, 0x2ac5a0a0,
+ 0x063d9cfd, 0x7c504c74, 0xf1a5884c, 0x0a9b1955, 0x8d0b91bf, 0xe5f6862f,
+ 0x79ff5361, 0x0ed3d38f, 0xc6fd31fb, 0x9fe131c7, 0x85b9c648, 0x8febf2b4,
+ 0x8e77e86b, 0x992ba80e, 0x56429986, 0x6848879a, 0x608cdda5, 0x3e0d106e,
+ 0x754b300e, 0x25200576, 0xafd5195b, 0x5d37aad9, 0xe81f0939, 0xe00a390e,
+ 0xdeeea20a, 0xf5fef0be, 0xb5d51155, 0x6e27d173, 0x9e72ebcf, 0xb776e978,
+ 0xb966f7ba, 0x09520238, 0x726c8408, 0x3347ebc5, 0x65dce5a2, 0x3ec78337,
+ 0x8c92d740, 0x3cdde3fe, 0x32caec93, 0xd20379ae, 0x411be811, 0x41756580,
+ 0x72fa1bbd, 0xa92125b3, 0x84c42f04, 0xdd4ee5fe, 0x3a25922c, 0x96446853,
+ 0x49ad3be0, 0x2880366d, 0x1c841afe, 0xf1e09019, 0xfb905fe1, 0xa451ad59,
+ 0x3ba9d0c9, 0x56db2e9c, 0xa42419f2, 0xe921e7a0, 0x3c9a3ca5, 0xad8ea375,
+ 0xcec7d091, 0x99bdb940, 0x477ef58f, 0x8a4933c7, 0xb2598b8d, 0xf5659df7,
+ 0xcfac1e1c, 0x339f8748, 0xe2a04aab, 0xe122b03f, 0x45bc6f37, 0xc9feeb30,
+ 0x9c75aaa0, 0xc13c174e, 0x0ea0585d, 0xdc58bbb4, 0x3a96bd5a, 0x20251482,
+ 0x3c7a714d, 0x696897eb, 0x6cb83b6b, 0xa37de406, 0x3b496b5f, 0x37e75d6a,
+ 0x380dd382, 0x0e1a513c, 0xda26fac9, 0xf2458364, 0x12b5c6ea, 0x79ce9e47,
+ 0x1ff1fcbf, 0xbe7c6e86, 0x59a6a7ba, 0x8d70f515, 0x94761453, 0x6b04e425,
+ 0x8768ffb2, 0x1ca5f425, 0x3f9e8407, 0x3b641184, 0x5f8f6756, 0x62b1a5a5,
+ 0x56bc2120, 0xd1e5da68, 0x17f2fa18, 0x8cce5e2d, 0xa1bc9c06, 0x8e290fb1,
+ 0x892df1af, 0xad10b8c8, 0xb43e5517, 0xd0597409, 0x4407c38f, 0x4a020d81,
+ 0xfea9c9b6, 0xd8e0e7d6, 0xd5b2aaf9, 0xde5e9b40, 0xda44ed4a, 0x45d6bf41,
+ 0x87aa3ca0, 0xc62d12fc, 0x4708acc8, 0x10212e26, 0x0d1227ff, 0xfeeb5742,
+ 0x5da02550, 0xd66668e7, 0x1d56e5e1, 0x32c215ec, 0xae1e0bef, 0x7f048b7e,
+ 0x58c0e922, 0x2aea8619, 0x58251aac, 0xbbe10425, 0xa1fea536, 0x2e1d9667,
+ 0xd233eb7d, 0xcf435c0b, 0xb0693c67, 0x61d918ea, 0x903ec9f0, 0xd6c4e8ac,
+ 0x0efb1788, 0xb0098f5b, 0x1709d878, 0x3c12b35e, 0x3f6ce1b7, 0xa1b3ff54,
+ 0x8a8f7dbb, 0x37608d6a, 0x73e8563e, 0xa3330540, 0x64e00749, 0xebbfcab9,
+ 0x8d5caaf9, 0x3bc87c7e, 0xedb2bd94, 0x22f8f62d, 0xe656dec3, 0xc5683222,
+ 0x670c1626, 0x94089e7f, 0x4237542f, 0x47d29440, 0x2fc4e530, 0x8419441e,
+ 0x8b288dac, 0x7f9245f9, 0xa7afb4e9, 0x8a15650d, 0x082adef7, 0x3104ef19,
+ 0x043c62de, 0x0aff3dc5, 0x7ecd0635, 0xe7e80a8b, 0xe0600fad, 0x4d8e81cc,
+ 0x81ebf4e0, 0xf587e30f, 0x7b372af7, 0x2d8f8ca0, 0xdee11c6f, 0xd3624b1c,
+ 0xf8adc426, 0xca9debed, 0x5c22de4f, 0x3634f778, 0xfae3186b, 0xacf8b595,
+ 0xd7bfa75f, 0x003cd316, 0xbbfe3cf6, 0xb023cb50, 0xc51055a1, 0x0063cffd,
+ 0x93869a77, 0x51e022d4, 0xfbceeb10, 0x5187457e, 0x109defc9, 0x673892d8,
+ 0xe13cfde2, 0xd4aa3272, 0xc09c8134, 0xbf89ad5b, 0x0327181b, 0x09511ec7,
+ 0xaa21b632, 0xd7e72186, 0xe41885b5, 0x46713f9c, 0x493d2789, 0x1386c526,
+ 0xd5d22a5c, 0xcefddfc4, 0xcf59281c, 0x92973ea6, 0x4ebe43f6, 0xeac5c6ad,
+ 0x6cf4897d, 0xd95082a0, 0x82ce562a, 0x28e5e9bd, 0x28d8f0db, 0xddf06e81,
+ 0x707b0166, 0x7dae3f00, 0xfbf5756a, 0x035a4680, 0x4f114102, 0xe7ba4b33,
+ 0x5190fedf, 0x106a7594, 0xe5f1bc49, 0xaae3ad67, 0xd7a1a766, 0x040ee971,
+ 0x9120a214, 0xf415b374, 0x1edc87ea, 0x17aab43c, 0xc6ad637d, 0x885858c1,
+ 0xd90303c7, 0xbfd4b70b, 0x3ff4eb0e, 0x344a9a88, 0xd81eea30, 0x95925446,
+ 0x5adef0ec, 0xabb5f5e7, 0x20bbd8c3, 0xc1c22cce, 0xe6944262, 0xc5acdb23,
+ 0x80024021, 0x2232c635, 0x94b30c81, 0x55f07648, 0x78569acd, 0x9696ea39,
+ 0x4dd6b528, 0x1c3e1b40, 0xde5853b3, 0x8a2c3679, 0x6eb5a7d8, 0x56bda89a,
+ 0x8f9cf096, 0xfda86d5b, 0x6481c7e7, 0x50a6a7d5, 0x15bfb45d, 0x4f9a5381,
+ 0xc057d45d, 0x4fb10024, 0xa0009f00, 0x5e1ca0dd, 0xac420f74, 0xcfbb38bd,
+ 0xf0d4a615, 0x19bf0318, 0x0e3aef84, 0xcb3d7b20, 0x166c1e3e, 0x58272fdd,
+ 0x3bfacf9f, 0xc0f5ce46, 0x63a13528, 0xea59e333, 0xa020ca8c, 0xaadd116b,
+ 0x3dbb5a3d, 0xe5523f47, 0x747f55ea, 0x0922171e, 0x64d520fb, 0x6c709e84,
+ 0x07ce951b, 0x35fdc402, 0x7508eb6d, 0xc495a8fa, 0xb0d11c39, 0x81313d65,
+ 0x57447ef0, 0xa7b61e26, 0xf72301f3, 0xbb096315, 0x45a3a7c5, 0xa903a44b,
+ 0x00432f88, 0x19081987, 0xeb4e1b66, 0xbb7b66bd, 0x6d245171, 0xde4182f5,
+ 0x0d89bd0b, 0x87f4de6c, 0xf70d8a60, 0x9a87855b, 0x08a27449, 0x4ac7720a,
+ 0xd4964017, 0xb0d9ddac, 0x4db3488c, 0xfe397d44, 0xd07b745b, 0x197dcb7b,
+ 0x6e9d567d, 0xe3b90812, 0x9143fef1, 0xb9e002ac, 0x115ff96d, 0xf60a2201,
+ 0x5b61c9c8, 0x09abab2f, 0xb14a44a7, 0x0ca19c73, 0x843c7997, 0xe3a9bbe6,
+ 0x5e3fc18c, 0x0c0404ee, 0x764df59d, 0x990ec2c2, 0x4ad0ba3c, 0x05e8be0f,
+ 0xe599647d, 0xc19d365d, 0x4d0c2990, 0xe5a9d9ac, 0xb680a72d, 0x4ce2e5dd,
+ 0x6d6c0267, 0x06f9c25b, 0xbd6078e0, 0xb5fcdc81, 0xd742fa41, 0xcccc2399,
+ 0xc691adc0, 0x215ad82c, 0xea73b0c3, 0xa511e5b0, 0xf499e0a6, 0x53e27ab0,
+ 0xd94440a2, 0x47752521, 0x9a6e3644, 0xab113708, 0x8f8b301d, 0x058a42a3,
#endif /* !__NO_LONG_DOUBLE_MATH */
};
@@ -277,9 +712,9 @@ const mp_limb_t __tens[] =
0x26b2716ed595d80full, 0x1d153624adc666b0ull, 0x63ff540e3c42d35aull,
0x65f9ef17cc5573c0ull, 0x80dcc7f755bc28f2ull, 0x5fdcefcef46eeddcull,
0x00000000000553f7ull,
-#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
-# define TENS_P9_IDX (TENS_P8_IDX + TENS_P8_SIZE)
-# define TENS_P9_SIZE 28
+
+#define TENS_P9_IDX (TENS_P8_IDX + TENS_P8_SIZE)
+#define TENS_P9_SIZE 28
[TENS_P9_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
@@ -291,8 +726,8 @@ const mp_limb_t __tens[] =
0xb099bc817343afacull, 0xa269974845a71d46ull, 0x8a0b1f138cb07303ull,
0xc1d238d98cab8a97ull, 0x0000001c633415d4ull,
-# define TENS_P10_IDX (TENS_P9_IDX + TENS_P9_SIZE)
-# define TENS_P10_SIZE 55
+#define TENS_P10_IDX (TENS_P9_IDX + TENS_P9_SIZE)
+#define TENS_P10_SIZE 55
[TENS_P10_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
@@ -313,6 +748,7 @@ const mp_limb_t __tens[] =
0xd2db49ef47187094ull, 0xae6209d4926c3f5bull, 0x34f4a3c62d433949ull,
0xd9d61a05d4305d94ull, 0x0000000000000325ull,
+#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
# define TENS_P11_IDX (TENS_P10_IDX + TENS_P10_SIZE)
# define TENS_P11_SIZE 108
[TENS_P11_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
@@ -426,7 +862,441 @@ const mp_limb_t __tens[] =
0x35fcb457200c03a5ull, 0xf74eb9281bb6c6e4ull, 0x87cc1d213d5d0b54ull,
0x18ae42404964046full, 0x8bd2b496d868b275ull, 0xc234d8f51c5563f4ull,
0xf9151ffff868e970ull, 0x271133eeae7be4a2ull, 0x25254932bb0fd922ull,
- 0x104bcd64a60a9fc0ull, 0x0000006230290145ull
+ 0x104bcd64a60a9fc0ull, 0x0000006230290145ull,
+
+# define TENS_P13_IDX (TENS_P12_IDX + TENS_P12_SIZE)
+# define TENS_P13_SIZE 427
+ [TENS_P13_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x9f34522664cf8001ull, 0x7b8d5053644963e5ull,
+ 0xb945c82f49f0aa29ull, 0x933b6bb8430ff478ull, 0x64c501d45ff82d0aull,
+ 0x9ec1e1b373bbf174ull, 0xe90106893bfbe803ull, 0x3fef8d80f7390d8eull,
+ 0x2c73446bf31d1325ull, 0x1c19e379f5ca7a92ull, 0xf52d9d9c270af2beull,
+ 0x3abf72e1eb2bed48ull, 0x7ecf35084ac4ffc2ull, 0x38597a5a22019a82ull,
+ 0x9a51ff6ebe6a7b3cull, 0x0c0abe9da2d28437ull, 0xc79887ff7c9ec6eaull,
+ 0x436420d05851c899ull, 0x72b5547fefead581ull, 0x077ad8f899b1d2b5ull,
+ 0x3b4305ed5cddbf5bull, 0x2d88f3fde3861ac7ull, 0x393220aa3d6b43beull,
+ 0x1cd62095e5382405ull, 0x87a0d1e161a10c96ull, 0x68c933e6ca95a55dull,
+ 0x778089bb9ee082e2ull, 0xfbb6d8d441429ee9ull, 0x26cf5471c529500dull,
+ 0xd6c9b14068b9be29ull, 0x8415185207be635aull, 0x83730335b5572182ull,
+ 0xdd312d31eb2300b4ull, 0x488da59c05d6dd9bull, 0xda2c2e4037784d25ull,
+ 0x6a57d7206a8d92faull, 0xf07a8632950b41acull, 0x2ecad06acd55f062ull,
+ 0x34c98bb0e6a3dfe7ull, 0xb60521b19c767d8full, 0xe87d16be752aafd1ull,
+ 0xe58a8b0c9de1d728ull, 0x2fa2c119c6013830ull, 0x519b40c83c4f9156ull,
+ 0xab78701b5058fc8full, 0xc502a554adc59c47ull, 0x6647f04c0fb3286full,
+ 0x5ea495c89db4076eull, 0xb4f00f8b9c74fab1ull, 0xd092b4c6897c7a3cull,
+ 0x32f31fa8283e0340ull, 0x67b63de2eeb708ccull, 0xef2bc02b4f7b3c8bull,
+ 0xc49344c0da14bfe3ull, 0xb6c4e69eaabc85beull, 0x63a110162ece8aa6ull,
+ 0x726ae4d919cfba4dull, 0xee6ae7070fc90b42ull, 0x4d9aabc54290b04aull,
+ 0xf34906cdfb2b070eull, 0x52ca97091ff54b0aull, 0x164315700b42bfe1ull,
+ 0x6b5565bb980f3076ull, 0x9ce63c76eb8c4c4aull, 0x3da24c53b9e4c771ull,
+ 0xb50e3c666f0266faull, 0x01bb4b9676e34f79ull, 0x0fbea1249948cf3eull,
+ 0xa1fa4edc86bead12ull, 0xc3b97bf9d11e901cull, 0x370ca58e71730e03ull,
+ 0x886467e248b19715ull, 0x3c727e24db237497ull, 0x8e67d76e2116ccd2ull,
+ 0x34bdedd3f973aecfull, 0xb042ab0531d680ecull, 0xfc5c3c17770e96a0ull,
+ 0xb8204eceab6f1874ull, 0x416c0ced5843f3a5ull, 0x9578018311dd112full,
+ 0x7e0e8613b1c74bd8ull, 0xa79ffc1096c6453bull, 0xfcd6da0ab2157651ull,
+ 0x3dd0ccac836a34a7ull, 0x496049ed316e5a36ull, 0xdea1a97d0322bcb2ull,
+ 0x39578d53cdf2aa5aull, 0x030565c91d1aa931ull, 0x324e0a27d198cbedull,
+ 0x284325345db83e8aull, 0x5cb134c090bf23e8ull, 0x009e5051dd0adab6ull,
+ 0x7e36a6d7f8ad61daull, 0xbdffe6aa84c75e57ull, 0x138d680eb5d5532eull,
+ 0x4a5f74a1bd84ddacull, 0x55538cfaccff00d1ull, 0x48528011b0948b8cull,
+ 0x9e047ad7e345f82eull, 0xea77bef06ee770ffull, 0x2f1625670fc13669ull,
+ 0x0614686c869426acull, 0x4263ed823a3ff464ull, 0x57205a7ab3589b47ull,
+ 0xae6fc46b213f24adull, 0xd92b133f3de03e4eull, 0x1b49c24a315a589bull,
+ 0x1641c13873381bcbull, 0xbc680ada7bc99425ull, 0x962e9884a5cfbc9aull,
+ 0xfc8d12f60a960d70ull, 0x60acc868ed18ef4cull, 0x131130369aea5d14ull,
+ 0x2d99a5b0c747c87eull, 0x006b36583a369bb3ull, 0xe43fa6e6118a5135ull,
+ 0xa13dc05eb4947190ull, 0x0dbd7170d7733db8ull, 0x117ed7e7c3fb67d1ull,
+ 0xc05fe99ee2d72a49ull, 0xd971a25b9638db40ull, 0x1a1595594239d468ull,
+ 0xc1117392850a223cull, 0x567b5fc022d2dbd8ull, 0xc051007a92c5b4ebull,
+ 0xfb35572011cc0099ull, 0x398481616907810dull, 0x61d19ef25e8534f4ull,
+ 0x8a0ab03c2ee8c466ull, 0x879aa514c234af76ull, 0x59e5da579774a235ull,
+ 0xf339bd5a9bc466b3ull, 0xbbb5fd6744ab026dull, 0x3685c9f22b977202ull,
+ 0x7054359e03e5dc00ull, 0x9ba11f085239cfb0ull, 0x9c258687f8237562ull,
+ 0x52c7bf8fa3b510ddull, 0x3245e079b31ed0cfull, 0xbaee38c7ff9ff8d3ull,
+ 0xf702b3b9f17d5562ull, 0xcbca275dcc4c8563ull, 0xe817dbace005d9d1ull,
+ 0x62cee35005c6920aull, 0x19e049b90f1deac0ull, 0xb2a27a1659599f74ull,
+ 0x7dcef00df0911d5aull, 0x375522513603dd66ull, 0x5fa022da97813735ull,
+ 0xefbe57c20d849416ull, 0x5761929630a0e592ull, 0x11735043c953cc47ull,
+ 0xc0444be0a83526adull, 0x16ff5136b5f8463cull, 0xf037572c2a0a6631ull,
+ 0xb1bf8daad30464daull, 0x0f3e9e7e7f5718f7ull, 0xc26f2624e5a4cfe7ull,
+ 0xdfe8f4858c9b5ae4ull, 0xc64a1509f6fa82e3ull, 0x3024b220acb24aeaull,
+ 0xddcdfeddddb02ac0ull, 0x384c86c3d834c574ull, 0xdd48a571d904e099ull,
+ 0x77b35c744550a05full, 0xaaebdc6d81e85f71ull, 0xd4cdc0540f9bb0b1ull,
+ 0x845786af7af4df85ull, 0xdf2a91cae5e53887ull, 0x5689a3c4f6a58211ull,
+ 0xa705983a8cf6aa15ull, 0x2ce7fef09fbf2f52ull, 0x4a3b536548e84a62ull,
+ 0xd48a0872f8281a47ull, 0xf0929c3e8423dcf6ull, 0xe9ec071b044a5049ull,
+ 0x20e30c1b17decc36ull, 0x3342196a45fc2813ull, 0x6601e33746afb7f9ull,
+ 0xf18094d130754439ull, 0x61410dd1d38b4112ull, 0xd97d4dd8d8796b36ull,
+ 0x8080519147e9bc0bull, 0xcde438c11584e2daull, 0x409659a1955d24f1ull,
+ 0x5a09635f1b0950b1ull, 0x615472b965b1febeull, 0x6308e067525dc00aull,
+ 0xd4e705a44089e2d4ull, 0x32c18b2643fc9209ull, 0xaf2711534447a5faull,
+ 0x4dc4f0d23617cadcull, 0x6aa116ef692eb386ull, 0x0641dc0b655991bcull,
+ 0xc655966454469597ull, 0x4bdc0d1a749c0fe8ull, 0xc5292a61a7d3381eull,
+ 0x42474cc24eb65fdcull, 0x19dfc9eef2c6b173ull, 0xbece2ee30a19a199ull,
+ 0xaa03aa7cc68b778dull, 0xae54d2bec8db86f0ull, 0xdee3f48fb92a01e0ull,
+ 0xf6ae28526023c0a9ull, 0xa441cb9ea233763bull, 0x3a8bb4b73246ddddull,
+ 0x308ef2c844faa3c3ull, 0xd2862534fd1c8516ull, 0x62336f6f3b25ebe7ull,
+ 0x0b8e2ce60c336a45ull, 0x11eea1f2e867f171ull, 0x68df4903523972ecull,
+ 0x51ef4cb750c05824ull, 0x3ffae115cb4df2a8ull, 0x3ed1635fb51aca2full,
+ 0x0a5ac09fd6ff1cc6ull, 0x0a3dc76fde8ed9d6ull, 0x37991dde5dc2d8ddull,
+ 0x80ad6e13f95bacb2ull, 0xd4f8c7a6163005eeull, 0xa4760f083225d180ull,
+ 0x9b2b1a875fff004dull, 0x5cd00b66e7ea8576ull, 0x285dd80dec478452ull,
+ 0x4301b3a120112439ull, 0xfacbb68cff879fc8ull, 0xb17fdf84af6af6b8ull,
+ 0xf4489576c208d9f1ull, 0xadcc862c8794a6e9ull, 0x931685a40e83e54cull,
+ 0x1e40293bab01c580ull, 0x1f1ddf7fcad784faull, 0xcee722b26b856084ull,
+ 0x74254eb41c39938bull, 0xb9c26d9ac7ccebf4ull, 0x2e3ece246b08dfb9ull,
+ 0xdff60410981455ecull, 0xe06fa38bbc804e2bull, 0x72e53c52b534540cull,
+ 0xb2a5c05a02dfb2efull, 0x973133385002a2a5ull, 0xd61df455597c53ffull,
+ 0x39ac2ec534e5261aull, 0x388b7539c6bc0cabull, 0x00eac7043f732fc0ull,
+ 0xc089971e92fb21d9ull, 0x7af93f8fb4ffa503ull, 0xa8311b2372e353b6ull,
+ 0x1de496ca8266c9afull, 0xd6fa0b51dbdb16b0ull, 0xbd5630899991a5efull,
+ 0x0954a1e3168cbe0full, 0x53d09723537b9245ull, 0x86558cb92867272dull,
+ 0xfac85d100b83f026ull, 0x1e5ddb95f8562951ull, 0x48d27b92ad3668c8ull,
+ 0x19b58a99c930b7e6ull, 0xa9cda917a3de74e3ull, 0x7a4dd16ecb6e35eeull,
+ 0x4d84073f4c80e9d5ull, 0x9cffcfc074a95ba8ull, 0x15796372d28485ebull,
+ 0x77eda8df5717e9cdull, 0xadb965e1ab473c4eull, 0x5bc05659ffad6959ull,
+ 0xfb2402276ed63880ull, 0xd15fdddf2014850bull, 0xb538f37dfdd74592ull,
+ 0x1473396f3a8e2e82ull, 0x3ce41a21f6a5edf8ull, 0x754e82640cc4351aull,
+ 0xc7821b96aab95e73ull, 0xc242faaaf42ff463ull, 0x087e260edd00ac65ull,
+ 0x0dbe032817d193f5ull, 0xf9d10f96844a63c9ull, 0xbaf127ec85aa91ddull,
+ 0xce85e6a50ab6dabbull, 0xe7b56a161af5d24full, 0x57d1d79fcd6c5a19ull,
+ 0xec4dd2f05dfc2b28ull, 0x8d72216a18fe64a1ull, 0x72f14a085f222077ull,
+ 0x3bf038abd8b09b11ull, 0xc4265d7cc6cf1f44ull, 0x46398d2cdab1b0e7ull,
+ 0xb6e705d37dcfdc68ull, 0x362c11834aafd1e6ull, 0xf6ac98b7d8701107ull,
+ 0xd6649424ad114d7eull, 0xddd1c6e4c40ab551ull, 0xc9d284c8a132030full,
+ 0x824069eedb1f662aull, 0xc846b3ad4157904bull, 0x0a248c17d38481caull,
+ 0xe8745febc846831full, 0x00000000000025a8ull,
+
+# define TENS_P14_IDX (TENS_P13_IDX + TENS_P13_SIZE)
+# define TENS_P14_SIZE 852
+ [TENS_P14_IDX] = 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull,
+ 0x41b5687d099f0001ull, 0x8c75ee63cbfd1b6eull, 0xd75296ad4b191ceaull,
+ 0x1eb5da9b2394d80aull, 0x5c79fed918a004edull, 0xed67a1b837e3b01cull,
+ 0x2a1a34d578d9a714ull, 0x6b1d35168fbe7f0dull, 0xa7825681e57c43eaull,
+ 0xd3e716e1c81d32e8ull, 0xa6d93d6558860b00ull, 0x0113232f83159c97ull,
+ 0x7321c3a0d6122269ull, 0xca4ca9d3be6a92f3ull, 0xc0e55163d1e276a5ull,
+ 0x7b7a78c1b05915d6ull, 0x62a3df4b0fae0ca4ull, 0x13030d1108abec6full,
+ 0x60dcc8f2d446338aull, 0x25e1f9f65f05d1d5ull, 0x7f8c711304a40beeull,
+ 0x589ff59a88f47ec0ull, 0xea5068a1308c3661ull, 0x06e87dff95fb108full,
+ 0xd4d4abdc1559e741ull, 0xee16907c01e092e4ull, 0xe73aabcb5a7b78e6ull,
+ 0xad372889146bb7e0ull, 0xfd49fc1d4f6b43c5ull, 0xd37392530f29f589ull,
+ 0xe2acfcc2c4745a56ull, 0xedd016cdd75ccbc7ull, 0xef82ccd3ac5a63e0ull,
+ 0x2bdabfc4b352496eull, 0x01b0197f5b3d0401ull, 0x29d9253dade96d3cull,
+ 0x73c56b1b19bebdbaull, 0x1f2b7f1e255e7b25ull, 0x6299c836a56a457eull,
+ 0xa2ca74c65c63cc78ull, 0xee571bea5c85fe93ull, 0x2db5f1d0508e2561ull,
+ 0xa9b87b99b1fde6a9ull, 0xf7260f074fb90a37ull, 0x56ee7e97ff58c5fdull,
+ 0x42e6f9cebab9fa46ull, 0x1b76d26778816f73ull, 0x4566519cfdb2c728ull,
+ 0xb9f6a95fae17dd8dull, 0x67160dea1cd533a1ull, 0xfcd8f8f914534bacull,
+ 0x708b1f0af3f2901dull, 0x9457a1df8829063bull, 0x36bb93358f872aa1ull,
+ 0xd889d109b5672c0eull, 0x933066727ec63a6aull, 0x8239ab6839b6d457ull,
+ 0xbe0d7a1fef2e2506ull, 0x05f655224251b635ull, 0x032868910ef0bd55ull,
+ 0x9815fbac2c42b664ull, 0x814e379c471fd611ull, 0xa4a25bda7dd8349dull,
+ 0x01b9e39d9886b84cull, 0xae31cbc95a7ce1a2ull, 0x83ef8faf86d07f32ull,
+ 0x58470fdfb66b5b76ull, 0x5161888996d59b73ull, 0xfc8e0fc6dc400cf7ull,
+ 0x09a08e56af693670ull, 0x74f682e191737de6ull, 0x7f8ac56d0e03923full,
+ 0x8e05e49a7400cfd4ull, 0x384e11644cebea3cull, 0xb50ae05eb2e43d8cull,
+ 0xa40061230f0b3ed9ull, 0x4e9a193464137137ull, 0xd9621be605404100ull,
+ 0x5c347ebb9329a255ull, 0xe684346b75cbeb1bull, 0xba6a9753840fee55ull,
+ 0x60505b7bf43836f6ull, 0xfd6d475d334a9278ull, 0x267375aa5db94761ull,
+ 0x024f6d63c110e160ull, 0xa99b4c192ec96610ull, 0x338cfd90b915c9f4ull,
+ 0xb9e51a09f02ea846ull, 0xfae31d88ae928fb1ull, 0x8475dd261a3db721ull,
+ 0x7ad4c4075769489dull, 0x34e275c80a49e9f0ull, 0x1d63114a3d075d83ull,
+ 0x6b98e94772a96415ull, 0xd50fdc361d500b5full, 0x87751275141e5085ull,
+ 0x2278809ee7843834ull, 0x947aead2b15c52eeull, 0x5197b744fedb7b02ull,
+ 0x8849d0a664e09ba8ull, 0x11ecb91323beaa85ull, 0x5d9848480f7ed667ull,
+ 0x588290e99f6331eaull, 0x7e09e9e5a24d64d1ull, 0x03a501df32592033ull,
+ 0xbb3df73827c270a6ull, 0x4190833c3c7c5a70ull, 0x80e5d89b7d4bf9f4ull,
+ 0xfaefb663a7fc6194ull, 0xd3b6adcd62e52b49ull, 0x1f2cf73a809646fcull,
+ 0x531e4bfbb765ed4full, 0xaf12d1a692cd05f2ull, 0x38da107422ee30f3ull,
+ 0x1a725608ed6447bbull, 0x7a3c6f54aff222d3ull, 0x7b0e8d12bca79a56ull,
+ 0x6e34d6fb1c4660c5ull, 0xfe9dc99c6f481a9full, 0xd8489ea0f888db82ull,
+ 0xc0dea28184b4c0faull, 0xae30e887977a8583ull, 0x1d4848cb8c1cbcecull,
+ 0xd011b0fc0ee0d137ull, 0x478d7dd494b5fd49ull, 0xacab62ad3d67f2e7ull,
+ 0x1dfc7df50ab4e62aull, 0x870b0e75d22e4553ull, 0x1b73bf6d49b7b001ull,
+ 0xdc9f073712807ffdull, 0xc0e2f2506f3e5852ull, 0x4d96a55a93e62e4aull,
+ 0x83a126dbc1d0e185ull, 0xefbfd043190b917bull, 0x8f25b6ddc7df1669ull,
+ 0x476c17a62062eac9ull, 0x25460383cb60f278ull, 0xda8c05be0e85e996ull,
+ 0x692062346f678a34ull, 0x1947b69af59be929ull, 0x90fd83220ebfa11bull,
+ 0xd699b1ec15c1e9bfull, 0x7001d002b2f0343full, 0xc0778ab5cf76eaaaull,
+ 0xb7b008e25173eda8ull, 0x505d3f4d4e00e4c6ull, 0x1c9d4e1299dd341aull,
+ 0x474c5e954ffb6978ull, 0xda19f9386e9ca6ddull, 0x98dc318ee2dda6e0ull,
+ 0x3f67b836da455e54ull, 0xa97e9a6421e4181cull, 0x527a08bb1e17f655ull,
+ 0x682972ad1712dc21ull, 0xccbeadf10042d256ull, 0x861e99e0ca497b96ull,
+ 0xeeb0f6500d8aa585ull, 0x506af77edcc3c3daull, 0x7c9d60be5deb9768ull,
+ 0x37b37e95e9d978b7ull, 0x42747f7577ad0b94ull, 0x6d5fd2fe07be42c4ull,
+ 0x0d8fc27d4c8c5da9ull, 0x0ccf60230f2fd50full, 0x3b1101bd5b56053full,
+ 0xc0feca2756d34906ull, 0xc4888da47602a150ull, 0x56d10633419abe54ull,
+ 0x8db14123c76120edull, 0x741e8f76b656e675ull, 0x96be6f21d297b94eull,
+ 0x9b409e273662439dull, 0x35fff92a6626574dull, 0x69e02439bf558205ull,
+ 0x6400fd4cbe6838b7ull, 0x1f4b158aa00f64caull, 0x04cca5589e2052aeull,
+ 0x58da644cfb5ee69eull, 0x8ab1940196f26e1full, 0xed8bf908bee1e16bull,
+ 0xd50babab2f2809a4ull, 0x6b0a89296e57f7e6ull, 0xb54a4cfcf7356431ull,
+ 0x6f9fd6cb9a1d0ac4ull, 0x3b42f469836bfbf8ull, 0x40111b6b8bd32129ull,
+ 0xb345d9557c278fb1ull, 0xd32cd13cff1fd188ull, 0x3789f792f7ec3aa0ull,
+ 0x4d79a4bfab707fa4ull, 0xd9c24d8eb3a28cebull, 0x06e2eb3e7134dadcull,
+ 0xb379d811d7c04f76ull, 0x8c94fc332b3b0ebcull, 0xc06c5d01a28b53abull,
+ 0x7fea91cad900432aull, 0x64845f086d30b008ull, 0xfde4687d796f5349ull,
+ 0xe0046c56f888fe67ull, 0xce98cb11ae482177ull, 0x1feb440084590c46ull,
+ 0xff2f16116e1ba29bull, 0x3159ca8cf73f3e9cull, 0x56f0ed4634845918ull,
+ 0xd9a16a01b7d10c32ull, 0x3cee3e24405b9e91ull, 0x2ab396b48739e4a6ull,
+ 0x09835dfd3f1b7871ull, 0x1592b74a8c7a489full, 0x0e8d3f3705df7c81ull,
+ 0x68b29622a61ff273ull, 0x43ff84a6259cd337ull, 0x566ed88381cf8fe9ull,
+ 0x35c7942848427fc6ull, 0xa97e8c8bcfd2fb59ull, 0x32ddca23750aaed8ull,
+ 0x96fbfff9aa8108efull, 0xe3cdf588a1d039aaull, 0xcd6b3fdb47e77e00ull,
+ 0x9a522152e72a9a80ull, 0xef175610eda06283ull, 0x339fe6c4a670cfa1ull,
+ 0xc2d7f53b2dfbf3eeull, 0xcc47e4b092a44e27ull, 0xd64f83c9dfa212bcull,
+ 0xb51319bf997e5475ull, 0x1fc2c7b69fffe599ull, 0x832169ddef5605e7ull,
+ 0xbf921dc8feb6be4eull, 0x72759f8d60bdfb1dull, 0x020eebed3546efa0ull,
+ 0xdb20a2fecaab3d64ull, 0xb2b62bddba1218f6ull, 0x8fde5cfa3101eff0ull,
+ 0xa52114d22e319213ull, 0xdf08b1dd87eead3full, 0x746f34d0a5387642ull,
+ 0x4cc40317d76c4844ull, 0xb7d76071e4f689c9ull, 0x6e1c79155fe0b4a2ull,
+ 0x3efb7d71c7d43f53ull, 0x35a75f5f068dd906ull, 0x750f4607652d7770ull,
+ 0x36c2cf8e64a1656cull, 0x9348ef93214d758bull, 0x9674b7f3e4058978ull,
+ 0xbdfaba8f10570b0bull, 0xa92b261fcef09dd7ull, 0xcbebb81f071c21b6ull,
+ 0x44228cd6f427ed6cull, 0x5036c46065e56fcfull, 0xccfd848bad919defull,
+ 0x7527dca361d158a6ull, 0x508550754cf30459ull, 0x3540f5aaa70dfd09ull,
+ 0xb5ba3d4e35577adbull, 0xcdfb689f35736c4full, 0x97ab0dcaefe8fa82ull,
+ 0x77a7fe9c51bd2ff3ull, 0x3d618b813107846cull, 0xfc5e9651bca797a4ull,
+ 0xf7e8791fe2e08fbcull, 0x7c426f9d772f1cc0ull, 0x0080c3ab08d56f88ull,
+ 0xe6d46ec60deea663ull, 0x6b681d9d7dca4eb7ull, 0x4af0e0f2da06730bull,
+ 0x52097463038bf468ull, 0xbc09bb9aca19d302ull, 0x3ded4433aa55aeb1ull,
+ 0x3e4b7865f27938baull, 0x7ef9631428296be7ull, 0xdf0b6b477a1d55ccull,
+ 0xcedda5bdcde11852ull, 0x72ca1a8bf00a0eb3ull, 0xb002fdcc5241b572ull,
+ 0xc4878862ff8898b3ull, 0xbf4bca29b3e85372ull, 0xf2d831897e1fef45ull,
+ 0x3cdf9e050f5427afull, 0xf65c06ac75bae885ull, 0xa3145eac9c71a700ull,
+ 0x76255bbfde63bab2ull, 0x4c6ad3d06e817be6ull, 0xe95ef2f825ab9935ull,
+ 0xd54f78de11cd095aull, 0xb3829dcba001ae7eull, 0x18eb9c9e5abd18bdull,
+ 0xe3e3556cada3c504ull, 0x5191ac5fd35479aaull, 0xc8d1d9d3221821acull,
+ 0x088c3fc8313a8c51ull, 0xb154abedc146a264ull, 0x349ec09392755bc5ull,
+ 0x41d5886cf94aba57ull, 0x36aba94b0a5ad8b2ull, 0xa9ad229f883a6758ull,
+ 0x0546172f5d64069aull, 0xc3808ea40366da16ull, 0x70f0a2350b172403ull,
+ 0x4fceb827fa816e66ull, 0x167b56d5a65fcfeaull, 0xfec36bcdfe2b9fb2ull,
+ 0xcd96320fa84c4cc9ull, 0x09eda8b83e128584ull, 0x7ec7e17b91eca525ull,
+ 0xc14032f4bc45bedcull, 0x2eb20bc09be689a7ull, 0x14ef835fffdf1efcull,
+ 0xcd778dd8c6966c59ull, 0x23d477155feb0f3bull, 0x5722a550d64b87c8ull,
+ 0x315a1a8b62883198ull, 0x4b7e9d7a648e17e6ull, 0x67caca842ba43d28ull,
+ 0x6e660159741f0398ull, 0x3dde3c453e16e1a9ull, 0xc7eb0aefa53e56aeull,
+ 0x78751d733f39f33eull, 0x626770f745816df8ull, 0x909e87f4cb17d28dull,
+ 0xc1dcf32893a86abaull, 0xd895d0421a1e4ce2ull, 0xbb00eaf5b9f6dd69ull,
+ 0xca609578acc37687ull, 0xf8b86d4c5b490d39ull, 0x39419f6df2737ef0ull,
+ 0x72524a0369267bc0ull, 0xdbc01e936eb060c4ull, 0x83984d54291035b1ull,
+ 0xe08cbc20f673ad85ull, 0x584803a61fb24915ull, 0x4088ddb5e15bbcd7ull,
+ 0x2c18041ad4c22542ull, 0xb2ba69b4a51372d1ull, 0xcd11c2962299283full,
+ 0xac54df2325dcd6f3ull, 0x77e16e1d24a3a55eull, 0xb99d85c0b3cd415bull,
+ 0xe91154e3497befc7ull, 0xb55100aa7365cd8bull, 0xfc0927a60ee699ebull,
+ 0x8acaa910efb374deull, 0xda3f000683b40e3dull, 0xc6ce1b758590a089ull,
+ 0xfda2f7f354f6ff20ull, 0xd0763b6dd2ab58f6ull, 0x2519622d6caf2515ull,
+ 0x9863638fc3714057ull, 0x09ea4a4dea00bb4full, 0x6b01fe5fe69de96dull,
+ 0x529e32ec960161a5ull, 0x01a37eeaf8260ae9ull, 0x5aa0716f69710577ull,
+ 0x4260fedacb3fb1daull, 0x76012f75a33fb790ull, 0x130f09ae24c0e5beull,
+ 0x5c8ecb762e8323dcull, 0x401b5f5c17cb8f12ull, 0x47e1560a5f0a63e0ull,
+ 0xee1377d4dc57a786ull, 0x0aa294b9228e7ee5ull, 0x55b0fe2faea6c534ull,
+ 0xf108b772922d318aull, 0xdfb69702f15bddf6ull, 0x90e1db66cd438a4eull,
+ 0x568ef6cb584ce4a1ull, 0x6da376ba69e55f9dull, 0x45c7e2945ca6c109ull,
+ 0xcf5b6c0cc977b3e9ull, 0x11b487ae1d694499ull, 0xbcb3cc6ecf8339acull,
+ 0x046b107150b828e0ull, 0x2c6159465703ed0dull, 0xa908dbd0720d1610ull,
+ 0x22c076e2742bbe33ull, 0x1d0cefa448966a66ull, 0x601352bf1dde819full,
+ 0xa585cc4ab9370c39ull, 0x5a2f7206eb857f94ull, 0x49cd0f1f3fae6b58ull,
+ 0x1b89d47678e5fb3dull, 0xed82945b74e9e65bull, 0x2941c4d9b74e6483ull,
+ 0x565c18dc7e087accull, 0xbf4ccd3d1a09f2e5ull, 0xa522631dd304e977ull,
+ 0x4517109b6123378eull, 0x4bf1a506b7e4285aull, 0x683172f8625803c2ull,
+ 0x3f8a2b11c84e7354ull, 0xed4204917dd12b89ull, 0x9853fb978c698b0bull,
+ 0xb697e1c99631777bull, 0x510381105f028f05ull, 0x30e255e39055f055ull,
+ 0xb990321ee2d0c1b6ull, 0xff4dc144a8fdf4d1ull, 0x148999e0521a3056ull,
+ 0xa9c96852a8111c66ull, 0x4b394a948157f508ull, 0x94ec2e93a0dc4df1ull,
+ 0x8fc283776e6afa56ull, 0xc435186ff72ffa04ull, 0x8d037f6ff91488b7ull,
+ 0x48757727a899ec1eull, 0xb8cf377d4101b612ull, 0xb4570569a5a54e68ull,
+ 0x063d9cfd2ac5a0a0ull, 0xf1a5884c7c504c74ull, 0x8d0b91bf0a9b1955ull,
+ 0x79ff5361e5f6862full, 0xc6fd31fb0ed3d38full, 0x85b9c6489fe131c7ull,
+ 0x8e77e86b8febf2b4ull, 0x56429986992ba80eull, 0x608cdda56848879aull,
+ 0x754b300e3e0d106eull, 0xafd5195b25200576ull, 0xe81f09395d37aad9ull,
+ 0xdeeea20ae00a390eull, 0xb5d51155f5fef0beull, 0x9e72ebcf6e27d173ull,
+ 0xb966f7bab776e978ull, 0x726c840809520238ull, 0x65dce5a23347ebc5ull,
+ 0x8c92d7403ec78337ull, 0x32caec933cdde3feull, 0x411be811d20379aeull,
+ 0x72fa1bbd41756580ull, 0x84c42f04a92125b3ull, 0x3a25922cdd4ee5feull,
+ 0x49ad3be096446853ull, 0x1c841afe2880366dull, 0xfb905fe1f1e09019ull,
+ 0x3ba9d0c9a451ad59ull, 0xa42419f256db2e9cull, 0x3c9a3ca5e921e7a0ull,
+ 0xcec7d091ad8ea375ull, 0x477ef58f99bdb940ull, 0xb2598b8d8a4933c7ull,
+ 0xcfac1e1cf5659df7ull, 0xe2a04aab339f8748ull, 0x45bc6f37e122b03full,
+ 0x9c75aaa0c9feeb30ull, 0x0ea0585dc13c174eull, 0x3a96bd5adc58bbb4ull,
+ 0x3c7a714d20251482ull, 0x6cb83b6b696897ebull, 0x3b496b5fa37de406ull,
+ 0x380dd38237e75d6aull, 0xda26fac90e1a513cull, 0x12b5c6eaf2458364ull,
+ 0x1ff1fcbf79ce9e47ull, 0x59a6a7babe7c6e86ull, 0x947614538d70f515ull,
+ 0x8768ffb26b04e425ull, 0x3f9e84071ca5f425ull, 0x5f8f67563b641184ull,
+ 0x56bc212062b1a5a5ull, 0x17f2fa18d1e5da68ull, 0xa1bc9c068cce5e2dull,
+ 0x892df1af8e290fb1ull, 0xb43e5517ad10b8c8ull, 0x4407c38fd0597409ull,
+ 0xfea9c9b64a020d81ull, 0xd5b2aaf9d8e0e7d6ull, 0xda44ed4ade5e9b40ull,
+ 0x87aa3ca045d6bf41ull, 0x4708acc8c62d12fcull, 0x0d1227ff10212e26ull,
+ 0x5da02550feeb5742ull, 0x1d56e5e1d66668e7ull, 0xae1e0bef32c215ecull,
+ 0x58c0e9227f048b7eull, 0x58251aac2aea8619ull, 0xa1fea536bbe10425ull,
+ 0xd233eb7d2e1d9667ull, 0xb0693c67cf435c0bull, 0x903ec9f061d918eaull,
+ 0x0efb1788d6c4e8acull, 0x1709d878b0098f5bull, 0x3f6ce1b73c12b35eull,
+ 0x8a8f7dbba1b3ff54ull, 0x73e8563e37608d6aull, 0x64e00749a3330540ull,
+ 0x8d5caaf9ebbfcab9ull, 0xedb2bd943bc87c7eull, 0xe656dec322f8f62dull,
+ 0x670c1626c5683222ull, 0x4237542f94089e7full, 0x2fc4e53047d29440ull,
+ 0x8b288dac8419441eull, 0xa7afb4e97f9245f9ull, 0x082adef78a15650dull,
+ 0x043c62de3104ef19ull, 0x7ecd06350aff3dc5ull, 0xe0600fade7e80a8bull,
+ 0x81ebf4e04d8e81ccull, 0x7b372af7f587e30full, 0xdee11c6f2d8f8ca0ull,
+ 0xf8adc426d3624b1cull, 0x5c22de4fca9debedull, 0xfae3186b3634f778ull,
+ 0xd7bfa75facf8b595ull, 0xbbfe3cf6003cd316ull, 0xc51055a1b023cb50ull,
+ 0x93869a770063cffdull, 0xfbceeb1051e022d4ull, 0x109defc95187457eull,
+ 0xe13cfde2673892d8ull, 0xc09c8134d4aa3272ull, 0x0327181bbf89ad5bull,
+ 0xaa21b63209511ec7ull, 0xe41885b5d7e72186ull, 0x493d278946713f9cull,
+ 0xd5d22a5c1386c526ull, 0xcf59281ccefddfc4ull, 0x4ebe43f692973ea6ull,
+ 0x6cf4897deac5c6adull, 0x82ce562ad95082a0ull, 0x28d8f0db28e5e9bdull,
+ 0x707b0166ddf06e81ull, 0xfbf5756a7dae3f00ull, 0x4f114102035a4680ull,
+ 0x5190fedfe7ba4b33ull, 0xe5f1bc49106a7594ull, 0xd7a1a766aae3ad67ull,
+ 0x9120a214040ee971ull, 0x1edc87eaf415b374ull, 0xc6ad637d17aab43cull,
+ 0xd90303c7885858c1ull, 0x3ff4eb0ebfd4b70bull, 0xd81eea30344a9a88ull,
+ 0x5adef0ec95925446ull, 0x20bbd8c3abb5f5e7ull, 0xe6944262c1c22cceull,
+ 0x80024021c5acdb23ull, 0x94b30c812232c635ull, 0x78569acd55f07648ull,
+ 0x4dd6b5289696ea39ull, 0xde5853b31c3e1b40ull, 0x6eb5a7d88a2c3679ull,
+ 0x8f9cf09656bda89aull, 0x6481c7e7fda86d5bull, 0x15bfb45d50a6a7d5ull,
+ 0xc057d45d4f9a5381ull, 0xa0009f004fb10024ull, 0xac420f745e1ca0ddull,
+ 0xf0d4a615cfbb38bdull, 0x0e3aef8419bf0318ull, 0x166c1e3ecb3d7b20ull,
+ 0x3bfacf9f58272fddull, 0x63a13528c0f5ce46ull, 0xa020ca8cea59e333ull,
+ 0x3dbb5a3daadd116bull, 0x747f55eae5523f47ull, 0x64d520fb0922171eull,
+ 0x07ce951b6c709e84ull, 0x7508eb6d35fdc402ull, 0xb0d11c39c495a8faull,
+ 0x57447ef081313d65ull, 0xf72301f3a7b61e26ull, 0x45a3a7c5bb096315ull,
+ 0x00432f88a903a44bull, 0xeb4e1b6619081987ull, 0x6d245171bb7b66bdull,
+ 0x0d89bd0bde4182f5ull, 0xf70d8a6087f4de6cull, 0x08a274499a87855bull,
+ 0xd49640174ac7720aull, 0x4db3488cb0d9ddacull, 0xd07b745bfe397d44ull,
+ 0x6e9d567d197dcb7bull, 0x9143fef1e3b90812ull, 0x115ff96db9e002acull,
+ 0x5b61c9c8f60a2201ull, 0xb14a44a709abab2full, 0x843c79970ca19c73ull,
+ 0x5e3fc18ce3a9bbe6ull, 0x764df59d0c0404eeull, 0x4ad0ba3c990ec2c2ull,
+ 0xe599647d05e8be0full, 0x4d0c2990c19d365dull, 0xb680a72de5a9d9acull,
+ 0x6d6c02674ce2e5ddull, 0xbd6078e006f9c25bull, 0xd742fa41b5fcdc81ull,
+ 0xc691adc0cccc2399ull, 0xea73b0c3215ad82cull, 0xf499e0a6a511e5b0ull,
+ 0xd94440a253e27ab0ull, 0x9a6e364447752521ull, 0x8f8b301dab113708ull,
+ 0x00000000058a42a3ull,
#endif
};
@@ -437,7 +1307,7 @@ const mp_limb_t __tens[] =
/* Each of array variable above defines one mpn integer which is a power of 10.
This table points to those variables, indexed by the exponent. */
-const struct mp_power _fpioconst_pow10[LDBL_MAX_10_EXP_LOG + 1] =
+const struct mp_power _fpioconst_pow10[FPIOCONST_POW10_ARRAY_SIZE] =
{
{ TENS_P0_IDX, TENS_P0_SIZE, 4, },
{ TENS_P1_IDX, TENS_P1_SIZE, 7, 4 },
@@ -448,14 +1318,12 @@ const struct mp_power _fpioconst_pow10[LDBL_MAX_10_EXP_LOG + 1] =
{ TENS_P6_IDX, TENS_P6_SIZE, 213, 210 },
{ TENS_P7_IDX, TENS_P7_SIZE, 426, 422 },
{ TENS_P8_IDX, TENS_P8_SIZE, 851, 848 },
-#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
{ TENS_P9_IDX, TENS_P9_SIZE, 1701, 1698 },
{ TENS_P10_IDX, TENS_P10_SIZE, 3402, 3399 },
+#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
{ TENS_P11_IDX, TENS_P11_SIZE, 6804, 6800 },
- { TENS_P12_IDX, TENS_P12_SIZE, 13607, 13604 }
+ { TENS_P12_IDX, TENS_P12_SIZE, 13607, 13604 },
+ { TENS_P13_IDX, TENS_P13_SIZE, 27214, 27210 },
+ { TENS_P14_IDX, TENS_P14_SIZE, 54427, 54424 },
#endif
};
-
-#if LAST_POW10 > _LAST_POW10
-# error "Need to expand 10^(2^i) table for i up to" LAST_POW10
-#endif
diff --git a/stdlib/fpioconst.h b/stdlib/fpioconst.h
index 5ab19f5bf1..34478b71cf 100644
--- a/stdlib/fpioconst.h
+++ b/stdlib/fpioconst.h
@@ -1,6 +1,5 @@
/* Header file for constants used in floating point <-> decimal conversions.
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,6 +40,13 @@
#define DBL_MAX_10_EXP_LOG 8 /* = floor(log_2(DBL_MAX_10_EXP)) */
#define FLT_MAX_10_EXP_LOG 5 /* = floor(log_2(FLT_MAX_10_EXP)) */
+/* For strtold, we need powers of 10 up to floor (log_2 (LDBL_MANT_DIG
+ - LDBL_MIN_EXP + 2)). */
+#if !defined __NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__ > 1024
+# define FPIOCONST_POW10_ARRAY_SIZE 15
+#else
+# define FPIOCONST_POW10_ARRAY_SIZE 11
+#endif
/* The array with the number representation. */
extern const mp_limb_t __tens[] attribute_hidden;
@@ -54,7 +60,7 @@ struct mp_power
int p_expo; /* Exponent of the number 10^(2^i). */
int m_expo; /* Exponent of the number 10^-(2^i-1). */
};
-extern const struct mp_power _fpioconst_pow10[LDBL_MAX_10_EXP_LOG + 1]
+extern const struct mp_power _fpioconst_pow10[FPIOCONST_POW10_ARRAY_SIZE]
attribute_hidden;
/* The constants in the array `_fpioconst_pow10' have an offset. */
diff --git a/stdlib/gen-fpioconst.c b/stdlib/gen-fpioconst.c
new file mode 100644
index 0000000000..0d26d8ef11
--- /dev/null
+++ b/stdlib/gen-fpioconst.c
@@ -0,0 +1,107 @@
+/* Generate data for fpioconst.c.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gmp.h>
+
+int
+main (void)
+{
+ FILE *out32 = fopen ("fpioconst-32", "w");
+ if (out32 == NULL)
+ abort ();
+ FILE *out64 = fopen ("fpioconst-64", "w");
+ if (out64 == NULL)
+ abort ();
+ FILE *outtable = fopen ("fpioconst-table", "w");
+ if (outtable == NULL)
+ abort ();
+ mpz_t p;
+ mpz_init (p);
+ for (int i = 0; i <= 14; i++)
+ {
+ int j = 1 << i;
+ mpz_ui_pow_ui (p, 10, j - 1);
+ int exp_m = mpz_sizeinbase (p, 2);
+ mpz_ui_pow_ui (p, 10, j);
+ int exp_p = mpz_sizeinbase (p, 2);
+ int size32 = 2 + (exp_p + 31) / 32;
+ int size64 = 1 + (exp_p + 63) / 64;
+ uint32_t data32[size32];
+ uint64_t data64[size64];
+ memset (data32, 0, sizeof data32);
+ memset (data64, 0, sizeof data64);
+ mpz_export (data32 + 2, NULL, -1, 4, 0, 0, p);
+ mpz_export (data64 + 1, NULL, -1, 8, 0, 0, p);
+ if (i == 0)
+ {
+ fprintf (out32, "#define TENS_P%d_IDX\t0\n", i);
+ fprintf (out64, "#define TENS_P%d_IDX\t0\n", i);
+ }
+ else
+ {
+ fprintf (out32, "#define TENS_P%d_IDX\t"
+ "(TENS_P%d_IDX + TENS_P%d_SIZE)\n",
+ i, i - 1, i - 1);
+ fprintf (out64, "#define TENS_P%d_IDX\t"
+ "(TENS_P%d_IDX + TENS_P%d_SIZE)\n",
+ i, i - 1, i - 1);
+ }
+ fprintf (out32, "#define TENS_P%d_SIZE\t%d\n", i, size32);
+ fprintf (out64, "#define TENS_P%d_SIZE\t%d\n", i, size64);
+ for (int k = 0; k < size32; k++)
+ {
+ if (k == 0)
+ fprintf (out32, " [TENS_P%d_IDX] = ", i);
+ else if (k % 6 == 5)
+ fprintf (out32, "\n ");
+ else
+ fprintf (out32, " ");
+ fprintf (out32, "0x%08"PRIx32",", data32[k]);
+ }
+ for (int k = 0; k < size64; k++)
+ {
+ if (k == 0)
+ fprintf (out64, " [TENS_P%d_IDX] = ", i);
+ else if (k % 3 == 2)
+ fprintf (out64, "\n ");
+ else
+ fprintf (out64, " ");
+ fprintf (out64, "0x%016"PRIx64"ull,", data64[k]);
+ }
+ fprintf (out32, "\n\n");
+ fprintf (out64, "\n\n");
+ const char *t = (i >= 10 ? "\t" : "\t\t");
+ if (i == 0)
+ fprintf (outtable, " { TENS_P%d_IDX, TENS_P%d_SIZE,%s%d,\t },\n",
+ i, i, t, exp_p);
+ else
+ fprintf (outtable, " { TENS_P%d_IDX, TENS_P%d_SIZE,%s%d,\t%5d },\n",
+ i, i, t, exp_p, exp_m);
+ }
+ if (fclose (out32) != 0)
+ abort ();
+ if (fclose (out64) != 0)
+ abort ();
+ if (fclose (outtable) != 0)
+ abort ();
+ return 0;
+}
diff --git a/stdlib/gen-tst-strtod-round.c b/stdlib/gen-tst-strtod-round.c
new file mode 100644
index 0000000000..56aafab02e
--- /dev/null
+++ b/stdlib/gen-tst-strtod-round.c
@@ -0,0 +1,147 @@
+/* Generate table of tests in tst-strtod-round.c from
+ tst-strtod-round-data.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define _GNU_SOURCE
+#include <assert.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <mpfr.h>
+
+/* Work around incorrect ternary value from mpfr_strtofr
+ <https://sympa.inria.fr/sympa/arc/mpfr/2012-08/msg00005.html>. */
+#define WORKAROUND
+
+static int
+string_to_fp (mpfr_t f, const char *s, mpfr_rnd_t rnd)
+{
+#ifdef WORKAROUND
+ mpfr_t f2;
+ mpfr_init2 (f2, 100000);
+ int r0 = mpfr_strtofr (f2, s, NULL, 0, rnd);
+ int r = mpfr_set (f, f2, rnd);
+ mpfr_subnormalize (f, r, rnd);
+ mpfr_clear (f2);
+ return r0 | r;
+#else
+ int r = mpfr_strtofr (f, s, NULL, 0, rnd);
+ mpfr_subnormalize (f, r, rnd);
+ return r;
+#endif
+}
+
+static void
+print_fp (mpfr_t f, const char *suffix, const char *suffix2)
+{
+ if (mpfr_inf_p (f))
+ mpfr_printf ("\t%sINFINITY%s", mpfr_signbit (f) ? "-" : "", suffix2);
+ else
+ mpfr_printf ("\t%Ra%s%s", f, suffix, suffix2);
+}
+
+static void
+round_str (const char *s, const char *suffix,
+ int prec, int emin, int emax, bool need_exact)
+{
+ mpfr_t f;
+ mpfr_set_default_prec (prec);
+ mpfr_set_emin (emin);
+ mpfr_set_emax (emax);
+ mpfr_init (f);
+ int r = string_to_fp (f, s, MPFR_RNDD);
+ if (need_exact)
+ {
+ assert (prec == 106 && emin == -1073 && emax == 1024);
+ /* The maximum value in IBM long double has discontiguous
+ mantissa bits. */
+ mpfr_t max_value;
+ mpfr_init2 (max_value, 107);
+ mpfr_set_str (max_value, "0x1.fffffffffffff7ffffffffffffcp+1023", 0,
+ MPFR_RNDN);
+ if (mpfr_cmpabs (f, max_value) > 0)
+ r = 1;
+ mpfr_printf ("\t%s,\n", r ? "false" : "true");
+ mpfr_clear (max_value);
+ }
+ print_fp (f, suffix, ",\n");
+ string_to_fp (f, s, MPFR_RNDN);
+ print_fp (f, suffix, ",\n");
+ string_to_fp (f, s, MPFR_RNDZ);
+ print_fp (f, suffix, ",\n");
+ string_to_fp (f, s, MPFR_RNDU);
+ print_fp (f, suffix, "");
+ mpfr_clear (f);
+}
+
+static void
+round_for_all (const char *s)
+{
+ static const struct fmt {
+ const char *suffix;
+ int prec;
+ int emin;
+ int emax;
+ bool need_exact;
+ } formats[7] = {
+ { "f", 24, -148, 128, false },
+ { "", 53, -1073, 1024, false },
+ { "L", 53, -1073, 1024, false },
+ /* This is the Intel extended float format. */
+ { "L", 64, -16444, 16384, false },
+ /* This is the Motorola extended float format. */
+ { "L", 64, -16445, 16384, false },
+ { "L", 106, -1073, 1024, true },
+ { "L", 113, -16493, 16384, false },
+ };
+ mpfr_printf (" TEST (\"");
+ const char *p;
+ for (p = s; *p; p++)
+ {
+ putchar (*p);
+ if ((p - s) % 60 == 59 && p[1])
+ mpfr_printf ("\"\n\t\"");
+ }
+ mpfr_printf ("\",\n");
+ int i;
+ for (i = 0; i < 7; i++)
+ {
+ round_str (s, formats[i].suffix, formats[i].prec,
+ formats[i].emin, formats[i].emax, formats[i].need_exact);
+ if (i < 6)
+ mpfr_printf (",\n");
+ }
+ mpfr_printf ("),\n");
+}
+
+int
+main (void)
+{
+ char *p = NULL;
+ size_t len;
+ ssize_t nbytes;
+ while ((nbytes = getline (&p, &len, stdin)) != -1)
+ {
+ if (p[nbytes - 1] == '\n')
+ p[nbytes - 1] = 0;
+ round_for_all (p);
+ free (p);
+ p = NULL;
+ }
+ return 0;
+}
diff --git a/stdlib/gmp-impl.h b/stdlib/gmp-impl.h
index f6454ee2d0..7e94624859 100644
--- a/stdlib/gmp-impl.h
+++ b/stdlib/gmp-impl.h
@@ -1,6 +1,6 @@
/* Include file for internal GNU MP types and definitions.
-Copyright (C) 1991, 1993, 1994, 1995, 1996, 2011 Free Software Foundation, Inc.
+Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -216,7 +216,8 @@ extern mp_size_t __gmp_default_fp_limb_precision;
has to be set. Put the quotient in Q and the remainder in R. */
#define udiv_qrnnd_preinv(q, r, nh, nl, d, di) \
do { \
- mp_limb_t _q, _ql, _r; \
+ mp_limb_t _ql __attribute__ ((unused)); \
+ mp_limb_t _q, _r; \
mp_limb_t _xh, _xl; \
umul_ppmm (_q, _ql, (nh), (di)); \
_q += (nh); /* DI is 2**BITS_PER_MP_LIMB too small */\
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 0427718396..30e638ca13 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -850,8 +850,6 @@ UDItype __umulsidi3 (USItype, USItype);
FIXME: What's needed for gcc PowerPC VxWorks? __vxworks__ is not good
enough, since that hits ARM and m68k too. */
#if (defined (_ARCH_PPC) /* AIX */ \
- || defined (_ARCH_PWR) /* AIX */ \
- || defined (_ARCH_COM) /* AIX */ \
|| defined (__powerpc__) /* gcc */ \
|| defined (__POWERPC__) /* BEOS */ \
|| defined (__ppc__) /* Darwin */ \
@@ -862,37 +860,37 @@ UDItype __umulsidi3 (USItype, USItype);
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (bh) && (bh) == 0) \
- __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
+ __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
- __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
+ __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
else \
- __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
+ __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
: "=r" (sh), "=&r" (sl) \
: "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
} while (0)
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (ah) && (ah) == 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
else if (__builtin_constant_p (bh) && (bh) == 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
else \
- __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
+ __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
: "=r" (sh), "=&r" (sl) \
: "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
} while (0)
#define count_leading_zeros(count, x) \
- __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
+ __asm__ ("cntlzw %0,%1" : "=r" (count) : "r" (x))
#define COUNT_LEADING_ZEROS_0 32
#if defined (_ARCH_PPC) || defined (__powerpc__) || defined (__POWERPC__) \
|| defined (__ppc__) \
@@ -914,14 +912,6 @@ UDItype __umulsidi3 (USItype, USItype);
} while (0)
#define SMUL_TIME 14
#define UDIV_TIME 120
-#elif defined (_ARCH_PWR)
-#define UMUL_TIME 8
-#define smul_ppmm(xh, xl, m0, m1) \
- __asm__ ("mul %0,%2,%3" : "=r" (xh), "=q" (xl) : "r" (m0), "r" (m1))
-#define SMUL_TIME 4
-#define sdiv_qrnnd(q, r, nh, nl, d) \
- __asm__ ("div %0,%2,%4" : "=r" (q), "=q" (r) : "r" (nh), "1" (nl), "r" (d))
-#define UDIV_TIME 100
#endif
#endif /* 32-bit POWER architecture variants. */
@@ -931,32 +921,32 @@ UDItype __umulsidi3 (USItype, USItype);
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (bh) && (bh) == 0) \
- __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2" \
+ __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
- __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2" \
+ __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
else \
- __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3" \
+ __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3" \
: "=r" (sh), "=&r" (sl) \
: "%r" (ah), "r" (bh), "%r" (al), "rI" (bl)); \
} while (0)
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
do { \
if (__builtin_constant_p (ah) && (ah) == 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
else if (__builtin_constant_p (ah) && (ah) == ~(UDItype) 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
else if (__builtin_constant_p (bh) && (bh) == 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
else if (__builtin_constant_p (bh) && (bh) == ~(UDItype) 0) \
- __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2" \
+ __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2" \
: "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
else \
- __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2" \
+ __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2" \
: "=r" (sh), "=&r" (sl) \
: "r" (ah), "r" (bh), "rI" (al), "r" (bl)); \
} while (0)
diff --git a/stdlib/mod_1.c b/stdlib/mod_1.c
index 00f338baf1..d325a931ad 100644
--- a/stdlib/mod_1.c
+++ b/stdlib/mod_1.c
@@ -3,7 +3,7 @@
Return the single-limb remainder.
There are no constraints on the value of the divisor.
-Copyright (C) 1991, 1993, 1994, Free Software Foundation, Inc.
+Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -49,7 +49,7 @@ mpn_mod_1 (dividend_ptr, dividend_size, divisor_limb)
{
mp_size_t i;
mp_limb_t n1, n0, r;
- mp_limb_t dummy;
+ mp_limb_t dummy __attribute__ ((unused));
/* Botch: Should this be handled at all? Rely on callers? */
if (dividend_size == 0)
diff --git a/stdlib/secure-getenv.c b/stdlib/secure-getenv.c
index 2e696e90f0..7634faea84 100644
--- a/stdlib/secure-getenv.c
+++ b/stdlib/secure-getenv.c
@@ -32,6 +32,6 @@ __libc_secure_getenv (name)
weak_alias (__libc_secure_getenv, secure_getenv)
libc_hidden_weak (__libc_secure_getenv)
-#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_16)
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)
compat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);
#endif
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 2166a08d21..fdce35742a 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -60,6 +60,9 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
#include <math.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
+#include <rounding-mode.h>
+#include <tininess.h>
/* The gmp headers need some configuration frobs. */
#define HAVE_ALLOCA 1
@@ -72,7 +75,6 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
#include "longlong.h"
#include "fpioconst.h"
-#define NDEBUG 1
#include <assert.h>
@@ -126,6 +128,8 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
#define MIN_EXP PASTE(FLT,_MIN_EXP)
#define MAX_10_EXP PASTE(FLT,_MAX_10_EXP)
#define MIN_10_EXP PASTE(FLT,_MIN_10_EXP)
+#define MAX_VALUE PASTE(FLT,_MAX)
+#define MIN_VALUE PASTE(FLT,_MIN)
/* Extra macros required to get FLT expanded before the pasting. */
#define PASTE(a,b) PASTE1(a,b)
@@ -153,17 +157,18 @@ extern const mp_limb_t _tens_in_limb[MAX_DIG_PER_LIMB + 1];
#endif
#define SWAP(x, y) ({ typeof(x) _tmp = x; x = y; y = _tmp; })
-#define NDIG (MAX_10_EXP - MIN_10_EXP + 2 * MANT_DIG)
-#define HEXNDIG ((MAX_EXP - MIN_EXP + 7) / 8 + 2 * MANT_DIG)
#define RETURN_LIMB_SIZE howmany (MANT_DIG, BITS_PER_MP_LIMB)
#define RETURN(val,end) \
do { if (endptr != NULL) *endptr = (STRING_TYPE *) (end); \
return val; } while (0)
-/* Maximum size necessary for mpn integers to hold floating point numbers. */
-#define MPNSIZE (howmany (MAX_EXP + 2 * MANT_DIG, BITS_PER_MP_LIMB) \
- + 2)
+/* Maximum size necessary for mpn integers to hold floating point
+ numbers. The largest number we need to hold is 10^n where 2^-n is
+ 1/4 ulp of the smallest representable value (that is, n = MANT_DIG
+ - MIN_EXP + 2). Approximate using 10^3 < 2^10. */
+#define MPNSIZE (howmany (1 + ((MANT_DIG - MIN_EXP + 2) * 10) / 3, \
+ BITS_PER_MP_LIMB) + 2)
/* Declare an mpn integer variable that big. */
#define MPN_VAR(name) mp_limb_t name[MPNSIZE]; mp_size_t name##size
/* Copy an mpn integer value. */
@@ -171,21 +176,49 @@ extern const mp_limb_t _tens_in_limb[MAX_DIG_PER_LIMB + 1];
memcpy (dst, src, (dst##size = src##size) * sizeof (mp_limb_t))
+/* Set errno and return an overflowing value with sign specified by
+ NEGATIVE. */
+static FLOAT
+overflow_value (int negative)
+{
+ __set_errno (ERANGE);
+#if FLT_EVAL_METHOD != 0
+ volatile
+#endif
+ FLOAT result = (negative ? -MAX_VALUE : MAX_VALUE) * MAX_VALUE;
+ return result;
+}
+
+
+/* Set errno and return an underflowing value with sign specified by
+ NEGATIVE. */
+static FLOAT
+underflow_value (int negative)
+{
+ __set_errno (ERANGE);
+#if FLT_EVAL_METHOD != 0
+ volatile
+#endif
+ FLOAT result = (negative ? -MIN_VALUE : MIN_VALUE) * MIN_VALUE;
+ return result;
+}
+
+
/* Return a floating point number of the needed type according to the given
multi-precision number after possible rounding. */
static FLOAT
-round_and_return (mp_limb_t *retval, int exponent, int negative,
+round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
mp_limb_t round_limb, mp_size_t round_bit, int more_bits)
{
+ int mode = get_rounding_mode ();
+
if (exponent < MIN_EXP - 1)
{
- mp_size_t shift = MIN_EXP - 1 - exponent;
+ if (exponent < MIN_EXP - 1 - MANT_DIG)
+ return underflow_value (negative);
- if (shift > MANT_DIG)
- {
- __set_errno (ERANGE);
- return 0.0;
- }
+ mp_size_t shift = MIN_EXP - 1 - exponent;
+ bool is_tiny = true;
more_bits |= (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0;
if (shift == MANT_DIG)
@@ -219,6 +252,33 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
}
else if (shift > 0)
{
+ if (TININESS_AFTER_ROUNDING && shift == 1)
+ {
+ /* Whether the result counts as tiny depends on whether,
+ after rounding to the normal precision, it still has
+ a subnormal exponent. */
+ mp_limb_t retval_normal[RETURN_LIMB_SIZE];
+ if (round_away (negative,
+ (retval[0] & 1) != 0,
+ (round_limb
+ & (((mp_limb_t) 1) << round_bit)) != 0,
+ (more_bits
+ || ((round_limb
+ & ((((mp_limb_t) 1) << round_bit) - 1))
+ != 0)),
+ mode))
+ {
+ mp_limb_t cy = __mpn_add_1 (retval_normal, retval,
+ RETURN_LIMB_SIZE, 1);
+
+ if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy) ||
+ ((MANT_DIG % BITS_PER_MP_LIMB) != 0 &&
+ ((retval_normal[RETURN_LIMB_SIZE - 1]
+ & (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB)))
+ != 0)))
+ is_tiny = false;
+ }
+ }
round_limb = retval[0];
round_bit = shift - 1;
(void) __mpn_rshift (retval, retval, RETURN_LIMB_SIZE, shift);
@@ -230,12 +290,26 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
# define DENORM_EXP (MIN_EXP - 2)
#endif
exponent = DENORM_EXP;
- __set_errno (ERANGE);
+ if (is_tiny
+ && ((round_limb & (((mp_limb_t) 1) << round_bit)) != 0
+ || more_bits
+ || (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0))
+ {
+ __set_errno (ERANGE);
+ volatile FLOAT force_underflow_exception = MIN_VALUE * MIN_VALUE;
+ (void) force_underflow_exception;
+ }
}
- if ((round_limb & (((mp_limb_t) 1) << round_bit)) != 0
- && (more_bits || (retval[0] & 1) != 0
- || (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0))
+ if (exponent > MAX_EXP)
+ goto overflow;
+
+ if (round_away (negative,
+ (retval[0] & 1) != 0,
+ (round_limb & (((mp_limb_t) 1) << round_bit)) != 0,
+ (more_bits
+ || (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0),
+ mode))
{
mp_limb_t cy = __mpn_add_1 (retval, retval, RETURN_LIMB_SIZE, 1);
@@ -258,7 +332,8 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
}
if (exponent > MAX_EXP)
- return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
+ overflow:
+ return overflow_value (negative);
return MPN2FLOAT (retval, exponent, negative);
}
@@ -271,7 +346,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
factor for the resulting number (see code) multiply by it. */
static const STRING_TYPE *
str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
- int *exponent
+ intmax_t *exponent
#ifndef USE_WIDE_CHAR
, const char *decimal, size_t decimal_len, const char *thousands
#endif
@@ -301,6 +376,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
cy += __mpn_add_1 (n, n, *nsize, low);
if (cy != 0)
{
+ assert (*nsize < MPNSIZE);
n[*nsize] = cy;
++(*nsize);
}
@@ -335,7 +411,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
}
while (--digcnt > 0);
- if (*exponent > 0 && cnt + *exponent <= MAX_DIG_PER_LIMB)
+ if (*exponent > 0 && *exponent <= MAX_DIG_PER_LIMB - cnt)
{
low *= _tens_in_limb[*exponent];
start = _tens_in_limb[cnt + *exponent];
@@ -355,7 +431,10 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
cy = __mpn_mul_1 (n, n, *nsize, start);
cy += __mpn_add_1 (n, n, *nsize, low);
if (cy != 0)
- n[(*nsize)++] = cy;
+ {
+ assert (*nsize < MPNSIZE);
+ n[(*nsize)++] = cy;
+ }
}
return str;
@@ -413,7 +492,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
{
int negative; /* The sign of the number. */
MPN_VAR (num); /* MP representation of the number. */
- int exponent; /* Exponent of the number. */
+ intmax_t exponent; /* Exponent of the number. */
/* Numbers starting `0X' or `0x' have to be processed with base 16. */
int base = 10;
@@ -435,7 +514,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
/* Points at the character following the integer and fractional digits. */
const STRING_TYPE *expp;
/* Total number of digit and number of digits in integer part. */
- int dig_no, int_no, lead_zero;
+ size_t dig_no, int_no, lead_zero;
/* Contains the last character read. */
CHAR_TYPE c;
@@ -767,7 +846,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
are all or any is really a fractional digit will be decided
later. */
int_no = dig_no;
- lead_zero = int_no == 0 ? -1 : 0;
+ lead_zero = int_no == 0 ? (size_t) -1 : 0;
/* Read the fractional digits. A special case are the 'american
style' numbers like `16.' i.e. with decimal point but without
@@ -789,12 +868,13 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
(base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
lo >= L_('a') && lo <= L_('f'); })))
{
- if (c != L_('0') && lead_zero == -1)
+ if (c != L_('0') && lead_zero == (size_t) -1)
lead_zero = dig_no - int_no;
++dig_no;
c = *++cp;
}
}
+ assert (dig_no <= (uintmax_t) INTMAX_MAX);
/* Remember start of exponent (if any). */
expp = cp;
@@ -817,24 +897,80 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
if (c >= L_('0') && c <= L_('9'))
{
- int exp_limit;
+ intmax_t exp_limit;
/* Get the exponent limit. */
if (base == 16)
- exp_limit = (exp_negative ?
- -MIN_EXP + MANT_DIG + 4 * int_no :
- MAX_EXP - 4 * int_no + 4 * lead_zero + 3);
+ {
+ if (exp_negative)
+ {
+ assert (int_no <= (uintmax_t) (INTMAX_MAX
+ + MIN_EXP - MANT_DIG) / 4);
+ exp_limit = -MIN_EXP + MANT_DIG + 4 * (intmax_t) int_no;
+ }
+ else
+ {
+ if (int_no)
+ {
+ assert (lead_zero == 0
+ && int_no <= (uintmax_t) INTMAX_MAX / 4);
+ exp_limit = MAX_EXP - 4 * (intmax_t) int_no + 3;
+ }
+ else if (lead_zero == (size_t) -1)
+ {
+ /* The number is zero and this limit is
+ arbitrary. */
+ exp_limit = MAX_EXP + 3;
+ }
+ else
+ {
+ assert (lead_zero
+ <= (uintmax_t) (INTMAX_MAX - MAX_EXP - 3) / 4);
+ exp_limit = (MAX_EXP
+ + 4 * (intmax_t) lead_zero
+ + 3);
+ }
+ }
+ }
else
- exp_limit = (exp_negative ?
- -MIN_10_EXP + MANT_DIG + int_no :
- MAX_10_EXP - int_no + lead_zero + 1);
+ {
+ if (exp_negative)
+ {
+ assert (int_no
+ <= (uintmax_t) (INTMAX_MAX + MIN_10_EXP - MANT_DIG));
+ exp_limit = -MIN_10_EXP + MANT_DIG + (intmax_t) int_no;
+ }
+ else
+ {
+ if (int_no)
+ {
+ assert (lead_zero == 0
+ && int_no <= (uintmax_t) INTMAX_MAX);
+ exp_limit = MAX_10_EXP - (intmax_t) int_no + 1;
+ }
+ else if (lead_zero == (size_t) -1)
+ {
+ /* The number is zero and this limit is
+ arbitrary. */
+ exp_limit = MAX_10_EXP + 1;
+ }
+ else
+ {
+ assert (lead_zero
+ <= (uintmax_t) (INTMAX_MAX - MAX_10_EXP - 1));
+ exp_limit = MAX_10_EXP + (intmax_t) lead_zero + 1;
+ }
+ }
+ }
+
+ if (exp_limit < 0)
+ exp_limit = 0;
do
{
- exponent *= 10;
- exponent += c - L_('0');
-
- if (__builtin_expect (exponent > exp_limit, 0))
+ if (__builtin_expect ((exponent > exp_limit / 10
+ || (exponent == exp_limit / 10
+ && c - L_('0') > exp_limit % 10)), 0))
/* The exponent is too large/small to represent a valid
number. */
{
@@ -843,14 +979,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
/* We have to take care for special situation: a joker
might have written "0.0e100000" which is in fact
zero. */
- if (lead_zero == -1)
+ if (lead_zero == (size_t) -1)
result = negative ? -0.0 : 0.0;
else
{
/* Overflow or underflow. */
- __set_errno (ERANGE);
- result = (exp_negative ? (negative ? -0.0 : 0.0) :
- negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL);
+ result = (exp_negative
+ ? underflow_value (negative)
+ : overflow_value (negative));
}
/* Accept all following digits as part of the exponent. */
@@ -862,6 +998,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
/* NOTREACHED */
}
+ exponent *= 10;
+ exponent += c - L_('0');
+
c = *++cp;
}
while (c >= L_('0') && c <= L_('9'));
@@ -930,7 +1069,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
}
#endif
startp += lead_zero + decimal_len;
- exponent -= base == 16 ? 4 * lead_zero : lead_zero;
+ assert (lead_zero <= (base == 16
+ ? (uintmax_t) INTMAX_MAX / 4
+ : (uintmax_t) INTMAX_MAX));
+ assert (lead_zero <= (base == 16
+ ? ((uintmax_t) exponent
+ - (uintmax_t) INTMAX_MIN) / 4
+ : ((uintmax_t) exponent - (uintmax_t) INTMAX_MIN)));
+ exponent -= base == 16 ? 4 * (intmax_t) lead_zero : (intmax_t) lead_zero;
dig_no -= lead_zero;
}
@@ -972,7 +1118,10 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
}
/* Adjust the exponent for the bits we are shifting in. */
- exponent += bits - 1 + (int_no - 1) * 4;
+ assert (int_no <= (uintmax_t) (exponent < 0
+ ? (INTMAX_MAX - bits + 1) / 4
+ : (INTMAX_MAX - exponent - bits + 1) / 4));
+ exponent += bits - 1 + ((intmax_t) int_no - 1) * 4;
while (--dig_no > 0 && idx >= 0)
{
@@ -1024,23 +1173,19 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
really integer digits or belong to the fractional part; i.e. we normalize
123e-2 to 1.23. */
{
- register int incr = (exponent < 0 ? MAX (-int_no, exponent)
- : MIN (dig_no - int_no, exponent));
+ register intmax_t incr = (exponent < 0
+ ? MAX (-(intmax_t) int_no, exponent)
+ : MIN ((intmax_t) dig_no - (intmax_t) int_no,
+ exponent));
int_no += incr;
exponent -= incr;
}
- if (__builtin_expect (int_no + exponent > MAX_10_EXP + 1, 0))
- {
- __set_errno (ERANGE);
- return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
- }
+ if (__builtin_expect (exponent > MAX_10_EXP + 1 - (intmax_t) int_no, 0))
+ return overflow_value (negative);
if (__builtin_expect (exponent < MIN_10_EXP - (DIG + 1), 0))
- {
- __set_errno (ERANGE);
- return negative ? -0.0 : 0.0;
- }
+ return underflow_value (negative);
if (int_no > 0)
{
@@ -1101,10 +1246,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
/* Now we know the exponent of the number in base two.
Check it against the maximum possible exponent. */
if (__builtin_expect (bits > MAX_EXP, 0))
- {
- __set_errno (ERANGE);
- return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
- }
+ return overflow_value (negative);
/* We have already the first BITS bits of the result. Together with
the information whether more non-zero bits follow this is enough
@@ -1201,29 +1343,66 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
int expbit;
int neg_exp;
int more_bits;
+ int need_frac_digits;
mp_limb_t cy;
mp_limb_t *psrc = den;
mp_limb_t *pdest = num;
const struct mp_power *ttab = &_fpioconst_pow10[0];
- assert (dig_no > int_no && exponent <= 0);
+ assert (dig_no > int_no
+ && exponent <= 0
+ && exponent >= MIN_10_EXP - (DIG + 1));
+
+ /* We need to compute MANT_DIG - BITS fractional bits that lie
+ within the mantissa of the result, the following bit for
+ rounding, and to know whether any subsequent bit is 0.
+ Computing a bit with value 2^-n means looking at n digits after
+ the decimal point. */
+ if (bits > 0)
+ {
+ /* The bits required are those immediately after the point. */
+ assert (int_no > 0 && exponent == 0);
+ need_frac_digits = 1 + MANT_DIG - bits;
+ }
+ else
+ {
+ /* The number is in the form .123eEXPONENT. */
+ assert (int_no == 0 && *startp != L_('0'));
+ /* The number is at least 10^(EXPONENT-1), and 10^3 <
+ 2^10. */
+ int neg_exp_2 = ((1 - exponent) * 10) / 3 + 1;
+ /* The number is at least 2^-NEG_EXP_2. We need up to
+ MANT_DIG bits following that bit. */
+ need_frac_digits = neg_exp_2 + MANT_DIG;
+ /* However, we never need bits beyond 1/4 ulp of the smallest
+ representable value. (That 1/4 ulp bit is only needed to
+ determine tinyness on machines where tinyness is determined
+ after rounding.) */
+ if (need_frac_digits > MANT_DIG - MIN_EXP + 2)
+ need_frac_digits = MANT_DIG - MIN_EXP + 2;
+ /* At this point, NEED_FRAC_DIGITS is the total number of
+ digits needed after the point, but some of those may be
+ leading 0s. */
+ need_frac_digits += exponent;
+ /* Any cases underflowing enough that none of the fractional
+ digits are needed should have been caught earlier (such
+ cases are on the order of 10^-n or smaller where 2^-n is
+ the least subnormal). */
+ assert (need_frac_digits > 0);
+ }
+ if (need_frac_digits > (intmax_t) dig_no - (intmax_t) int_no)
+ need_frac_digits = (intmax_t) dig_no - (intmax_t) int_no;
- /* For the fractional part we need not process too many digits. One
- decimal digits gives us log_2(10) ~ 3.32 bits. If we now compute
- ceil(BITS / 3) =: N
- digits we should have enough bits for the result. The remaining
- decimal digits give us the information that more bits are following.
- This can be used while rounding. (Two added as a safety margin.) */
- if (dig_no - int_no > (MANT_DIG - bits + 2) / 3 + 2)
+ if ((intmax_t) dig_no > (intmax_t) int_no + need_frac_digits)
{
- dig_no = int_no + (MANT_DIG - bits + 2) / 3 + 2;
+ dig_no = int_no + need_frac_digits;
more_bits = 1;
}
else
more_bits = 0;
- neg_exp = dig_no - int_no - exponent;
+ neg_exp = (intmax_t) dig_no - (intmax_t) int_no - exponent;
/* Construct the denominator. */
densize = 0;
diff --git a/stdlib/tst-fmtmsg.sh b/stdlib/tst-fmtmsg.sh
index abde254e06..868292eba2 100755
--- a/stdlib/tst-fmtmsg.sh
+++ b/stdlib/tst-fmtmsg.sh
@@ -1,8 +1,7 @@
#! /bin/sh
# Test of fmtmsg function family.
-# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
-#
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,6 +17,8 @@
# License along with the GNU C Library; if not, see
# <http://www.gnu.org/licenses/>.
+set -e
+
common_objpfx=$1
run_program_prefix=$2
objpfx=$3
diff --git a/stdlib/tst-secure-getenv.c b/stdlib/tst-secure-getenv.c
index 76d8de6ed4..7a6930b5a1 100644
--- a/stdlib/tst-secure-getenv.c
+++ b/stdlib/tst-secure-getenv.c
@@ -18,7 +18,7 @@
/* Test that secure_getenv works by invoking the test as a SGID
program with a group ID from the supplementary group list. This
test can fail spuriously if the user is not a member of a suitable
- supplementary group. */
+ supplementary group. */
#include <errno.h>
#include <fcntl.h>
@@ -36,7 +36,7 @@ static char MAGIC_ARGUMENT[] = "run-actual-test";
static const char *test_dir;
/* Return a GID which is not our current GID, but is present in the
- supplementary group list. */
+ supplementary group list. */
static gid_t
choose_gid (void)
{
@@ -45,7 +45,7 @@ choose_gid (void)
int ret = getgroups (count, groups);
if (ret < 0)
{
- perror ("getgroups");
+ printf ("getgroups: %m\n");
exit (1);
}
gid_t current = getgid ();
@@ -60,7 +60,7 @@ choose_gid (void)
/* Copies the executable into a restricted directory, so that we can
safely make it SGID with the TARGET group ID. Then runs the
- executable. */
+ executable. */
static int
run_executable_sgid (gid_t target)
{
@@ -72,29 +72,29 @@ run_executable_sgid (gid_t target)
if (asprintf (&dirname, "%s/secure-getenv.%jd",
test_dir, (intmax_t) getpid ()) < 0)
{
- perror ("asprintf");
+ printf ("asprintf: %m\n");
goto err;
}
if (mkdir (dirname, 0700) < 0)
{
- perror ("mkdir");
+ printf ("mkdir: %m\n");
goto err;
}
if (asprintf (&execname, "%s/bin", dirname) < 0)
{
- perror ("asprintf");
+ printf ("asprintf: %m\n");
goto err;
}
infd = open ("/proc/self/exe", O_RDONLY);
if (infd < 0)
{
- perror ("open");
+ printf ("open (/proc/self/exe): %m\n");
goto err;
}
outfd = open (execname, O_WRONLY | O_CREAT | O_EXCL, 0700);
if (outfd < 0)
{
- perror ("open");
+ printf ("open (%s): %m\n", execname);
goto err;
}
char buf[4096];
@@ -103,7 +103,7 @@ run_executable_sgid (gid_t target)
ssize_t rdcount = read (infd, buf, sizeof (buf));
if (rdcount < 0)
{
- perror ("read");
+ printf ("read: %m\n");
goto err;
}
if (rdcount == 0)
@@ -117,7 +117,7 @@ run_executable_sgid (gid_t target)
errno = ENOSPC;
if (wrcount <= 0)
{
- perror ("write");
+ printf ("write: %m\n");
goto err;
}
p += wrcount;
@@ -125,49 +125,49 @@ run_executable_sgid (gid_t target)
}
if (fchown (outfd, getuid (), target) < 0)
{
- perror ("fchown");
+ printf ("fchown (%s): %m\n", execname);
goto err;
}
if (fchmod (outfd, 02750) < 0)
{
- perror ("fchmod");
+ printf ("fchmod (%s): %m\n", execname);
goto err;
}
if (close (outfd) < 0)
{
- perror ("close");
+ printf ("close (outfd): %m\n");
goto err;
}
if (close (infd) < 0)
{
- perror ("close");
+ printf ("close (infd): %m\n");
goto err;
}
int kid = fork ();
if (kid < 0)
{
- perror ("fork");
+ printf ("fork: %m\n");
goto err;
}
if (kid == 0)
{
- /* Child process. */
+ /* Child process. */
char *args[] = { execname, MAGIC_ARGUMENT, NULL };
execve (execname, args, environ);
- perror ("execve");
+ printf ("execve (%s): %m\n", execname);
_exit (1);
}
int status;
if (waitpid (kid, &status, 0) < 0)
{
- perror ("waitpid");
+ printf ("waitpid: %m\n");
goto err;
}
if (!WIFEXITED (status) || WEXITSTATUS (status) != MAGIC_STATUS)
{
- fprintf (stderr, "Unexpected exit status %d from child process\n",
- status);
+ printf ("Unexpected exit status %d from child process\n",
+ status);
goto err;
}
ret = 0;
@@ -195,27 +195,28 @@ do_test (void)
{
if (getenv ("PATH") == NULL)
{
- fprintf (stderr, "PATH not set\n");
+ printf ("PATH not set\n");
exit (1);
}
if (secure_getenv ("PATH") == NULL)
{
- fprintf (stderr, "PATH not set according to secure_getenv\n");
+ printf ("PATH not set according to secure_getenv\n");
exit (1);
}
if (strcmp (getenv ("PATH"), secure_getenv ("PATH")) != 0)
{
- fprintf (stderr, "PATH mismatch (%s, %s)\n",
- getenv ("PATH"), secure_getenv ("PATH"));
+ printf ("PATH mismatch (%s, %s)\n",
+ getenv ("PATH"), secure_getenv ("PATH"));
exit (1);
}
gid_t target = choose_gid ();
if (target == 0)
{
- fprintf (stderr, "Could not find a suitable GID user %jd\n",
+ fprintf (stderr,
+ "Could not find a suitable GID for user %jd, skipping test\n",
(intmax_t) getuid ());
- exit (1);
+ exit (0);
}
return run_executable_sgid (target);
}
@@ -227,18 +228,19 @@ alternative_main (int argc, char **argv)
{
if (getgid () == getegid ())
{
+ /* This can happen if the file system is mounted nosuid. */
fprintf (stderr, "SGID failed: GID and EGID match (%jd)\n",
- (intmax_t) getgid ());
- exit (2);
+ (intmax_t) getgid ());
+ exit (MAGIC_STATUS);
}
if (getenv ("PATH") == NULL)
{
- fprintf (stderr, "PATH variable not present\n");
+ printf ("PATH variable not present\n");
exit (3);
}
if (secure_getenv ("PATH") != NULL)
{
- fprintf (stderr, "PATH variable not filtered out\n");
+ printf ("PATH variable not filtered out\n");
exit (4);
}
exit (MAGIC_STATUS);
diff --git a/stdlib/tst-strtod-overflow.c b/stdlib/tst-strtod-overflow.c
new file mode 100644
index 0000000000..6c5b282855
--- /dev/null
+++ b/stdlib/tst-strtod-overflow.c
@@ -0,0 +1,49 @@
+/* Test for integer/buffer overflow in strtod.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define EXPONENT "e-2147483649"
+#define SIZE 214748364
+
+static int
+do_test (void)
+{
+ char *p = malloc (1 + SIZE + sizeof (EXPONENT));
+ if (p == NULL)
+ {
+ puts ("malloc failed, cannot test for overflow");
+ return 0;
+ }
+ p[0] = '1';
+ memset (p + 1, '0', SIZE);
+ memcpy (p + 1 + SIZE, EXPONENT, sizeof (EXPONENT));
+ double d = strtod (p, NULL);
+ if (d != 0)
+ {
+ printf ("strtod returned wrong value: %a\n", d);
+ return 1;
+ }
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#define TIMEOUT 5
+#include "../test-skeleton.c"
diff --git a/stdlib/tst-strtod-round-data b/stdlib/tst-strtod-round-data
new file mode 100644
index 0000000000..86d460e3b6
--- /dev/null
+++ b/stdlib/tst-strtod-round-data
@@ -0,0 +1,111 @@
+3.518437208883201171875E+013
+1.00000005960464477550
+1.0000000596046447755
+1.000000059604644776
+1.000000059604644775
+1.00000005960464478
+1.0000000596046448
+1.000000059604645
+1.00000005960464
+1.0000000596046
+1.000000059605
+1.00000005960
+1.0000000596
+1.000000060
+1.00000006
+1.0000001
+1.000000
+1.00000000000000011113
+1.00000000000000011103
+1.00000000000000011102
+1.00000000000000011101
+1.0000000000000001111
+1.000000000000000111
+1.00000000000000011
+1.0000000000000001
+3929201589819414e-25
+0.000000000000000000000000000000000000000000002101947696487225606385594374934874196920392912814773657635602425834686624028790902229957282543182373046875
+1.00000005960464477539062499
+1.000000059604644775390625
+1.00000005960464477539062501
+1.00000011920928955078125
+1.00000017881393432617187499
+1.000000178813934326171875
+1.00000017881393432617187501
+1.0000002384185791015625
+1.08420217248550443400745280086994171142578125e-19
+1.0842022371089897897127399001987457793916291848290711641311645507812499e-19
+1.08420223710898978971273990019874577939162918482907116413116455078125e-19
+1.0842022371089897897127399001987457793916291848290711641311645507812501e-19
+1.0842023017324751454180269995275498473574771196581423282623291015625e-19
+1.0842023663559605011233140988563539153233250544872134923934936523437499e-19
+1.08420236635596050112331409885635391532332505448721349239349365234375e-19
+1.0842023663559605011233140988563539153233250544872134923934936523437501e-19
+1.084202430979445856828601198185157983289172989316284656524658203125e-19
+7.52316384526264005099991383822237233803945956334136013765601092018187046051025390625e-37
+7.5231642936781486349413765338158389908126215730251815381410578824437213052434003657253924757242202758789062499e-37
+7.52316429367814863494137653381583899081262157302518153814105788244372130524340036572539247572422027587890625e-37
+7.5231642936781486349413765338158389908126215730251815381410578824437213052434003657253924757242202758789062501e-37
+7.5231647420936572188828392294093056435857835827090029386261048447055721499765468252007849514484405517578125e-37
+7.5231651905091658028243019250027722963589455923928243391111518069674229947096932846761774271726608276367187499e-37
+7.52316519050916580282430192500277229635894559239282433911115180696742299470969328467617742717266082763671875e-37
+7.5231651905091658028243019250027722963589455923928243391111518069674229947096932846761774271726608276367187501e-37
+7.523165638924674386765764620596238949132107602076645739596198769229273839442839744151569902896881103515625e-37
+340282356779733661637539395458142568447.999
+340282356779733661637539395458142568448
+340282356779733661637539395458142568448.001
+-340282356779733661637539395458142568447.999
+-340282356779733661637539395458142568448
+-340282356779733661637539395458142568448.001
+179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791.999
+179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792
+179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.001
+-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497791.999
+-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792
+-179769313486231580793728971405303415079934132710037826936173778980444968292764750946649017977587207096330286416692887910946555547851940402630657488671505820681908902000708383676273854845817711531764475730270069855571366959622842914819860834936475292719074168444365510704342711559699508093042880177904174497792.001
+1189731495357231765053511589829488667966254004695567218956499277562499181851727204760449442904570461384330567646167443286662555267489487930236325136097654342377232417536489080362029584951246485605740928178136611230674219048500381811805207877203107268812398885808170517032687767579195512604426112969939697309064970421357373593737548189791064578075396520278041564919877710332117871859964923206311175434753221226253534337199304629504137668677812103359730222935610071343425325633562626092674600633358193879055413937592435479934747155496913520748914500847834599706604816899916747713074435514585511372746030946789075371775796999312354227866587803370992862072730331502951338476357350089453460696354521572546926077765383044577075982892200047380230605947983926605074559374288887635146614087580689065065271437207231562037396763728185780908406142166217047877746112568232134313256340568095056911759884246066540728231159508276273778086735741815471986687141421432344475502062691975457742639931301197788106590436213127071090684338861628772228444915189303418963135612389885203608036075349871783050435209372998381734440835020273404521625820382960095748088096587424348978607559613437524195438026532392163371033702927429354975024746264545597290170945602348672367013792302348098432637396409095613884932277251719835310031547998505803752546406866843706502753183166325399209709698038388729144247605351114448647488475730429635692916794001788966968620265007002798266353024717022066273037990476329714600171995445673732316103762568799871343179341500144434361457105461379244904895252415230182712399067436456639767780598951274425173976825259444309519076481099524794546856555816525710213317614010389620491220471110091857573837438278112540147709446027133781874510952001326117006323864207925852079541370644269957126564493435341201207708574988136737425864785839645124060309307041974867276363338370018636105162869283008917743830711050229193144085029688094638483773246680141155923835213247853616763725824680857167751837090780487900840228387283614547346509044804890143691849792564977383927445249156165014494875205013001248617782698812613355440377357151258089863597284198597765215866830359241005748505543689358738031324284465243629136488333487686637331181039189590604124992017972343852392605049057443576119873279945400832860199527936922650062116335246759763699388664096895732875994904427617012292176896143437273923395471742216159840248646356256801083915667206811346470984128630513747606135060039717590702096972930814428759032404269759101709671790756463178143949787623821836792662477247624052842849718333550449622140658955581054081751312471819712726722479962465958577056952080928160441258225609897705262614494607339126216928069521406520619119688243287473394538225119027875465220992256233111477265049726174251028452120761620567236506258269287781320020740354052506311094266116406810709272834304862320539294205143454357131313879679493260017348668942730474494178249137387898297328336833589009038180169681270850774180709517707029996636939683240047817287633101083794404428541740415811916696232677498555197744273877942786661835044988438574758774422356087368185157228627335879058660154558309535912070401295584736621504268847267595223765835863174255756697267818931047523414328918687705134068360361363742640382966108545994545911705825697417989043286767551310728319742954355856116731710961138337957358885918445698641669559694166808074917226884181158917536699176609687522288426691820400183361523559409155799556283862329497478912575261457830579497761228960488413082611130636745385531466634515743840239035698486403517044157039226831085528805370810274043977756176084122952933117637894899009906118591255725255303492783199432613047841255537488113392259699564654048366964907825009036946741350368993216860237824660346368178183476516236016631293185747612693520285606412666148401080833153012602745585750872969103848152851344605317151546396041150523486651715472516090757848631964035419441554251667764234034722117421393132102998968842527073068624998951156916755512381404671428195378673434142765187038589280087599553911407299582781759652177398265112189244631130776935980062283655148992367895151475032666162688096176262281649169171506024644941424855074678761732513983988468070793092275675388024763356241941156378024394000502219343689759498466840264622527907455975633934878799543518206521383037618795439338086429200645002065120039545639315698201147683480515936292743251499063438531296922453863968872815997353125881179686462705170051219974666064694475306164653842558263043808428507798331085671416437696164008096171739721381877119714312306163210350382599226246553966125970240408129674442076735944784179006667645805896851048093638137596670696937010699212957919299380937222250509562807981779341384684146547286314982564181910419531236194060603634063907761401557097370591258981203660079555061603095538604465962028762337280258716255780315038694244061790279947528902264433516193654532433289688740976918527.999
+1189731495357231765053511589829488667966254004695567218956499277562499181851727204760449442904570461384330567646167443286662555267489487930236325136097654342377232417536489080362029584951246485605740928178136611230674219048500381811805207877203107268812398885808170517032687767579195512604426112969939697309064970421357373593737548189791064578075396520278041564919877710332117871859964923206311175434753221226253534337199304629504137668677812103359730222935610071343425325633562626092674600633358193879055413937592435479934747155496913520748914500847834599706604816899916747713074435514585511372746030946789075371775796999312354227866587803370992862072730331502951338476357350089453460696354521572546926077765383044577075982892200047380230605947983926605074559374288887635146614087580689065065271437207231562037396763728185780908406142166217047877746112568232134313256340568095056911759884246066540728231159508276273778086735741815471986687141421432344475502062691975457742639931301197788106590436213127071090684338861628772228444915189303418963135612389885203608036075349871783050435209372998381734440835020273404521625820382960095748088096587424348978607559613437524195438026532392163371033702927429354975024746264545597290170945602348672367013792302348098432637396409095613884932277251719835310031547998505803752546406866843706502753183166325399209709698038388729144247605351114448647488475730429635692916794001788966968620265007002798266353024717022066273037990476329714600171995445673732316103762568799871343179341500144434361457105461379244904895252415230182712399067436456639767780598951274425173976825259444309519076481099524794546856555816525710213317614010389620491220471110091857573837438278112540147709446027133781874510952001326117006323864207925852079541370644269957126564493435341201207708574988136737425864785839645124060309307041974867276363338370018636105162869283008917743830711050229193144085029688094638483773246680141155923835213247853616763725824680857167751837090780487900840228387283614547346509044804890143691849792564977383927445249156165014494875205013001248617782698812613355440377357151258089863597284198597765215866830359241005748505543689358738031324284465243629136488333487686637331181039189590604124992017972343852392605049057443576119873279945400832860199527936922650062116335246759763699388664096895732875994904427617012292176896143437273923395471742216159840248646356256801083915667206811346470984128630513747606135060039717590702096972930814428759032404269759101709671790756463178143949787623821836792662477247624052842849718333550449622140658955581054081751312471819712726722479962465958577056952080928160441258225609897705262614494607339126216928069521406520619119688243287473394538225119027875465220992256233111477265049726174251028452120761620567236506258269287781320020740354052506311094266116406810709272834304862320539294205143454357131313879679493260017348668942730474494178249137387898297328336833589009038180169681270850774180709517707029996636939683240047817287633101083794404428541740415811916696232677498555197744273877942786661835044988438574758774422356087368185157228627335879058660154558309535912070401295584736621504268847267595223765835863174255756697267818931047523414328918687705134068360361363742640382966108545994545911705825697417989043286767551310728319742954355856116731710961138337957358885918445698641669559694166808074917226884181158917536699176609687522288426691820400183361523559409155799556283862329497478912575261457830579497761228960488413082611130636745385531466634515743840239035698486403517044157039226831085528805370810274043977756176084122952933117637894899009906118591255725255303492783199432613047841255537488113392259699564654048366964907825009036946741350368993216860237824660346368178183476516236016631293185747612693520285606412666148401080833153012602745585750872969103848152851344605317151546396041150523486651715472516090757848631964035419441554251667764234034722117421393132102998968842527073068624998951156916755512381404671428195378673434142765187038589280087599553911407299582781759652177398265112189244631130776935980062283655148992367895151475032666162688096176262281649169171506024644941424855074678761732513983988468070793092275675388024763356241941156378024394000502219343689759498466840264622527907455975633934878799543518206521383037618795439338086429200645002065120039545639315698201147683480515936292743251499063438531296922453863968872815997353125881179686462705170051219974666064694475306164653842558263043808428507798331085671416437696164008096171739721381877119714312306163210350382599226246553966125970240408129674442076735944784179006667645805896851048093638137596670696937010699212957919299380937222250509562807981779341384684146547286314982564181910419531236194060603634063907761401557097370591258981203660079555061603095538604465962028762337280258716255780315038694244061790279947528902264433516193654532433289688740976918528
+1189731495357231765053511589829488667966254004695567218956499277562499181851727204760449442904570461384330567646167443286662555267489487930236325136097654342377232417536489080362029584951246485605740928178136611230674219048500381811805207877203107268812398885808170517032687767579195512604426112969939697309064970421357373593737548189791064578075396520278041564919877710332117871859964923206311175434753221226253534337199304629504137668677812103359730222935610071343425325633562626092674600633358193879055413937592435479934747155496913520748914500847834599706604816899916747713074435514585511372746030946789075371775796999312354227866587803370992862072730331502951338476357350089453460696354521572546926077765383044577075982892200047380230605947983926605074559374288887635146614087580689065065271437207231562037396763728185780908406142166217047877746112568232134313256340568095056911759884246066540728231159508276273778086735741815471986687141421432344475502062691975457742639931301197788106590436213127071090684338861628772228444915189303418963135612389885203608036075349871783050435209372998381734440835020273404521625820382960095748088096587424348978607559613437524195438026532392163371033702927429354975024746264545597290170945602348672367013792302348098432637396409095613884932277251719835310031547998505803752546406866843706502753183166325399209709698038388729144247605351114448647488475730429635692916794001788966968620265007002798266353024717022066273037990476329714600171995445673732316103762568799871343179341500144434361457105461379244904895252415230182712399067436456639767780598951274425173976825259444309519076481099524794546856555816525710213317614010389620491220471110091857573837438278112540147709446027133781874510952001326117006323864207925852079541370644269957126564493435341201207708574988136737425864785839645124060309307041974867276363338370018636105162869283008917743830711050229193144085029688094638483773246680141155923835213247853616763725824680857167751837090780487900840228387283614547346509044804890143691849792564977383927445249156165014494875205013001248617782698812613355440377357151258089863597284198597765215866830359241005748505543689358738031324284465243629136488333487686637331181039189590604124992017972343852392605049057443576119873279945400832860199527936922650062116335246759763699388664096895732875994904427617012292176896143437273923395471742216159840248646356256801083915667206811346470984128630513747606135060039717590702096972930814428759032404269759101709671790756463178143949787623821836792662477247624052842849718333550449622140658955581054081751312471819712726722479962465958577056952080928160441258225609897705262614494607339126216928069521406520619119688243287473394538225119027875465220992256233111477265049726174251028452120761620567236506258269287781320020740354052506311094266116406810709272834304862320539294205143454357131313879679493260017348668942730474494178249137387898297328336833589009038180169681270850774180709517707029996636939683240047817287633101083794404428541740415811916696232677498555197744273877942786661835044988438574758774422356087368185157228627335879058660154558309535912070401295584736621504268847267595223765835863174255756697267818931047523414328918687705134068360361363742640382966108545994545911705825697417989043286767551310728319742954355856116731710961138337957358885918445698641669559694166808074917226884181158917536699176609687522288426691820400183361523559409155799556283862329497478912575261457830579497761228960488413082611130636745385531466634515743840239035698486403517044157039226831085528805370810274043977756176084122952933117637894899009906118591255725255303492783199432613047841255537488113392259699564654048366964907825009036946741350368993216860237824660346368178183476516236016631293185747612693520285606412666148401080833153012602745585750872969103848152851344605317151546396041150523486651715472516090757848631964035419441554251667764234034722117421393132102998968842527073068624998951156916755512381404671428195378673434142765187038589280087599553911407299582781759652177398265112189244631130776935980062283655148992367895151475032666162688096176262281649169171506024644941424855074678761732513983988468070793092275675388024763356241941156378024394000502219343689759498466840264622527907455975633934878799543518206521383037618795439338086429200645002065120039545639315698201147683480515936292743251499063438531296922453863968872815997353125881179686462705170051219974666064694475306164653842558263043808428507798331085671416437696164008096171739721381877119714312306163210350382599226246553966125970240408129674442076735944784179006667645805896851048093638137596670696937010699212957919299380937222250509562807981779341384684146547286314982564181910419531236194060603634063907761401557097370591258981203660079555061603095538604465962028762337280258716255780315038694244061790279947528902264433516193654532433289688740976918528.001
+-1189731495357231765053511589829488667966254004695567218956499277562499181851727204760449442904570461384330567646167443286662555267489487930236325136097654342377232417536489080362029584951246485605740928178136611230674219048500381811805207877203107268812398885808170517032687767579195512604426112969939697309064970421357373593737548189791064578075396520278041564919877710332117871859964923206311175434753221226253534337199304629504137668677812103359730222935610071343425325633562626092674600633358193879055413937592435479934747155496913520748914500847834599706604816899916747713074435514585511372746030946789075371775796999312354227866587803370992862072730331502951338476357350089453460696354521572546926077765383044577075982892200047380230605947983926605074559374288887635146614087580689065065271437207231562037396763728185780908406142166217047877746112568232134313256340568095056911759884246066540728231159508276273778086735741815471986687141421432344475502062691975457742639931301197788106590436213127071090684338861628772228444915189303418963135612389885203608036075349871783050435209372998381734440835020273404521625820382960095748088096587424348978607559613437524195438026532392163371033702927429354975024746264545597290170945602348672367013792302348098432637396409095613884932277251719835310031547998505803752546406866843706502753183166325399209709698038388729144247605351114448647488475730429635692916794001788966968620265007002798266353024717022066273037990476329714600171995445673732316103762568799871343179341500144434361457105461379244904895252415230182712399067436456639767780598951274425173976825259444309519076481099524794546856555816525710213317614010389620491220471110091857573837438278112540147709446027133781874510952001326117006323864207925852079541370644269957126564493435341201207708574988136737425864785839645124060309307041974867276363338370018636105162869283008917743830711050229193144085029688094638483773246680141155923835213247853616763725824680857167751837090780487900840228387283614547346509044804890143691849792564977383927445249156165014494875205013001248617782698812613355440377357151258089863597284198597765215866830359241005748505543689358738031324284465243629136488333487686637331181039189590604124992017972343852392605049057443576119873279945400832860199527936922650062116335246759763699388664096895732875994904427617012292176896143437273923395471742216159840248646356256801083915667206811346470984128630513747606135060039717590702096972930814428759032404269759101709671790756463178143949787623821836792662477247624052842849718333550449622140658955581054081751312471819712726722479962465958577056952080928160441258225609897705262614494607339126216928069521406520619119688243287473394538225119027875465220992256233111477265049726174251028452120761620567236506258269287781320020740354052506311094266116406810709272834304862320539294205143454357131313879679493260017348668942730474494178249137387898297328336833589009038180169681270850774180709517707029996636939683240047817287633101083794404428541740415811916696232677498555197744273877942786661835044988438574758774422356087368185157228627335879058660154558309535912070401295584736621504268847267595223765835863174255756697267818931047523414328918687705134068360361363742640382966108545994545911705825697417989043286767551310728319742954355856116731710961138337957358885918445698641669559694166808074917226884181158917536699176609687522288426691820400183361523559409155799556283862329497478912575261457830579497761228960488413082611130636745385531466634515743840239035698486403517044157039226831085528805370810274043977756176084122952933117637894899009906118591255725255303492783199432613047841255537488113392259699564654048366964907825009036946741350368993216860237824660346368178183476516236016631293185747612693520285606412666148401080833153012602745585750872969103848152851344605317151546396041150523486651715472516090757848631964035419441554251667764234034722117421393132102998968842527073068624998951156916755512381404671428195378673434142765187038589280087599553911407299582781759652177398265112189244631130776935980062283655148992367895151475032666162688096176262281649169171506024644941424855074678761732513983988468070793092275675388024763356241941156378024394000502219343689759498466840264622527907455975633934878799543518206521383037618795439338086429200645002065120039545639315698201147683480515936292743251499063438531296922453863968872815997353125881179686462705170051219974666064694475306164653842558263043808428507798331085671416437696164008096171739721381877119714312306163210350382599226246553966125970240408129674442076735944784179006667645805896851048093638137596670696937010699212957919299380937222250509562807981779341384684146547286314982564181910419531236194060603634063907761401557097370591258981203660079555061603095538604465962028762337280258716255780315038694244061790279947528902264433516193654532433289688740976918527.999
+-1189731495357231765053511589829488667966254004695567218956499277562499181851727204760449442904570461384330567646167443286662555267489487930236325136097654342377232417536489080362029584951246485605740928178136611230674219048500381811805207877203107268812398885808170517032687767579195512604426112969939697309064970421357373593737548189791064578075396520278041564919877710332117871859964923206311175434753221226253534337199304629504137668677812103359730222935610071343425325633562626092674600633358193879055413937592435479934747155496913520748914500847834599706604816899916747713074435514585511372746030946789075371775796999312354227866587803370992862072730331502951338476357350089453460696354521572546926077765383044577075982892200047380230605947983926605074559374288887635146614087580689065065271437207231562037396763728185780908406142166217047877746112568232134313256340568095056911759884246066540728231159508276273778086735741815471986687141421432344475502062691975457742639931301197788106590436213127071090684338861628772228444915189303418963135612389885203608036075349871783050435209372998381734440835020273404521625820382960095748088096587424348978607559613437524195438026532392163371033702927429354975024746264545597290170945602348672367013792302348098432637396409095613884932277251719835310031547998505803752546406866843706502753183166325399209709698038388729144247605351114448647488475730429635692916794001788966968620265007002798266353024717022066273037990476329714600171995445673732316103762568799871343179341500144434361457105461379244904895252415230182712399067436456639767780598951274425173976825259444309519076481099524794546856555816525710213317614010389620491220471110091857573837438278112540147709446027133781874510952001326117006323864207925852079541370644269957126564493435341201207708574988136737425864785839645124060309307041974867276363338370018636105162869283008917743830711050229193144085029688094638483773246680141155923835213247853616763725824680857167751837090780487900840228387283614547346509044804890143691849792564977383927445249156165014494875205013001248617782698812613355440377357151258089863597284198597765215866830359241005748505543689358738031324284465243629136488333487686637331181039189590604124992017972343852392605049057443576119873279945400832860199527936922650062116335246759763699388664096895732875994904427617012292176896143437273923395471742216159840248646356256801083915667206811346470984128630513747606135060039717590702096972930814428759032404269759101709671790756463178143949787623821836792662477247624052842849718333550449622140658955581054081751312471819712726722479962465958577056952080928160441258225609897705262614494607339126216928069521406520619119688243287473394538225119027875465220992256233111477265049726174251028452120761620567236506258269287781320020740354052506311094266116406810709272834304862320539294205143454357131313879679493260017348668942730474494178249137387898297328336833589009038180169681270850774180709517707029996636939683240047817287633101083794404428541740415811916696232677498555197744273877942786661835044988438574758774422356087368185157228627335879058660154558309535912070401295584736621504268847267595223765835863174255756697267818931047523414328918687705134068360361363742640382966108545994545911705825697417989043286767551310728319742954355856116731710961138337957358885918445698641669559694166808074917226884181158917536699176609687522288426691820400183361523559409155799556283862329497478912575261457830579497761228960488413082611130636745385531466634515743840239035698486403517044157039226831085528805370810274043977756176084122952933117637894899009906118591255725255303492783199432613047841255537488113392259699564654048366964907825009036946741350368993216860237824660346368178183476516236016631293185747612693520285606412666148401080833153012602745585750872969103848152851344605317151546396041150523486651715472516090757848631964035419441554251667764234034722117421393132102998968842527073068624998951156916755512381404671428195378673434142765187038589280087599553911407299582781759652177398265112189244631130776935980062283655148992367895151475032666162688096176262281649169171506024644941424855074678761732513983988468070793092275675388024763356241941156378024394000502219343689759498466840264622527907455975633934878799543518206521383037618795439338086429200645002065120039545639315698201147683480515936292743251499063438531296922453863968872815997353125881179686462705170051219974666064694475306164653842558263043808428507798331085671416437696164008096171739721381877119714312306163210350382599226246553966125970240408129674442076735944784179006667645805896851048093638137596670696937010699212957919299380937222250509562807981779341384684146547286314982564181910419531236194060603634063907761401557097370591258981203660079555061603095538604465962028762337280258716255780315038694244061790279947528902264433516193654532433289688740976918528
+-1189731495357231765053511589829488667966254004695567218956499277562499181851727204760449442904570461384330567646167443286662555267489487930236325136097654342377232417536489080362029584951246485605740928178136611230674219048500381811805207877203107268812398885808170517032687767579195512604426112969939697309064970421357373593737548189791064578075396520278041564919877710332117871859964923206311175434753221226253534337199304629504137668677812103359730222935610071343425325633562626092674600633358193879055413937592435479934747155496913520748914500847834599706604816899916747713074435514585511372746030946789075371775796999312354227866587803370992862072730331502951338476357350089453460696354521572546926077765383044577075982892200047380230605947983926605074559374288887635146614087580689065065271437207231562037396763728185780908406142166217047877746112568232134313256340568095056911759884246066540728231159508276273778086735741815471986687141421432344475502062691975457742639931301197788106590436213127071090684338861628772228444915189303418963135612389885203608036075349871783050435209372998381734440835020273404521625820382960095748088096587424348978607559613437524195438026532392163371033702927429354975024746264545597290170945602348672367013792302348098432637396409095613884932277251719835310031547998505803752546406866843706502753183166325399209709698038388729144247605351114448647488475730429635692916794001788966968620265007002798266353024717022066273037990476329714600171995445673732316103762568799871343179341500144434361457105461379244904895252415230182712399067436456639767780598951274425173976825259444309519076481099524794546856555816525710213317614010389620491220471110091857573837438278112540147709446027133781874510952001326117006323864207925852079541370644269957126564493435341201207708574988136737425864785839645124060309307041974867276363338370018636105162869283008917743830711050229193144085029688094638483773246680141155923835213247853616763725824680857167751837090780487900840228387283614547346509044804890143691849792564977383927445249156165014494875205013001248617782698812613355440377357151258089863597284198597765215866830359241005748505543689358738031324284465243629136488333487686637331181039189590604124992017972343852392605049057443576119873279945400832860199527936922650062116335246759763699388664096895732875994904427617012292176896143437273923395471742216159840248646356256801083915667206811346470984128630513747606135060039717590702096972930814428759032404269759101709671790756463178143949787623821836792662477247624052842849718333550449622140658955581054081751312471819712726722479962465958577056952080928160441258225609897705262614494607339126216928069521406520619119688243287473394538225119027875465220992256233111477265049726174251028452120761620567236506258269287781320020740354052506311094266116406810709272834304862320539294205143454357131313879679493260017348668942730474494178249137387898297328336833589009038180169681270850774180709517707029996636939683240047817287633101083794404428541740415811916696232677498555197744273877942786661835044988438574758774422356087368185157228627335879058660154558309535912070401295584736621504268847267595223765835863174255756697267818931047523414328918687705134068360361363742640382966108545994545911705825697417989043286767551310728319742954355856116731710961138337957358885918445698641669559694166808074917226884181158917536699176609687522288426691820400183361523559409155799556283862329497478912575261457830579497761228960488413082611130636745385531466634515743840239035698486403517044157039226831085528805370810274043977756176084122952933117637894899009906118591255725255303492783199432613047841255537488113392259699564654048366964907825009036946741350368993216860237824660346368178183476516236016631293185747612693520285606412666148401080833153012602745585750872969103848152851344605317151546396041150523486651715472516090757848631964035419441554251667764234034722117421393132102998968842527073068624998951156916755512381404671428195378673434142765187038589280087599553911407299582781759652177398265112189244631130776935980062283655148992367895151475032666162688096176262281649169171506024644941424855074678761732513983988468070793092275675388024763356241941156378024394000502219343689759498466840264622527907455975633934878799543518206521383037618795439338086429200645002065120039545639315698201147683480515936292743251499063438531296922453863968872815997353125881179686462705170051219974666064694475306164653842558263043808428507798331085671416437696164008096171739721381877119714312306163210350382599226246553966125970240408129674442076735944784179006667645805896851048093638137596670696937010699212957919299380937222250509562807981779341384684146547286314982564181910419531236194060603634063907761401557097370591258981203660079555061603095538604465962028762337280258716255780315038694244061790279947528902264433516193654532433289688740976918528.001
+1189731495357231765085759326628007073479956869869102141501186852722712468967898039614731304160537056720508735524794218059326466407441245944473611725143413248467166796545513080184004525512467970210316955903084154210995219628561620502745688412979158287475743437748747529021767100495257876251386789060100486382120270573746835428422826338960972409135720437886908785614210084478384078153933033666173528598766851519250363351426064628258395419088471393111667700918729834985086320676654241316634560118019882210119337445330955835919527132875094715720056355846555701747536986251959671182002652387533752686564043006387189322467736998297209841197138514624008092952665297074506030396759964773170346856327642777902149445005909504598179054586496247232351389508014081573398665168934777318775791837135956795815584276253258339396528978452820191499230693717636210145879266988271829694083738038077122921912824291024453524934340394022902439339419069066610906029009607658742583030029946393156561520787087964747197937630779342237465827257153805466210260228188924675519409775662832664987585685048138307557155853256492278248578919164433813909200793462409840728598763947896501274688614908225267667177701366807438669326623433058218213443062408099675370787076912329373870411405571681619566725953239506667420107865842757661716617919733022513948046643510651078865572997073260056512303946747105979292110003450407489924836142530065624248678935670746065899317880622000638073367400369402302158314033221251653687424468051520786824115060818437539740055831113916055471483034808874617739843143938172333284262271469979254217432808855959164876994617775909494325360213896498452140653220161981435472501438614603134083005358006470142761755484855437912983836446436796696188799077203473615780300012474195744483595979884254878292198513051622049258764225807542304782444925923341494613428285320468971377328625604051015673705708956626631746891317417396029708456942140863834024650370695696409569123851257481398138888752582030034869787470552028103940729085803240085987569938856671422005581372166650497556769407574429118602955596567887598719046627586511067969787887833869882951233268645804198215954308918671793783729688211286988794688142675294614947234254538088223560934361145676358046211831627683890340178210365154617001635372653348370422726598857026002477929177288289123739070353691365311645518715750245510770260801141976525982246774038853785442558514521428892111522375063439093517487315386834431958429128019507409290585031131279294212910898440219254009319059392162713475019891930586543895163777707714398600339409818266699397506309660607491889862314049922386749339985169589508248405389966372279472368480994566101598780613797426213113809272341186010030687520020604372850246235750477820866306072249009107891882044221153421572454947459745218327822086016027106392614825047067937041894741980478402880643992102437022027245971074555342753214011193822631471157489050501952568860820401920833804902096485703539056563038766617104309221550246208420803236102663918198532911605896456149452566847699113209434574026975730941194301255893892984954283771852399164279918441721650800291777296251806440774844416950920058440264116651186795378697819243783770608877693892976259074109340205317427395771831523271197915676367134269045536541349377669517895718456625645303642348316558188118515730182101737730372539888936801532474040601312554322979825347707786172180885839980406705981955978435796108903153166067253815216088254644383863063765964591075911345075411534030241991912223282597135304726831878735179556423807036390298160370960490420948364372810759652439684318393869597369898890279242300069046830503059657125858043553373113729594871087942860315948055593344147677932119321424028600190292509664619336217631490498027916950777163752425164438252351468600785554531423979834791445600150108890772427261831495874930509509679414887523661977405914784645916502014777727175798319834059621717421648892845862179131151362279648610789587662840109016397812560123410281881558369684764808427158589621053418154441646967665840185085136102607775409115734963155803833286789583501481573372226195484679719674349562964338708154613401347218002057551149833995233231065737207320566592164688912051242035274499618147339269167576074688060033124924140616954310412384530235227956908301847998406574780144353357884105883387959218296741020722854954100887277304947480547152700263711114665576920925961724019512061174430771918685854961160518537953685957360038825116204970615989239857746870933341859397441672382036764530524729808239765622931171203720639459438906663253650619610229282159290703571350858167568164860431176138378765549296218562697437528856056494473388171789278961444737763604387979003662127798027475934505640301147524790717395857232708656327584954348395562117135230986025734451614751913114005140624270977801178582308406486958461409022442175446835595658183592121309722334474915831657286355138025915434411459395393534709704525536550715391.999
+1189731495357231765085759326628007073479956869869102141501186852722712468967898039614731304160537056720508735524794218059326466407441245944473611725143413248467166796545513080184004525512467970210316955903084154210995219628561620502745688412979158287475743437748747529021767100495257876251386789060100486382120270573746835428422826338960972409135720437886908785614210084478384078153933033666173528598766851519250363351426064628258395419088471393111667700918729834985086320676654241316634560118019882210119337445330955835919527132875094715720056355846555701747536986251959671182002652387533752686564043006387189322467736998297209841197138514624008092952665297074506030396759964773170346856327642777902149445005909504598179054586496247232351389508014081573398665168934777318775791837135956795815584276253258339396528978452820191499230693717636210145879266988271829694083738038077122921912824291024453524934340394022902439339419069066610906029009607658742583030029946393156561520787087964747197937630779342237465827257153805466210260228188924675519409775662832664987585685048138307557155853256492278248578919164433813909200793462409840728598763947896501274688614908225267667177701366807438669326623433058218213443062408099675370787076912329373870411405571681619566725953239506667420107865842757661716617919733022513948046643510651078865572997073260056512303946747105979292110003450407489924836142530065624248678935670746065899317880622000638073367400369402302158314033221251653687424468051520786824115060818437539740055831113916055471483034808874617739843143938172333284262271469979254217432808855959164876994617775909494325360213896498452140653220161981435472501438614603134083005358006470142761755484855437912983836446436796696188799077203473615780300012474195744483595979884254878292198513051622049258764225807542304782444925923341494613428285320468971377328625604051015673705708956626631746891317417396029708456942140863834024650370695696409569123851257481398138888752582030034869787470552028103940729085803240085987569938856671422005581372166650497556769407574429118602955596567887598719046627586511067969787887833869882951233268645804198215954308918671793783729688211286988794688142675294614947234254538088223560934361145676358046211831627683890340178210365154617001635372653348370422726598857026002477929177288289123739070353691365311645518715750245510770260801141976525982246774038853785442558514521428892111522375063439093517487315386834431958429128019507409290585031131279294212910898440219254009319059392162713475019891930586543895163777707714398600339409818266699397506309660607491889862314049922386749339985169589508248405389966372279472368480994566101598780613797426213113809272341186010030687520020604372850246235750477820866306072249009107891882044221153421572454947459745218327822086016027106392614825047067937041894741980478402880643992102437022027245971074555342753214011193822631471157489050501952568860820401920833804902096485703539056563038766617104309221550246208420803236102663918198532911605896456149452566847699113209434574026975730941194301255893892984954283771852399164279918441721650800291777296251806440774844416950920058440264116651186795378697819243783770608877693892976259074109340205317427395771831523271197915676367134269045536541349377669517895718456625645303642348316558188118515730182101737730372539888936801532474040601312554322979825347707786172180885839980406705981955978435796108903153166067253815216088254644383863063765964591075911345075411534030241991912223282597135304726831878735179556423807036390298160370960490420948364372810759652439684318393869597369898890279242300069046830503059657125858043553373113729594871087942860315948055593344147677932119321424028600190292509664619336217631490498027916950777163752425164438252351468600785554531423979834791445600150108890772427261831495874930509509679414887523661977405914784645916502014777727175798319834059621717421648892845862179131151362279648610789587662840109016397812560123410281881558369684764808427158589621053418154441646967665840185085136102607775409115734963155803833286789583501481573372226195484679719674349562964338708154613401347218002057551149833995233231065737207320566592164688912051242035274499618147339269167576074688060033124924140616954310412384530235227956908301847998406574780144353357884105883387959218296741020722854954100887277304947480547152700263711114665576920925961724019512061174430771918685854961160518537953685957360038825116204970615989239857746870933341859397441672382036764530524729808239765622931171203720639459438906663253650619610229282159290703571350858167568164860431176138378765549296218562697437528856056494473388171789278961444737763604387979003662127798027475934505640301147524790717395857232708656327584954348395562117135230986025734451614751913114005140624270977801178582308406486958461409022442175446835595658183592121309722334474915831657286355138025915434411459395393534709704525536550715392
+1189731495357231765085759326628007073479956869869102141501186852722712468967898039614731304160537056720508735524794218059326466407441245944473611725143413248467166796545513080184004525512467970210316955903084154210995219628561620502745688412979158287475743437748747529021767100495257876251386789060100486382120270573746835428422826338960972409135720437886908785614210084478384078153933033666173528598766851519250363351426064628258395419088471393111667700918729834985086320676654241316634560118019882210119337445330955835919527132875094715720056355846555701747536986251959671182002652387533752686564043006387189322467736998297209841197138514624008092952665297074506030396759964773170346856327642777902149445005909504598179054586496247232351389508014081573398665168934777318775791837135956795815584276253258339396528978452820191499230693717636210145879266988271829694083738038077122921912824291024453524934340394022902439339419069066610906029009607658742583030029946393156561520787087964747197937630779342237465827257153805466210260228188924675519409775662832664987585685048138307557155853256492278248578919164433813909200793462409840728598763947896501274688614908225267667177701366807438669326623433058218213443062408099675370787076912329373870411405571681619566725953239506667420107865842757661716617919733022513948046643510651078865572997073260056512303946747105979292110003450407489924836142530065624248678935670746065899317880622000638073367400369402302158314033221251653687424468051520786824115060818437539740055831113916055471483034808874617739843143938172333284262271469979254217432808855959164876994617775909494325360213896498452140653220161981435472501438614603134083005358006470142761755484855437912983836446436796696188799077203473615780300012474195744483595979884254878292198513051622049258764225807542304782444925923341494613428285320468971377328625604051015673705708956626631746891317417396029708456942140863834024650370695696409569123851257481398138888752582030034869787470552028103940729085803240085987569938856671422005581372166650497556769407574429118602955596567887598719046627586511067969787887833869882951233268645804198215954308918671793783729688211286988794688142675294614947234254538088223560934361145676358046211831627683890340178210365154617001635372653348370422726598857026002477929177288289123739070353691365311645518715750245510770260801141976525982246774038853785442558514521428892111522375063439093517487315386834431958429128019507409290585031131279294212910898440219254009319059392162713475019891930586543895163777707714398600339409818266699397506309660607491889862314049922386749339985169589508248405389966372279472368480994566101598780613797426213113809272341186010030687520020604372850246235750477820866306072249009107891882044221153421572454947459745218327822086016027106392614825047067937041894741980478402880643992102437022027245971074555342753214011193822631471157489050501952568860820401920833804902096485703539056563038766617104309221550246208420803236102663918198532911605896456149452566847699113209434574026975730941194301255893892984954283771852399164279918441721650800291777296251806440774844416950920058440264116651186795378697819243783770608877693892976259074109340205317427395771831523271197915676367134269045536541349377669517895718456625645303642348316558188118515730182101737730372539888936801532474040601312554322979825347707786172180885839980406705981955978435796108903153166067253815216088254644383863063765964591075911345075411534030241991912223282597135304726831878735179556423807036390298160370960490420948364372810759652439684318393869597369898890279242300069046830503059657125858043553373113729594871087942860315948055593344147677932119321424028600190292509664619336217631490498027916950777163752425164438252351468600785554531423979834791445600150108890772427261831495874930509509679414887523661977405914784645916502014777727175798319834059621717421648892845862179131151362279648610789587662840109016397812560123410281881558369684764808427158589621053418154441646967665840185085136102607775409115734963155803833286789583501481573372226195484679719674349562964338708154613401347218002057551149833995233231065737207320566592164688912051242035274499618147339269167576074688060033124924140616954310412384530235227956908301847998406574780144353357884105883387959218296741020722854954100887277304947480547152700263711114665576920925961724019512061174430771918685854961160518537953685957360038825116204970615989239857746870933341859397441672382036764530524729808239765622931171203720639459438906663253650619610229282159290703571350858167568164860431176138378765549296218562697437528856056494473388171789278961444737763604387979003662127798027475934505640301147524790717395857232708656327584954348395562117135230986025734451614751913114005140624270977801178582308406486958461409022442175446835595658183592121309722334474915831657286355138025915434411459395393534709704525536550715392.001
+-1189731495357231765085759326628007073479956869869102141501186852722712468967898039614731304160537056720508735524794218059326466407441245944473611725143413248467166796545513080184004525512467970210316955903084154210995219628561620502745688412979158287475743437748747529021767100495257876251386789060100486382120270573746835428422826338960972409135720437886908785614210084478384078153933033666173528598766851519250363351426064628258395419088471393111667700918729834985086320676654241316634560118019882210119337445330955835919527132875094715720056355846555701747536986251959671182002652387533752686564043006387189322467736998297209841197138514624008092952665297074506030396759964773170346856327642777902149445005909504598179054586496247232351389508014081573398665168934777318775791837135956795815584276253258339396528978452820191499230693717636210145879266988271829694083738038077122921912824291024453524934340394022902439339419069066610906029009607658742583030029946393156561520787087964747197937630779342237465827257153805466210260228188924675519409775662832664987585685048138307557155853256492278248578919164433813909200793462409840728598763947896501274688614908225267667177701366807438669326623433058218213443062408099675370787076912329373870411405571681619566725953239506667420107865842757661716617919733022513948046643510651078865572997073260056512303946747105979292110003450407489924836142530065624248678935670746065899317880622000638073367400369402302158314033221251653687424468051520786824115060818437539740055831113916055471483034808874617739843143938172333284262271469979254217432808855959164876994617775909494325360213896498452140653220161981435472501438614603134083005358006470142761755484855437912983836446436796696188799077203473615780300012474195744483595979884254878292198513051622049258764225807542304782444925923341494613428285320468971377328625604051015673705708956626631746891317417396029708456942140863834024650370695696409569123851257481398138888752582030034869787470552028103940729085803240085987569938856671422005581372166650497556769407574429118602955596567887598719046627586511067969787887833869882951233268645804198215954308918671793783729688211286988794688142675294614947234254538088223560934361145676358046211831627683890340178210365154617001635372653348370422726598857026002477929177288289123739070353691365311645518715750245510770260801141976525982246774038853785442558514521428892111522375063439093517487315386834431958429128019507409290585031131279294212910898440219254009319059392162713475019891930586543895163777707714398600339409818266699397506309660607491889862314049922386749339985169589508248405389966372279472368480994566101598780613797426213113809272341186010030687520020604372850246235750477820866306072249009107891882044221153421572454947459745218327822086016027106392614825047067937041894741980478402880643992102437022027245971074555342753214011193822631471157489050501952568860820401920833804902096485703539056563038766617104309221550246208420803236102663918198532911605896456149452566847699113209434574026975730941194301255893892984954283771852399164279918441721650800291777296251806440774844416950920058440264116651186795378697819243783770608877693892976259074109340205317427395771831523271197915676367134269045536541349377669517895718456625645303642348316558188118515730182101737730372539888936801532474040601312554322979825347707786172180885839980406705981955978435796108903153166067253815216088254644383863063765964591075911345075411534030241991912223282597135304726831878735179556423807036390298160370960490420948364372810759652439684318393869597369898890279242300069046830503059657125858043553373113729594871087942860315948055593344147677932119321424028600190292509664619336217631490498027916950777163752425164438252351468600785554531423979834791445600150108890772427261831495874930509509679414887523661977405914784645916502014777727175798319834059621717421648892845862179131151362279648610789587662840109016397812560123410281881558369684764808427158589621053418154441646967665840185085136102607775409115734963155803833286789583501481573372226195484679719674349562964338708154613401347218002057551149833995233231065737207320566592164688912051242035274499618147339269167576074688060033124924140616954310412384530235227956908301847998406574780144353357884105883387959218296741020722854954100887277304947480547152700263711114665576920925961724019512061174430771918685854961160518537953685957360038825116204970615989239857746870933341859397441672382036764530524729808239765622931171203720639459438906663253650619610229282159290703571350858167568164860431176138378765549296218562697437528856056494473388171789278961444737763604387979003662127798027475934505640301147524790717395857232708656327584954348395562117135230986025734451614751913114005140624270977801178582308406486958461409022442175446835595658183592121309722334474915831657286355138025915434411459395393534709704525536550715391.999
+-1189731495357231765085759326628007073479956869869102141501186852722712468967898039614731304160537056720508735524794218059326466407441245944473611725143413248467166796545513080184004525512467970210316955903084154210995219628561620502745688412979158287475743437748747529021767100495257876251386789060100486382120270573746835428422826338960972409135720437886908785614210084478384078153933033666173528598766851519250363351426064628258395419088471393111667700918729834985086320676654241316634560118019882210119337445330955835919527132875094715720056355846555701747536986251959671182002652387533752686564043006387189322467736998297209841197138514624008092952665297074506030396759964773170346856327642777902149445005909504598179054586496247232351389508014081573398665168934777318775791837135956795815584276253258339396528978452820191499230693717636210145879266988271829694083738038077122921912824291024453524934340394022902439339419069066610906029009607658742583030029946393156561520787087964747197937630779342237465827257153805466210260228188924675519409775662832664987585685048138307557155853256492278248578919164433813909200793462409840728598763947896501274688614908225267667177701366807438669326623433058218213443062408099675370787076912329373870411405571681619566725953239506667420107865842757661716617919733022513948046643510651078865572997073260056512303946747105979292110003450407489924836142530065624248678935670746065899317880622000638073367400369402302158314033221251653687424468051520786824115060818437539740055831113916055471483034808874617739843143938172333284262271469979254217432808855959164876994617775909494325360213896498452140653220161981435472501438614603134083005358006470142761755484855437912983836446436796696188799077203473615780300012474195744483595979884254878292198513051622049258764225807542304782444925923341494613428285320468971377328625604051015673705708956626631746891317417396029708456942140863834024650370695696409569123851257481398138888752582030034869787470552028103940729085803240085987569938856671422005581372166650497556769407574429118602955596567887598719046627586511067969787887833869882951233268645804198215954308918671793783729688211286988794688142675294614947234254538088223560934361145676358046211831627683890340178210365154617001635372653348370422726598857026002477929177288289123739070353691365311645518715750245510770260801141976525982246774038853785442558514521428892111522375063439093517487315386834431958429128019507409290585031131279294212910898440219254009319059392162713475019891930586543895163777707714398600339409818266699397506309660607491889862314049922386749339985169589508248405389966372279472368480994566101598780613797426213113809272341186010030687520020604372850246235750477820866306072249009107891882044221153421572454947459745218327822086016027106392614825047067937041894741980478402880643992102437022027245971074555342753214011193822631471157489050501952568860820401920833804902096485703539056563038766617104309221550246208420803236102663918198532911605896456149452566847699113209434574026975730941194301255893892984954283771852399164279918441721650800291777296251806440774844416950920058440264116651186795378697819243783770608877693892976259074109340205317427395771831523271197915676367134269045536541349377669517895718456625645303642348316558188118515730182101737730372539888936801532474040601312554322979825347707786172180885839980406705981955978435796108903153166067253815216088254644383863063765964591075911345075411534030241991912223282597135304726831878735179556423807036390298160370960490420948364372810759652439684318393869597369898890279242300069046830503059657125858043553373113729594871087942860315948055593344147677932119321424028600190292509664619336217631490498027916950777163752425164438252351468600785554531423979834791445600150108890772427261831495874930509509679414887523661977405914784645916502014777727175798319834059621717421648892845862179131151362279648610789587662840109016397812560123410281881558369684764808427158589621053418154441646967665840185085136102607775409115734963155803833286789583501481573372226195484679719674349562964338708154613401347218002057551149833995233231065737207320566592164688912051242035274499618147339269167576074688060033124924140616954310412384530235227956908301847998406574780144353357884105883387959218296741020722854954100887277304947480547152700263711114665576920925961724019512061174430771918685854961160518537953685957360038825116204970615989239857746870933341859397441672382036764530524729808239765622931171203720639459438906663253650619610229282159290703571350858167568164860431176138378765549296218562697437528856056494473388171789278961444737763604387979003662127798027475934505640301147524790717395857232708656327584954348395562117135230986025734451614751913114005140624270977801178582308406486958461409022442175446835595658183592121309722334474915831657286355138025915434411459395393534709704525536550715392
+-1189731495357231765085759326628007073479956869869102141501186852722712468967898039614731304160537056720508735524794218059326466407441245944473611725143413248467166796545513080184004525512467970210316955903084154210995219628561620502745688412979158287475743437748747529021767100495257876251386789060100486382120270573746835428422826338960972409135720437886908785614210084478384078153933033666173528598766851519250363351426064628258395419088471393111667700918729834985086320676654241316634560118019882210119337445330955835919527132875094715720056355846555701747536986251959671182002652387533752686564043006387189322467736998297209841197138514624008092952665297074506030396759964773170346856327642777902149445005909504598179054586496247232351389508014081573398665168934777318775791837135956795815584276253258339396528978452820191499230693717636210145879266988271829694083738038077122921912824291024453524934340394022902439339419069066610906029009607658742583030029946393156561520787087964747197937630779342237465827257153805466210260228188924675519409775662832664987585685048138307557155853256492278248578919164433813909200793462409840728598763947896501274688614908225267667177701366807438669326623433058218213443062408099675370787076912329373870411405571681619566725953239506667420107865842757661716617919733022513948046643510651078865572997073260056512303946747105979292110003450407489924836142530065624248678935670746065899317880622000638073367400369402302158314033221251653687424468051520786824115060818437539740055831113916055471483034808874617739843143938172333284262271469979254217432808855959164876994617775909494325360213896498452140653220161981435472501438614603134083005358006470142761755484855437912983836446436796696188799077203473615780300012474195744483595979884254878292198513051622049258764225807542304782444925923341494613428285320468971377328625604051015673705708956626631746891317417396029708456942140863834024650370695696409569123851257481398138888752582030034869787470552028103940729085803240085987569938856671422005581372166650497556769407574429118602955596567887598719046627586511067969787887833869882951233268645804198215954308918671793783729688211286988794688142675294614947234254538088223560934361145676358046211831627683890340178210365154617001635372653348370422726598857026002477929177288289123739070353691365311645518715750245510770260801141976525982246774038853785442558514521428892111522375063439093517487315386834431958429128019507409290585031131279294212910898440219254009319059392162713475019891930586543895163777707714398600339409818266699397506309660607491889862314049922386749339985169589508248405389966372279472368480994566101598780613797426213113809272341186010030687520020604372850246235750477820866306072249009107891882044221153421572454947459745218327822086016027106392614825047067937041894741980478402880643992102437022027245971074555342753214011193822631471157489050501952568860820401920833804902096485703539056563038766617104309221550246208420803236102663918198532911605896456149452566847699113209434574026975730941194301255893892984954283771852399164279918441721650800291777296251806440774844416950920058440264116651186795378697819243783770608877693892976259074109340205317427395771831523271197915676367134269045536541349377669517895718456625645303642348316558188118515730182101737730372539888936801532474040601312554322979825347707786172180885839980406705981955978435796108903153166067253815216088254644383863063765964591075911345075411534030241991912223282597135304726831878735179556423807036390298160370960490420948364372810759652439684318393869597369898890279242300069046830503059657125858043553373113729594871087942860315948055593344147677932119321424028600190292509664619336217631490498027916950777163752425164438252351468600785554531423979834791445600150108890772427261831495874930509509679414887523661977405914784645916502014777727175798319834059621717421648892845862179131151362279648610789587662840109016397812560123410281881558369684764808427158589621053418154441646967665840185085136102607775409115734963155803833286789583501481573372226195484679719674349562964338708154613401347218002057551149833995233231065737207320566592164688912051242035274499618147339269167576074688060033124924140616954310412384530235227956908301847998406574780144353357884105883387959218296741020722854954100887277304947480547152700263711114665576920925961724019512061174430771918685854961160518537953685957360038825116204970615989239857746870933341859397441672382036764530524729808239765622931171203720639459438906663253650619610229282159290703571350858167568164860431176138378765549296218562697437528856056494473388171789278961444737763604387979003662127798027475934505640301147524790717395857232708656327584954348395562117135230986025734451614751913114005140624270977801178582308406486958461409022442175446835595658183592121309722334474915831657286355138025915434411459395393534709704525536550715392.001
+2.10194769648722560638559437493487419692039291281477365763560242583468662402879090222995728254318237304687499e-45
+2.101947696487225606385594374934874196920392912814773657635602425834686624028790902229957282543182373046875e-45
+2.10194769648722560638559437493487419692039291281477365763560242583468662402879090222995728254318237304687501e-45
+-2.10194769648722560638559437493487419692039291281477365763560242583468662402879090222995728254318237304687499e-45
+-2.101947696487225606385594374934874196920392912814773657635602425834686624028790902229957282543182373046875e-45
+-2.10194769648722560638559437493487419692039291281477365763560242583468662402879090222995728254318237304687501e-45
+3.50324616081204267730932395822479032820065485469128942939267070972447770671465150371659547090530395507812499e-45
+3.503246160812042677309323958224790328200654854691289429392670709724477706714651503716595470905303955078125e-45
+3.50324616081204267730932395822479032820065485469128942939267070972447770671465150371659547090530395507812501e-45
+-3.50324616081204267730932395822479032820065485469128942939267070972447770671465150371659547090530395507812499e-45
+-3.503246160812042677309323958224790328200654854691289429392670709724477706714651503716595470905303955078125e-45
+-3.50324616081204267730932395822479032820065485469128942939267070972447770671465150371659547090530395507812501e-45
+7.410984687618698162648531893023320585475897039214871466383785237510132609053131277979497545424539885696948470431685765963899850655339096945981621940161728171894510697854671067917687257517734731555330779540854980960845750095811137303474765809687100959097544227100475730780971111893578483867565399878350301522805593404659373979179073872386829939581848166016912201945649993128979841136206248449867871357218035220901702390328579173252022052897402080290685402160661237554998340267130003581248647904138574340187552090159017259254714629617513415977493871857473787096164563890871811984127167305601704549300470526959016576377688490826798697257336652176556794107250876433756084600398490497214911746308553955635418864151316847843631308023759629577398300170898437499e-324
+7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984375e-324
+7.410984687618698162648531893023320585475897039214871466383785237510132609053131277979497545424539885696948470431685765963899850655339096945981621940161728171894510697854671067917687257517734731555330779540854980960845750095811137303474765809687100959097544227100475730780971111893578483867565399878350301522805593404659373979179073872386829939581848166016912201945649993128979841136206248449867871357218035220901702390328579173252022052897402080290685402160661237554998340267130003581248647904138574340187552090159017259254714629617513415977493871857473787096164563890871811984127167305601704549300470526959016576377688490826798697257336652176556794107250876433756084600398490497214911746308553955635418864151316847843631308023759629577398300170898437501e-324
+-7.410984687618698162648531893023320585475897039214871466383785237510132609053131277979497545424539885696948470431685765963899850655339096945981621940161728171894510697854671067917687257517734731555330779540854980960845750095811137303474765809687100959097544227100475730780971111893578483867565399878350301522805593404659373979179073872386829939581848166016912201945649993128979841136206248449867871357218035220901702390328579173252022052897402080290685402160661237554998340267130003581248647904138574340187552090159017259254714629617513415977493871857473787096164563890871811984127167305601704549300470526959016576377688490826798697257336652176556794107250876433756084600398490497214911746308553955635418864151316847843631308023759629577398300170898437499e-324
+-7.4109846876186981626485318930233205854758970392148714663837852375101326090531312779794975454245398856969484704316857659638998506553390969459816219401617281718945106978546710679176872575177347315553307795408549809608457500958111373034747658096871009590975442271004757307809711118935784838675653998783503015228055934046593739791790738723868299395818481660169122019456499931289798411362062484498678713572180352209017023903285791732520220528974020802906854021606612375549983402671300035812486479041385743401875520901590172592547146296175134159774938718574737870961645638908718119841271673056017045493004705269590165763776884908267986972573366521765567941072508764337560846003984904972149117463085539556354188641513168478436313080237596295773983001708984375e-324
+-7.410984687618698162648531893023320585475897039214871466383785237510132609053131277979497545424539885696948470431685765963899850655339096945981621940161728171894510697854671067917687257517734731555330779540854980960845750095811137303474765809687100959097544227100475730780971111893578483867565399878350301522805593404659373979179073872386829939581848166016912201945649993128979841136206248449867871357218035220901702390328579173252022052897402080290685402160661237554998340267130003581248647904138574340187552090159017259254714629617513415977493871857473787096164563890871811984127167305601704549300470526959016576377688490826798697257336652176556794107250876433756084600398490497214911746308553955635418864151316847843631308023759629577398300170898437501e-324
+5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687499e-4951
+5.46779929782371190379260890042912972459857622354034501558147073054255753295009660521434106293874080779587102102080529665295047844893304825496026211338471350822573387176689751785383789570845033963493234384897511609341047969033029090288686119993125921652327780757456908215307313367394295878957740232139393310129853319126610211888963060953233950845785422003199631793594071800032514400843804841615045854626840829469327828294881838298175674523144370769439505327077912524046992686788101985028712502357968555779098305597496288175991948375220290368919956488030568463545206536359579198829053635210070171697414632960443922662694334080526864190176997186277619487638560405926908417212393004914459916660510317558023267203296664540665686303143487355117536394182579842533190638252470657276648523287454223056426260916178239688724389624700924406883725156778322327128669248001067971134780240835161999919912749368941130062333775184713893949842620045030584554856591000906652415254548036281829022414017017836373531792968500569736393059459388134289532878925936202911959860111289900618887987637185487890257175376747802810055833471650478460459250779148245153313351312860635744071818212363779076932092244234906632899168786207255077931639313903720118757997293301622787489850525574323330053349895193815663640653261384657614561732314168448072640907418419722475454249088439281362536533088134879943284462483896082614443915736191774429072907311631885819175882194201070472653674851414139198108859096891122440647971063242952915458929379913214790617434914900609409461282745336576821301251695869305718994035511225062977631807957323251343409893311558937242893589182127073929977680322999972072084511129714257799395078371652632557642689712118195363229932217741231347266655794602658713781865895628587618356133445842690980622757869697298305457864854014077743134149549581616770960047019414114115927554858644718705151733262444646312957015720874401831783399876629267632412206980788226617090546010735234775446535427950204682560784093064091008748868287818605298248793439879457512520813143459903135506837923488146278624413240301557305921665812510099227873245904315487345753286636286503807226030243834125646514462721175610422077384131141310997310167289350231522394313116195338483765836875091084530867301962551116953524641866782219275647577303198252230493416188536313334782412272272680845833966884362299362668540114271927670393635174916595231338524725341041244411123466156968910970701214636522586812703780765383816975942646584796378630871592938388807529281755454082628134037935686954169983885723045287488247562656656838905184226961694223388061375323047846826624482079286817404761883437391178335259163868151357930349068061174131050087191978828376147382620503202915394941049520564716066454820461766340754590215525559595903549562621278099530136795125074514242718392219467940568610559805583630337329057723569860511809664741164231921947415724386492152042297812796203704453738513487869185273997856308082426571227053818066616162711321820177977936612440784457475475356233845487698185296555392790365032340724558109915880751818176959751731101364826598545575062030580805510188732031382604511098551005267200735661262096661256044824137056119967967779273328271035688633522914992613122903551437420180422544707071078472935932052340497748391917547810304969780910060995596752409667301101676249036106564732671055561556337835940895462611076531105318082794457577243991861203875486751486321760491907016803052102243880722619748067919226364128975269527936779466226741495770848035680512429340764509429270927056845470429154903231124579718536587607255881903776664771069031066938472788476460322012930233295033487307239472187974104523339108479138928271958145518583355195189390314460933853291828207141736579466617460059018668855897329226526045739728421972311873652633819589252279700383580649872482332717064626876511433504720180433213145347598195242033084909143585968861500534066295124347881553551091005403198578135356959232734262569115529775393942099186306684666328819296619712127724446251513719534288754911396839196870087240104752172553479156988209602152172573903085602353234630969464420805480187541663697061615897052158736871663656287877965014700568701277294647143621722168024410452769115970094432811353897291302226031856656464346619476276280777232193768927273861205192875774054105101149361515027529971227502627819113726259972234152835169954792656314857994567825617347666484628496410640971818182042794985528278253841862020655169993625733881361630774771266021694104359050140770498084974090253693257957652720666502780042003578789909113749828579771084884825283544063138938642114971057650305046009822534888054745317987421433744650802400305823700866991679376510383079097061393271193254188545464782857356545416354777903469647826173542650507678783352302721948966801419867450746302258931065735595588435458411860251695316041515884813891649489148235939442871333362636803581913695403219306498244714254851377779848235254021151511710933136132513506853438248590522201268915519660183559208727757248071287690032431294868087337963504976682551164851571910118588306438983236282234720992802435831644343483470149103980044398219705082804408727593958279432709850087691435623519380914762150835481641373335418838088700191162340990134529298079501516522974364360061496849397757812346609541561544786426941760385242778104838331497986813457080891521791939794631694023406117934862723018080732675346126855938595967878668842110313414179033917498253204546635083703852518317784773110170897293611521619288153898185799835444909828917340811313123097443309606660312914517408855034585438849563676549437992646003145318154279326911078747823286547592935758034819293619617810739585020754384990706331937996993116942871832994234753398176556080587247232218670875630645576361123808295145013820732577370224728666082441643103852052135237029107871824725171250301064910318448715931417597297739077195100440493528574265929367637279694961039405916019750786028596604786141194054282128301344907317062205837882653447288187668851269775881511119842904443216489319071880803360647138732888340962292032766761198105218517261333777006163413042578229757889674721527422550419125841970454230312985062190118002401201824458385906966474162853345156310197990075156820042500608570209040122153751704798004826805544998060107661096550615074217477224611806173614025750822946789256052710835878978453907682264056485085181035257786386181957751285160739592729901482394153462634869665739345774507872436670632443783818831158272076058561748763500450868853206266693313118805937759162696436463954232205499407904769897092430274201583908061356909751493847146842199649381827199629139314649794586391855195314900094376198383063623654537548076548847041634904692964444271447785937256873584370873901519906946675162792020243324948282106576182619520385972302637994125842758516674039106573708797071810533658185026800374315600912099826417389956527932358515693723141301076471660852356156972570942691331009141357831788562803921393250013528417186104846166274481895569136218377916506998203230597087664208101335848418267186316816833817435119742641262509842148123971199782739179038898658917188367922633778880524581892387460749864560166810987228694195882740201814306527328178587284738493695393674639171713173248820998049990430544672477855920384647234422762398960664315801237564285400749454724277525689811714006217058533748758859430726006925769147904672059052723725947401879880819003174931850051429136071633807200697867867820953318408936940737783251194718335284929170810085473034145093815636178641952577515465395754614358036259938883256478835410391923683669874002630496812188314777763451185185037095888408590233797624565610306839281153499423939631856771230553247716937842149249317370437936795460514548456241502709554506083187473957557289508327546112770413596023012051385091755433135227727865041410075526919022495723751757317409236187691973046528983526943866654482600334585753232528142338680982794761667642582849114342880722431789416983473659854276969831295794960590320328412811499235180870848768851143690332277365212457405547117714234927198999823577119102255454804246883221953362404922531362818578378084917959937881991252055552221165810711344767874684305393079096174421066851595190710538449873436664524942803177201535670543641172447751413365584060985488039245094960522618251980431402726553036253156053265695302528858549918222892192012183135907454120104466422471117039019915913380626933201571806187365694399692832452794303126511926687883400336268251942602962629598842585977035848887708019612096528229823223761223035861698616851060438205104442934328562512103956932612648678239801726833527961417722103017259976523738041525250371628522914038044559973313673784636324377732429055180750654147242958574602882254000616086649616491964000793596226737706078983952690750565966271161482894910424917641709240148851061582354827747784181341232939744368770519956736186837511153538087714349842044477361747583160630962450473112798415799955781866094028642440427514431285362784534306334231186628526883742296008944189588248424594505408261764521458293892861035227741011955560296507532542444335659379385268289908931497662989977383599138871788886071907657098670524708807859379351100914247434499663534978656817538413802460756120940336174886746762968225700770270762668795579136738393410120995580438064423487980539512392749133346315224095644617704348757904022300228726475684361770186580686970717318793991803745609634927267145287292242089385899402725157478883791184616177022716940750874196341472980767647757457070269344429082366644005572655279514534821916845976742736919782536786909511787772395739254104386790993747006099739201282014223813291082365753694036759607652383337781270170965742961483210755669592850422218371597998001335632399639696386108726803932103001801520206130516134145471637137725126177572779559798958663675717764562685641910924770276501358322003764402397837265405526948517172695984892888515296609750277756395652297345967262058326684349793545419433450629778911871465610501181181082233237352108436811286154136010912220079123505369597771143065415145113323689360785609297881437988143912215075223706486467673642091321473124070149531135323798381957284911285369782859180669910409931530643561799038859520279527137496536045020535123554499166808872342387738555816361724795948668717650945139401032841679141101967202611108127167764242601545073950503805754528504207308184129947310793073435383768802801240193210401980387235587845444085843444660909828020673265290009315620489328754690798749565951805953953470932851402791654679655963183657497015358123843332409682836407213440034420026916137720567620990980257393327159139701862251764595634841341397466479401705379002753504804904688514393007719499151947030805766110225906703998449318676097774175289034547319222063789321414647554026294200742938163492700383513394191467684738513531716291539122387971419059201430360641317052304217623052328615038567995111559365651690059167118453891355809281625119124385312041561384477751207895486661436002934120657671671068885091725680035306685394605882483165133926525678562246026972962033289200733544259940449566248313469794588468375979500641518671645837492034339425921785288689813115753318489415974924704367823875026875326490930964983153474039774360013999821020308467636989947850546175232414631869808983945042114307636178253068950656615360454314979037591180079348391228818858630917694698835398768405435212957063159198557844932356038662689259817026902702028295957943508009182579139917444559226833433740466716699302196502685546875e-4951
+5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687501e-4951
+-5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687499e-4951
+-5.46779929782371190379260890042912972459857622354034501558147073054255753295009660521434106293874080779587102102080529665295047844893304825496026211338471350822573387176689751785383789570845033963493234384897511609341047969033029090288686119993125921652327780757456908215307313367394295878957740232139393310129853319126610211888963060953233950845785422003199631793594071800032514400843804841615045854626840829469327828294881838298175674523144370769439505327077912524046992686788101985028712502357968555779098305597496288175991948375220290368919956488030568463545206536359579198829053635210070171697414632960443922662694334080526864190176997186277619487638560405926908417212393004914459916660510317558023267203296664540665686303143487355117536394182579842533190638252470657276648523287454223056426260916178239688724389624700924406883725156778322327128669248001067971134780240835161999919912749368941130062333775184713893949842620045030584554856591000906652415254548036281829022414017017836373531792968500569736393059459388134289532878925936202911959860111289900618887987637185487890257175376747802810055833471650478460459250779148245153313351312860635744071818212363779076932092244234906632899168786207255077931639313903720118757997293301622787489850525574323330053349895193815663640653261384657614561732314168448072640907418419722475454249088439281362536533088134879943284462483896082614443915736191774429072907311631885819175882194201070472653674851414139198108859096891122440647971063242952915458929379913214790617434914900609409461282745336576821301251695869305718994035511225062977631807957323251343409893311558937242893589182127073929977680322999972072084511129714257799395078371652632557642689712118195363229932217741231347266655794602658713781865895628587618356133445842690980622757869697298305457864854014077743134149549581616770960047019414114115927554858644718705151733262444646312957015720874401831783399876629267632412206980788226617090546010735234775446535427950204682560784093064091008748868287818605298248793439879457512520813143459903135506837923488146278624413240301557305921665812510099227873245904315487345753286636286503807226030243834125646514462721175610422077384131141310997310167289350231522394313116195338483765836875091084530867301962551116953524641866782219275647577303198252230493416188536313334782412272272680845833966884362299362668540114271927670393635174916595231338524725341041244411123466156968910970701214636522586812703780765383816975942646584796378630871592938388807529281755454082628134037935686954169983885723045287488247562656656838905184226961694223388061375323047846826624482079286817404761883437391178335259163868151357930349068061174131050087191978828376147382620503202915394941049520564716066454820461766340754590215525559595903549562621278099530136795125074514242718392219467940568610559805583630337329057723569860511809664741164231921947415724386492152042297812796203704453738513487869185273997856308082426571227053818066616162711321820177977936612440784457475475356233845487698185296555392790365032340724558109915880751818176959751731101364826598545575062030580805510188732031382604511098551005267200735661262096661256044824137056119967967779273328271035688633522914992613122903551437420180422544707071078472935932052340497748391917547810304969780910060995596752409667301101676249036106564732671055561556337835940895462611076531105318082794457577243991861203875486751486321760491907016803052102243880722619748067919226364128975269527936779466226741495770848035680512429340764509429270927056845470429154903231124579718536587607255881903776664771069031066938472788476460322012930233295033487307239472187974104523339108479138928271958145518583355195189390314460933853291828207141736579466617460059018668855897329226526045739728421972311873652633819589252279700383580649872482332717064626876511433504720180433213145347598195242033084909143585968861500534066295124347881553551091005403198578135356959232734262569115529775393942099186306684666328819296619712127724446251513719534288754911396839196870087240104752172553479156988209602152172573903085602353234630969464420805480187541663697061615897052158736871663656287877965014700568701277294647143621722168024410452769115970094432811353897291302226031856656464346619476276280777232193768927273861205192875774054105101149361515027529971227502627819113726259972234152835169954792656314857994567825617347666484628496410640971818182042794985528278253841862020655169993625733881361630774771266021694104359050140770498084974090253693257957652720666502780042003578789909113749828579771084884825283544063138938642114971057650305046009822534888054745317987421433744650802400305823700866991679376510383079097061393271193254188545464782857356545416354777903469647826173542650507678783352302721948966801419867450746302258931065735595588435458411860251695316041515884813891649489148235939442871333362636803581913695403219306498244714254851377779848235254021151511710933136132513506853438248590522201268915519660183559208727757248071287690032431294868087337963504976682551164851571910118588306438983236282234720992802435831644343483470149103980044398219705082804408727593958279432709850087691435623519380914762150835481641373335418838088700191162340990134529298079501516522974364360061496849397757812346609541561544786426941760385242778104838331497986813457080891521791939794631694023406117934862723018080732675346126855938595967878668842110313414179033917498253204546635083703852518317784773110170897293611521619288153898185799835444909828917340811313123097443309606660312914517408855034585438849563676549437992646003145318154279326911078747823286547592935758034819293619617810739585020754384990706331937996993116942871832994234753398176556080587247232218670875630645576361123808295145013820732577370224728666082441643103852052135237029107871824725171250301064910318448715931417597297739077195100440493528574265929367637279694961039405916019750786028596604786141194054282128301344907317062205837882653447288187668851269775881511119842904443216489319071880803360647138732888340962292032766761198105218517261333777006163413042578229757889674721527422550419125841970454230312985062190118002401201824458385906966474162853345156310197990075156820042500608570209040122153751704798004826805544998060107661096550615074217477224611806173614025750822946789256052710835878978453907682264056485085181035257786386181957751285160739592729901482394153462634869665739345774507872436670632443783818831158272076058561748763500450868853206266693313118805937759162696436463954232205499407904769897092430274201583908061356909751493847146842199649381827199629139314649794586391855195314900094376198383063623654537548076548847041634904692964444271447785937256873584370873901519906946675162792020243324948282106576182619520385972302637994125842758516674039106573708797071810533658185026800374315600912099826417389956527932358515693723141301076471660852356156972570942691331009141357831788562803921393250013528417186104846166274481895569136218377916506998203230597087664208101335848418267186316816833817435119742641262509842148123971199782739179038898658917188367922633778880524581892387460749864560166810987228694195882740201814306527328178587284738493695393674639171713173248820998049990430544672477855920384647234422762398960664315801237564285400749454724277525689811714006217058533748758859430726006925769147904672059052723725947401879880819003174931850051429136071633807200697867867820953318408936940737783251194718335284929170810085473034145093815636178641952577515465395754614358036259938883256478835410391923683669874002630496812188314777763451185185037095888408590233797624565610306839281153499423939631856771230553247716937842149249317370437936795460514548456241502709554506083187473957557289508327546112770413596023012051385091755433135227727865041410075526919022495723751757317409236187691973046528983526943866654482600334585753232528142338680982794761667642582849114342880722431789416983473659854276969831295794960590320328412811499235180870848768851143690332277365212457405547117714234927198999823577119102255454804246883221953362404922531362818578378084917959937881991252055552221165810711344767874684305393079096174421066851595190710538449873436664524942803177201535670543641172447751413365584060985488039245094960522618251980431402726553036253156053265695302528858549918222892192012183135907454120104466422471117039019915913380626933201571806187365694399692832452794303126511926687883400336268251942602962629598842585977035848887708019612096528229823223761223035861698616851060438205104442934328562512103956932612648678239801726833527961417722103017259976523738041525250371628522914038044559973313673784636324377732429055180750654147242958574602882254000616086649616491964000793596226737706078983952690750565966271161482894910424917641709240148851061582354827747784181341232939744368770519956736186837511153538087714349842044477361747583160630962450473112798415799955781866094028642440427514431285362784534306334231186628526883742296008944189588248424594505408261764521458293892861035227741011955560296507532542444335659379385268289908931497662989977383599138871788886071907657098670524708807859379351100914247434499663534978656817538413802460756120940336174886746762968225700770270762668795579136738393410120995580438064423487980539512392749133346315224095644617704348757904022300228726475684361770186580686970717318793991803745609634927267145287292242089385899402725157478883791184616177022716940750874196341472980767647757457070269344429082366644005572655279514534821916845976742736919782536786909511787772395739254104386790993747006099739201282014223813291082365753694036759607652383337781270170965742961483210755669592850422218371597998001335632399639696386108726803932103001801520206130516134145471637137725126177572779559798958663675717764562685641910924770276501358322003764402397837265405526948517172695984892888515296609750277756395652297345967262058326684349793545419433450629778911871465610501181181082233237352108436811286154136010912220079123505369597771143065415145113323689360785609297881437988143912215075223706486467673642091321473124070149531135323798381957284911285369782859180669910409931530643561799038859520279527137496536045020535123554499166808872342387738555816361724795948668717650945139401032841679141101967202611108127167764242601545073950503805754528504207308184129947310793073435383768802801240193210401980387235587845444085843444660909828020673265290009315620489328754690798749565951805953953470932851402791654679655963183657497015358123843332409682836407213440034420026916137720567620990980257393327159139701862251764595634841341397466479401705379002753504804904688514393007719499151947030805766110225906703998449318676097774175289034547319222063789321414647554026294200742938163492700383513394191467684738513531716291539122387971419059201430360641317052304217623052328615038567995111559365651690059167118453891355809281625119124385312041561384477751207895486661436002934120657671671068885091725680035306685394605882483165133926525678562246026972962033289200733544259940449566248313469794588468375979500641518671645837492034339425921785288689813115753318489415974924704367823875026875326490930964983153474039774360013999821020308467636989947850546175232414631869808983945042114307636178253068950656615360454314979037591180079348391228818858630917694698835398768405435212957063159198557844932356038662689259817026902702028295957943508009182579139917444559226833433740466716699302196502685546875e-4951
+-5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687501e-4951
+5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687499e-4951
+5.46779929782371190379260890042912972459857622354034501558147073054255753295009660521434106293874080779587102102080529665295047844893304825496026211338471350822573387176689751785383789570845033963493234384897511609341047969033029090288686119993125921652327780757456908215307313367394295878957740232139393310129853319126610211888963060953233950845785422003199631793594071800032514400843804841615045854626840829469327828294881838298175674523144370769439505327077912524046992686788101985028712502357968555779098305597496288175991948375220290368919956488030568463545206536359579198829053635210070171697414632960443922662694334080526864190176997186277619487638560405926908417212393004914459916660510317558023267203296664540665686303143487355117536394182579842533190638252470657276648523287454223056426260916178239688724389624700924406883725156778322327128669248001067971134780240835161999919912749368941130062333775184713893949842620045030584554856591000906652415254548036281829022414017017836373531792968500569736393059459388134289532878925936202911959860111289900618887987637185487890257175376747802810055833471650478460459250779148245153313351312860635744071818212363779076932092244234906632899168786207255077931639313903720118757997293301622787489850525574323330053349895193815663640653261384657614561732314168448072640907418419722475454249088439281362536533088134879943284462483896082614443915736191774429072907311631885819175882194201070472653674851414139198108859096891122440647971063242952915458929379913214790617434914900609409461282745336576821301251695869305718994035511225062977631807957323251343409893311558937242893589182127073929977680322999972072084511129714257799395078371652632557642689712118195363229932217741231347266655794602658713781865895628587618356133445842690980622757869697298305457864854014077743134149549581616770960047019414114115927554858644718705151733262444646312957015720874401831783399876629267632412206980788226617090546010735234775446535427950204682560784093064091008748868287818605298248793439879457512520813143459903135506837923488146278624413240301557305921665812510099227873245904315487345753286636286503807226030243834125646514462721175610422077384131141310997310167289350231522394313116195338483765836875091084530867301962551116953524641866782219275647577303198252230493416188536313334782412272272680845833966884362299362668540114271927670393635174916595231338524725341041244411123466156968910970701214636522586812703780765383816975942646584796378630871592938388807529281755454082628134037935686954169983885723045287488247562656656838905184226961694223388061375323047846826624482079286817404761883437391178335259163868151357930349068061174131050087191978828376147382620503202915394941049520564716066454820461766340754590215525559595903549562621278099530136795125074514242718392219467940568610559805583630337329057723569860511809664741164231921947415724386492152042297812796203704453738513487869185273997856308082426571227053818066616162711321820177977936612440784457475475356233845487698185296555392790365032340724558109915880751818176959751731101364826598545575062030580805510188732031382604511098551005267200735661262096661256044824137056119967967779273328271035688633522914992613122903551437420180422544707071078472935932052340497748391917547810304969780910060995596752409667301101676249036106564732671055561556337835940895462611076531105318082794457577243991861203875486751486321760491907016803052102243880722619748067919226364128975269527936779466226741495770848035680512429340764509429270927056845470429154903231124579718536587607255881903776664771069031066938472788476460322012930233295033487307239472187974104523339108479138928271958145518583355195189390314460933853291828207141736579466617460059018668855897329226526045739728421972311873652633819589252279700383580649872482332717064626876511433504720180433213145347598195242033084909143585968861500534066295124347881553551091005403198578135356959232734262569115529775393942099186306684666328819296619712127724446251513719534288754911396839196870087240104752172553479156988209602152172573903085602353234630969464420805480187541663697061615897052158736871663656287877965014700568701277294647143621722168024410452769115970094432811353897291302226031856656464346619476276280777232193768927273861205192875774054105101149361515027529971227502627819113726259972234152835169954792656314857994567825617347666484628496410640971818182042794985528278253841862020655169993625733881361630774771266021694104359050140770498084974090253693257957652720666502780042003578789909113749828579771084884825283544063138938642114971057650305046009822534888054745317987421433744650802400305823700866991679376510383079097061393271193254188545464782857356545416354777903469647826173542650507678783352302721948966801419867450746302258931065735595588435458411860251695316041515884813891649489148235939442871333362636803581913695403219306498244714254851377779848235254021151511710933136132513506853438248590522201268915519660183559208727757248071287690032431294868087337963504976682551164851571910118588306438983236282234720992802435831644343483470149103980044398219705082804408727593958279432709850087691435623519380914762150835481641373335418838088700191162340990134529298079501516522974364360061496849397757812346609541561544786426941760385242778104838331497986813457080891521791939794631694023406117934862723018080732675346126855938595967878668842110313414179033917498253204546635083703852518317784773110170897293611521619288153898185799835444909828917340811313123097443309606660312914517408855034585438849563676549437992646003145318154279326911078747823286547592935758034819293619617810739585020754384990706331937996993116942871832994234753398176556080587247232218670875630645576361123808295145013820732577370224728666082441643103852052135237029107871824725171250301064910318448715931417597297739077195100440493528574265929367637279694961039405916019750786028596604786141194054282128301344907317062205837882653447288187668851269775881511119842904443216489319071880803360647138732888340962292032766761198105218517261333777006163413042578229757889674721527422550419125841970454230312985062190118002401201824458385906966474162853345156310197990075156820042500608570209040122153751704798004826805544998060107661096550615074217477224611806173614025750822946789256052710835878978453907682264056485085181035257786386181957751285160739592729901482394153462634869665739345774507872436670632443783818831158272076058561748763500450868853206266693313118805937759162696436463954232205499407904769897092430274201583908061356909751493847146842199649381827199629139314649794586391855195314900094376198383063623654537548076548847041634904692964444271447785937256873584370873901519906946675162792020243324948282106576182619520385972302637994125842758516674039106573708797071810533658185026800374315600912099826417389956527932358515693723141301076471660852356156972570942691331009141357831788562803921393250013528417186104846166274481895569136218377916506998203230597087664208101335848418267186316816833817435119742641262509842148123971199782739179038898658917188367922633778880524581892387460749864560166810987228694195882740201814306527328178587284738493695393674639171713173248820998049990430544672477855920384647234422762398960664315801237564285400749454724277525689811714006217058533748758859430726006925769147904672059052723725947401879880819003174931850051429136071633807200697867867820953318408936940737783251194718335284929170810085473034145093815636178641952577515465395754614358036259938883256478835410391923683669874002630496812188314777763451185185037095888408590233797624565610306839281153499423939631856771230553247716937842149249317370437936795460514548456241502709554506083187473957557289508327546112770413596023012051385091755433135227727865041410075526919022495723751757317409236187691973046528983526943866654482600334585753232528142338680982794761667642582849114342880722431789416983473659854276969831295794960590320328412811499235180870848768851143690332277365212457405547117714234927198999823577119102255454804246883221953362404922531362818578378084917959937881991252055552221165810711344767874684305393079096174421066851595190710538449873436664524942803177201535670543641172447751413365584060985488039245094960522618251980431402726553036253156053265695302528858549918222892192012183135907454120104466422471117039019915913380626933201571806187365694399692832452794303126511926687883400336268251942602962629598842585977035848887708019612096528229823223761223035861698616851060438205104442934328562512103956932612648678239801726833527961417722103017259976523738041525250371628522914038044559973313673784636324377732429055180750654147242958574602882254000616086649616491964000793596226737706078983952690750565966271161482894910424917641709240148851061582354827747784181341232939744368770519956736186837511153538087714349842044477361747583160630962450473112798415799955781866094028642440427514431285362784534306334231186628526883742296008944189588248424594505408261764521458293892861035227741011955560296507532542444335659379385268289908931497662989977383599138871788886071907657098670524708807859379351100914247434499663534978656817538413802460756120940336174886746762968225700770270762668795579136738393410120995580438064423487980539512392749133346315224095644617704348757904022300228726475684361770186580686970717318793991803745609634927267145287292242089385899402725157478883791184616177022716940750874196341472980767647757457070269344429082366644005572655279514534821916845976742736919782536786909511787772395739254104386790993747006099739201282014223813291082365753694036759607652383337781270170965742961483210755669592850422218371597998001335632399639696386108726803932103001801520206130516134145471637137725126177572779559798958663675717764562685641910924770276501358322003764402397837265405526948517172695984892888515296609750277756395652297345967262058326684349793545419433450629778911871465610501181181082233237352108436811286154136010912220079123505369597771143065415145113323689360785609297881437988143912215075223706486467673642091321473124070149531135323798381957284911285369782859180669910409931530643561799038859520279527137496536045020535123554499166808872342387738555816361724795948668717650945139401032841679141101967202611108127167764242601545073950503805754528504207308184129947310793073435383768802801240193210401980387235587845444085843444660909828020673265290009315620489328754690798749565951805953953470932851402791654679655963183657497015358123843332409682836407213440034420026916137720567620990980257393327159139701862251764595634841341397466479401705379002753504804904688514393007719499151947030805766110225906703998449318676097774175289034547319222063789321414647554026294200742938163492700383513394191467684738513531716291539122387971419059201430360641317052304217623052328615038567995111559365651690059167118453891355809281625119124385312041561384477751207895486661436002934120657671671068885091725680035306685394605882483165133926525678562246026972962033289200733544259940449566248313469794588468375979500641518671645837492034339425921785288689813115753318489415974924704367823875026875326490930964983153474039774360013999821020308467636989947850546175232414631869808983945042114307636178253068950656615360454314979037591180079348391228818858630917694698835398768405435212957063159198557844932356038662689259817026902702028295957943508009182579139917444559226833433740466716699302196502685546875e-4951
+5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687501e-4951
+-5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687499e-4951
+-5.46779929782371190379260890042912972459857622354034501558147073054255753295009660521434106293874080779587102102080529665295047844893304825496026211338471350822573387176689751785383789570845033963493234384897511609341047969033029090288686119993125921652327780757456908215307313367394295878957740232139393310129853319126610211888963060953233950845785422003199631793594071800032514400843804841615045854626840829469327828294881838298175674523144370769439505327077912524046992686788101985028712502357968555779098305597496288175991948375220290368919956488030568463545206536359579198829053635210070171697414632960443922662694334080526864190176997186277619487638560405926908417212393004914459916660510317558023267203296664540665686303143487355117536394182579842533190638252470657276648523287454223056426260916178239688724389624700924406883725156778322327128669248001067971134780240835161999919912749368941130062333775184713893949842620045030584554856591000906652415254548036281829022414017017836373531792968500569736393059459388134289532878925936202911959860111289900618887987637185487890257175376747802810055833471650478460459250779148245153313351312860635744071818212363779076932092244234906632899168786207255077931639313903720118757997293301622787489850525574323330053349895193815663640653261384657614561732314168448072640907418419722475454249088439281362536533088134879943284462483896082614443915736191774429072907311631885819175882194201070472653674851414139198108859096891122440647971063242952915458929379913214790617434914900609409461282745336576821301251695869305718994035511225062977631807957323251343409893311558937242893589182127073929977680322999972072084511129714257799395078371652632557642689712118195363229932217741231347266655794602658713781865895628587618356133445842690980622757869697298305457864854014077743134149549581616770960047019414114115927554858644718705151733262444646312957015720874401831783399876629267632412206980788226617090546010735234775446535427950204682560784093064091008748868287818605298248793439879457512520813143459903135506837923488146278624413240301557305921665812510099227873245904315487345753286636286503807226030243834125646514462721175610422077384131141310997310167289350231522394313116195338483765836875091084530867301962551116953524641866782219275647577303198252230493416188536313334782412272272680845833966884362299362668540114271927670393635174916595231338524725341041244411123466156968910970701214636522586812703780765383816975942646584796378630871592938388807529281755454082628134037935686954169983885723045287488247562656656838905184226961694223388061375323047846826624482079286817404761883437391178335259163868151357930349068061174131050087191978828376147382620503202915394941049520564716066454820461766340754590215525559595903549562621278099530136795125074514242718392219467940568610559805583630337329057723569860511809664741164231921947415724386492152042297812796203704453738513487869185273997856308082426571227053818066616162711321820177977936612440784457475475356233845487698185296555392790365032340724558109915880751818176959751731101364826598545575062030580805510188732031382604511098551005267200735661262096661256044824137056119967967779273328271035688633522914992613122903551437420180422544707071078472935932052340497748391917547810304969780910060995596752409667301101676249036106564732671055561556337835940895462611076531105318082794457577243991861203875486751486321760491907016803052102243880722619748067919226364128975269527936779466226741495770848035680512429340764509429270927056845470429154903231124579718536587607255881903776664771069031066938472788476460322012930233295033487307239472187974104523339108479138928271958145518583355195189390314460933853291828207141736579466617460059018668855897329226526045739728421972311873652633819589252279700383580649872482332717064626876511433504720180433213145347598195242033084909143585968861500534066295124347881553551091005403198578135356959232734262569115529775393942099186306684666328819296619712127724446251513719534288754911396839196870087240104752172553479156988209602152172573903085602353234630969464420805480187541663697061615897052158736871663656287877965014700568701277294647143621722168024410452769115970094432811353897291302226031856656464346619476276280777232193768927273861205192875774054105101149361515027529971227502627819113726259972234152835169954792656314857994567825617347666484628496410640971818182042794985528278253841862020655169993625733881361630774771266021694104359050140770498084974090253693257957652720666502780042003578789909113749828579771084884825283544063138938642114971057650305046009822534888054745317987421433744650802400305823700866991679376510383079097061393271193254188545464782857356545416354777903469647826173542650507678783352302721948966801419867450746302258931065735595588435458411860251695316041515884813891649489148235939442871333362636803581913695403219306498244714254851377779848235254021151511710933136132513506853438248590522201268915519660183559208727757248071287690032431294868087337963504976682551164851571910118588306438983236282234720992802435831644343483470149103980044398219705082804408727593958279432709850087691435623519380914762150835481641373335418838088700191162340990134529298079501516522974364360061496849397757812346609541561544786426941760385242778104838331497986813457080891521791939794631694023406117934862723018080732675346126855938595967878668842110313414179033917498253204546635083703852518317784773110170897293611521619288153898185799835444909828917340811313123097443309606660312914517408855034585438849563676549437992646003145318154279326911078747823286547592935758034819293619617810739585020754384990706331937996993116942871832994234753398176556080587247232218670875630645576361123808295145013820732577370224728666082441643103852052135237029107871824725171250301064910318448715931417597297739077195100440493528574265929367637279694961039405916019750786028596604786141194054282128301344907317062205837882653447288187668851269775881511119842904443216489319071880803360647138732888340962292032766761198105218517261333777006163413042578229757889674721527422550419125841970454230312985062190118002401201824458385906966474162853345156310197990075156820042500608570209040122153751704798004826805544998060107661096550615074217477224611806173614025750822946789256052710835878978453907682264056485085181035257786386181957751285160739592729901482394153462634869665739345774507872436670632443783818831158272076058561748763500450868853206266693313118805937759162696436463954232205499407904769897092430274201583908061356909751493847146842199649381827199629139314649794586391855195314900094376198383063623654537548076548847041634904692964444271447785937256873584370873901519906946675162792020243324948282106576182619520385972302637994125842758516674039106573708797071810533658185026800374315600912099826417389956527932358515693723141301076471660852356156972570942691331009141357831788562803921393250013528417186104846166274481895569136218377916506998203230597087664208101335848418267186316816833817435119742641262509842148123971199782739179038898658917188367922633778880524581892387460749864560166810987228694195882740201814306527328178587284738493695393674639171713173248820998049990430544672477855920384647234422762398960664315801237564285400749454724277525689811714006217058533748758859430726006925769147904672059052723725947401879880819003174931850051429136071633807200697867867820953318408936940737783251194718335284929170810085473034145093815636178641952577515465395754614358036259938883256478835410391923683669874002630496812188314777763451185185037095888408590233797624565610306839281153499423939631856771230553247716937842149249317370437936795460514548456241502709554506083187473957557289508327546112770413596023012051385091755433135227727865041410075526919022495723751757317409236187691973046528983526943866654482600334585753232528142338680982794761667642582849114342880722431789416983473659854276969831295794960590320328412811499235180870848768851143690332277365212457405547117714234927198999823577119102255454804246883221953362404922531362818578378084917959937881991252055552221165810711344767874684305393079096174421066851595190710538449873436664524942803177201535670543641172447751413365584060985488039245094960522618251980431402726553036253156053265695302528858549918222892192012183135907454120104466422471117039019915913380626933201571806187365694399692832452794303126511926687883400336268251942602962629598842585977035848887708019612096528229823223761223035861698616851060438205104442934328562512103956932612648678239801726833527961417722103017259976523738041525250371628522914038044559973313673784636324377732429055180750654147242958574602882254000616086649616491964000793596226737706078983952690750565966271161482894910424917641709240148851061582354827747784181341232939744368770519956736186837511153538087714349842044477361747583160630962450473112798415799955781866094028642440427514431285362784534306334231186628526883742296008944189588248424594505408261764521458293892861035227741011955560296507532542444335659379385268289908931497662989977383599138871788886071907657098670524708807859379351100914247434499663534978656817538413802460756120940336174886746762968225700770270762668795579136738393410120995580438064423487980539512392749133346315224095644617704348757904022300228726475684361770186580686970717318793991803745609634927267145287292242089385899402725157478883791184616177022716940750874196341472980767647757457070269344429082366644005572655279514534821916845976742736919782536786909511787772395739254104386790993747006099739201282014223813291082365753694036759607652383337781270170965742961483210755669592850422218371597998001335632399639696386108726803932103001801520206130516134145471637137725126177572779559798958663675717764562685641910924770276501358322003764402397837265405526948517172695984892888515296609750277756395652297345967262058326684349793545419433450629778911871465610501181181082233237352108436811286154136010912220079123505369597771143065415145113323689360785609297881437988143912215075223706486467673642091321473124070149531135323798381957284911285369782859180669910409931530643561799038859520279527137496536045020535123554499166808872342387738555816361724795948668717650945139401032841679141101967202611108127167764242601545073950503805754528504207308184129947310793073435383768802801240193210401980387235587845444085843444660909828020673265290009315620489328754690798749565951805953953470932851402791654679655963183657497015358123843332409682836407213440034420026916137720567620990980257393327159139701862251764595634841341397466479401705379002753504804904688514393007719499151947030805766110225906703998449318676097774175289034547319222063789321414647554026294200742938163492700383513394191467684738513531716291539122387971419059201430360641317052304217623052328615038567995111559365651690059167118453891355809281625119124385312041561384477751207895486661436002934120657671671068885091725680035306685394605882483165133926525678562246026972962033289200733544259940449566248313469794588468375979500641518671645837492034339425921785288689813115753318489415974924704367823875026875326490930964983153474039774360013999821020308467636989947850546175232414631869808983945042114307636178253068950656615360454314979037591180079348391228818858630917694698835398768405435212957063159198557844932356038662689259817026902702028295957943508009182579139917444559226833433740466716699302196502685546875e-4951
+-5.4677992978237119037926089004291297245985762235403450155814707305425575329500966052143410629387408077958710210208052966529504784489330482549602621133847135082257338717668975178538378957084503396349323438489751160934104796903302909028868611999312592165232778075745690821530731336739429587895774023213939331012985331912661021188896306095323395084578542200319963179359407180003251440084380484161504585462684082946932782829488183829817567452314437076943950532707791252404699268678810198502871250235796855577909830559749628817599194837522029036891995648803056846354520653635957919882905363521007017169741463296044392266269433408052686419017699718627761948763856040592690841721239300491445991666051031755802326720329666454066568630314348735511753639418257984253319063825247065727664852328745422305642626091617823968872438962470092440688372515677832232712866924800106797113478024083516199991991274936894113006233377518471389394984262004503058455485659100090665241525454803628182902241401701783637353179296850056973639305945938813428953287892593620291195986011128990061888798763718548789025717537674780281005583347165047846045925077914824515331335131286063574407181821236377907693209224423490663289916878620725507793163931390372011875799729330162278748985052557432333005334989519381566364065326138465761456173231416844807264090741841972247545424908843928136253653308813487994328446248389608261444391573619177442907290731163188581917588219420107047265367485141413919810885909689112244064797106324295291545892937991321479061743491490060940946128274533657682130125169586930571899403551122506297763180795732325134340989331155893724289358918212707392997768032299997207208451112971425779939507837165263255764268971211819536322993221774123134726665579460265871378186589562858761835613344584269098062275786969729830545786485401407774313414954958161677096004701941411411592755485864471870515173326244464631295701572087440183178339987662926763241220698078822661709054601073523477544653542795020468256078409306409100874886828781860529824879343987945751252081314345990313550683792348814627862441324030155730592166581251009922787324590431548734575328663628650380722603024383412564651446272117561042207738413114131099731016728935023152239431311619533848376583687509108453086730196255111695352464186678221927564757730319825223049341618853631333478241227227268084583396688436229936266854011427192767039363517491659523133852472534104124441112346615696891097070121463652258681270378076538381697594264658479637863087159293838880752928175545408262813403793568695416998388572304528748824756265665683890518422696169422338806137532304784682662448207928681740476188343739117833525916386815135793034906806117413105008719197882837614738262050320291539494104952056471606645482046176634075459021552555959590354956262127809953013679512507451424271839221946794056861055980558363033732905772356986051180966474116423192194741572438649215204229781279620370445373851348786918527399785630808242657122705381806661616271132182017797793661244078445747547535623384548769818529655539279036503234072455810991588075181817695975173110136482659854557506203058080551018873203138260451109855100526720073566126209666125604482413705611996796777927332827103568863352291499261312290355143742018042254470707107847293593205234049774839191754781030496978091006099559675240966730110167624903610656473267105556155633783594089546261107653110531808279445757724399186120387548675148632176049190701680305210224388072261974806791922636412897526952793677946622674149577084803568051242934076450942927092705684547042915490323112457971853658760725588190377666477106903106693847278847646032201293023329503348730723947218797410452333910847913892827195814551858335519518939031446093385329182820714173657946661746005901866885589732922652604573972842197231187365263381958925227970038358064987248233271706462687651143350472018043321314534759819524203308490914358596886150053406629512434788155355109100540319857813535695923273426256911552977539394209918630668466632881929661971212772444625151371953428875491139683919687008724010475217255347915698820960215217257390308560235323463096946442080548018754166369706161589705215873687166365628787796501470056870127729464714362172216802441045276911597009443281135389729130222603185665646434661947627628077723219376892727386120519287577405410510114936151502752997122750262781911372625997223415283516995479265631485799456782561734766648462849641064097181818204279498552827825384186202065516999362573388136163077477126602169410435905014077049808497409025369325795765272066650278004200357878990911374982857977108488482528354406313893864211497105765030504600982253488805474531798742143374465080240030582370086699167937651038307909706139327119325418854546478285735654541635477790346964782617354265050767878335230272194896680141986745074630225893106573559558843545841186025169531604151588481389164948914823593944287133336263680358191369540321930649824471425485137777984823525402115151171093313613251350685343824859052220126891551966018355920872775724807128769003243129486808733796350497668255116485157191011858830643898323628223472099280243583164434348347014910398004439821970508280440872759395827943270985008769143562351938091476215083548164137333541883808870019116234099013452929807950151652297436436006149684939775781234660954156154478642694176038524277810483833149798681345708089152179193979463169402340611793486272301808073267534612685593859596787866884211031341417903391749825320454663508370385251831778477311017089729361152161928815389818579983544490982891734081131312309744330960666031291451740885503458543884956367654943799264600314531815427932691107874782328654759293575803481929361961781073958502075438499070633193799699311694287183299423475339817655608058724723221867087563064557636112380829514501382073257737022472866608244164310385205213523702910787182472517125030106491031844871593141759729773907719510044049352857426592936763727969496103940591601975078602859660478614119405428212830134490731706220583788265344728818766885126977588151111984290444321648931907188080336064713873288834096229203276676119810521851726133377700616341304257822975788967472152742255041912584197045423031298506219011800240120182445838590696647416285334515631019799007515682004250060857020904012215375170479800482680554499806010766109655061507421747722461180617361402575082294678925605271083587897845390768226405648508518103525778638618195775128516073959272990148239415346263486966573934577450787243667063244378381883115827207605856174876350045086885320626669331311880593775916269643646395423220549940790476989709243027420158390806135690975149384714684219964938182719962913931464979458639185519531490009437619838306362365453754807654884704163490469296444427144778593725687358437087390151990694667516279202024332494828210657618261952038597230263799412584275851667403910657370879707181053365818502680037431560091209982641738995652793235851569372314130107647166085235615697257094269133100914135783178856280392139325001352841718610484616627448189556913621837791650699820323059708766420810133584841826718631681683381743511974264126250984214812397119978273917903889865891718836792263377888052458189238746074986456016681098722869419588274020181430652732817858728473849369539367463917171317324882099804999043054467247785592038464723442276239896066431580123756428540074945472427752568981171400621705853374875885943072600692576914790467205905272372594740187988081900317493185005142913607163380720069786786782095331840893694073778325119471833528492917081008547303414509381563617864195257751546539575461435803625993888325647883541039192368366987400263049681218831477776345118518503709588840859023379762456561030683928115349942393963185677123055324771693784214924931737043793679546051454845624150270955450608318747395755728950832754611277041359602301205138509175543313522772786504141007552691902249572375175731740923618769197304652898352694386665448260033458575323252814233868098279476166764258284911434288072243178941698347365985427696983129579496059032032841281149923518087084876885114369033227736521245740554711771423492719899982357711910225545480424688322195336240492253136281857837808491795993788199125205555222116581071134476787468430539307909617442106685159519071053844987343666452494280317720153567054364117244775141336558406098548803924509496052261825198043140272655303625315605326569530252885854991822289219201218313590745412010446642247111703901991591338062693320157180618736569439969283245279430312651192668788340033626825194260296262959884258597703584888770801961209652822982322376122303586169861685106043820510444293432856251210395693261264867823980172683352796141772210301725997652373804152525037162852291403804455997331367378463632437773242905518075065414724295857460288225400061608664961649196400079359622673770607898395269075056596627116148289491042491764170924014885106158235482774778418134123293974436877051995673618683751115353808771434984204447736174758316063096245047311279841579995578186609402864244042751443128536278453430633423118662852688374229600894418958824842459450540826176452145829389286103522774101195556029650753254244433565937938526828990893149766298997738359913887178888607190765709867052470880785937935110091424743449966353497865681753841380246075612094033617488674676296822570077027076266879557913673839341012099558043806442348798053951239274913334631522409564461770434875790402230022872647568436177018658068697071731879399180374560963492726714528729224208938589940272515747888379118461617702271694075087419634147298076764775745707026934442908236664400557265527951453482191684597674273691978253678690951178777239573925410438679099374700609973920128201422381329108236575369403675960765238333778127017096574296148321075566959285042221837159799800133563239963969638610872680393210300180152020613051613414547163713772512617757277955979895866367571776456268564191092477027650135832200376440239783726540552694851717269598489288851529660975027775639565229734596726205832668434979354541943345062977891187146561050118118108223323735210843681128615413601091222007912350536959777114306541514511332368936078560929788143798814391221507522370648646767364209132147312407014953113532379838195728491128536978285918066991040993153064356179903885952027952713749653604502053512355449916680887234238773855581636172479594866871765094513940103284167914110196720261110812716776424260154507395050380575452850420730818412994731079307343538376880280124019321040198038723558784544408584344466090982802067326529000931562048932875469079874956595180595395347093285140279165467965596318365749701535812384333240968283640721344003442002691613772056762099098025739332715913970186225176459563484134139746647940170537900275350480490468851439300771949915194703080576611022590670399844931867609777417528903454731922206378932141464755402629420074293816349270038351339419146768473851353171629153912238797141905920143036064131705230421762305232861503856799511155936565169005916711845389135580928162511912438531204156138447775120789548666143600293412065767167106888509172568003530668539460588248316513392652567856224602697296203328920073354425994044956624831346979458846837597950064151867164583749203433942592178528868981311575331848941597492470436782387502687532649093096498315347403977436001399982102030846763698994785054617523241463186980898394504211430763617825306895065661536045431497903759118007934839122881885863091769469883539876840543521295706315919855784493235603866268925981702690270202829595794350800918257913991744455922683343374046671669930219650268554687501e-4951
+-0x0.7p-149
+-0x0.7p-1074
+-0x0.7p-16445
+-0x0.7p-16494
diff --git a/stdlib/tst-strtod-round.c b/stdlib/tst-strtod-round.c
new file mode 100644
index 0000000000..76385a94d3
--- /dev/null
+++ b/stdlib/tst-strtod-round.c
@@ -0,0 +1,6934 @@
+/* Test for correct rounding of results of strtod and related
+ functions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fenv.h>
+#include <float.h>
+#include <math.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct test_results {
+ float f;
+ double d;
+ long double ld;
+};
+
+struct test {
+ const char *s;
+ bool ld_ok;
+ struct test_results rd, rn, rz, ru;
+};
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
+ { \
+ s, \
+ true, \
+ { fd, dd, ld53d }, \
+ { fn, dn, ld53n }, \
+ { fz, dz, ld53z }, \
+ { fu, du, ld53u } \
+ }
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && LDBL_MIN_EXP == -16381
+/* This is for the Intel extended float format. */
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
+ { \
+ s, \
+ true, \
+ { fd, dd, ld64id }, \
+ { fn, dn, ld64in }, \
+ { fz, dz, ld64iz }, \
+ { fu, du, ld64iu } \
+ }
+#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && LDBL_MIN_EXP == -16382
+/* This is for the Motorola extended float format. */
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
+ { \
+ s, \
+ true, \
+ { fd, dd, ld64md }, \
+ { fn, dn, ld64mn }, \
+ { fz, dz, ld64mz }, \
+ { fu, du, ld64mu } \
+ }
+#elif LDBL_MANT_DIG == 106 && LDBL_MAX_EXP == 1024
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
+ { \
+ s, \
+ ld106exact, \
+ { fd, dd, ld106d }, \
+ { fn, dn, ld106n }, \
+ { fz, dz, ld106z }, \
+ { fu, du, ld106u } \
+ }
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
+# define TEST(s, fd, fn, fz, fu, dd, dn, dz, du, ld53d, ld53n, ld53z, ld53u, \
+ ld64id, ld64in, ld64iz, ld64iu, \
+ ld64md, ld64mn, ld64mz, ld64mu, \
+ ld106exact, ld106d, ld106n, ld106z, ld106u, \
+ ld113d, ld113n, ld113z, ld113u) \
+ { \
+ s, \
+ true, \
+ { fd, dd, ld113d }, \
+ { fn, dn, ld113n }, \
+ { fz, dz, ld113z }, \
+ { fu, du, ld113u } \
+ }
+#else
+# error "unknown long double format"
+#endif
+
+/* These tests are generated by gen-tst-strtod-round.c from
+ tst-strtod-round-data. */
+
+static const struct test tests[] = {
+ TEST ("3.518437208883201171875E+013",
+ 0x2p+44f,
+ 0x2p+44f,
+ 0x2p+44f,
+ 0x2.000004p+44f,
+ 0x2.0000000000002p+44,
+ 0x2.0000000000004p+44,
+ 0x2.0000000000002p+44,
+ 0x2.0000000000004p+44,
+ 0x2.0000000000002p+44L,
+ 0x2.0000000000004p+44L,
+ 0x2.0000000000002p+44L,
+ 0x2.0000000000004p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ true,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L,
+ 0x2.0000000000003p+44L),
+ TEST ("1.00000005960464477550",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000004p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000004p+0L,
+ false,
+ 0x1.0000010000000002048242f2ffp+0L,
+ 0x1.0000010000000002048242f2ff8p+0L,
+ 0x1.0000010000000002048242f2ffp+0L,
+ 0x1.0000010000000002048242f2ff8p+0L,
+ 0x1.0000010000000002048242f2ff66p+0L,
+ 0x1.0000010000000002048242f2ff67p+0L,
+ 0x1.0000010000000002048242f2ff66p+0L,
+ 0x1.0000010000000002048242f2ff67p+0L),
+ TEST ("1.0000000596046447755",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000004p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.0000010000000004p+0L,
+ false,
+ 0x1.0000010000000002048242f2ffp+0L,
+ 0x1.0000010000000002048242f2ff8p+0L,
+ 0x1.0000010000000002048242f2ffp+0L,
+ 0x1.0000010000000002048242f2ff8p+0L,
+ 0x1.0000010000000002048242f2ff66p+0L,
+ 0x1.0000010000000002048242f2ff67p+0L,
+ 0x1.0000010000000002048242f2ff66p+0L,
+ 0x1.0000010000000002048242f2ff67p+0L),
+ TEST ("1.000000059604644776",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.000001000000000ap+0L,
+ 0x1.000001000000000cp+0L,
+ 0x1.000001000000000ap+0L,
+ 0x1.000001000000000cp+0L,
+ 0x1.000001000000000ap+0L,
+ 0x1.000001000000000cp+0L,
+ 0x1.000001000000000ap+0L,
+ 0x1.000001000000000cp+0L,
+ false,
+ 0x1.000001000000000b3db12bdc21p+0L,
+ 0x1.000001000000000b3db12bdc21p+0L,
+ 0x1.000001000000000b3db12bdc21p+0L,
+ 0x1.000001000000000b3db12bdc218p+0L,
+ 0x1.000001000000000b3db12bdc213cp+0L,
+ 0x1.000001000000000b3db12bdc213dp+0L,
+ 0x1.000001000000000b3db12bdc213cp+0L,
+ 0x1.000001000000000b3db12bdc213dp+0L),
+ TEST ("1.000000059604644775",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000000fffffffp+0,
+ 0x1.000001p+0,
+ 0x1.000000fffffffp+0,
+ 0x1.000001p+0,
+ 0x1.000000fffffffp+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffp+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffff8p+0L,
+ 0x1.000000fffffffff8p+0L,
+ 0x1.000000fffffffff8p+0L,
+ 0x1.000000fffffffffap+0L,
+ 0x1.000000fffffffff8p+0L,
+ 0x1.000000fffffffff8p+0L,
+ 0x1.000000fffffffff8p+0L,
+ 0x1.000000fffffffffap+0L,
+ false,
+ 0x1.000000fffffffff8cb535a09dd8p+0L,
+ 0x1.000000fffffffff8cb535a09dd8p+0L,
+ 0x1.000000fffffffff8cb535a09dd8p+0L,
+ 0x1.000000fffffffff8cb535a09dep+0L,
+ 0x1.000000fffffffff8cb535a09dd9p+0L,
+ 0x1.000000fffffffff8cb535a09dd91p+0L,
+ 0x1.000000fffffffff8cb535a09dd9p+0L,
+ 0x1.000000fffffffff8cb535a09dd91p+0L),
+ TEST ("1.00000005960464478",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.0000010000000054p+0L,
+ 0x1.0000010000000056p+0L,
+ 0x1.0000010000000054p+0L,
+ 0x1.0000010000000056p+0L,
+ 0x1.0000010000000054p+0L,
+ 0x1.0000010000000056p+0L,
+ 0x1.0000010000000054p+0L,
+ 0x1.0000010000000056p+0L,
+ false,
+ 0x1.0000010000000055072873252f8p+0L,
+ 0x1.0000010000000055072873253p+0L,
+ 0x1.0000010000000055072873252f8p+0L,
+ 0x1.0000010000000055072873253p+0L,
+ 0x1.0000010000000055072873252febp+0L,
+ 0x1.0000010000000055072873252febp+0L,
+ 0x1.0000010000000055072873252febp+0L,
+ 0x1.0000010000000055072873252fecp+0L),
+ TEST ("1.0000000596046448",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.00000100000001c4p+0L,
+ 0x1.00000100000001c6p+0L,
+ 0x1.00000100000001c4p+0L,
+ 0x1.00000100000001c6p+0L,
+ 0x1.00000100000001c4p+0L,
+ 0x1.00000100000001c6p+0L,
+ 0x1.00000100000001c4p+0L,
+ 0x1.00000100000001c6p+0L,
+ false,
+ 0x1.00000100000001c5f67cd79279p+0L,
+ 0x1.00000100000001c5f67cd792798p+0L,
+ 0x1.00000100000001c5f67cd79279p+0L,
+ 0x1.00000100000001c5f67cd792798p+0L,
+ 0x1.00000100000001c5f67cd7927953p+0L,
+ 0x1.00000100000001c5f67cd7927954p+0L,
+ 0x1.00000100000001c5f67cd7927953p+0L,
+ 0x1.00000100000001c5f67cd7927954p+0L),
+ TEST ("1.000000059604645",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.0000010000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.0000010000002p+0,
+ 0x1.0000010000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.0000010000002p+0L,
+ 0x1.000001000000102ep+0L,
+ 0x1.000001000000103p+0L,
+ 0x1.000001000000102ep+0L,
+ 0x1.000001000000103p+0L,
+ 0x1.000001000000102ep+0L,
+ 0x1.000001000000103p+0L,
+ 0x1.000001000000102ep+0L,
+ 0x1.000001000000103p+0L,
+ false,
+ 0x1.000001000000102f4fc8c3d757p+0L,
+ 0x1.000001000000102f4fc8c3d7578p+0L,
+ 0x1.000001000000102f4fc8c3d757p+0L,
+ 0x1.000001000000102f4fc8c3d7578p+0L,
+ 0x1.000001000000102f4fc8c3d75769p+0L,
+ 0x1.000001000000102f4fc8c3d75769p+0L,
+ 0x1.000001000000102f4fc8c3d75769p+0L,
+ 0x1.000001000000102f4fc8c3d7576ap+0L),
+ TEST ("1.00000005960464",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000000fffffeap+0,
+ 0x1.000000fffffeap+0,
+ 0x1.000000fffffeap+0,
+ 0x1.000000fffffebp+0,
+ 0x1.000000fffffeap+0L,
+ 0x1.000000fffffeap+0L,
+ 0x1.000000fffffeap+0L,
+ 0x1.000000fffffebp+0L,
+ 0x1.000000fffffea7e4p+0L,
+ 0x1.000000fffffea7e6p+0L,
+ 0x1.000000fffffea7e4p+0L,
+ 0x1.000000fffffea7e6p+0L,
+ 0x1.000000fffffea7e4p+0L,
+ 0x1.000000fffffea7e6p+0L,
+ 0x1.000000fffffea7e4p+0L,
+ 0x1.000000fffffea7e6p+0L,
+ false,
+ 0x1.000000fffffea7e5975eb11da7p+0L,
+ 0x1.000000fffffea7e5975eb11da78p+0L,
+ 0x1.000000fffffea7e5975eb11da7p+0L,
+ 0x1.000000fffffea7e5975eb11da78p+0L,
+ 0x1.000000fffffea7e5975eb11da74ap+0L,
+ 0x1.000000fffffea7e5975eb11da74bp+0L,
+ 0x1.000000fffffea7e5975eb11da74ap+0L,
+ 0x1.000000fffffea7e5975eb11da74bp+0L),
+ TEST ("1.0000000596046",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000000fffff36p+0,
+ 0x1.000000fffff36p+0,
+ 0x1.000000fffff36p+0,
+ 0x1.000000fffff37p+0,
+ 0x1.000000fffff36p+0L,
+ 0x1.000000fffff36p+0L,
+ 0x1.000000fffff36p+0L,
+ 0x1.000000fffff37p+0L,
+ 0x1.000000fffff36596p+0L,
+ 0x1.000000fffff36598p+0L,
+ 0x1.000000fffff36596p+0L,
+ 0x1.000000fffff36598p+0L,
+ 0x1.000000fffff36596p+0L,
+ 0x1.000000fffff36598p+0L,
+ 0x1.000000fffff36596p+0L,
+ 0x1.000000fffff36598p+0L,
+ false,
+ 0x1.000000fffff36597d40e1b5026p+0L,
+ 0x1.000000fffff36597d40e1b50268p+0L,
+ 0x1.000000fffff36597d40e1b5026p+0L,
+ 0x1.000000fffff36597d40e1b50268p+0L,
+ 0x1.000000fffff36597d40e1b502655p+0L,
+ 0x1.000000fffff36597d40e1b502656p+0L,
+ 0x1.000000fffff36597d40e1b502655p+0L,
+ 0x1.000000fffff36597d40e1b502656p+0L),
+ TEST ("1.000000059605",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001000063fp+0,
+ 0x1.000001000064p+0,
+ 0x1.000001000063fp+0,
+ 0x1.000001000064p+0,
+ 0x1.000001000063fp+0L,
+ 0x1.000001000064p+0L,
+ 0x1.000001000063fp+0L,
+ 0x1.000001000064p+0L,
+ 0x1.000001000063fcap+0L,
+ 0x1.000001000063fca2p+0L,
+ 0x1.000001000063fcap+0L,
+ 0x1.000001000063fca2p+0L,
+ 0x1.000001000063fcap+0L,
+ 0x1.000001000063fca2p+0L,
+ 0x1.000001000063fcap+0L,
+ 0x1.000001000063fca2p+0L,
+ false,
+ 0x1.000001000063fca17533f5572f8p+0L,
+ 0x1.000001000063fca17533f5573p+0L,
+ 0x1.000001000063fca17533f5572f8p+0L,
+ 0x1.000001000063fca17533f5573p+0L,
+ 0x1.000001000063fca17533f5572fe9p+0L,
+ 0x1.000001000063fca17533f5572feap+0L,
+ 0x1.000001000063fca17533f5572fe9p+0L,
+ 0x1.000001000063fca17533f5572feap+0L),
+ TEST ("1.00000005960",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000000fffae49p+0,
+ 0x1.000000fffae4ap+0,
+ 0x1.000000fffae49p+0,
+ 0x1.000000fffae4ap+0,
+ 0x1.000000fffae49p+0L,
+ 0x1.000000fffae4ap+0L,
+ 0x1.000000fffae49p+0L,
+ 0x1.000000fffae4ap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ false,
+ 0x1.000000fffae49ca916dacfff38p+0L,
+ 0x1.000000fffae49ca916dacfff38p+0L,
+ 0x1.000000fffae49ca916dacfff38p+0L,
+ 0x1.000000fffae49ca916dacfff388p+0L,
+ 0x1.000000fffae49ca916dacfff382dp+0L,
+ 0x1.000000fffae49ca916dacfff382dp+0L,
+ 0x1.000000fffae49ca916dacfff382dp+0L,
+ 0x1.000000fffae49ca916dacfff382ep+0L),
+ TEST ("1.0000000596",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000000fffae49p+0,
+ 0x1.000000fffae4ap+0,
+ 0x1.000000fffae49p+0,
+ 0x1.000000fffae4ap+0,
+ 0x1.000000fffae49p+0L,
+ 0x1.000000fffae4ap+0L,
+ 0x1.000000fffae49p+0L,
+ 0x1.000000fffae4ap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ 0x1.000000fffae49ca8p+0L,
+ 0x1.000000fffae49caap+0L,
+ false,
+ 0x1.000000fffae49ca916dacfff38p+0L,
+ 0x1.000000fffae49ca916dacfff38p+0L,
+ 0x1.000000fffae49ca916dacfff38p+0L,
+ 0x1.000000fffae49ca916dacfff388p+0L,
+ 0x1.000000fffae49ca916dacfff382dp+0L,
+ 0x1.000000fffae49ca916dacfff382dp+0L,
+ 0x1.000000fffae49ca916dacfff382dp+0L,
+ 0x1.000000fffae49ca916dacfff382ep+0L),
+ TEST ("1.000000060",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.00000101b2b29p+0,
+ 0x1.00000101b2b2ap+0,
+ 0x1.00000101b2b29p+0,
+ 0x1.00000101b2b2ap+0,
+ 0x1.00000101b2b29p+0L,
+ 0x1.00000101b2b2ap+0L,
+ 0x1.00000101b2b29p+0L,
+ 0x1.00000101b2b2ap+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a48p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a48p+0L,
+ false,
+ 0x1.00000101b2b29a4692b67b7ca3p+0L,
+ 0x1.00000101b2b29a4692b67b7ca3p+0L,
+ 0x1.00000101b2b29a4692b67b7ca3p+0L,
+ 0x1.00000101b2b29a4692b67b7ca38p+0L,
+ 0x1.00000101b2b29a4692b67b7ca313p+0L,
+ 0x1.00000101b2b29a4692b67b7ca314p+0L,
+ 0x1.00000101b2b29a4692b67b7ca313p+0L,
+ 0x1.00000101b2b29a4692b67b7ca314p+0L),
+ TEST ("1.00000006",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.00000101b2b29p+0,
+ 0x1.00000101b2b2ap+0,
+ 0x1.00000101b2b29p+0,
+ 0x1.00000101b2b2ap+0,
+ 0x1.00000101b2b29p+0L,
+ 0x1.00000101b2b2ap+0L,
+ 0x1.00000101b2b29p+0L,
+ 0x1.00000101b2b2ap+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a48p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a46p+0L,
+ 0x1.00000101b2b29a48p+0L,
+ false,
+ 0x1.00000101b2b29a4692b67b7ca3p+0L,
+ 0x1.00000101b2b29a4692b67b7ca3p+0L,
+ 0x1.00000101b2b29a4692b67b7ca3p+0L,
+ 0x1.00000101b2b29a4692b67b7ca38p+0L,
+ 0x1.00000101b2b29a4692b67b7ca313p+0L,
+ 0x1.00000101b2b29a4692b67b7ca314p+0L,
+ 0x1.00000101b2b29a4692b67b7ca313p+0L,
+ 0x1.00000101b2b29a4692b67b7ca314p+0L),
+ TEST ("1.0000001",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001ad7f29ap+0,
+ 0x1.000001ad7f29bp+0,
+ 0x1.000001ad7f29ap+0,
+ 0x1.000001ad7f29bp+0,
+ 0x1.000001ad7f29ap+0L,
+ 0x1.000001ad7f29bp+0L,
+ 0x1.000001ad7f29ap+0L,
+ 0x1.000001ad7f29bp+0L,
+ 0x1.000001ad7f29abcap+0L,
+ 0x1.000001ad7f29abcap+0L,
+ 0x1.000001ad7f29abcap+0L,
+ 0x1.000001ad7f29abccp+0L,
+ 0x1.000001ad7f29abcap+0L,
+ 0x1.000001ad7f29abcap+0L,
+ 0x1.000001ad7f29abcap+0L,
+ 0x1.000001ad7f29abccp+0L,
+ false,
+ 0x1.000001ad7f29abcaf485787a65p+0L,
+ 0x1.000001ad7f29abcaf485787a65p+0L,
+ 0x1.000001ad7f29abcaf485787a65p+0L,
+ 0x1.000001ad7f29abcaf485787a658p+0L,
+ 0x1.000001ad7f29abcaf485787a652p+0L,
+ 0x1.000001ad7f29abcaf485787a6521p+0L,
+ 0x1.000001ad7f29abcaf485787a652p+0L,
+ 0x1.000001ad7f29abcaf485787a6521p+0L),
+ TEST ("1.000000",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ true,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L),
+ TEST ("1.00000000000000011113",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ false,
+ 0x1.0000000000000801fc96557232p+0L,
+ 0x1.0000000000000801fc96557232p+0L,
+ 0x1.0000000000000801fc96557232p+0L,
+ 0x1.0000000000000801fc965572328p+0L,
+ 0x1.0000000000000801fc9655723222p+0L,
+ 0x1.0000000000000801fc9655723222p+0L,
+ 0x1.0000000000000801fc9655723222p+0L,
+ 0x1.0000000000000801fc9655723223p+0L),
+ TEST ("1.00000000000000011103",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ false,
+ 0x1.00000000000008002459c076c48p+0L,
+ 0x1.00000000000008002459c076c5p+0L,
+ 0x1.00000000000008002459c076c48p+0L,
+ 0x1.00000000000008002459c076c5p+0L,
+ 0x1.00000000000008002459c076c4f7p+0L,
+ 0x1.00000000000008002459c076c4f8p+0L,
+ 0x1.00000000000008002459c076c4f7p+0L,
+ 0x1.00000000000008002459c076c4f8p+0L),
+ TEST ("1.00000000000000011102",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ false,
+ 0x1.00000000000007fff5207e5dap+0L,
+ 0x1.00000000000007fff5207e5da08p+0L,
+ 0x1.00000000000007fff5207e5dap+0L,
+ 0x1.00000000000007fff5207e5da08p+0L,
+ 0x1.00000000000007fff5207e5da073p+0L,
+ 0x1.00000000000007fff5207e5da073p+0L,
+ 0x1.00000000000007fff5207e5da073p+0L,
+ 0x1.00000000000007fff5207e5da074p+0L),
+ TEST ("1.00000000000000011101",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ false,
+ 0x1.00000000000007ffc5e73c447b8p+0L,
+ 0x1.00000000000007ffc5e73c447cp+0L,
+ 0x1.00000000000007ffc5e73c447b8p+0L,
+ 0x1.00000000000007ffc5e73c447cp+0L,
+ 0x1.00000000000007ffc5e73c447befp+0L,
+ 0x1.00000000000007ffc5e73c447befp+0L,
+ 0x1.00000000000007ffc5e73c447befp+0L,
+ 0x1.00000000000007ffc5e73c447bfp+0L),
+ TEST ("1.0000000000000001111",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.0000000000000802p+0L,
+ false,
+ 0x1.00000000000008016eea8f26c48p+0L,
+ 0x1.00000000000008016eea8f26c48p+0L,
+ 0x1.00000000000008016eea8f26c48p+0L,
+ 0x1.00000000000008016eea8f26c5p+0L,
+ 0x1.00000000000008016eea8f26c495p+0L,
+ 0x1.00000000000008016eea8f26c496p+0L,
+ 0x1.00000000000008016eea8f26c495p+0L,
+ 0x1.00000000000008016eea8f26c496p+0L),
+ TEST ("1.000000000000000111",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ 0x1.00000000000007fep+0L,
+ 0x1.00000000000008p+0L,
+ false,
+ 0x1.00000000000007ff96adfa2b57p+0L,
+ 0x1.00000000000007ff96adfa2b578p+0L,
+ 0x1.00000000000007ff96adfa2b57p+0L,
+ 0x1.00000000000007ff96adfa2b578p+0L,
+ 0x1.00000000000007ff96adfa2b576ap+0L,
+ 0x1.00000000000007ff96adfa2b576bp+0L,
+ 0x1.00000000000007ff96adfa2b576ap+0L,
+ 0x1.00000000000007ff96adfa2b576bp+0L),
+ TEST ("1.00000000000000011",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.00000000000007ecp+0L,
+ 0x1.00000000000007eep+0L,
+ 0x1.00000000000007ecp+0L,
+ 0x1.00000000000007eep+0L,
+ 0x1.00000000000007ecp+0L,
+ 0x1.00000000000007eep+0L,
+ 0x1.00000000000007ecp+0L,
+ 0x1.00000000000007eep+0L,
+ false,
+ 0x1.00000000000007ed24502859138p+0L,
+ 0x1.00000000000007ed24502859138p+0L,
+ 0x1.00000000000007ed24502859138p+0L,
+ 0x1.00000000000007ed2450285914p+0L,
+ 0x1.00000000000007ed2450285913bfp+0L,
+ 0x1.00000000000007ed2450285913bfp+0L,
+ 0x1.00000000000007ed2450285913bfp+0L,
+ 0x1.00000000000007ed2450285913cp+0L),
+ TEST ("1.0000000000000001",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1p+0,
+ 0x1.0000000000001p+0,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1p+0L,
+ 0x1.0000000000001p+0L,
+ 0x1.0000000000000734p+0L,
+ 0x1.0000000000000734p+0L,
+ 0x1.0000000000000734p+0L,
+ 0x1.0000000000000736p+0L,
+ 0x1.0000000000000734p+0L,
+ 0x1.0000000000000734p+0L,
+ 0x1.0000000000000734p+0L,
+ 0x1.0000000000000736p+0L,
+ false,
+ 0x1.0000000000000734aca5f6226fp+0L,
+ 0x1.0000000000000734aca5f6226fp+0L,
+ 0x1.0000000000000734aca5f6226fp+0L,
+ 0x1.0000000000000734aca5f6226f8p+0L,
+ 0x1.0000000000000734aca5f6226f0ap+0L,
+ 0x1.0000000000000734aca5f6226f0bp+0L,
+ 0x1.0000000000000734aca5f6226f0ap+0L,
+ 0x1.0000000000000734aca5f6226f0bp+0L),
+ TEST ("3929201589819414e-25",
+ 0x1.b0053p-32f,
+ 0x1.b00532p-32f,
+ 0x1.b0053p-32f,
+ 0x1.b00532p-32f,
+ 0x1.b005314e2421ep-32,
+ 0x1.b005314e2421ep-32,
+ 0x1.b005314e2421ep-32,
+ 0x1.b005314e2421fp-32,
+ 0x1.b005314e2421ep-32L,
+ 0x1.b005314e2421ep-32L,
+ 0x1.b005314e2421ep-32L,
+ 0x1.b005314e2421fp-32L,
+ 0x1.b005314e2421e7fep-32L,
+ 0x1.b005314e2421e8p-32L,
+ 0x1.b005314e2421e7fep-32L,
+ 0x1.b005314e2421e8p-32L,
+ 0x1.b005314e2421e7fep-32L,
+ 0x1.b005314e2421e8p-32L,
+ 0x1.b005314e2421e7fep-32L,
+ 0x1.b005314e2421e8p-32L,
+ false,
+ 0x1.b005314e2421e7ffb472840c5ap-32L,
+ 0x1.b005314e2421e7ffb472840c5a8p-32L,
+ 0x1.b005314e2421e7ffb472840c5ap-32L,
+ 0x1.b005314e2421e7ffb472840c5a8p-32L,
+ 0x1.b005314e2421e7ffb472840c5a6ep-32L,
+ 0x1.b005314e2421e7ffb472840c5a6fp-32L,
+ 0x1.b005314e2421e7ffb472840c5a6ep-32L,
+ 0x1.b005314e2421e7ffb472840c5a6fp-32L),
+ TEST ("0.0000000000000000000000000000000000000000000021019476964872"
+ "256063855943749348741969203929128147736576356024258346866240"
+ "28790902229957282543182373046875",
+ 0x8p-152f,
+ 0x1p-148f,
+ 0x8p-152f,
+ 0x1p-148f,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ true,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L),
+ TEST ("1.00000005960464477539062499",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000000fffffffp+0,
+ 0x1.000001p+0,
+ 0x1.000000fffffffp+0,
+ 0x1.000001p+0,
+ 0x1.000000fffffffp+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffp+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffffep+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffffep+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffffep+0L,
+ 0x1.000001p+0L,
+ 0x1.000000fffffffffep+0L,
+ 0x1.000001p+0L,
+ false,
+ 0x1.000000fffffffffffffffce7b78p+0L,
+ 0x1.000000fffffffffffffffce7b8p+0L,
+ 0x1.000000fffffffffffffffce7b78p+0L,
+ 0x1.000000fffffffffffffffce7b8p+0L,
+ 0x1.000000fffffffffffffffce7b7e7p+0L,
+ 0x1.000000fffffffffffffffce7b7e7p+0L,
+ 0x1.000000fffffffffffffffce7b7e7p+0L,
+ 0x1.000000fffffffffffffffce7b7e8p+0L),
+ TEST ("1.000000059604644775390625",
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ true,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L),
+ TEST ("1.00000005960464477539062501",
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1p+0f,
+ 0x1.000002p+0f,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.000001p+0,
+ 0x1.0000010000001p+0,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000000002p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.000001p+0L,
+ 0x1.0000010000000002p+0L,
+ false,
+ 0x1.00000100000000000000031848p+0L,
+ 0x1.00000100000000000000031848p+0L,
+ 0x1.00000100000000000000031848p+0L,
+ 0x1.000001000000000000000318488p+0L,
+ 0x1.0000010000000000000003184818p+0L,
+ 0x1.0000010000000000000003184819p+0L,
+ 0x1.0000010000000000000003184818p+0L,
+ 0x1.0000010000000000000003184819p+0L),
+ TEST ("1.00000011920928955078125",
+ 0x1.000002p+0f,
+ 0x1.000002p+0f,
+ 0x1.000002p+0f,
+ 0x1.000002p+0f,
+ 0x1.000002p+0,
+ 0x1.000002p+0,
+ 0x1.000002p+0,
+ 0x1.000002p+0,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ true,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L,
+ 0x1.000002p+0L),
+ TEST ("1.00000017881393432617187499",
+ 0x1.000002p+0f,
+ 0x1.000002p+0f,
+ 0x1.000002p+0f,
+ 0x1.000004p+0f,
+ 0x1.000002fffffffp+0,
+ 0x1.000003p+0,
+ 0x1.000002fffffffp+0,
+ 0x1.000003p+0,
+ 0x1.000002fffffffp+0L,
+ 0x1.000003p+0L,
+ 0x1.000002fffffffp+0L,
+ 0x1.000003p+0L,
+ 0x1.000002fffffffffep+0L,
+ 0x1.000003p+0L,
+ 0x1.000002fffffffffep+0L,
+ 0x1.000003p+0L,
+ 0x1.000002fffffffffep+0L,
+ 0x1.000003p+0L,
+ 0x1.000002fffffffffep+0L,
+ 0x1.000003p+0L,
+ false,
+ 0x1.000002fffffffffffffffce7b78p+0L,
+ 0x1.000002fffffffffffffffce7b8p+0L,
+ 0x1.000002fffffffffffffffce7b78p+0L,
+ 0x1.000002fffffffffffffffce7b8p+0L,
+ 0x1.000002fffffffffffffffce7b7e7p+0L,
+ 0x1.000002fffffffffffffffce7b7e7p+0L,
+ 0x1.000002fffffffffffffffce7b7e7p+0L,
+ 0x1.000002fffffffffffffffce7b7e8p+0L),
+ TEST ("1.000000178813934326171875",
+ 0x1.000002p+0f,
+ 0x1.000004p+0f,
+ 0x1.000002p+0f,
+ 0x1.000004p+0f,
+ 0x1.000003p+0,
+ 0x1.000003p+0,
+ 0x1.000003p+0,
+ 0x1.000003p+0,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ true,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L),
+ TEST ("1.00000017881393432617187501",
+ 0x1.000002p+0f,
+ 0x1.000004p+0f,
+ 0x1.000002p+0f,
+ 0x1.000004p+0f,
+ 0x1.000003p+0,
+ 0x1.000003p+0,
+ 0x1.000003p+0,
+ 0x1.0000030000001p+0,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.0000030000001p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.0000030000000002p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.000003p+0L,
+ 0x1.0000030000000002p+0L,
+ false,
+ 0x1.00000300000000000000031848p+0L,
+ 0x1.00000300000000000000031848p+0L,
+ 0x1.00000300000000000000031848p+0L,
+ 0x1.000003000000000000000318488p+0L,
+ 0x1.0000030000000000000003184818p+0L,
+ 0x1.0000030000000000000003184819p+0L,
+ 0x1.0000030000000000000003184818p+0L,
+ 0x1.0000030000000000000003184819p+0L),
+ TEST ("1.0000002384185791015625",
+ 0x1.000004p+0f,
+ 0x1.000004p+0f,
+ 0x1.000004p+0f,
+ 0x1.000004p+0f,
+ 0x1.000004p+0,
+ 0x1.000004p+0,
+ 0x1.000004p+0,
+ 0x1.000004p+0,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ true,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L,
+ 0x1.000004p+0L),
+ TEST ("1.08420217248550443400745280086994171142578125e-19",
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2p-64,
+ 0x2p-64,
+ 0x2p-64,
+ 0x2p-64,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ true,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L,
+ 0x2p-64L),
+ TEST ("1.0842022371089897897127399001987457793916291848290711641311"
+ "645507812499e-19",
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2.000004p-64f,
+ 0x2.000001ffffffep-64,
+ 0x2.000002p-64,
+ 0x2.000001ffffffep-64,
+ 0x2.000002p-64,
+ 0x2.000001ffffffep-64L,
+ 0x2.000002p-64L,
+ 0x2.000001ffffffep-64L,
+ 0x2.000002p-64L,
+ 0x2.000001fffffffffcp-64L,
+ 0x2.000002p-64L,
+ 0x2.000001fffffffffcp-64L,
+ 0x2.000002p-64L,
+ 0x2.000001fffffffffcp-64L,
+ 0x2.000002p-64L,
+ 0x2.000001fffffffffcp-64L,
+ 0x2.000002p-64L,
+ false,
+ 0x2.000001ffffffffffffffffffffp-64L,
+ 0x2.000002p-64L,
+ 0x2.000001ffffffffffffffffffffp-64L,
+ 0x2.000002p-64L,
+ 0x2.000001fffffffffffffffffffffep-64L,
+ 0x2.000002p-64L,
+ 0x2.000001fffffffffffffffffffffep-64L,
+ 0x2.000002p-64L),
+ TEST ("1.0842022371089897897127399001987457793916291848290711641311"
+ "6455078125e-19",
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2p-64f,
+ 0x2.000004p-64f,
+ 0x2.000002p-64,
+ 0x2.000002p-64,
+ 0x2.000002p-64,
+ 0x2.000002p-64,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ true,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L),
+ TEST ("1.0842022371089897897127399001987457793916291848290711641311"
+ "645507812501e-19",
+ 0x2p-64f,
+ 0x2.000004p-64f,
+ 0x2p-64f,
+ 0x2.000004p-64f,
+ 0x2.000002p-64,
+ 0x2.000002p-64,
+ 0x2.000002p-64,
+ 0x2.0000020000002p-64,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.0000020000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.0000020000000004p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.0000020000000004p-64L,
+ false,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.00000200000000000000000001p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.000002p-64L,
+ 0x2.0000020000000000000000000002p-64L),
+ TEST ("1.0842023017324751454180269995275498473574771196581423282623"
+ "291015625e-19",
+ 0x2.000004p-64f,
+ 0x2.000004p-64f,
+ 0x2.000004p-64f,
+ 0x2.000004p-64f,
+ 0x2.000004p-64,
+ 0x2.000004p-64,
+ 0x2.000004p-64,
+ 0x2.000004p-64,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ true,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L,
+ 0x2.000004p-64L),
+ TEST ("1.0842023663559605011233140988563539153233250544872134923934"
+ "936523437499e-19",
+ 0x2.000004p-64f,
+ 0x2.000004p-64f,
+ 0x2.000004p-64f,
+ 0x2.000008p-64f,
+ 0x2.000005ffffffep-64,
+ 0x2.000006p-64,
+ 0x2.000005ffffffep-64,
+ 0x2.000006p-64,
+ 0x2.000005ffffffep-64L,
+ 0x2.000006p-64L,
+ 0x2.000005ffffffep-64L,
+ 0x2.000006p-64L,
+ 0x2.000005fffffffffcp-64L,
+ 0x2.000006p-64L,
+ 0x2.000005fffffffffcp-64L,
+ 0x2.000006p-64L,
+ 0x2.000005fffffffffcp-64L,
+ 0x2.000006p-64L,
+ 0x2.000005fffffffffcp-64L,
+ 0x2.000006p-64L,
+ false,
+ 0x2.000005ffffffffffffffffffffp-64L,
+ 0x2.000006p-64L,
+ 0x2.000005ffffffffffffffffffffp-64L,
+ 0x2.000006p-64L,
+ 0x2.000005fffffffffffffffffffffep-64L,
+ 0x2.000006p-64L,
+ 0x2.000005fffffffffffffffffffffep-64L,
+ 0x2.000006p-64L),
+ TEST ("1.0842023663559605011233140988563539153233250544872134923934"
+ "9365234375e-19",
+ 0x2.000004p-64f,
+ 0x2.000008p-64f,
+ 0x2.000004p-64f,
+ 0x2.000008p-64f,
+ 0x2.000006p-64,
+ 0x2.000006p-64,
+ 0x2.000006p-64,
+ 0x2.000006p-64,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ true,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L),
+ TEST ("1.0842023663559605011233140988563539153233250544872134923934"
+ "936523437501e-19",
+ 0x2.000004p-64f,
+ 0x2.000008p-64f,
+ 0x2.000004p-64f,
+ 0x2.000008p-64f,
+ 0x2.000006p-64,
+ 0x2.000006p-64,
+ 0x2.000006p-64,
+ 0x2.0000060000002p-64,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.0000060000002p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.0000060000000004p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.0000060000000004p-64L,
+ false,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.00000600000000000000000001p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.000006p-64L,
+ 0x2.0000060000000000000000000002p-64L),
+ TEST ("1.0842024309794458568286011981851579832891729893162846565246"
+ "58203125e-19",
+ 0x2.000008p-64f,
+ 0x2.000008p-64f,
+ 0x2.000008p-64f,
+ 0x2.000008p-64f,
+ 0x2.000008p-64,
+ 0x2.000008p-64,
+ 0x2.000008p-64,
+ 0x2.000008p-64,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ true,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L,
+ 0x2.000008p-64L),
+ TEST ("7.5231638452626400509999138382223723380394595633413601376560"
+ "1092018187046051025390625e-37",
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1p-120,
+ 0x1p-120,
+ 0x1p-120,
+ 0x1p-120,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ true,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L,
+ 0x1p-120L),
+ TEST ("7.5231642936781486349413765338158389908126215730251815381410"
+ "578824437213052434003657253924757242202758789062499e-37",
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1.000002p-120f,
+ 0x1.000000fffffffp-120,
+ 0x1.000001p-120,
+ 0x1.000000fffffffp-120,
+ 0x1.000001p-120,
+ 0x1.000000fffffffp-120L,
+ 0x1.000001p-120L,
+ 0x1.000000fffffffp-120L,
+ 0x1.000001p-120L,
+ 0x1.000000fffffffffep-120L,
+ 0x1.000001p-120L,
+ 0x1.000000fffffffffep-120L,
+ 0x1.000001p-120L,
+ 0x1.000000fffffffffep-120L,
+ 0x1.000001p-120L,
+ 0x1.000000fffffffffep-120L,
+ 0x1.000001p-120L,
+ false,
+ 0x1.000000ffffffffffffffffffff8p-120L,
+ 0x1.000001p-120L,
+ 0x1.000000ffffffffffffffffffff8p-120L,
+ 0x1.000001p-120L,
+ 0x1.000000ffffffffffffffffffffffp-120L,
+ 0x1.000001p-120L,
+ 0x1.000000ffffffffffffffffffffffp-120L,
+ 0x1.000001p-120L),
+ TEST ("7.5231642936781486349413765338158389908126215730251815381410"
+ "5788244372130524340036572539247572422027587890625e-37",
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1p-120f,
+ 0x1.000002p-120f,
+ 0x1.000001p-120,
+ 0x1.000001p-120,
+ 0x1.000001p-120,
+ 0x1.000001p-120,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ true,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L),
+ TEST ("7.5231642936781486349413765338158389908126215730251815381410"
+ "578824437213052434003657253924757242202758789062501e-37",
+ 0x1p-120f,
+ 0x1.000002p-120f,
+ 0x1p-120f,
+ 0x1.000002p-120f,
+ 0x1.000001p-120,
+ 0x1.000001p-120,
+ 0x1.000001p-120,
+ 0x1.0000010000001p-120,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.0000010000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.0000010000000002p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.0000010000000002p-120L,
+ false,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001000000000000000000008p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.000001p-120L,
+ 0x1.0000010000000000000000000001p-120L),
+ TEST ("7.5231647420936572188828392294093056435857835827090029386261"
+ "048447055721499765468252007849514484405517578125e-37",
+ 0x1.000002p-120f,
+ 0x1.000002p-120f,
+ 0x1.000002p-120f,
+ 0x1.000002p-120f,
+ 0x1.000002p-120,
+ 0x1.000002p-120,
+ 0x1.000002p-120,
+ 0x1.000002p-120,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ true,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L,
+ 0x1.000002p-120L),
+ TEST ("7.5231651905091658028243019250027722963589455923928243391111"
+ "518069674229947096932846761774271726608276367187499e-37",
+ 0x1.000002p-120f,
+ 0x1.000002p-120f,
+ 0x1.000002p-120f,
+ 0x1.000004p-120f,
+ 0x1.000002fffffffp-120,
+ 0x1.000003p-120,
+ 0x1.000002fffffffp-120,
+ 0x1.000003p-120,
+ 0x1.000002fffffffp-120L,
+ 0x1.000003p-120L,
+ 0x1.000002fffffffp-120L,
+ 0x1.000003p-120L,
+ 0x1.000002fffffffffep-120L,
+ 0x1.000003p-120L,
+ 0x1.000002fffffffffep-120L,
+ 0x1.000003p-120L,
+ 0x1.000002fffffffffep-120L,
+ 0x1.000003p-120L,
+ 0x1.000002fffffffffep-120L,
+ 0x1.000003p-120L,
+ false,
+ 0x1.000002ffffffffffffffffffff8p-120L,
+ 0x1.000003p-120L,
+ 0x1.000002ffffffffffffffffffff8p-120L,
+ 0x1.000003p-120L,
+ 0x1.000002ffffffffffffffffffffffp-120L,
+ 0x1.000003p-120L,
+ 0x1.000002ffffffffffffffffffffffp-120L,
+ 0x1.000003p-120L),
+ TEST ("7.5231651905091658028243019250027722963589455923928243391111"
+ "5180696742299470969328467617742717266082763671875e-37",
+ 0x1.000002p-120f,
+ 0x1.000004p-120f,
+ 0x1.000002p-120f,
+ 0x1.000004p-120f,
+ 0x1.000003p-120,
+ 0x1.000003p-120,
+ 0x1.000003p-120,
+ 0x1.000003p-120,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ true,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L),
+ TEST ("7.5231651905091658028243019250027722963589455923928243391111"
+ "518069674229947096932846761774271726608276367187501e-37",
+ 0x1.000002p-120f,
+ 0x1.000004p-120f,
+ 0x1.000002p-120f,
+ 0x1.000004p-120f,
+ 0x1.000003p-120,
+ 0x1.000003p-120,
+ 0x1.000003p-120,
+ 0x1.0000030000001p-120,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.0000030000001p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.0000030000000002p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.0000030000000002p-120L,
+ false,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003000000000000000000008p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.000003p-120L,
+ 0x1.0000030000000000000000000001p-120L),
+ TEST ("7.5231656389246743867657646205962389491321076020766457395961"
+ "98769229273839442839744151569902896881103515625e-37",
+ 0x1.000004p-120f,
+ 0x1.000004p-120f,
+ 0x1.000004p-120f,
+ 0x1.000004p-120f,
+ 0x1.000004p-120,
+ 0x1.000004p-120,
+ 0x1.000004p-120,
+ 0x1.000004p-120,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ true,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L,
+ 0x1.000004p-120L),
+ TEST ("340282356779733661637539395458142568447.999",
+ 0xf.fffffp+124f,
+ 0xf.fffffp+124f,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffff7ffffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff7ffffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff7ffffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7ffffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffp+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffp+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffp+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffp+124L,
+ 0xf.fffff8p+124L,
+ false,
+ 0xf.fffff7fffffffffffffffffffcp+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffffffffffffcp+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffffffffffffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff7fffffffffffffffffffff8p+124L,
+ 0xf.fffff8p+124L),
+ TEST ("340282356779733661637539395458142568448",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ true,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L),
+ TEST ("340282356779733661637539395458142568448.001",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff8p+124,
+ 0xf.fffff80000008p+124,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff80000008p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8000000001p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8000000001p+124L,
+ false,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff800000000000000000004p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff8p+124L,
+ 0xf.fffff80000000000000000000008p+124L),
+ TEST ("-340282356779733661637539395458142568447.999",
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff7ffffff8p+124,
+ -0xf.fffff7ffffff8p+124,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff7ffffff8p+124L,
+ -0xf.fffff7ffffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff7fffffffffp+124L,
+ -0xf.fffff7fffffffffp+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff7fffffffffp+124L,
+ -0xf.fffff7fffffffffp+124L,
+ false,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff7fffffffffffffffffffcp+124L,
+ -0xf.fffff7fffffffffffffffffffcp+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff7fffffffffffffffffffff8p+124L,
+ -0xf.fffff7fffffffffffffffffffff8p+124L),
+ TEST ("-340282356779733661637539395458142568448",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ true,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L),
+ TEST ("-340282356779733661637539395458142568448.001",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -0xf.fffff80000008p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff8p+124,
+ -0xf.fffff80000008p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8000000001p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8000000001p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ false,
+ -0xf.fffff800000000000000000004p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff80000000000000000000008p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L,
+ -0xf.fffff8p+124L),
+ TEST ("179769313486231580793728971405303415079934132710037826936173"
+ "778980444968292764750946649017977587207096330286416692887910"
+ "946555547851940402630657488671505820681908902000708383676273"
+ "854845817711531764475730270069855571366959622842914819860834"
+ "936475292719074168444365510704342711559699508093042880177904"
+ "174497791.999",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ 0xf.ffffffffffff8p+1020,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ 0xf.ffffffffffff8p+1020L,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffffbffp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffbffp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffbffp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffbffp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ false,
+ 0xf.ffffffffffffbffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffbffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffbffffffffffffff8p+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffbffffffffffffff8p+1020L,
+ 0xf.ffffffffffffcp+1020L),
+ TEST ("179769313486231580793728971405303415079934132710037826936173"
+ "778980444968292764750946649017977587207096330286416692887910"
+ "946555547851940402630657488671505820681908902000708383676273"
+ "854845817711531764475730270069855571366959622842914819860834"
+ "936475292719074168444365510704342711559699508093042880177904"
+ "174497792",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ false,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L),
+ TEST ("179769313486231580793728971405303415079934132710037826936173"
+ "778980444968292764750946649017977587207096330286416692887910"
+ "946555547851940402630657488671505820681908902000708383676273"
+ "854845817711531764475730270069855571366959622842914819860834"
+ "936475292719074168444365510704342711559699508093042880177904"
+ "174497792.001",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffc01p+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffc01p+1020L,
+ false,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffc0000000000004p+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffcp+1020L,
+ 0xf.ffffffffffffc000000000000008p+1020L),
+ TEST ("-17976931348623158079372897140530341507993413271003782693617"
+ "377898044496829276475094664901797758720709633028641669288791"
+ "094655554785194040263065748867150582068190890200070838367627"
+ "385484581771153176447573027006985557136695962284291481986083"
+ "493647529271907416844436551070434271155969950809304288017790"
+ "4174497791.999",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffbffp+1020L,
+ -0xf.ffffffffffffbffp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffbffp+1020L,
+ -0xf.ffffffffffffbffp+1020L,
+ false,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffbffffffffffffcp+1020L,
+ -0xf.ffffffffffffbffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffbffffffffffffff8p+1020L,
+ -0xf.ffffffffffffbffffffffffffff8p+1020L),
+ TEST ("-17976931348623158079372897140530341507993413271003782693617"
+ "377898044496829276475094664901797758720709633028641669288791"
+ "094655554785194040263065748867150582068190890200070838367627"
+ "385484581771153176447573027006985557136695962284291481986083"
+ "493647529271907416844436551070434271155969950809304288017790"
+ "4174497792",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ false,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L),
+ TEST ("-17976931348623158079372897140530341507993413271003782693617"
+ "377898044496829276475094664901797758720709633028641669288791"
+ "094655554785194040263065748867150582068190890200070838367627"
+ "385484581771153176447573027006985557136695962284291481986083"
+ "493647529271907416844436551070434271155969950809304288017790"
+ "4174497792.001",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffffc01p+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffc01p+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ false,
+ -0xf.ffffffffffffc0000000000004p+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffc000000000000008p+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L,
+ -0xf.ffffffffffffcp+1020L),
+ TEST ("118973149535723176505351158982948866796625400469556721895649"
+ "927756249918185172720476044944290457046138433056764616744328"
+ "666255526748948793023632513609765434237723241753648908036202"
+ "958495124648560574092817813661123067421904850038181180520787"
+ "720310726881239888580817051703268776757919551260442611296993"
+ "969730906497042135737359373754818979106457807539652027804156"
+ "491987771033211787185996492320631117543475322122625353433719"
+ "930462950413766867781210335973022293561007134342532563356262"
+ "609267460063335819387905541393759243547993474715549691352074"
+ "891450084783459970660481689991674771307443551458551137274603"
+ "094678907537177579699931235422786658780337099286207273033150"
+ "295133847635735008945346069635452157254692607776538304457707"
+ "598289220004738023060594798392660507455937428888763514661408"
+ "758068906506527143720723156203739676372818578090840614216621"
+ "704787774611256823213431325634056809505691175988424606654072"
+ "823115950827627377808673574181547198668714142143234447550206"
+ "269197545774263993130119778810659043621312707109068433886162"
+ "877222844491518930341896313561238988520360803607534987178305"
+ "043520937299838173444083502027340452162582038296009574808809"
+ "658742434897860755961343752419543802653239216337103370292742"
+ "935497502474626454559729017094560234867236701379230234809843"
+ "263739640909561388493227725171983531003154799850580375254640"
+ "686684370650275318316632539920970969803838872914424760535111"
+ "444864748847573042963569291679400178896696862026500700279826"
+ "635302471702206627303799047632971460017199544567373231610376"
+ "256879987134317934150014443436145710546137924490489525241523"
+ "018271239906743645663976778059895127442517397682525944430951"
+ "907648109952479454685655581652571021331761401038962049122047"
+ "111009185757383743827811254014770944602713378187451095200132"
+ "611700632386420792585207954137064426995712656449343534120120"
+ "770857498813673742586478583964512406030930704197486727636333"
+ "837001863610516286928300891774383071105022919314408502968809"
+ "463848377324668014115592383521324785361676372582468085716775"
+ "183709078048790084022838728361454734650904480489014369184979"
+ "256497738392744524915616501449487520501300124861778269881261"
+ "335544037735715125808986359728419859776521586683035924100574"
+ "850554368935873803132428446524362913648833348768663733118103"
+ "918959060412499201797234385239260504905744357611987327994540"
+ "083286019952793692265006211633524675976369938866409689573287"
+ "599490442761701229217689614343727392339547174221615984024864"
+ "635625680108391566720681134647098412863051374760613506003971"
+ "759070209697293081442875903240426975910170967179075646317814"
+ "394978762382183679266247724762405284284971833355044962214065"
+ "895558105408175131247181971272672247996246595857705695208092"
+ "816044125822560989770526261449460733912621692806952140652061"
+ "911968824328747339453822511902787546522099225623311147726504"
+ "972617425102845212076162056723650625826928778132002074035405"
+ "250631109426611640681070927283430486232053929420514345435713"
+ "131387967949326001734866894273047449417824913738789829732833"
+ "683358900903818016968127085077418070951770702999663693968324"
+ "004781728763310108379440442854174041581191669623267749855519"
+ "774427387794278666183504498843857475877442235608736818515722"
+ "862733587905866015455830953591207040129558473662150426884726"
+ "759522376583586317425575669726781893104752341432891868770513"
+ "406836036136374264038296610854599454591170582569741798904328"
+ "676755131072831974295435585611673171096113833795735888591844"
+ "569864166955969416680807491722688418115891753669917660968752"
+ "228842669182040018336152355940915579955628386232949747891257"
+ "526145783057949776122896048841308261113063674538553146663451"
+ "574384023903569848640351704415703922683108552880537081027404"
+ "397775617608412295293311763789489900990611859125572525530349"
+ "278319943261304784125553748811339225969956465404836696490782"
+ "500903694674135036899321686023782466034636817818347651623601"
+ "663129318574761269352028560641266614840108083315301260274558"
+ "575087296910384815285134460531715154639604115052348665171547"
+ "251609075784863196403541944155425166776423403472211742139313"
+ "210299896884252707306862499895115691675551238140467142819537"
+ "867343414276518703858928008759955391140729958278175965217739"
+ "826511218924463113077693598006228365514899236789515147503266"
+ "616268809617626228164916917150602464494142485507467876173251"
+ "398398846807079309227567538802476335624194115637802439400050"
+ "221934368975949846684026462252790745597563393487879954351820"
+ "652138303761879543933808642920064500206512003954563931569820"
+ "114768348051593629274325149906343853129692245386396887281599"
+ "735312588117968646270517005121997466606469447530616465384255"
+ "826304380842850779833108567141643769616400809617173972138187"
+ "711971431230616321035038259922624655396612597024040812967444"
+ "207673594478417900666764580589685104809363813759667069693701"
+ "069921295791929938093722225050956280798177934138468414654728"
+ "631498256418191041953123619406060363406390776140155709737059"
+ "125898120366007955506160309553860446596202876233728025871625"
+ "578031503869424406179027994752890226443351619365453243328968"
+ "8740976918527.999",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ 0xf.fffffffffffffffp+16380L,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ 0xf.fffffffffffffffp+16380L,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ false,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffff7fffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff7fffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L),
+ TEST ("118973149535723176505351158982948866796625400469556721895649"
+ "927756249918185172720476044944290457046138433056764616744328"
+ "666255526748948793023632513609765434237723241753648908036202"
+ "958495124648560574092817813661123067421904850038181180520787"
+ "720310726881239888580817051703268776757919551260442611296993"
+ "969730906497042135737359373754818979106457807539652027804156"
+ "491987771033211787185996492320631117543475322122625353433719"
+ "930462950413766867781210335973022293561007134342532563356262"
+ "609267460063335819387905541393759243547993474715549691352074"
+ "891450084783459970660481689991674771307443551458551137274603"
+ "094678907537177579699931235422786658780337099286207273033150"
+ "295133847635735008945346069635452157254692607776538304457707"
+ "598289220004738023060594798392660507455937428888763514661408"
+ "758068906506527143720723156203739676372818578090840614216621"
+ "704787774611256823213431325634056809505691175988424606654072"
+ "823115950827627377808673574181547198668714142143234447550206"
+ "269197545774263993130119778810659043621312707109068433886162"
+ "877222844491518930341896313561238988520360803607534987178305"
+ "043520937299838173444083502027340452162582038296009574808809"
+ "658742434897860755961343752419543802653239216337103370292742"
+ "935497502474626454559729017094560234867236701379230234809843"
+ "263739640909561388493227725171983531003154799850580375254640"
+ "686684370650275318316632539920970969803838872914424760535111"
+ "444864748847573042963569291679400178896696862026500700279826"
+ "635302471702206627303799047632971460017199544567373231610376"
+ "256879987134317934150014443436145710546137924490489525241523"
+ "018271239906743645663976778059895127442517397682525944430951"
+ "907648109952479454685655581652571021331761401038962049122047"
+ "111009185757383743827811254014770944602713378187451095200132"
+ "611700632386420792585207954137064426995712656449343534120120"
+ "770857498813673742586478583964512406030930704197486727636333"
+ "837001863610516286928300891774383071105022919314408502968809"
+ "463848377324668014115592383521324785361676372582468085716775"
+ "183709078048790084022838728361454734650904480489014369184979"
+ "256497738392744524915616501449487520501300124861778269881261"
+ "335544037735715125808986359728419859776521586683035924100574"
+ "850554368935873803132428446524362913648833348768663733118103"
+ "918959060412499201797234385239260504905744357611987327994540"
+ "083286019952793692265006211633524675976369938866409689573287"
+ "599490442761701229217689614343727392339547174221615984024864"
+ "635625680108391566720681134647098412863051374760613506003971"
+ "759070209697293081442875903240426975910170967179075646317814"
+ "394978762382183679266247724762405284284971833355044962214065"
+ "895558105408175131247181971272672247996246595857705695208092"
+ "816044125822560989770526261449460733912621692806952140652061"
+ "911968824328747339453822511902787546522099225623311147726504"
+ "972617425102845212076162056723650625826928778132002074035405"
+ "250631109426611640681070927283430486232053929420514345435713"
+ "131387967949326001734866894273047449417824913738789829732833"
+ "683358900903818016968127085077418070951770702999663693968324"
+ "004781728763310108379440442854174041581191669623267749855519"
+ "774427387794278666183504498843857475877442235608736818515722"
+ "862733587905866015455830953591207040129558473662150426884726"
+ "759522376583586317425575669726781893104752341432891868770513"
+ "406836036136374264038296610854599454591170582569741798904328"
+ "676755131072831974295435585611673171096113833795735888591844"
+ "569864166955969416680807491722688418115891753669917660968752"
+ "228842669182040018336152355940915579955628386232949747891257"
+ "526145783057949776122896048841308261113063674538553146663451"
+ "574384023903569848640351704415703922683108552880537081027404"
+ "397775617608412295293311763789489900990611859125572525530349"
+ "278319943261304784125553748811339225969956465404836696490782"
+ "500903694674135036899321686023782466034636817818347651623601"
+ "663129318574761269352028560641266614840108083315301260274558"
+ "575087296910384815285134460531715154639604115052348665171547"
+ "251609075784863196403541944155425166776423403472211742139313"
+ "210299896884252707306862499895115691675551238140467142819537"
+ "867343414276518703858928008759955391140729958278175965217739"
+ "826511218924463113077693598006228365514899236789515147503266"
+ "616268809617626228164916917150602464494142485507467876173251"
+ "398398846807079309227567538802476335624194115637802439400050"
+ "221934368975949846684026462252790745597563393487879954351820"
+ "652138303761879543933808642920064500206512003954563931569820"
+ "114768348051593629274325149906343853129692245386396887281599"
+ "735312588117968646270517005121997466606469447530616465384255"
+ "826304380842850779833108567141643769616400809617173972138187"
+ "711971431230616321035038259922624655396612597024040812967444"
+ "207673594478417900666764580589685104809363813759667069693701"
+ "069921295791929938093722225050956280798177934138468414654728"
+ "631498256418191041953123619406060363406390776140155709737059"
+ "125898120366007955506160309553860446596202876233728025871625"
+ "578031503869424406179027994752890226443351619365453243328968"
+ "8740976918528",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ false,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L),
+ TEST ("118973149535723176505351158982948866796625400469556721895649"
+ "927756249918185172720476044944290457046138433056764616744328"
+ "666255526748948793023632513609765434237723241753648908036202"
+ "958495124648560574092817813661123067421904850038181180520787"
+ "720310726881239888580817051703268776757919551260442611296993"
+ "969730906497042135737359373754818979106457807539652027804156"
+ "491987771033211787185996492320631117543475322122625353433719"
+ "930462950413766867781210335973022293561007134342532563356262"
+ "609267460063335819387905541393759243547993474715549691352074"
+ "891450084783459970660481689991674771307443551458551137274603"
+ "094678907537177579699931235422786658780337099286207273033150"
+ "295133847635735008945346069635452157254692607776538304457707"
+ "598289220004738023060594798392660507455937428888763514661408"
+ "758068906506527143720723156203739676372818578090840614216621"
+ "704787774611256823213431325634056809505691175988424606654072"
+ "823115950827627377808673574181547198668714142143234447550206"
+ "269197545774263993130119778810659043621312707109068433886162"
+ "877222844491518930341896313561238988520360803607534987178305"
+ "043520937299838173444083502027340452162582038296009574808809"
+ "658742434897860755961343752419543802653239216337103370292742"
+ "935497502474626454559729017094560234867236701379230234809843"
+ "263739640909561388493227725171983531003154799850580375254640"
+ "686684370650275318316632539920970969803838872914424760535111"
+ "444864748847573042963569291679400178896696862026500700279826"
+ "635302471702206627303799047632971460017199544567373231610376"
+ "256879987134317934150014443436145710546137924490489525241523"
+ "018271239906743645663976778059895127442517397682525944430951"
+ "907648109952479454685655581652571021331761401038962049122047"
+ "111009185757383743827811254014770944602713378187451095200132"
+ "611700632386420792585207954137064426995712656449343534120120"
+ "770857498813673742586478583964512406030930704197486727636333"
+ "837001863610516286928300891774383071105022919314408502968809"
+ "463848377324668014115592383521324785361676372582468085716775"
+ "183709078048790084022838728361454734650904480489014369184979"
+ "256497738392744524915616501449487520501300124861778269881261"
+ "335544037735715125808986359728419859776521586683035924100574"
+ "850554368935873803132428446524362913648833348768663733118103"
+ "918959060412499201797234385239260504905744357611987327994540"
+ "083286019952793692265006211633524675976369938866409689573287"
+ "599490442761701229217689614343727392339547174221615984024864"
+ "635625680108391566720681134647098412863051374760613506003971"
+ "759070209697293081442875903240426975910170967179075646317814"
+ "394978762382183679266247724762405284284971833355044962214065"
+ "895558105408175131247181971272672247996246595857705695208092"
+ "816044125822560989770526261449460733912621692806952140652061"
+ "911968824328747339453822511902787546522099225623311147726504"
+ "972617425102845212076162056723650625826928778132002074035405"
+ "250631109426611640681070927283430486232053929420514345435713"
+ "131387967949326001734866894273047449417824913738789829732833"
+ "683358900903818016968127085077418070951770702999663693968324"
+ "004781728763310108379440442854174041581191669623267749855519"
+ "774427387794278666183504498843857475877442235608736818515722"
+ "862733587905866015455830953591207040129558473662150426884726"
+ "759522376583586317425575669726781893104752341432891868770513"
+ "406836036136374264038296610854599454591170582569741798904328"
+ "676755131072831974295435585611673171096113833795735888591844"
+ "569864166955969416680807491722688418115891753669917660968752"
+ "228842669182040018336152355940915579955628386232949747891257"
+ "526145783057949776122896048841308261113063674538553146663451"
+ "574384023903569848640351704415703922683108552880537081027404"
+ "397775617608412295293311763789489900990611859125572525530349"
+ "278319943261304784125553748811339225969956465404836696490782"
+ "500903694674135036899321686023782466034636817818347651623601"
+ "663129318574761269352028560641266614840108083315301260274558"
+ "575087296910384815285134460531715154639604115052348665171547"
+ "251609075784863196403541944155425166776423403472211742139313"
+ "210299896884252707306862499895115691675551238140467142819537"
+ "867343414276518703858928008759955391140729958278175965217739"
+ "826511218924463113077693598006228365514899236789515147503266"
+ "616268809617626228164916917150602464494142485507467876173251"
+ "398398846807079309227567538802476335624194115637802439400050"
+ "221934368975949846684026462252790745597563393487879954351820"
+ "652138303761879543933808642920064500206512003954563931569820"
+ "114768348051593629274325149906343853129692245386396887281599"
+ "735312588117968646270517005121997466606469447530616465384255"
+ "826304380842850779833108567141643769616400809617173972138187"
+ "711971431230616321035038259922624655396612597024040812967444"
+ "207673594478417900666764580589685104809363813759667069693701"
+ "069921295791929938093722225050956280798177934138468414654728"
+ "631498256418191041953123619406060363406390776140155709737059"
+ "125898120366007955506160309553860446596202876233728025871625"
+ "578031503869424406179027994752890226443351619365453243328968"
+ "8740976918528.001",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ false,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff8p+16380L,
+ 0xf.fffffffffffffff8000000000008p+16380L),
+ TEST ("-11897314953572317650535115898294886679662540046955672189564"
+ "992775624991818517272047604494429045704613843305676461674432"
+ "866625552674894879302363251360976543423772324175364890803620"
+ "295849512464856057409281781366112306742190485003818118052078"
+ "772031072688123988858081705170326877675791955126044261129699"
+ "396973090649704213573735937375481897910645780753965202780415"
+ "649198777103321178718599649232063111754347532212262535343371"
+ "993046295041376686778121033597302229356100713434253256335626"
+ "260926746006333581938790554139375924354799347471554969135207"
+ "489145008478345997066048168999167477130744355145855113727460"
+ "309467890753717757969993123542278665878033709928620727303315"
+ "029513384763573500894534606963545215725469260777653830445770"
+ "759828922000473802306059479839266050745593742888876351466140"
+ "875806890650652714372072315620373967637281857809084061421662"
+ "170478777461125682321343132563405680950569117598842460665407"
+ "282311595082762737780867357418154719866871414214323444755020"
+ "626919754577426399313011977881065904362131270710906843388616"
+ "287722284449151893034189631356123898852036080360753498717830"
+ "504352093729983817344408350202734045216258203829600957480880"
+ "965874243489786075596134375241954380265323921633710337029274"
+ "293549750247462645455972901709456023486723670137923023480984"
+ "326373964090956138849322772517198353100315479985058037525464"
+ "068668437065027531831663253992097096980383887291442476053511"
+ "144486474884757304296356929167940017889669686202650070027982"
+ "663530247170220662730379904763297146001719954456737323161037"
+ "625687998713431793415001444343614571054613792449048952524152"
+ "301827123990674364566397677805989512744251739768252594443095"
+ "190764810995247945468565558165257102133176140103896204912204"
+ "711100918575738374382781125401477094460271337818745109520013"
+ "261170063238642079258520795413706442699571265644934353412012"
+ "077085749881367374258647858396451240603093070419748672763633"
+ "383700186361051628692830089177438307110502291931440850296880"
+ "946384837732466801411559238352132478536167637258246808571677"
+ "518370907804879008402283872836145473465090448048901436918497"
+ "925649773839274452491561650144948752050130012486177826988126"
+ "133554403773571512580898635972841985977652158668303592410057"
+ "485055436893587380313242844652436291364883334876866373311810"
+ "391895906041249920179723438523926050490574435761198732799454"
+ "008328601995279369226500621163352467597636993886640968957328"
+ "759949044276170122921768961434372739233954717422161598402486"
+ "463562568010839156672068113464709841286305137476061350600397"
+ "175907020969729308144287590324042697591017096717907564631781"
+ "439497876238218367926624772476240528428497183335504496221406"
+ "589555810540817513124718197127267224799624659585770569520809"
+ "281604412582256098977052626144946073391262169280695214065206"
+ "191196882432874733945382251190278754652209922562331114772650"
+ "497261742510284521207616205672365062582692877813200207403540"
+ "525063110942661164068107092728343048623205392942051434543571"
+ "313138796794932600173486689427304744941782491373878982973283"
+ "368335890090381801696812708507741807095177070299966369396832"
+ "400478172876331010837944044285417404158119166962326774985551"
+ "977442738779427866618350449884385747587744223560873681851572"
+ "286273358790586601545583095359120704012955847366215042688472"
+ "675952237658358631742557566972678189310475234143289186877051"
+ "340683603613637426403829661085459945459117058256974179890432"
+ "867675513107283197429543558561167317109611383379573588859184"
+ "456986416695596941668080749172268841811589175366991766096875"
+ "222884266918204001833615235594091557995562838623294974789125"
+ "752614578305794977612289604884130826111306367453855314666345"
+ "157438402390356984864035170441570392268310855288053708102740"
+ "439777561760841229529331176378948990099061185912557252553034"
+ "927831994326130478412555374881133922596995646540483669649078"
+ "250090369467413503689932168602378246603463681781834765162360"
+ "166312931857476126935202856064126661484010808331530126027455"
+ "857508729691038481528513446053171515463960411505234866517154"
+ "725160907578486319640354194415542516677642340347221174213931"
+ "321029989688425270730686249989511569167555123814046714281953"
+ "786734341427651870385892800875995539114072995827817596521773"
+ "982651121892446311307769359800622836551489923678951514750326"
+ "661626880961762622816491691715060246449414248550746787617325"
+ "139839884680707930922756753880247633562419411563780243940005"
+ "022193436897594984668402646225279074559756339348787995435182"
+ "065213830376187954393380864292006450020651200395456393156982"
+ "011476834805159362927432514990634385312969224538639688728159"
+ "973531258811796864627051700512199746660646944753061646538425"
+ "582630438084285077983310856714164376961640080961717397213818"
+ "771197143123061632103503825992262465539661259702404081296744"
+ "420767359447841790066676458058968510480936381375966706969370"
+ "106992129579192993809372222505095628079817793413846841465472"
+ "863149825641819104195312361940606036340639077614015570973705"
+ "912589812036600795550616030955386044659620287623372802587162"
+ "557803150386942440617902799475289022644335161936545324332896"
+ "88740976918527.999",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ false,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff7fffffffffff8p+16380L,
+ -0xf.fffffffffffffff7fffffffffff8p+16380L),
+ TEST ("-11897314953572317650535115898294886679662540046955672189564"
+ "992775624991818517272047604494429045704613843305676461674432"
+ "866625552674894879302363251360976543423772324175364890803620"
+ "295849512464856057409281781366112306742190485003818118052078"
+ "772031072688123988858081705170326877675791955126044261129699"
+ "396973090649704213573735937375481897910645780753965202780415"
+ "649198777103321178718599649232063111754347532212262535343371"
+ "993046295041376686778121033597302229356100713434253256335626"
+ "260926746006333581938790554139375924354799347471554969135207"
+ "489145008478345997066048168999167477130744355145855113727460"
+ "309467890753717757969993123542278665878033709928620727303315"
+ "029513384763573500894534606963545215725469260777653830445770"
+ "759828922000473802306059479839266050745593742888876351466140"
+ "875806890650652714372072315620373967637281857809084061421662"
+ "170478777461125682321343132563405680950569117598842460665407"
+ "282311595082762737780867357418154719866871414214323444755020"
+ "626919754577426399313011977881065904362131270710906843388616"
+ "287722284449151893034189631356123898852036080360753498717830"
+ "504352093729983817344408350202734045216258203829600957480880"
+ "965874243489786075596134375241954380265323921633710337029274"
+ "293549750247462645455972901709456023486723670137923023480984"
+ "326373964090956138849322772517198353100315479985058037525464"
+ "068668437065027531831663253992097096980383887291442476053511"
+ "144486474884757304296356929167940017889669686202650070027982"
+ "663530247170220662730379904763297146001719954456737323161037"
+ "625687998713431793415001444343614571054613792449048952524152"
+ "301827123990674364566397677805989512744251739768252594443095"
+ "190764810995247945468565558165257102133176140103896204912204"
+ "711100918575738374382781125401477094460271337818745109520013"
+ "261170063238642079258520795413706442699571265644934353412012"
+ "077085749881367374258647858396451240603093070419748672763633"
+ "383700186361051628692830089177438307110502291931440850296880"
+ "946384837732466801411559238352132478536167637258246808571677"
+ "518370907804879008402283872836145473465090448048901436918497"
+ "925649773839274452491561650144948752050130012486177826988126"
+ "133554403773571512580898635972841985977652158668303592410057"
+ "485055436893587380313242844652436291364883334876866373311810"
+ "391895906041249920179723438523926050490574435761198732799454"
+ "008328601995279369226500621163352467597636993886640968957328"
+ "759949044276170122921768961434372739233954717422161598402486"
+ "463562568010839156672068113464709841286305137476061350600397"
+ "175907020969729308144287590324042697591017096717907564631781"
+ "439497876238218367926624772476240528428497183335504496221406"
+ "589555810540817513124718197127267224799624659585770569520809"
+ "281604412582256098977052626144946073391262169280695214065206"
+ "191196882432874733945382251190278754652209922562331114772650"
+ "497261742510284521207616205672365062582692877813200207403540"
+ "525063110942661164068107092728343048623205392942051434543571"
+ "313138796794932600173486689427304744941782491373878982973283"
+ "368335890090381801696812708507741807095177070299966369396832"
+ "400478172876331010837944044285417404158119166962326774985551"
+ "977442738779427866618350449884385747587744223560873681851572"
+ "286273358790586601545583095359120704012955847366215042688472"
+ "675952237658358631742557566972678189310475234143289186877051"
+ "340683603613637426403829661085459945459117058256974179890432"
+ "867675513107283197429543558561167317109611383379573588859184"
+ "456986416695596941668080749172268841811589175366991766096875"
+ "222884266918204001833615235594091557995562838623294974789125"
+ "752614578305794977612289604884130826111306367453855314666345"
+ "157438402390356984864035170441570392268310855288053708102740"
+ "439777561760841229529331176378948990099061185912557252553034"
+ "927831994326130478412555374881133922596995646540483669649078"
+ "250090369467413503689932168602378246603463681781834765162360"
+ "166312931857476126935202856064126661484010808331530126027455"
+ "857508729691038481528513446053171515463960411505234866517154"
+ "725160907578486319640354194415542516677642340347221174213931"
+ "321029989688425270730686249989511569167555123814046714281953"
+ "786734341427651870385892800875995539114072995827817596521773"
+ "982651121892446311307769359800622836551489923678951514750326"
+ "661626880961762622816491691715060246449414248550746787617325"
+ "139839884680707930922756753880247633562419411563780243940005"
+ "022193436897594984668402646225279074559756339348787995435182"
+ "065213830376187954393380864292006450020651200395456393156982"
+ "011476834805159362927432514990634385312969224538639688728159"
+ "973531258811796864627051700512199746660646944753061646538425"
+ "582630438084285077983310856714164376961640080961717397213818"
+ "771197143123061632103503825992262465539661259702404081296744"
+ "420767359447841790066676458058968510480936381375966706969370"
+ "106992129579192993809372222505095628079817793413846841465472"
+ "863149825641819104195312361940606036340639077614015570973705"
+ "912589812036600795550616030955386044659620287623372802587162"
+ "557803150386942440617902799475289022644335161936545324332896"
+ "88740976918528",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ false,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff8p+16380L),
+ TEST ("-11897314953572317650535115898294886679662540046955672189564"
+ "992775624991818517272047604494429045704613843305676461674432"
+ "866625552674894879302363251360976543423772324175364890803620"
+ "295849512464856057409281781366112306742190485003818118052078"
+ "772031072688123988858081705170326877675791955126044261129699"
+ "396973090649704213573735937375481897910645780753965202780415"
+ "649198777103321178718599649232063111754347532212262535343371"
+ "993046295041376686778121033597302229356100713434253256335626"
+ "260926746006333581938790554139375924354799347471554969135207"
+ "489145008478345997066048168999167477130744355145855113727460"
+ "309467890753717757969993123542278665878033709928620727303315"
+ "029513384763573500894534606963545215725469260777653830445770"
+ "759828922000473802306059479839266050745593742888876351466140"
+ "875806890650652714372072315620373967637281857809084061421662"
+ "170478777461125682321343132563405680950569117598842460665407"
+ "282311595082762737780867357418154719866871414214323444755020"
+ "626919754577426399313011977881065904362131270710906843388616"
+ "287722284449151893034189631356123898852036080360753498717830"
+ "504352093729983817344408350202734045216258203829600957480880"
+ "965874243489786075596134375241954380265323921633710337029274"
+ "293549750247462645455972901709456023486723670137923023480984"
+ "326373964090956138849322772517198353100315479985058037525464"
+ "068668437065027531831663253992097096980383887291442476053511"
+ "144486474884757304296356929167940017889669686202650070027982"
+ "663530247170220662730379904763297146001719954456737323161037"
+ "625687998713431793415001444343614571054613792449048952524152"
+ "301827123990674364566397677805989512744251739768252594443095"
+ "190764810995247945468565558165257102133176140103896204912204"
+ "711100918575738374382781125401477094460271337818745109520013"
+ "261170063238642079258520795413706442699571265644934353412012"
+ "077085749881367374258647858396451240603093070419748672763633"
+ "383700186361051628692830089177438307110502291931440850296880"
+ "946384837732466801411559238352132478536167637258246808571677"
+ "518370907804879008402283872836145473465090448048901436918497"
+ "925649773839274452491561650144948752050130012486177826988126"
+ "133554403773571512580898635972841985977652158668303592410057"
+ "485055436893587380313242844652436291364883334876866373311810"
+ "391895906041249920179723438523926050490574435761198732799454"
+ "008328601995279369226500621163352467597636993886640968957328"
+ "759949044276170122921768961434372739233954717422161598402486"
+ "463562568010839156672068113464709841286305137476061350600397"
+ "175907020969729308144287590324042697591017096717907564631781"
+ "439497876238218367926624772476240528428497183335504496221406"
+ "589555810540817513124718197127267224799624659585770569520809"
+ "281604412582256098977052626144946073391262169280695214065206"
+ "191196882432874733945382251190278754652209922562331114772650"
+ "497261742510284521207616205672365062582692877813200207403540"
+ "525063110942661164068107092728343048623205392942051434543571"
+ "313138796794932600173486689427304744941782491373878982973283"
+ "368335890090381801696812708507741807095177070299966369396832"
+ "400478172876331010837944044285417404158119166962326774985551"
+ "977442738779427866618350449884385747587744223560873681851572"
+ "286273358790586601545583095359120704012955847366215042688472"
+ "675952237658358631742557566972678189310475234143289186877051"
+ "340683603613637426403829661085459945459117058256974179890432"
+ "867675513107283197429543558561167317109611383379573588859184"
+ "456986416695596941668080749172268841811589175366991766096875"
+ "222884266918204001833615235594091557995562838623294974789125"
+ "752614578305794977612289604884130826111306367453855314666345"
+ "157438402390356984864035170441570392268310855288053708102740"
+ "439777561760841229529331176378948990099061185912557252553034"
+ "927831994326130478412555374881133922596995646540483669649078"
+ "250090369467413503689932168602378246603463681781834765162360"
+ "166312931857476126935202856064126661484010808331530126027455"
+ "857508729691038481528513446053171515463960411505234866517154"
+ "725160907578486319640354194415542516677642340347221174213931"
+ "321029989688425270730686249989511569167555123814046714281953"
+ "786734341427651870385892800875995539114072995827817596521773"
+ "982651121892446311307769359800622836551489923678951514750326"
+ "661626880961762622816491691715060246449414248550746787617325"
+ "139839884680707930922756753880247633562419411563780243940005"
+ "022193436897594984668402646225279074559756339348787995435182"
+ "065213830376187954393380864292006450020651200395456393156982"
+ "011476834805159362927432514990634385312969224538639688728159"
+ "973531258811796864627051700512199746660646944753061646538425"
+ "582630438084285077983310856714164376961640080961717397213818"
+ "771197143123061632103503825992262465539661259702404081296744"
+ "420767359447841790066676458058968510480936381375966706969370"
+ "106992129579192993809372222505095628079817793413846841465472"
+ "863149825641819104195312361940606036340639077614015570973705"
+ "912589812036600795550616030955386044659620287623372802587162"
+ "557803150386942440617902799475289022644335161936545324332896"
+ "88740976918528.001",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ false,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffff8000000000008p+16380L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff8p+16380L,
+ -0xf.fffffffffffffff8p+16380L),
+ TEST ("118973149535723176508575932662800707347995686986910214150118"
+ "685272271246896789803961473130416053705672050873552479421805"
+ "932646640744124594447361172514341324846716679654551308018400"
+ "452551246797021031695590308415421099521962856162050274568841"
+ "297915828747574343774874752902176710049525787625138678906010"
+ "048638212027057374683542842282633896097240913572043788690878"
+ "561421008447838407815393303366617352859876685151925036335142"
+ "606462825839541908847139311166770091872983498508632067665424"
+ "131663456011801988221011933744533095583591952713287509471572"
+ "005635584655570174753698625195967118200265238753375268656404"
+ "300638718932246773699829720984119713851462400809295266529707"
+ "450603039675996477317034685632764277790214944500590950459817"
+ "905458649624723235138950801408157339866516893477731877579183"
+ "713595679581558427625325833939652897845282019149923069371763"
+ "621014587926698827182969408373803807712292191282429102445352"
+ "493434039402290243933941906906661090602900960765874258303002"
+ "994639315656152078708796474719793763077934223746582725715380"
+ "546621026022818892467551940977566283266498758568504813830755"
+ "715585325649227824857891916443381390920079346240984072859876"
+ "394789650127468861490822526766717770136680743866932662343305"
+ "821821344306240809967537078707691232937387041140557168161956"
+ "672595323950666742010786584275766171661791973302251394804664"
+ "351065107886557299707326005651230394674710597929211000345040"
+ "748992483614253006562424867893567074606589931788062200063807"
+ "336740036940230215831403322125165368742446805152078682411506"
+ "081843753974005583111391605547148303480887461773984314393817"
+ "233328426227146997925421743280885595916487699461777590949432"
+ "536021389649845214065322016198143547250143861460313408300535"
+ "800647014276175548485543791298383644643679669618879907720347"
+ "361578030001247419574448359597988425487829219851305162204925"
+ "876422580754230478244492592334149461342828532046897137732862"
+ "560405101567370570895662663174689131741739602970845694214086"
+ "383402465037069569640956912385125748139813888875258203003486"
+ "978747055202810394072908580324008598756993885667142200558137"
+ "216665049755676940757442911860295559656788759871904662758651"
+ "106796978788783386988295123326864580419821595430891867179378"
+ "372968821128698879468814267529461494723425453808822356093436"
+ "114567635804621183162768389034017821036515461700163537265334"
+ "837042272659885702600247792917728828912373907035369136531164"
+ "551871575024551077026080114197652598224677403885378544255851"
+ "452142889211152237506343909351748731538683443195842912801950"
+ "740929058503113127929421291089844021925400931905939216271347"
+ "501989193058654389516377770771439860033940981826669939750630"
+ "966060749188986231404992238674933998516958950824840538996637"
+ "227947236848099456610159878061379742621311380927234118601003"
+ "068752002060437285024623575047782086630607224900910789188204"
+ "422115342157245494745974521832782208601602710639261482504706"
+ "793704189474198047840288064399210243702202724597107455534275"
+ "321401119382263147115748905050195256886082040192083380490209"
+ "648570353905656303876661710430922155024620842080323610266391"
+ "819853291160589645614945256684769911320943457402697573094119"
+ "430125589389298495428377185239916427991844172165080029177729"
+ "625180644077484441695092005844026411665118679537869781924378"
+ "377060887769389297625907410934020531742739577183152327119791"
+ "567636713426904553654134937766951789571845662564530364234831"
+ "655818811851573018210173773037253988893680153247404060131255"
+ "432297982534770778617218088583998040670598195597843579610890"
+ "315316606725381521608825464438386306376596459107591134507541"
+ "153403024199191222328259713530472683187873517955642380703639"
+ "029816037096049042094836437281075965243968431839386959736989"
+ "889027924230006904683050305965712585804355337311372959487108"
+ "794286031594805559334414767793211932142402860019029250966461"
+ "933621763149049802791695077716375242516443825235146860078555"
+ "453142397983479144560015010889077242726183149587493050950967"
+ "941488752366197740591478464591650201477772717579831983405962"
+ "171742164889284586217913115136227964861078958766284010901639"
+ "781256012341028188155836968476480842715858962105341815444164"
+ "696766584018508513610260777540911573496315580383328678958350"
+ "148157337222619548467971967434956296433870815461340134721800"
+ "205755114983399523323106573720732056659216468891205124203527"
+ "449961814733926916757607468806003312492414061695431041238453"
+ "023522795690830184799840657478014435335788410588338795921829"
+ "674102072285495410088727730494748054715270026371111466557692"
+ "092596172401951206117443077191868585496116051853795368595736"
+ "003882511620497061598923985774687093334185939744167238203676"
+ "453052472980823976562293117120372063945943890666325365061961"
+ "022928215929070357135085816756816486043117613837876554929621"
+ "856269743752885605649447338817178927896144473776360438797900"
+ "366212779802747593450564030114752479071739585723270865632758"
+ "495434839556211713523098602573445161475191311400514062427097"
+ "780117858230840648695846140902244217544683559565818359212130"
+ "972233447491583165728635513802591543441145939539353470970452"
+ "5536550715391.999",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ false,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ INFINITY),
+ TEST ("118973149535723176508575932662800707347995686986910214150118"
+ "685272271246896789803961473130416053705672050873552479421805"
+ "932646640744124594447361172514341324846716679654551308018400"
+ "452551246797021031695590308415421099521962856162050274568841"
+ "297915828747574343774874752902176710049525787625138678906010"
+ "048638212027057374683542842282633896097240913572043788690878"
+ "561421008447838407815393303366617352859876685151925036335142"
+ "606462825839541908847139311166770091872983498508632067665424"
+ "131663456011801988221011933744533095583591952713287509471572"
+ "005635584655570174753698625195967118200265238753375268656404"
+ "300638718932246773699829720984119713851462400809295266529707"
+ "450603039675996477317034685632764277790214944500590950459817"
+ "905458649624723235138950801408157339866516893477731877579183"
+ "713595679581558427625325833939652897845282019149923069371763"
+ "621014587926698827182969408373803807712292191282429102445352"
+ "493434039402290243933941906906661090602900960765874258303002"
+ "994639315656152078708796474719793763077934223746582725715380"
+ "546621026022818892467551940977566283266498758568504813830755"
+ "715585325649227824857891916443381390920079346240984072859876"
+ "394789650127468861490822526766717770136680743866932662343305"
+ "821821344306240809967537078707691232937387041140557168161956"
+ "672595323950666742010786584275766171661791973302251394804664"
+ "351065107886557299707326005651230394674710597929211000345040"
+ "748992483614253006562424867893567074606589931788062200063807"
+ "336740036940230215831403322125165368742446805152078682411506"
+ "081843753974005583111391605547148303480887461773984314393817"
+ "233328426227146997925421743280885595916487699461777590949432"
+ "536021389649845214065322016198143547250143861460313408300535"
+ "800647014276175548485543791298383644643679669618879907720347"
+ "361578030001247419574448359597988425487829219851305162204925"
+ "876422580754230478244492592334149461342828532046897137732862"
+ "560405101567370570895662663174689131741739602970845694214086"
+ "383402465037069569640956912385125748139813888875258203003486"
+ "978747055202810394072908580324008598756993885667142200558137"
+ "216665049755676940757442911860295559656788759871904662758651"
+ "106796978788783386988295123326864580419821595430891867179378"
+ "372968821128698879468814267529461494723425453808822356093436"
+ "114567635804621183162768389034017821036515461700163537265334"
+ "837042272659885702600247792917728828912373907035369136531164"
+ "551871575024551077026080114197652598224677403885378544255851"
+ "452142889211152237506343909351748731538683443195842912801950"
+ "740929058503113127929421291089844021925400931905939216271347"
+ "501989193058654389516377770771439860033940981826669939750630"
+ "966060749188986231404992238674933998516958950824840538996637"
+ "227947236848099456610159878061379742621311380927234118601003"
+ "068752002060437285024623575047782086630607224900910789188204"
+ "422115342157245494745974521832782208601602710639261482504706"
+ "793704189474198047840288064399210243702202724597107455534275"
+ "321401119382263147115748905050195256886082040192083380490209"
+ "648570353905656303876661710430922155024620842080323610266391"
+ "819853291160589645614945256684769911320943457402697573094119"
+ "430125589389298495428377185239916427991844172165080029177729"
+ "625180644077484441695092005844026411665118679537869781924378"
+ "377060887769389297625907410934020531742739577183152327119791"
+ "567636713426904553654134937766951789571845662564530364234831"
+ "655818811851573018210173773037253988893680153247404060131255"
+ "432297982534770778617218088583998040670598195597843579610890"
+ "315316606725381521608825464438386306376596459107591134507541"
+ "153403024199191222328259713530472683187873517955642380703639"
+ "029816037096049042094836437281075965243968431839386959736989"
+ "889027924230006904683050305965712585804355337311372959487108"
+ "794286031594805559334414767793211932142402860019029250966461"
+ "933621763149049802791695077716375242516443825235146860078555"
+ "453142397983479144560015010889077242726183149587493050950967"
+ "941488752366197740591478464591650201477772717579831983405962"
+ "171742164889284586217913115136227964861078958766284010901639"
+ "781256012341028188155836968476480842715858962105341815444164"
+ "696766584018508513610260777540911573496315580383328678958350"
+ "148157337222619548467971967434956296433870815461340134721800"
+ "205755114983399523323106573720732056659216468891205124203527"
+ "449961814733926916757607468806003312492414061695431041238453"
+ "023522795690830184799840657478014435335788410588338795921829"
+ "674102072285495410088727730494748054715270026371111466557692"
+ "092596172401951206117443077191868585496116051853795368595736"
+ "003882511620497061598923985774687093334185939744167238203676"
+ "453052472980823976562293117120372063945943890666325365061961"
+ "022928215929070357135085816756816486043117613837876554929621"
+ "856269743752885605649447338817178927896144473776360438797900"
+ "366212779802747593450564030114752479071739585723270865632758"
+ "495434839556211713523098602573445161475191311400514062427097"
+ "780117858230840648695846140902244217544683559565818359212130"
+ "972233447491583165728635513802591543441145939539353470970452"
+ "5536550715392",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ false,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ INFINITY),
+ TEST ("118973149535723176508575932662800707347995686986910214150118"
+ "685272271246896789803961473130416053705672050873552479421805"
+ "932646640744124594447361172514341324846716679654551308018400"
+ "452551246797021031695590308415421099521962856162050274568841"
+ "297915828747574343774874752902176710049525787625138678906010"
+ "048638212027057374683542842282633896097240913572043788690878"
+ "561421008447838407815393303366617352859876685151925036335142"
+ "606462825839541908847139311166770091872983498508632067665424"
+ "131663456011801988221011933744533095583591952713287509471572"
+ "005635584655570174753698625195967118200265238753375268656404"
+ "300638718932246773699829720984119713851462400809295266529707"
+ "450603039675996477317034685632764277790214944500590950459817"
+ "905458649624723235138950801408157339866516893477731877579183"
+ "713595679581558427625325833939652897845282019149923069371763"
+ "621014587926698827182969408373803807712292191282429102445352"
+ "493434039402290243933941906906661090602900960765874258303002"
+ "994639315656152078708796474719793763077934223746582725715380"
+ "546621026022818892467551940977566283266498758568504813830755"
+ "715585325649227824857891916443381390920079346240984072859876"
+ "394789650127468861490822526766717770136680743866932662343305"
+ "821821344306240809967537078707691232937387041140557168161956"
+ "672595323950666742010786584275766171661791973302251394804664"
+ "351065107886557299707326005651230394674710597929211000345040"
+ "748992483614253006562424867893567074606589931788062200063807"
+ "336740036940230215831403322125165368742446805152078682411506"
+ "081843753974005583111391605547148303480887461773984314393817"
+ "233328426227146997925421743280885595916487699461777590949432"
+ "536021389649845214065322016198143547250143861460313408300535"
+ "800647014276175548485543791298383644643679669618879907720347"
+ "361578030001247419574448359597988425487829219851305162204925"
+ "876422580754230478244492592334149461342828532046897137732862"
+ "560405101567370570895662663174689131741739602970845694214086"
+ "383402465037069569640956912385125748139813888875258203003486"
+ "978747055202810394072908580324008598756993885667142200558137"
+ "216665049755676940757442911860295559656788759871904662758651"
+ "106796978788783386988295123326864580419821595430891867179378"
+ "372968821128698879468814267529461494723425453808822356093436"
+ "114567635804621183162768389034017821036515461700163537265334"
+ "837042272659885702600247792917728828912373907035369136531164"
+ "551871575024551077026080114197652598224677403885378544255851"
+ "452142889211152237506343909351748731538683443195842912801950"
+ "740929058503113127929421291089844021925400931905939216271347"
+ "501989193058654389516377770771439860033940981826669939750630"
+ "966060749188986231404992238674933998516958950824840538996637"
+ "227947236848099456610159878061379742621311380927234118601003"
+ "068752002060437285024623575047782086630607224900910789188204"
+ "422115342157245494745974521832782208601602710639261482504706"
+ "793704189474198047840288064399210243702202724597107455534275"
+ "321401119382263147115748905050195256886082040192083380490209"
+ "648570353905656303876661710430922155024620842080323610266391"
+ "819853291160589645614945256684769911320943457402697573094119"
+ "430125589389298495428377185239916427991844172165080029177729"
+ "625180644077484441695092005844026411665118679537869781924378"
+ "377060887769389297625907410934020531742739577183152327119791"
+ "567636713426904553654134937766951789571845662564530364234831"
+ "655818811851573018210173773037253988893680153247404060131255"
+ "432297982534770778617218088583998040670598195597843579610890"
+ "315316606725381521608825464438386306376596459107591134507541"
+ "153403024199191222328259713530472683187873517955642380703639"
+ "029816037096049042094836437281075965243968431839386959736989"
+ "889027924230006904683050305965712585804355337311372959487108"
+ "794286031594805559334414767793211932142402860019029250966461"
+ "933621763149049802791695077716375242516443825235146860078555"
+ "453142397983479144560015010889077242726183149587493050950967"
+ "941488752366197740591478464591650201477772717579831983405962"
+ "171742164889284586217913115136227964861078958766284010901639"
+ "781256012341028188155836968476480842715858962105341815444164"
+ "696766584018508513610260777540911573496315580383328678958350"
+ "148157337222619548467971967434956296433870815461340134721800"
+ "205755114983399523323106573720732056659216468891205124203527"
+ "449961814733926916757607468806003312492414061695431041238453"
+ "023522795690830184799840657478014435335788410588338795921829"
+ "674102072285495410088727730494748054715270026371111466557692"
+ "092596172401951206117443077191868585496116051853795368595736"
+ "003882511620497061598923985774687093334185939744167238203676"
+ "453052472980823976562293117120372063945943890666325365061961"
+ "022928215929070357135085816756816486043117613837876554929621"
+ "856269743752885605649447338817178927896144473776360438797900"
+ "366212779802747593450564030114752479071739585723270865632758"
+ "495434839556211713523098602573445161475191311400514062427097"
+ "780117858230840648695846140902244217544683559565818359212130"
+ "972233447491583165728635513802591543441145939539353470970452"
+ "5536550715392.001",
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.fffffp+124f,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.ffffffffffff8p+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffp+16380L,
+ INFINITY,
+ false,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffcp+1020L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ INFINITY,
+ 0xf.fffffffffffffffffffffffffff8p+16380L,
+ INFINITY),
+ TEST ("-11897314953572317650857593266280070734799568698691021415011"
+ "868527227124689678980396147313041605370567205087355247942180"
+ "593264664074412459444736117251434132484671667965455130801840"
+ "045255124679702103169559030841542109952196285616205027456884"
+ "129791582874757434377487475290217671004952578762513867890601"
+ "004863821202705737468354284228263389609724091357204378869087"
+ "856142100844783840781539330336661735285987668515192503633514"
+ "260646282583954190884713931116677009187298349850863206766542"
+ "413166345601180198822101193374453309558359195271328750947157"
+ "200563558465557017475369862519596711820026523875337526865640"
+ "430063871893224677369982972098411971385146240080929526652970"
+ "745060303967599647731703468563276427779021494450059095045981"
+ "790545864962472323513895080140815733986651689347773187757918"
+ "371359567958155842762532583393965289784528201914992306937176"
+ "362101458792669882718296940837380380771229219128242910244535"
+ "249343403940229024393394190690666109060290096076587425830300"
+ "299463931565615207870879647471979376307793422374658272571538"
+ "054662102602281889246755194097756628326649875856850481383075"
+ "571558532564922782485789191644338139092007934624098407285987"
+ "639478965012746886149082252676671777013668074386693266234330"
+ "582182134430624080996753707870769123293738704114055716816195"
+ "667259532395066674201078658427576617166179197330225139480466"
+ "435106510788655729970732600565123039467471059792921100034504"
+ "074899248361425300656242486789356707460658993178806220006380"
+ "733674003694023021583140332212516536874244680515207868241150"
+ "608184375397400558311139160554714830348088746177398431439381"
+ "723332842622714699792542174328088559591648769946177759094943"
+ "253602138964984521406532201619814354725014386146031340830053"
+ "580064701427617554848554379129838364464367966961887990772034"
+ "736157803000124741957444835959798842548782921985130516220492"
+ "587642258075423047824449259233414946134282853204689713773286"
+ "256040510156737057089566266317468913174173960297084569421408"
+ "638340246503706956964095691238512574813981388887525820300348"
+ "697874705520281039407290858032400859875699388566714220055813"
+ "721666504975567694075744291186029555965678875987190466275865"
+ "110679697878878338698829512332686458041982159543089186717937"
+ "837296882112869887946881426752946149472342545380882235609343"
+ "611456763580462118316276838903401782103651546170016353726533"
+ "483704227265988570260024779291772882891237390703536913653116"
+ "455187157502455107702608011419765259822467740388537854425585"
+ "145214288921115223750634390935174873153868344319584291280195"
+ "074092905850311312792942129108984402192540093190593921627134"
+ "750198919305865438951637777077143986003394098182666993975063"
+ "096606074918898623140499223867493399851695895082484053899663"
+ "722794723684809945661015987806137974262131138092723411860100"
+ "306875200206043728502462357504778208663060722490091078918820"
+ "442211534215724549474597452183278220860160271063926148250470"
+ "679370418947419804784028806439921024370220272459710745553427"
+ "532140111938226314711574890505019525688608204019208338049020"
+ "964857035390565630387666171043092215502462084208032361026639"
+ "181985329116058964561494525668476991132094345740269757309411"
+ "943012558938929849542837718523991642799184417216508002917772"
+ "962518064407748444169509200584402641166511867953786978192437"
+ "837706088776938929762590741093402053174273957718315232711979"
+ "156763671342690455365413493776695178957184566256453036423483"
+ "165581881185157301821017377303725398889368015324740406013125"
+ "543229798253477077861721808858399804067059819559784357961089"
+ "031531660672538152160882546443838630637659645910759113450754"
+ "115340302419919122232825971353047268318787351795564238070363"
+ "902981603709604904209483643728107596524396843183938695973698"
+ "988902792423000690468305030596571258580435533731137295948710"
+ "879428603159480555933441476779321193214240286001902925096646"
+ "193362176314904980279169507771637524251644382523514686007855"
+ "545314239798347914456001501088907724272618314958749305095096"
+ "794148875236619774059147846459165020147777271757983198340596"
+ "217174216488928458621791311513622796486107895876628401090163"
+ "978125601234102818815583696847648084271585896210534181544416"
+ "469676658401850851361026077754091157349631558038332867895835"
+ "014815733722261954846797196743495629643387081546134013472180"
+ "020575511498339952332310657372073205665921646889120512420352"
+ "744996181473392691675760746880600331249241406169543104123845"
+ "302352279569083018479984065747801443533578841058833879592182"
+ "967410207228549541008872773049474805471527002637111146655769"
+ "209259617240195120611744307719186858549611605185379536859573"
+ "600388251162049706159892398577468709333418593974416723820367"
+ "645305247298082397656229311712037206394594389066632536506196"
+ "102292821592907035713508581675681648604311761383787655492962"
+ "185626974375288560564944733881717892789614447377636043879790"
+ "036621277980274759345056403011475247907173958572327086563275"
+ "849543483955621171352309860257344516147519131140051406242709"
+ "778011785823084064869584614090224421754468355956581835921213"
+ "097223344749158316572863551380259154344114593953935347097045"
+ "25536550715391.999",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ false,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffff8p+16380L,
+ -0xf.fffffffffffffffffffffffffff8p+16380L,
+ -0xf.fffffffffffffffffffffffffff8p+16380L),
+ TEST ("-11897314953572317650857593266280070734799568698691021415011"
+ "868527227124689678980396147313041605370567205087355247942180"
+ "593264664074412459444736117251434132484671667965455130801840"
+ "045255124679702103169559030841542109952196285616205027456884"
+ "129791582874757434377487475290217671004952578762513867890601"
+ "004863821202705737468354284228263389609724091357204378869087"
+ "856142100844783840781539330336661735285987668515192503633514"
+ "260646282583954190884713931116677009187298349850863206766542"
+ "413166345601180198822101193374453309558359195271328750947157"
+ "200563558465557017475369862519596711820026523875337526865640"
+ "430063871893224677369982972098411971385146240080929526652970"
+ "745060303967599647731703468563276427779021494450059095045981"
+ "790545864962472323513895080140815733986651689347773187757918"
+ "371359567958155842762532583393965289784528201914992306937176"
+ "362101458792669882718296940837380380771229219128242910244535"
+ "249343403940229024393394190690666109060290096076587425830300"
+ "299463931565615207870879647471979376307793422374658272571538"
+ "054662102602281889246755194097756628326649875856850481383075"
+ "571558532564922782485789191644338139092007934624098407285987"
+ "639478965012746886149082252676671777013668074386693266234330"
+ "582182134430624080996753707870769123293738704114055716816195"
+ "667259532395066674201078658427576617166179197330225139480466"
+ "435106510788655729970732600565123039467471059792921100034504"
+ "074899248361425300656242486789356707460658993178806220006380"
+ "733674003694023021583140332212516536874244680515207868241150"
+ "608184375397400558311139160554714830348088746177398431439381"
+ "723332842622714699792542174328088559591648769946177759094943"
+ "253602138964984521406532201619814354725014386146031340830053"
+ "580064701427617554848554379129838364464367966961887990772034"
+ "736157803000124741957444835959798842548782921985130516220492"
+ "587642258075423047824449259233414946134282853204689713773286"
+ "256040510156737057089566266317468913174173960297084569421408"
+ "638340246503706956964095691238512574813981388887525820300348"
+ "697874705520281039407290858032400859875699388566714220055813"
+ "721666504975567694075744291186029555965678875987190466275865"
+ "110679697878878338698829512332686458041982159543089186717937"
+ "837296882112869887946881426752946149472342545380882235609343"
+ "611456763580462118316276838903401782103651546170016353726533"
+ "483704227265988570260024779291772882891237390703536913653116"
+ "455187157502455107702608011419765259822467740388537854425585"
+ "145214288921115223750634390935174873153868344319584291280195"
+ "074092905850311312792942129108984402192540093190593921627134"
+ "750198919305865438951637777077143986003394098182666993975063"
+ "096606074918898623140499223867493399851695895082484053899663"
+ "722794723684809945661015987806137974262131138092723411860100"
+ "306875200206043728502462357504778208663060722490091078918820"
+ "442211534215724549474597452183278220860160271063926148250470"
+ "679370418947419804784028806439921024370220272459710745553427"
+ "532140111938226314711574890505019525688608204019208338049020"
+ "964857035390565630387666171043092215502462084208032361026639"
+ "181985329116058964561494525668476991132094345740269757309411"
+ "943012558938929849542837718523991642799184417216508002917772"
+ "962518064407748444169509200584402641166511867953786978192437"
+ "837706088776938929762590741093402053174273957718315232711979"
+ "156763671342690455365413493776695178957184566256453036423483"
+ "165581881185157301821017377303725398889368015324740406013125"
+ "543229798253477077861721808858399804067059819559784357961089"
+ "031531660672538152160882546443838630637659645910759113450754"
+ "115340302419919122232825971353047268318787351795564238070363"
+ "902981603709604904209483643728107596524396843183938695973698"
+ "988902792423000690468305030596571258580435533731137295948710"
+ "879428603159480555933441476779321193214240286001902925096646"
+ "193362176314904980279169507771637524251644382523514686007855"
+ "545314239798347914456001501088907724272618314958749305095096"
+ "794148875236619774059147846459165020147777271757983198340596"
+ "217174216488928458621791311513622796486107895876628401090163"
+ "978125601234102818815583696847648084271585896210534181544416"
+ "469676658401850851361026077754091157349631558038332867895835"
+ "014815733722261954846797196743495629643387081546134013472180"
+ "020575511498339952332310657372073205665921646889120512420352"
+ "744996181473392691675760746880600331249241406169543104123845"
+ "302352279569083018479984065747801443533578841058833879592182"
+ "967410207228549541008872773049474805471527002637111146655769"
+ "209259617240195120611744307719186858549611605185379536859573"
+ "600388251162049706159892398577468709333418593974416723820367"
+ "645305247298082397656229311712037206394594389066632536506196"
+ "102292821592907035713508581675681648604311761383787655492962"
+ "185626974375288560564944733881717892789614447377636043879790"
+ "036621277980274759345056403011475247907173958572327086563275"
+ "849543483955621171352309860257344516147519131140051406242709"
+ "778011785823084064869584614090224421754468355956581835921213"
+ "097223344749158316572863551380259154344114593953935347097045"
+ "25536550715392",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ false,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffff8p+16380L,
+ -0xf.fffffffffffffffffffffffffff8p+16380L),
+ TEST ("-11897314953572317650857593266280070734799568698691021415011"
+ "868527227124689678980396147313041605370567205087355247942180"
+ "593264664074412459444736117251434132484671667965455130801840"
+ "045255124679702103169559030841542109952196285616205027456884"
+ "129791582874757434377487475290217671004952578762513867890601"
+ "004863821202705737468354284228263389609724091357204378869087"
+ "856142100844783840781539330336661735285987668515192503633514"
+ "260646282583954190884713931116677009187298349850863206766542"
+ "413166345601180198822101193374453309558359195271328750947157"
+ "200563558465557017475369862519596711820026523875337526865640"
+ "430063871893224677369982972098411971385146240080929526652970"
+ "745060303967599647731703468563276427779021494450059095045981"
+ "790545864962472323513895080140815733986651689347773187757918"
+ "371359567958155842762532583393965289784528201914992306937176"
+ "362101458792669882718296940837380380771229219128242910244535"
+ "249343403940229024393394190690666109060290096076587425830300"
+ "299463931565615207870879647471979376307793422374658272571538"
+ "054662102602281889246755194097756628326649875856850481383075"
+ "571558532564922782485789191644338139092007934624098407285987"
+ "639478965012746886149082252676671777013668074386693266234330"
+ "582182134430624080996753707870769123293738704114055716816195"
+ "667259532395066674201078658427576617166179197330225139480466"
+ "435106510788655729970732600565123039467471059792921100034504"
+ "074899248361425300656242486789356707460658993178806220006380"
+ "733674003694023021583140332212516536874244680515207868241150"
+ "608184375397400558311139160554714830348088746177398431439381"
+ "723332842622714699792542174328088559591648769946177759094943"
+ "253602138964984521406532201619814354725014386146031340830053"
+ "580064701427617554848554379129838364464367966961887990772034"
+ "736157803000124741957444835959798842548782921985130516220492"
+ "587642258075423047824449259233414946134282853204689713773286"
+ "256040510156737057089566266317468913174173960297084569421408"
+ "638340246503706956964095691238512574813981388887525820300348"
+ "697874705520281039407290858032400859875699388566714220055813"
+ "721666504975567694075744291186029555965678875987190466275865"
+ "110679697878878338698829512332686458041982159543089186717937"
+ "837296882112869887946881426752946149472342545380882235609343"
+ "611456763580462118316276838903401782103651546170016353726533"
+ "483704227265988570260024779291772882891237390703536913653116"
+ "455187157502455107702608011419765259822467740388537854425585"
+ "145214288921115223750634390935174873153868344319584291280195"
+ "074092905850311312792942129108984402192540093190593921627134"
+ "750198919305865438951637777077143986003394098182666993975063"
+ "096606074918898623140499223867493399851695895082484053899663"
+ "722794723684809945661015987806137974262131138092723411860100"
+ "306875200206043728502462357504778208663060722490091078918820"
+ "442211534215724549474597452183278220860160271063926148250470"
+ "679370418947419804784028806439921024370220272459710745553427"
+ "532140111938226314711574890505019525688608204019208338049020"
+ "964857035390565630387666171043092215502462084208032361026639"
+ "181985329116058964561494525668476991132094345740269757309411"
+ "943012558938929849542837718523991642799184417216508002917772"
+ "962518064407748444169509200584402641166511867953786978192437"
+ "837706088776938929762590741093402053174273957718315232711979"
+ "156763671342690455365413493776695178957184566256453036423483"
+ "165581881185157301821017377303725398889368015324740406013125"
+ "543229798253477077861721808858399804067059819559784357961089"
+ "031531660672538152160882546443838630637659645910759113450754"
+ "115340302419919122232825971353047268318787351795564238070363"
+ "902981603709604904209483643728107596524396843183938695973698"
+ "988902792423000690468305030596571258580435533731137295948710"
+ "879428603159480555933441476779321193214240286001902925096646"
+ "193362176314904980279169507771637524251644382523514686007855"
+ "545314239798347914456001501088907724272618314958749305095096"
+ "794148875236619774059147846459165020147777271757983198340596"
+ "217174216488928458621791311513622796486107895876628401090163"
+ "978125601234102818815583696847648084271585896210534181544416"
+ "469676658401850851361026077754091157349631558038332867895835"
+ "014815733722261954846797196743495629643387081546134013472180"
+ "020575511498339952332310657372073205665921646889120512420352"
+ "744996181473392691675760746880600331249241406169543104123845"
+ "302352279569083018479984065747801443533578841058833879592182"
+ "967410207228549541008872773049474805471527002637111146655769"
+ "209259617240195120611744307719186858549611605185379536859573"
+ "600388251162049706159892398577468709333418593974416723820367"
+ "645305247298082397656229311712037206394594389066632536506196"
+ "102292821592907035713508581675681648604311761383787655492962"
+ "185626974375288560564944733881717892789614447377636043879790"
+ "036621277980274759345056403011475247907173958572327086563275"
+ "849543483955621171352309860257344516147519131140051406242709"
+ "778011785823084064869584614090224421754468355956581835921213"
+ "097223344749158316572863551380259154344114593953935347097045"
+ "25536550715392.001",
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffp+124f,
+ -0xf.fffffp+124f,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020,
+ -0xf.ffffffffffff8p+1020,
+ -INFINITY,
+ -INFINITY,
+ -0xf.ffffffffffff8p+1020L,
+ -0xf.ffffffffffff8p+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffp+16380L,
+ -0xf.fffffffffffffffp+16380L,
+ false,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -0xf.fffffffffffffffffffffffffcp+1020L,
+ -INFINITY,
+ -INFINITY,
+ -0xf.fffffffffffffffffffffffffff8p+16380L,
+ -0xf.fffffffffffffffffffffffffff8p+16380L),
+ TEST ("2.1019476964872256063855943749348741969203929128147736576356"
+ "0242583468662402879090222995728254318237304687499e-45",
+ 0x8p-152f,
+ 0x8p-152f,
+ 0x8p-152f,
+ 0x1p-148f,
+ 0xb.ffffffffffff8p-152,
+ 0xcp-152,
+ 0xb.ffffffffffff8p-152,
+ 0xcp-152,
+ 0xb.ffffffffffff8p-152L,
+ 0xcp-152L,
+ 0xb.ffffffffffff8p-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffp-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffp-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffp-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffp-152L,
+ 0xcp-152L,
+ false,
+ 0xb.fffffffffffffffffffffffffcp-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffffffffffffcp-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffffffffffffff8p-152L,
+ 0xcp-152L,
+ 0xb.fffffffffffffffffffffffffff8p-152L,
+ 0xcp-152L),
+ TEST ("2.1019476964872256063855943749348741969203929128147736576356"
+ "02425834686624028790902229957282543182373046875e-45",
+ 0x8p-152f,
+ 0x1p-148f,
+ 0x8p-152f,
+ 0x1p-148f,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ true,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L),
+ TEST ("2.1019476964872256063855943749348741969203929128147736576356"
+ "0242583468662402879090222995728254318237304687501e-45",
+ 0x8p-152f,
+ 0x1p-148f,
+ 0x8p-152f,
+ 0x1p-148f,
+ 0xcp-152,
+ 0xcp-152,
+ 0xcp-152,
+ 0xc.0000000000008p-152,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xc.0000000000008p-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xc.000000000000001p-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xc.000000000000001p-152L,
+ false,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xc.00000000000000000000000004p-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xcp-152L,
+ 0xc.0000000000000000000000000008p-152L),
+ TEST ("-2.101947696487225606385594374934874196920392912814773657635"
+ "60242583468662402879090222995728254318237304687499e-45",
+ -0x1p-148f,
+ -0x8p-152f,
+ -0x8p-152f,
+ -0x8p-152f,
+ -0xcp-152,
+ -0xcp-152,
+ -0xb.ffffffffffff8p-152,
+ -0xb.ffffffffffff8p-152,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xb.ffffffffffff8p-152L,
+ -0xb.ffffffffffff8p-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xb.fffffffffffffffp-152L,
+ -0xb.fffffffffffffffp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xb.fffffffffffffffp-152L,
+ -0xb.fffffffffffffffp-152L,
+ false,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xb.fffffffffffffffffffffffffcp-152L,
+ -0xb.fffffffffffffffffffffffffcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xb.fffffffffffffffffffffffffff8p-152L,
+ -0xb.fffffffffffffffffffffffffff8p-152L),
+ TEST ("-2.101947696487225606385594374934874196920392912814773657635"
+ "602425834686624028790902229957282543182373046875e-45",
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x8p-152f,
+ -0x8p-152f,
+ -0xcp-152,
+ -0xcp-152,
+ -0xcp-152,
+ -0xcp-152,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ true,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L),
+ TEST ("-2.101947696487225606385594374934874196920392912814773657635"
+ "60242583468662402879090222995728254318237304687501e-45",
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x8p-152f,
+ -0x8p-152f,
+ -0xc.0000000000008p-152,
+ -0xcp-152,
+ -0xcp-152,
+ -0xcp-152,
+ -0xc.0000000000008p-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xc.000000000000001p-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xc.000000000000001p-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ false,
+ -0xc.00000000000000000000000004p-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xc.0000000000000000000000000008p-152L,
+ -0xcp-152L,
+ -0xcp-152L,
+ -0xcp-152L),
+ TEST ("3.5032461608120426773093239582247903282006548546912894293926"
+ "7070972447770671465150371659547090530395507812499e-45",
+ 0x1p-148f,
+ 0x1p-148f,
+ 0x1p-148f,
+ 0x1.8p-148f,
+ 0x1.3ffffffffffffp-148,
+ 0x1.4p-148,
+ 0x1.3ffffffffffffp-148,
+ 0x1.4p-148,
+ 0x1.3ffffffffffffp-148L,
+ 0x1.4p-148L,
+ 0x1.3ffffffffffffp-148L,
+ 0x1.4p-148L,
+ 0x1.3ffffffffffffffep-148L,
+ 0x1.4p-148L,
+ 0x1.3ffffffffffffffep-148L,
+ 0x1.4p-148L,
+ 0x1.3ffffffffffffffep-148L,
+ 0x1.4p-148L,
+ 0x1.3ffffffffffffffep-148L,
+ 0x1.4p-148L,
+ false,
+ 0x1.3fffffffffffffffffffffffff8p-148L,
+ 0x1.4p-148L,
+ 0x1.3fffffffffffffffffffffffff8p-148L,
+ 0x1.4p-148L,
+ 0x1.3fffffffffffffffffffffffffffp-148L,
+ 0x1.4p-148L,
+ 0x1.3fffffffffffffffffffffffffffp-148L,
+ 0x1.4p-148L),
+ TEST ("3.5032461608120426773093239582247903282006548546912894293926"
+ "70709724477706714651503716595470905303955078125e-45",
+ 0x1p-148f,
+ 0x1p-148f,
+ 0x1p-148f,
+ 0x1.8p-148f,
+ 0x1.4p-148,
+ 0x1.4p-148,
+ 0x1.4p-148,
+ 0x1.4p-148,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ true,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L),
+ TEST ("3.5032461608120426773093239582247903282006548546912894293926"
+ "7070972447770671465150371659547090530395507812501e-45",
+ 0x1p-148f,
+ 0x1.8p-148f,
+ 0x1p-148f,
+ 0x1.8p-148f,
+ 0x1.4p-148,
+ 0x1.4p-148,
+ 0x1.4p-148,
+ 0x1.4000000000001p-148,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4000000000001p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4000000000000002p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4000000000000002p-148L,
+ false,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.400000000000000000000000008p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4p-148L,
+ 0x1.4000000000000000000000000001p-148L),
+ TEST ("-3.503246160812042677309323958224790328200654854691289429392"
+ "67070972447770671465150371659547090530395507812499e-45",
+ -0x1.8p-148f,
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x1.4p-148,
+ -0x1.4p-148,
+ -0x1.3ffffffffffffp-148,
+ -0x1.3ffffffffffffp-148,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.3ffffffffffffp-148L,
+ -0x1.3ffffffffffffp-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.3ffffffffffffffep-148L,
+ -0x1.3ffffffffffffffep-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.3ffffffffffffffep-148L,
+ -0x1.3ffffffffffffffep-148L,
+ false,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.3fffffffffffffffffffffffff8p-148L,
+ -0x1.3fffffffffffffffffffffffff8p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.3fffffffffffffffffffffffffffp-148L,
+ -0x1.3fffffffffffffffffffffffffffp-148L),
+ TEST ("-3.503246160812042677309323958224790328200654854691289429392"
+ "670709724477706714651503716595470905303955078125e-45",
+ -0x1.8p-148f,
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x1.4p-148,
+ -0x1.4p-148,
+ -0x1.4p-148,
+ -0x1.4p-148,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ true,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L),
+ TEST ("-3.503246160812042677309323958224790328200654854691289429392"
+ "67070972447770671465150371659547090530395507812501e-45",
+ -0x1.8p-148f,
+ -0x1.8p-148f,
+ -0x1p-148f,
+ -0x1p-148f,
+ -0x1.4000000000001p-148,
+ -0x1.4p-148,
+ -0x1.4p-148,
+ -0x1.4p-148,
+ -0x1.4000000000001p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4000000000000002p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4000000000000002p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ false,
+ -0x1.400000000000000000000000008p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4000000000000000000000000001p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L,
+ -0x1.4p-148L),
+ TEST ("7.4109846876186981626485318930233205854758970392148714663837"
+ "852375101326090531312779794975454245398856969484704316857659"
+ "638998506553390969459816219401617281718945106978546710679176"
+ "872575177347315553307795408549809608457500958111373034747658"
+ "096871009590975442271004757307809711118935784838675653998783"
+ "503015228055934046593739791790738723868299395818481660169122"
+ "019456499931289798411362062484498678713572180352209017023903"
+ "285791732520220528974020802906854021606612375549983402671300"
+ "035812486479041385743401875520901590172592547146296175134159"
+ "774938718574737870961645638908718119841271673056017045493004"
+ "705269590165763776884908267986972573366521765567941072508764"
+ "337560846003984904972149117463085539556354188641513168478436"
+ "31308023759629577398300170898437499e-324",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x4p-1076,
+ 0x4p-1076,
+ 0x4p-1076,
+ 0x8p-1076,
+ 0x4p-1076L,
+ 0x4p-1076L,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x5.fffffffffffffff8p-1076L,
+ 0x6p-1076L,
+ 0x5.fffffffffffffff8p-1076L,
+ 0x6p-1076L,
+ 0x5.fffffffffffffff8p-1076L,
+ 0x6p-1076L,
+ 0x5.fffffffffffffff8p-1076L,
+ 0x6p-1076L,
+ false,
+ 0x4p-1076L,
+ 0x4p-1076L,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x5.fffffffffffffffffffffffffffcp-1076L,
+ 0x6p-1076L,
+ 0x5.fffffffffffffffffffffffffffcp-1076L,
+ 0x6p-1076L),
+ TEST ("7.4109846876186981626485318930233205854758970392148714663837"
+ "852375101326090531312779794975454245398856969484704316857659"
+ "638998506553390969459816219401617281718945106978546710679176"
+ "872575177347315553307795408549809608457500958111373034747658"
+ "096871009590975442271004757307809711118935784838675653998783"
+ "503015228055934046593739791790738723868299395818481660169122"
+ "019456499931289798411362062484498678713572180352209017023903"
+ "285791732520220528974020802906854021606612375549983402671300"
+ "035812486479041385743401875520901590172592547146296175134159"
+ "774938718574737870961645638908718119841271673056017045493004"
+ "705269590165763776884908267986972573366521765567941072508764"
+ "337560846003984904972149117463085539556354188641513168478436"
+ "313080237596295773983001708984375e-324",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x4p-1076,
+ 0x8p-1076,
+ 0x4p-1076,
+ 0x8p-1076,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ true,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L),
+ TEST ("7.4109846876186981626485318930233205854758970392148714663837"
+ "852375101326090531312779794975454245398856969484704316857659"
+ "638998506553390969459816219401617281718945106978546710679176"
+ "872575177347315553307795408549809608457500958111373034747658"
+ "096871009590975442271004757307809711118935784838675653998783"
+ "503015228055934046593739791790738723868299395818481660169122"
+ "019456499931289798411362062484498678713572180352209017023903"
+ "285791732520220528974020802906854021606612375549983402671300"
+ "035812486479041385743401875520901590172592547146296175134159"
+ "774938718574737870961645638908718119841271673056017045493004"
+ "705269590165763776884908267986972573366521765567941072508764"
+ "337560846003984904972149117463085539556354188641513168478436"
+ "31308023759629577398300170898437501e-324",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x4p-1076,
+ 0x8p-1076,
+ 0x4p-1076,
+ 0x8p-1076,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6.0000000000000008p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6.0000000000000008p-1076L,
+ false,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x4p-1076L,
+ 0x8p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6p-1076L,
+ 0x6.0000000000000000000000000004p-1076L),
+ TEST ("-7.410984687618698162648531893023320585475897039214871466383"
+ "785237510132609053131277979497545424539885696948470431685765"
+ "963899850655339096945981621940161728171894510697854671067917"
+ "687257517734731555330779540854980960845750095811137303474765"
+ "809687100959097544227100475730780971111893578483867565399878"
+ "350301522805593404659373979179073872386829939581848166016912"
+ "201945649993128979841136206248449867871357218035220901702390"
+ "328579173252022052897402080290685402160661237554998340267130"
+ "003581248647904138574340187552090159017259254714629617513415"
+ "977493871857473787096164563890871811984127167305601704549300"
+ "470526959016576377688490826798697257336652176556794107250876"
+ "433756084600398490497214911746308553955635418864151316847843"
+ "631308023759629577398300170898437499e-324",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x8p-1076,
+ -0x4p-1076,
+ -0x4p-1076,
+ -0x4p-1076,
+ -0x8p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x5.fffffffffffffff8p-1076L,
+ -0x5.fffffffffffffff8p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x5.fffffffffffffff8p-1076L,
+ -0x5.fffffffffffffff8p-1076L,
+ false,
+ -0x8p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x5.fffffffffffffffffffffffffffcp-1076L,
+ -0x5.fffffffffffffffffffffffffffcp-1076L),
+ TEST ("-7.410984687618698162648531893023320585475897039214871466383"
+ "785237510132609053131277979497545424539885696948470431685765"
+ "963899850655339096945981621940161728171894510697854671067917"
+ "687257517734731555330779540854980960845750095811137303474765"
+ "809687100959097544227100475730780971111893578483867565399878"
+ "350301522805593404659373979179073872386829939581848166016912"
+ "201945649993128979841136206248449867871357218035220901702390"
+ "328579173252022052897402080290685402160661237554998340267130"
+ "003581248647904138574340187552090159017259254714629617513415"
+ "977493871857473787096164563890871811984127167305601704549300"
+ "470526959016576377688490826798697257336652176556794107250876"
+ "433756084600398490497214911746308553955635418864151316847843"
+ "6313080237596295773983001708984375e-324",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x8p-1076,
+ -0x8p-1076,
+ -0x4p-1076,
+ -0x4p-1076,
+ -0x8p-1076L,
+ -0x8p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ true,
+ -0x8p-1076L,
+ -0x8p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L),
+ TEST ("-7.410984687618698162648531893023320585475897039214871466383"
+ "785237510132609053131277979497545424539885696948470431685765"
+ "963899850655339096945981621940161728171894510697854671067917"
+ "687257517734731555330779540854980960845750095811137303474765"
+ "809687100959097544227100475730780971111893578483867565399878"
+ "350301522805593404659373979179073872386829939581848166016912"
+ "201945649993128979841136206248449867871357218035220901702390"
+ "328579173252022052897402080290685402160661237554998340267130"
+ "003581248647904138574340187552090159017259254714629617513415"
+ "977493871857473787096164563890871811984127167305601704549300"
+ "470526959016576377688490826798697257336652176556794107250876"
+ "433756084600398490497214911746308553955635418864151316847843"
+ "631308023759629577398300170898437501e-324",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x8p-1076,
+ -0x8p-1076,
+ -0x4p-1076,
+ -0x4p-1076,
+ -0x8p-1076L,
+ -0x8p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x6.0000000000000008p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6.0000000000000008p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ false,
+ -0x8p-1076L,
+ -0x8p-1076L,
+ -0x4p-1076L,
+ -0x4p-1076L,
+ -0x6.0000000000000000000000000004p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L,
+ -0x6p-1076L),
+ TEST ("5.4677992978237119037926089004291297245985762235403450155814"
+ "707305425575329500966052143410629387408077958710210208052966"
+ "529504784489330482549602621133847135082257338717668975178538"
+ "378957084503396349323438489751160934104796903302909028868611"
+ "999312592165232778075745690821530731336739429587895774023213"
+ "939331012985331912661021188896306095323395084578542200319963"
+ "179359407180003251440084380484161504585462684082946932782829"
+ "488183829817567452314437076943950532707791252404699268678810"
+ "198502871250235796855577909830559749628817599194837522029036"
+ "891995648803056846354520653635957919882905363521007017169741"
+ "463296044392266269433408052686419017699718627761948763856040"
+ "592690841721239300491445991666051031755802326720329666454066"
+ "568630314348735511753639418257984253319063825247065727664852"
+ "328745422305642626091617823968872438962470092440688372515677"
+ "832232712866924800106797113478024083516199991991274936894113"
+ "006233377518471389394984262004503058455485659100090665241525"
+ "454803628182902241401701783637353179296850056973639305945938"
+ "813428953287892593620291195986011128990061888798763718548789"
+ "025717537674780281005583347165047846045925077914824515331335"
+ "131286063574407181821236377907693209224423490663289916878620"
+ "725507793163931390372011875799729330162278748985052557432333"
+ "005334989519381566364065326138465761456173231416844807264090"
+ "741841972247545424908843928136253653308813487994328446248389"
+ "608261444391573619177442907290731163188581917588219420107047"
+ "265367485141413919810885909689112244064797106324295291545892"
+ "937991321479061743491490060940946128274533657682130125169586"
+ "930571899403551122506297763180795732325134340989331155893724"
+ "289358918212707392997768032299997207208451112971425779939507"
+ "837165263255764268971211819536322993221774123134726665579460"
+ "265871378186589562858761835613344584269098062275786969729830"
+ "545786485401407774313414954958161677096004701941411411592755"
+ "485864471870515173326244464631295701572087440183178339987662"
+ "926763241220698078822661709054601073523477544653542795020468"
+ "256078409306409100874886828781860529824879343987945751252081"
+ "314345990313550683792348814627862441324030155730592166581251"
+ "009922787324590431548734575328663628650380722603024383412564"
+ "651446272117561042207738413114131099731016728935023152239431"
+ "311619533848376583687509108453086730196255111695352464186678"
+ "221927564757730319825223049341618853631333478241227227268084"
+ "583396688436229936266854011427192767039363517491659523133852"
+ "472534104124441112346615696891097070121463652258681270378076"
+ "538381697594264658479637863087159293838880752928175545408262"
+ "813403793568695416998388572304528748824756265665683890518422"
+ "696169422338806137532304784682662448207928681740476188343739"
+ "117833525916386815135793034906806117413105008719197882837614"
+ "738262050320291539494104952056471606645482046176634075459021"
+ "552555959590354956262127809953013679512507451424271839221946"
+ "794056861055980558363033732905772356986051180966474116423192"
+ "194741572438649215204229781279620370445373851348786918527399"
+ "785630808242657122705381806661616271132182017797793661244078"
+ "445747547535623384548769818529655539279036503234072455810991"
+ "588075181817695975173110136482659854557506203058080551018873"
+ "203138260451109855100526720073566126209666125604482413705611"
+ "996796777927332827103568863352291499261312290355143742018042"
+ "254470707107847293593205234049774839191754781030496978091006"
+ "099559675240966730110167624903610656473267105556155633783594"
+ "089546261107653110531808279445757724399186120387548675148632"
+ "176049190701680305210224388072261974806791922636412897526952"
+ "793677946622674149577084803568051242934076450942927092705684"
+ "547042915490323112457971853658760725588190377666477106903106"
+ "693847278847646032201293023329503348730723947218797410452333"
+ "910847913892827195814551858335519518939031446093385329182820"
+ "714173657946661746005901866885589732922652604573972842197231"
+ "187365263381958925227970038358064987248233271706462687651143"
+ "350472018043321314534759819524203308490914358596886150053406"
+ "629512434788155355109100540319857813535695923273426256911552"
+ "977539394209918630668466632881929661971212772444625151371953"
+ "428875491139683919687008724010475217255347915698820960215217"
+ "257390308560235323463096946442080548018754166369706161589705"
+ "215873687166365628787796501470056870127729464714362172216802"
+ "441045276911597009443281135389729130222603185665646434661947"
+ "627628077723219376892727386120519287577405410510114936151502"
+ "752997122750262781911372625997223415283516995479265631485799"
+ "456782561734766648462849641064097181818204279498552827825384"
+ "186202065516999362573388136163077477126602169410435905014077"
+ "049808497409025369325795765272066650278004200357878990911374"
+ "982857977108488482528354406313893864211497105765030504600982"
+ "253488805474531798742143374465080240030582370086699167937651"
+ "038307909706139327119325418854546478285735654541635477790346"
+ "964782617354265050767878335230272194896680141986745074630225"
+ "893106573559558843545841186025169531604151588481389164948914"
+ "823593944287133336263680358191369540321930649824471425485137"
+ "777984823525402115151171093313613251350685343824859052220126"
+ "891551966018355920872775724807128769003243129486808733796350"
+ "497668255116485157191011858830643898323628223472099280243583"
+ "164434348347014910398004439821970508280440872759395827943270"
+ "985008769143562351938091476215083548164137333541883808870019"
+ "116234099013452929807950151652297436436006149684939775781234"
+ "660954156154478642694176038524277810483833149798681345708089"
+ "152179193979463169402340611793486272301808073267534612685593"
+ "859596787866884211031341417903391749825320454663508370385251"
+ "831778477311017089729361152161928815389818579983544490982891"
+ "734081131312309744330960666031291451740885503458543884956367"
+ "654943799264600314531815427932691107874782328654759293575803"
+ "481929361961781073958502075438499070633193799699311694287183"
+ "299423475339817655608058724723221867087563064557636112380829"
+ "514501382073257737022472866608244164310385205213523702910787"
+ "182472517125030106491031844871593141759729773907719510044049"
+ "352857426592936763727969496103940591601975078602859660478614"
+ "119405428212830134490731706220583788265344728818766885126977"
+ "588151111984290444321648931907188080336064713873288834096229"
+ "203276676119810521851726133377700616341304257822975788967472"
+ "152742255041912584197045423031298506219011800240120182445838"
+ "590696647416285334515631019799007515682004250060857020904012"
+ "215375170479800482680554499806010766109655061507421747722461"
+ "180617361402575082294678925605271083587897845390768226405648"
+ "508518103525778638618195775128516073959272990148239415346263"
+ "486966573934577450787243667063244378381883115827207605856174"
+ "876350045086885320626669331311880593775916269643646395423220"
+ "549940790476989709243027420158390806135690975149384714684219"
+ "964938182719962913931464979458639185519531490009437619838306"
+ "362365453754807654884704163490469296444427144778593725687358"
+ "437087390151990694667516279202024332494828210657618261952038"
+ "597230263799412584275851667403910657370879707181053365818502"
+ "680037431560091209982641738995652793235851569372314130107647"
+ "166085235615697257094269133100914135783178856280392139325001"
+ "352841718610484616627448189556913621837791650699820323059708"
+ "766420810133584841826718631681683381743511974264126250984214"
+ "812397119978273917903889865891718836792263377888052458189238"
+ "746074986456016681098722869419588274020181430652732817858728"
+ "473849369539367463917171317324882099804999043054467247785592"
+ "038464723442276239896066431580123756428540074945472427752568"
+ "981171400621705853374875885943072600692576914790467205905272"
+ "372594740187988081900317493185005142913607163380720069786786"
+ "782095331840893694073778325119471833528492917081008547303414"
+ "509381563617864195257751546539575461435803625993888325647883"
+ "541039192368366987400263049681218831477776345118518503709588"
+ "840859023379762456561030683928115349942393963185677123055324"
+ "771693784214924931737043793679546051454845624150270955450608"
+ "318747395755728950832754611277041359602301205138509175543313"
+ "522772786504141007552691902249572375175731740923618769197304"
+ "652898352694386665448260033458575323252814233868098279476166"
+ "764258284911434288072243178941698347365985427696983129579496"
+ "059032032841281149923518087084876885114369033227736521245740"
+ "554711771423492719899982357711910225545480424688322195336240"
+ "492253136281857837808491795993788199125205555222116581071134"
+ "476787468430539307909617442106685159519071053844987343666452"
+ "494280317720153567054364117244775141336558406098548803924509"
+ "496052261825198043140272655303625315605326569530252885854991"
+ "822289219201218313590745412010446642247111703901991591338062"
+ "693320157180618736569439969283245279430312651192668788340033"
+ "626825194260296262959884258597703584888770801961209652822982"
+ "322376122303586169861685106043820510444293432856251210395693"
+ "261264867823980172683352796141772210301725997652373804152525"
+ "037162852291403804455997331367378463632437773242905518075065"
+ "414724295857460288225400061608664961649196400079359622673770"
+ "607898395269075056596627116148289491042491764170924014885106"
+ "158235482774778418134123293974436877051995673618683751115353"
+ "808771434984204447736174758316063096245047311279841579995578"
+ "186609402864244042751443128536278453430633423118662852688374"
+ "229600894418958824842459450540826176452145829389286103522774"
+ "101195556029650753254244433565937938526828990893149766298997"
+ "738359913887178888607190765709867052470880785937935110091424"
+ "743449966353497865681753841380246075612094033617488674676296"
+ "822570077027076266879557913673839341012099558043806442348798"
+ "053951239274913334631522409564461770434875790402230022872647"
+ "568436177018658068697071731879399180374560963492726714528729"
+ "224208938589940272515747888379118461617702271694075087419634"
+ "147298076764775745707026934442908236664400557265527951453482"
+ "191684597674273691978253678690951178777239573925410438679099"
+ "374700609973920128201422381329108236575369403675960765238333"
+ "778127017096574296148321075566959285042221837159799800133563"
+ "239963969638610872680393210300180152020613051613414547163713"
+ "772512617757277955979895866367571776456268564191092477027650"
+ "135832200376440239783726540552694851717269598489288851529660"
+ "975027775639565229734596726205832668434979354541943345062977"
+ "891187146561050118118108223323735210843681128615413601091222"
+ "007912350536959777114306541514511332368936078560929788143798"
+ "814391221507522370648646767364209132147312407014953113532379"
+ "838195728491128536978285918066991040993153064356179903885952"
+ "027952713749653604502053512355449916680887234238773855581636"
+ "172479594866871765094513940103284167914110196720261110812716"
+ "776424260154507395050380575452850420730818412994731079307343"
+ "538376880280124019321040198038723558784544408584344466090982"
+ "802067326529000931562048932875469079874956595180595395347093"
+ "285140279165467965596318365749701535812384333240968283640721"
+ "344003442002691613772056762099098025739332715913970186225176"
+ "459563484134139746647940170537900275350480490468851439300771"
+ "949915194703080576611022590670399844931867609777417528903454"
+ "731922206378932141464755402629420074293816349270038351339419"
+ "146768473851353171629153912238797141905920143036064131705230"
+ "421762305232861503856799511155936565169005916711845389135580"
+ "928162511912438531204156138447775120789548666143600293412065"
+ "767167106888509172568003530668539460588248316513392652567856"
+ "224602697296203328920073354425994044956624831346979458846837"
+ "597950064151867164583749203433942592178528868981311575331848"
+ "941597492470436782387502687532649093096498315347403977436001"
+ "399982102030846763698994785054617523241463186980898394504211"
+ "430763617825306895065661536045431497903759118007934839122881"
+ "885863091769469883539876840543521295706315919855784493235603"
+ "866268925981702690270202829595794350800918257913991744455922"
+ "683343374046671669930219650268554687499e-4951",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x0p+0,
+ 0x0p+0,
+ 0x0p+0,
+ 0x4p-1076,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0x8p-16448L,
+ 0x8p-16448L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0x8p-16448L,
+ 0xcp-16448L,
+ 0x8p-16448L,
+ 0xcp-16448L,
+ false,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0xb.fffffffffffcp-16448L,
+ 0xcp-16448L,
+ 0xb.fffffffffffcp-16448L,
+ 0xcp-16448L),
+ TEST ("5.4677992978237119037926089004291297245985762235403450155814"
+ "707305425575329500966052143410629387408077958710210208052966"
+ "529504784489330482549602621133847135082257338717668975178538"
+ "378957084503396349323438489751160934104796903302909028868611"
+ "999312592165232778075745690821530731336739429587895774023213"
+ "939331012985331912661021188896306095323395084578542200319963"
+ "179359407180003251440084380484161504585462684082946932782829"
+ "488183829817567452314437076943950532707791252404699268678810"
+ "198502871250235796855577909830559749628817599194837522029036"
+ "891995648803056846354520653635957919882905363521007017169741"
+ "463296044392266269433408052686419017699718627761948763856040"
+ "592690841721239300491445991666051031755802326720329666454066"
+ "568630314348735511753639418257984253319063825247065727664852"
+ "328745422305642626091617823968872438962470092440688372515677"
+ "832232712866924800106797113478024083516199991991274936894113"
+ "006233377518471389394984262004503058455485659100090665241525"
+ "454803628182902241401701783637353179296850056973639305945938"
+ "813428953287892593620291195986011128990061888798763718548789"
+ "025717537674780281005583347165047846045925077914824515331335"
+ "131286063574407181821236377907693209224423490663289916878620"
+ "725507793163931390372011875799729330162278748985052557432333"
+ "005334989519381566364065326138465761456173231416844807264090"
+ "741841972247545424908843928136253653308813487994328446248389"
+ "608261444391573619177442907290731163188581917588219420107047"
+ "265367485141413919810885909689112244064797106324295291545892"
+ "937991321479061743491490060940946128274533657682130125169586"
+ "930571899403551122506297763180795732325134340989331155893724"
+ "289358918212707392997768032299997207208451112971425779939507"
+ "837165263255764268971211819536322993221774123134726665579460"
+ "265871378186589562858761835613344584269098062275786969729830"
+ "545786485401407774313414954958161677096004701941411411592755"
+ "485864471870515173326244464631295701572087440183178339987662"
+ "926763241220698078822661709054601073523477544653542795020468"
+ "256078409306409100874886828781860529824879343987945751252081"
+ "314345990313550683792348814627862441324030155730592166581251"
+ "009922787324590431548734575328663628650380722603024383412564"
+ "651446272117561042207738413114131099731016728935023152239431"
+ "311619533848376583687509108453086730196255111695352464186678"
+ "221927564757730319825223049341618853631333478241227227268084"
+ "583396688436229936266854011427192767039363517491659523133852"
+ "472534104124441112346615696891097070121463652258681270378076"
+ "538381697594264658479637863087159293838880752928175545408262"
+ "813403793568695416998388572304528748824756265665683890518422"
+ "696169422338806137532304784682662448207928681740476188343739"
+ "117833525916386815135793034906806117413105008719197882837614"
+ "738262050320291539494104952056471606645482046176634075459021"
+ "552555959590354956262127809953013679512507451424271839221946"
+ "794056861055980558363033732905772356986051180966474116423192"
+ "194741572438649215204229781279620370445373851348786918527399"
+ "785630808242657122705381806661616271132182017797793661244078"
+ "445747547535623384548769818529655539279036503234072455810991"
+ "588075181817695975173110136482659854557506203058080551018873"
+ "203138260451109855100526720073566126209666125604482413705611"
+ "996796777927332827103568863352291499261312290355143742018042"
+ "254470707107847293593205234049774839191754781030496978091006"
+ "099559675240966730110167624903610656473267105556155633783594"
+ "089546261107653110531808279445757724399186120387548675148632"
+ "176049190701680305210224388072261974806791922636412897526952"
+ "793677946622674149577084803568051242934076450942927092705684"
+ "547042915490323112457971853658760725588190377666477106903106"
+ "693847278847646032201293023329503348730723947218797410452333"
+ "910847913892827195814551858335519518939031446093385329182820"
+ "714173657946661746005901866885589732922652604573972842197231"
+ "187365263381958925227970038358064987248233271706462687651143"
+ "350472018043321314534759819524203308490914358596886150053406"
+ "629512434788155355109100540319857813535695923273426256911552"
+ "977539394209918630668466632881929661971212772444625151371953"
+ "428875491139683919687008724010475217255347915698820960215217"
+ "257390308560235323463096946442080548018754166369706161589705"
+ "215873687166365628787796501470056870127729464714362172216802"
+ "441045276911597009443281135389729130222603185665646434661947"
+ "627628077723219376892727386120519287577405410510114936151502"
+ "752997122750262781911372625997223415283516995479265631485799"
+ "456782561734766648462849641064097181818204279498552827825384"
+ "186202065516999362573388136163077477126602169410435905014077"
+ "049808497409025369325795765272066650278004200357878990911374"
+ "982857977108488482528354406313893864211497105765030504600982"
+ "253488805474531798742143374465080240030582370086699167937651"
+ "038307909706139327119325418854546478285735654541635477790346"
+ "964782617354265050767878335230272194896680141986745074630225"
+ "893106573559558843545841186025169531604151588481389164948914"
+ "823593944287133336263680358191369540321930649824471425485137"
+ "777984823525402115151171093313613251350685343824859052220126"
+ "891551966018355920872775724807128769003243129486808733796350"
+ "497668255116485157191011858830643898323628223472099280243583"
+ "164434348347014910398004439821970508280440872759395827943270"
+ "985008769143562351938091476215083548164137333541883808870019"
+ "116234099013452929807950151652297436436006149684939775781234"
+ "660954156154478642694176038524277810483833149798681345708089"
+ "152179193979463169402340611793486272301808073267534612685593"
+ "859596787866884211031341417903391749825320454663508370385251"
+ "831778477311017089729361152161928815389818579983544490982891"
+ "734081131312309744330960666031291451740885503458543884956367"
+ "654943799264600314531815427932691107874782328654759293575803"
+ "481929361961781073958502075438499070633193799699311694287183"
+ "299423475339817655608058724723221867087563064557636112380829"
+ "514501382073257737022472866608244164310385205213523702910787"
+ "182472517125030106491031844871593141759729773907719510044049"
+ "352857426592936763727969496103940591601975078602859660478614"
+ "119405428212830134490731706220583788265344728818766885126977"
+ "588151111984290444321648931907188080336064713873288834096229"
+ "203276676119810521851726133377700616341304257822975788967472"
+ "152742255041912584197045423031298506219011800240120182445838"
+ "590696647416285334515631019799007515682004250060857020904012"
+ "215375170479800482680554499806010766109655061507421747722461"
+ "180617361402575082294678925605271083587897845390768226405648"
+ "508518103525778638618195775128516073959272990148239415346263"
+ "486966573934577450787243667063244378381883115827207605856174"
+ "876350045086885320626669331311880593775916269643646395423220"
+ "549940790476989709243027420158390806135690975149384714684219"
+ "964938182719962913931464979458639185519531490009437619838306"
+ "362365453754807654884704163490469296444427144778593725687358"
+ "437087390151990694667516279202024332494828210657618261952038"
+ "597230263799412584275851667403910657370879707181053365818502"
+ "680037431560091209982641738995652793235851569372314130107647"
+ "166085235615697257094269133100914135783178856280392139325001"
+ "352841718610484616627448189556913621837791650699820323059708"
+ "766420810133584841826718631681683381743511974264126250984214"
+ "812397119978273917903889865891718836792263377888052458189238"
+ "746074986456016681098722869419588274020181430652732817858728"
+ "473849369539367463917171317324882099804999043054467247785592"
+ "038464723442276239896066431580123756428540074945472427752568"
+ "981171400621705853374875885943072600692576914790467205905272"
+ "372594740187988081900317493185005142913607163380720069786786"
+ "782095331840893694073778325119471833528492917081008547303414"
+ "509381563617864195257751546539575461435803625993888325647883"
+ "541039192368366987400263049681218831477776345118518503709588"
+ "840859023379762456561030683928115349942393963185677123055324"
+ "771693784214924931737043793679546051454845624150270955450608"
+ "318747395755728950832754611277041359602301205138509175543313"
+ "522772786504141007552691902249572375175731740923618769197304"
+ "652898352694386665448260033458575323252814233868098279476166"
+ "764258284911434288072243178941698347365985427696983129579496"
+ "059032032841281149923518087084876885114369033227736521245740"
+ "554711771423492719899982357711910225545480424688322195336240"
+ "492253136281857837808491795993788199125205555222116581071134"
+ "476787468430539307909617442106685159519071053844987343666452"
+ "494280317720153567054364117244775141336558406098548803924509"
+ "496052261825198043140272655303625315605326569530252885854991"
+ "822289219201218313590745412010446642247111703901991591338062"
+ "693320157180618736569439969283245279430312651192668788340033"
+ "626825194260296262959884258597703584888770801961209652822982"
+ "322376122303586169861685106043820510444293432856251210395693"
+ "261264867823980172683352796141772210301725997652373804152525"
+ "037162852291403804455997331367378463632437773242905518075065"
+ "414724295857460288225400061608664961649196400079359622673770"
+ "607898395269075056596627116148289491042491764170924014885106"
+ "158235482774778418134123293974436877051995673618683751115353"
+ "808771434984204447736174758316063096245047311279841579995578"
+ "186609402864244042751443128536278453430633423118662852688374"
+ "229600894418958824842459450540826176452145829389286103522774"
+ "101195556029650753254244433565937938526828990893149766298997"
+ "738359913887178888607190765709867052470880785937935110091424"
+ "743449966353497865681753841380246075612094033617488674676296"
+ "822570077027076266879557913673839341012099558043806442348798"
+ "053951239274913334631522409564461770434875790402230022872647"
+ "568436177018658068697071731879399180374560963492726714528729"
+ "224208938589940272515747888379118461617702271694075087419634"
+ "147298076764775745707026934442908236664400557265527951453482"
+ "191684597674273691978253678690951178777239573925410438679099"
+ "374700609973920128201422381329108236575369403675960765238333"
+ "778127017096574296148321075566959285042221837159799800133563"
+ "239963969638610872680393210300180152020613051613414547163713"
+ "772512617757277955979895866367571776456268564191092477027650"
+ "135832200376440239783726540552694851717269598489288851529660"
+ "975027775639565229734596726205832668434979354541943345062977"
+ "891187146561050118118108223323735210843681128615413601091222"
+ "007912350536959777114306541514511332368936078560929788143798"
+ "814391221507522370648646767364209132147312407014953113532379"
+ "838195728491128536978285918066991040993153064356179903885952"
+ "027952713749653604502053512355449916680887234238773855581636"
+ "172479594866871765094513940103284167914110196720261110812716"
+ "776424260154507395050380575452850420730818412994731079307343"
+ "538376880280124019321040198038723558784544408584344466090982"
+ "802067326529000931562048932875469079874956595180595395347093"
+ "285140279165467965596318365749701535812384333240968283640721"
+ "344003442002691613772056762099098025739332715913970186225176"
+ "459563484134139746647940170537900275350480490468851439300771"
+ "949915194703080576611022590670399844931867609777417528903454"
+ "731922206378932141464755402629420074293816349270038351339419"
+ "146768473851353171629153912238797141905920143036064131705230"
+ "421762305232861503856799511155936565169005916711845389135580"
+ "928162511912438531204156138447775120789548666143600293412065"
+ "767167106888509172568003530668539460588248316513392652567856"
+ "224602697296203328920073354425994044956624831346979458846837"
+ "597950064151867164583749203433942592178528868981311575331848"
+ "941597492470436782387502687532649093096498315347403977436001"
+ "399982102030846763698994785054617523241463186980898394504211"
+ "430763617825306895065661536045431497903759118007934839122881"
+ "885863091769469883539876840543521295706315919855784493235603"
+ "866268925981702690270202829595794350800918257913991744455922"
+ "6833433740466716699302196502685546875e-4951",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x0p+0,
+ 0x0p+0,
+ 0x0p+0,
+ 0x4p-1076,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ false,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L),
+ TEST ("5.4677992978237119037926089004291297245985762235403450155814"
+ "707305425575329500966052143410629387408077958710210208052966"
+ "529504784489330482549602621133847135082257338717668975178538"
+ "378957084503396349323438489751160934104796903302909028868611"
+ "999312592165232778075745690821530731336739429587895774023213"
+ "939331012985331912661021188896306095323395084578542200319963"
+ "179359407180003251440084380484161504585462684082946932782829"
+ "488183829817567452314437076943950532707791252404699268678810"
+ "198502871250235796855577909830559749628817599194837522029036"
+ "891995648803056846354520653635957919882905363521007017169741"
+ "463296044392266269433408052686419017699718627761948763856040"
+ "592690841721239300491445991666051031755802326720329666454066"
+ "568630314348735511753639418257984253319063825247065727664852"
+ "328745422305642626091617823968872438962470092440688372515677"
+ "832232712866924800106797113478024083516199991991274936894113"
+ "006233377518471389394984262004503058455485659100090665241525"
+ "454803628182902241401701783637353179296850056973639305945938"
+ "813428953287892593620291195986011128990061888798763718548789"
+ "025717537674780281005583347165047846045925077914824515331335"
+ "131286063574407181821236377907693209224423490663289916878620"
+ "725507793163931390372011875799729330162278748985052557432333"
+ "005334989519381566364065326138465761456173231416844807264090"
+ "741841972247545424908843928136253653308813487994328446248389"
+ "608261444391573619177442907290731163188581917588219420107047"
+ "265367485141413919810885909689112244064797106324295291545892"
+ "937991321479061743491490060940946128274533657682130125169586"
+ "930571899403551122506297763180795732325134340989331155893724"
+ "289358918212707392997768032299997207208451112971425779939507"
+ "837165263255764268971211819536322993221774123134726665579460"
+ "265871378186589562858761835613344584269098062275786969729830"
+ "545786485401407774313414954958161677096004701941411411592755"
+ "485864471870515173326244464631295701572087440183178339987662"
+ "926763241220698078822661709054601073523477544653542795020468"
+ "256078409306409100874886828781860529824879343987945751252081"
+ "314345990313550683792348814627862441324030155730592166581251"
+ "009922787324590431548734575328663628650380722603024383412564"
+ "651446272117561042207738413114131099731016728935023152239431"
+ "311619533848376583687509108453086730196255111695352464186678"
+ "221927564757730319825223049341618853631333478241227227268084"
+ "583396688436229936266854011427192767039363517491659523133852"
+ "472534104124441112346615696891097070121463652258681270378076"
+ "538381697594264658479637863087159293838880752928175545408262"
+ "813403793568695416998388572304528748824756265665683890518422"
+ "696169422338806137532304784682662448207928681740476188343739"
+ "117833525916386815135793034906806117413105008719197882837614"
+ "738262050320291539494104952056471606645482046176634075459021"
+ "552555959590354956262127809953013679512507451424271839221946"
+ "794056861055980558363033732905772356986051180966474116423192"
+ "194741572438649215204229781279620370445373851348786918527399"
+ "785630808242657122705381806661616271132182017797793661244078"
+ "445747547535623384548769818529655539279036503234072455810991"
+ "588075181817695975173110136482659854557506203058080551018873"
+ "203138260451109855100526720073566126209666125604482413705611"
+ "996796777927332827103568863352291499261312290355143742018042"
+ "254470707107847293593205234049774839191754781030496978091006"
+ "099559675240966730110167624903610656473267105556155633783594"
+ "089546261107653110531808279445757724399186120387548675148632"
+ "176049190701680305210224388072261974806791922636412897526952"
+ "793677946622674149577084803568051242934076450942927092705684"
+ "547042915490323112457971853658760725588190377666477106903106"
+ "693847278847646032201293023329503348730723947218797410452333"
+ "910847913892827195814551858335519518939031446093385329182820"
+ "714173657946661746005901866885589732922652604573972842197231"
+ "187365263381958925227970038358064987248233271706462687651143"
+ "350472018043321314534759819524203308490914358596886150053406"
+ "629512434788155355109100540319857813535695923273426256911552"
+ "977539394209918630668466632881929661971212772444625151371953"
+ "428875491139683919687008724010475217255347915698820960215217"
+ "257390308560235323463096946442080548018754166369706161589705"
+ "215873687166365628787796501470056870127729464714362172216802"
+ "441045276911597009443281135389729130222603185665646434661947"
+ "627628077723219376892727386120519287577405410510114936151502"
+ "752997122750262781911372625997223415283516995479265631485799"
+ "456782561734766648462849641064097181818204279498552827825384"
+ "186202065516999362573388136163077477126602169410435905014077"
+ "049808497409025369325795765272066650278004200357878990911374"
+ "982857977108488482528354406313893864211497105765030504600982"
+ "253488805474531798742143374465080240030582370086699167937651"
+ "038307909706139327119325418854546478285735654541635477790346"
+ "964782617354265050767878335230272194896680141986745074630225"
+ "893106573559558843545841186025169531604151588481389164948914"
+ "823593944287133336263680358191369540321930649824471425485137"
+ "777984823525402115151171093313613251350685343824859052220126"
+ "891551966018355920872775724807128769003243129486808733796350"
+ "497668255116485157191011858830643898323628223472099280243583"
+ "164434348347014910398004439821970508280440872759395827943270"
+ "985008769143562351938091476215083548164137333541883808870019"
+ "116234099013452929807950151652297436436006149684939775781234"
+ "660954156154478642694176038524277810483833149798681345708089"
+ "152179193979463169402340611793486272301808073267534612685593"
+ "859596787866884211031341417903391749825320454663508370385251"
+ "831778477311017089729361152161928815389818579983544490982891"
+ "734081131312309744330960666031291451740885503458543884956367"
+ "654943799264600314531815427932691107874782328654759293575803"
+ "481929361961781073958502075438499070633193799699311694287183"
+ "299423475339817655608058724723221867087563064557636112380829"
+ "514501382073257737022472866608244164310385205213523702910787"
+ "182472517125030106491031844871593141759729773907719510044049"
+ "352857426592936763727969496103940591601975078602859660478614"
+ "119405428212830134490731706220583788265344728818766885126977"
+ "588151111984290444321648931907188080336064713873288834096229"
+ "203276676119810521851726133377700616341304257822975788967472"
+ "152742255041912584197045423031298506219011800240120182445838"
+ "590696647416285334515631019799007515682004250060857020904012"
+ "215375170479800482680554499806010766109655061507421747722461"
+ "180617361402575082294678925605271083587897845390768226405648"
+ "508518103525778638618195775128516073959272990148239415346263"
+ "486966573934577450787243667063244378381883115827207605856174"
+ "876350045086885320626669331311880593775916269643646395423220"
+ "549940790476989709243027420158390806135690975149384714684219"
+ "964938182719962913931464979458639185519531490009437619838306"
+ "362365453754807654884704163490469296444427144778593725687358"
+ "437087390151990694667516279202024332494828210657618261952038"
+ "597230263799412584275851667403910657370879707181053365818502"
+ "680037431560091209982641738995652793235851569372314130107647"
+ "166085235615697257094269133100914135783178856280392139325001"
+ "352841718610484616627448189556913621837791650699820323059708"
+ "766420810133584841826718631681683381743511974264126250984214"
+ "812397119978273917903889865891718836792263377888052458189238"
+ "746074986456016681098722869419588274020181430652732817858728"
+ "473849369539367463917171317324882099804999043054467247785592"
+ "038464723442276239896066431580123756428540074945472427752568"
+ "981171400621705853374875885943072600692576914790467205905272"
+ "372594740187988081900317493185005142913607163380720069786786"
+ "782095331840893694073778325119471833528492917081008547303414"
+ "509381563617864195257751546539575461435803625993888325647883"
+ "541039192368366987400263049681218831477776345118518503709588"
+ "840859023379762456561030683928115349942393963185677123055324"
+ "771693784214924931737043793679546051454845624150270955450608"
+ "318747395755728950832754611277041359602301205138509175543313"
+ "522772786504141007552691902249572375175731740923618769197304"
+ "652898352694386665448260033458575323252814233868098279476166"
+ "764258284911434288072243178941698347365985427696983129579496"
+ "059032032841281149923518087084876885114369033227736521245740"
+ "554711771423492719899982357711910225545480424688322195336240"
+ "492253136281857837808491795993788199125205555222116581071134"
+ "476787468430539307909617442106685159519071053844987343666452"
+ "494280317720153567054364117244775141336558406098548803924509"
+ "496052261825198043140272655303625315605326569530252885854991"
+ "822289219201218313590745412010446642247111703901991591338062"
+ "693320157180618736569439969283245279430312651192668788340033"
+ "626825194260296262959884258597703584888770801961209652822982"
+ "322376122303586169861685106043820510444293432856251210395693"
+ "261264867823980172683352796141772210301725997652373804152525"
+ "037162852291403804455997331367378463632437773242905518075065"
+ "414724295857460288225400061608664961649196400079359622673770"
+ "607898395269075056596627116148289491042491764170924014885106"
+ "158235482774778418134123293974436877051995673618683751115353"
+ "808771434984204447736174758316063096245047311279841579995578"
+ "186609402864244042751443128536278453430633423118662852688374"
+ "229600894418958824842459450540826176452145829389286103522774"
+ "101195556029650753254244433565937938526828990893149766298997"
+ "738359913887178888607190765709867052470880785937935110091424"
+ "743449966353497865681753841380246075612094033617488674676296"
+ "822570077027076266879557913673839341012099558043806442348798"
+ "053951239274913334631522409564461770434875790402230022872647"
+ "568436177018658068697071731879399180374560963492726714528729"
+ "224208938589940272515747888379118461617702271694075087419634"
+ "147298076764775745707026934442908236664400557265527951453482"
+ "191684597674273691978253678690951178777239573925410438679099"
+ "374700609973920128201422381329108236575369403675960765238333"
+ "778127017096574296148321075566959285042221837159799800133563"
+ "239963969638610872680393210300180152020613051613414547163713"
+ "772512617757277955979895866367571776456268564191092477027650"
+ "135832200376440239783726540552694851717269598489288851529660"
+ "975027775639565229734596726205832668434979354541943345062977"
+ "891187146561050118118108223323735210843681128615413601091222"
+ "007912350536959777114306541514511332368936078560929788143798"
+ "814391221507522370648646767364209132147312407014953113532379"
+ "838195728491128536978285918066991040993153064356179903885952"
+ "027952713749653604502053512355449916680887234238773855581636"
+ "172479594866871765094513940103284167914110196720261110812716"
+ "776424260154507395050380575452850420730818412994731079307343"
+ "538376880280124019321040198038723558784544408584344466090982"
+ "802067326529000931562048932875469079874956595180595395347093"
+ "285140279165467965596318365749701535812384333240968283640721"
+ "344003442002691613772056762099098025739332715913970186225176"
+ "459563484134139746647940170537900275350480490468851439300771"
+ "949915194703080576611022590670399844931867609777417528903454"
+ "731922206378932141464755402629420074293816349270038351339419"
+ "146768473851353171629153912238797141905920143036064131705230"
+ "421762305232861503856799511155936565169005916711845389135580"
+ "928162511912438531204156138447775120789548666143600293412065"
+ "767167106888509172568003530668539460588248316513392652567856"
+ "224602697296203328920073354425994044956624831346979458846837"
+ "597950064151867164583749203433942592178528868981311575331848"
+ "941597492470436782387502687532649093096498315347403977436001"
+ "399982102030846763698994785054617523241463186980898394504211"
+ "430763617825306895065661536045431497903759118007934839122881"
+ "885863091769469883539876840543521295706315919855784493235603"
+ "866268925981702690270202829595794350800918257913991744455922"
+ "683343374046671669930219650268554687501e-4951",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x0p+0,
+ 0x0p+0,
+ 0x0p+0,
+ 0x4p-1076,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0x1p-16444L,
+ false,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xc.000000000004p-16448L),
+ TEST ("-5.467799297823711903792608900429129724598576223540345015581"
+ "470730542557532950096605214341062938740807795871021020805296"
+ "652950478448933048254960262113384713508225733871766897517853"
+ "837895708450339634932343848975116093410479690330290902886861"
+ "199931259216523277807574569082153073133673942958789577402321"
+ "393933101298533191266102118889630609532339508457854220031996"
+ "317935940718000325144008438048416150458546268408294693278282"
+ "948818382981756745231443707694395053270779125240469926867881"
+ "019850287125023579685557790983055974962881759919483752202903"
+ "689199564880305684635452065363595791988290536352100701716974"
+ "146329604439226626943340805268641901769971862776194876385604"
+ "059269084172123930049144599166605103175580232672032966645406"
+ "656863031434873551175363941825798425331906382524706572766485"
+ "232874542230564262609161782396887243896247009244068837251567"
+ "783223271286692480010679711347802408351619999199127493689411"
+ "300623337751847138939498426200450305845548565910009066524152"
+ "545480362818290224140170178363735317929685005697363930594593"
+ "881342895328789259362029119598601112899006188879876371854878"
+ "902571753767478028100558334716504784604592507791482451533133"
+ "513128606357440718182123637790769320922442349066328991687862"
+ "072550779316393139037201187579972933016227874898505255743233"
+ "300533498951938156636406532613846576145617323141684480726409"
+ "074184197224754542490884392813625365330881348799432844624838"
+ "960826144439157361917744290729073116318858191758821942010704"
+ "726536748514141391981088590968911224406479710632429529154589"
+ "293799132147906174349149006094094612827453365768213012516958"
+ "693057189940355112250629776318079573232513434098933115589372"
+ "428935891821270739299776803229999720720845111297142577993950"
+ "783716526325576426897121181953632299322177412313472666557946"
+ "026587137818658956285876183561334458426909806227578696972983"
+ "054578648540140777431341495495816167709600470194141141159275"
+ "548586447187051517332624446463129570157208744018317833998766"
+ "292676324122069807882266170905460107352347754465354279502046"
+ "825607840930640910087488682878186052982487934398794575125208"
+ "131434599031355068379234881462786244132403015573059216658125"
+ "100992278732459043154873457532866362865038072260302438341256"
+ "465144627211756104220773841311413109973101672893502315223943"
+ "131161953384837658368750910845308673019625511169535246418667"
+ "822192756475773031982522304934161885363133347824122722726808"
+ "458339668843622993626685401142719276703936351749165952313385"
+ "247253410412444111234661569689109707012146365225868127037807"
+ "653838169759426465847963786308715929383888075292817554540826"
+ "281340379356869541699838857230452874882475626566568389051842"
+ "269616942233880613753230478468266244820792868174047618834373"
+ "911783352591638681513579303490680611741310500871919788283761"
+ "473826205032029153949410495205647160664548204617663407545902"
+ "155255595959035495626212780995301367951250745142427183922194"
+ "679405686105598055836303373290577235698605118096647411642319"
+ "219474157243864921520422978127962037044537385134878691852739"
+ "978563080824265712270538180666161627113218201779779366124407"
+ "844574754753562338454876981852965553927903650323407245581099"
+ "158807518181769597517311013648265985455750620305808055101887"
+ "320313826045110985510052672007356612620966612560448241370561"
+ "199679677792733282710356886335229149926131229035514374201804"
+ "225447070710784729359320523404977483919175478103049697809100"
+ "609955967524096673011016762490361065647326710555615563378359"
+ "408954626110765311053180827944575772439918612038754867514863"
+ "217604919070168030521022438807226197480679192263641289752695"
+ "279367794662267414957708480356805124293407645094292709270568"
+ "454704291549032311245797185365876072558819037766647710690310"
+ "669384727884764603220129302332950334873072394721879741045233"
+ "391084791389282719581455185833551951893903144609338532918282"
+ "071417365794666174600590186688558973292265260457397284219723"
+ "118736526338195892522797003835806498724823327170646268765114"
+ "335047201804332131453475981952420330849091435859688615005340"
+ "662951243478815535510910054031985781353569592327342625691155"
+ "297753939420991863066846663288192966197121277244462515137195"
+ "342887549113968391968700872401047521725534791569882096021521"
+ "725739030856023532346309694644208054801875416636970616158970"
+ "521587368716636562878779650147005687012772946471436217221680"
+ "244104527691159700944328113538972913022260318566564643466194"
+ "762762807772321937689272738612051928757740541051011493615150"
+ "275299712275026278191137262599722341528351699547926563148579"
+ "945678256173476664846284964106409718181820427949855282782538"
+ "418620206551699936257338813616307747712660216941043590501407"
+ "704980849740902536932579576527206665027800420035787899091137"
+ "498285797710848848252835440631389386421149710576503050460098"
+ "225348880547453179874214337446508024003058237008669916793765"
+ "103830790970613932711932541885454647828573565454163547779034"
+ "696478261735426505076787833523027219489668014198674507463022"
+ "589310657355955884354584118602516953160415158848138916494891"
+ "482359394428713333626368035819136954032193064982447142548513"
+ "777798482352540211515117109331361325135068534382485905222012"
+ "689155196601835592087277572480712876900324312948680873379635"
+ "049766825511648515719101185883064389832362822347209928024358"
+ "316443434834701491039800443982197050828044087275939582794327"
+ "098500876914356235193809147621508354816413733354188380887001"
+ "911623409901345292980795015165229743643600614968493977578123"
+ "466095415615447864269417603852427781048383314979868134570808"
+ "915217919397946316940234061179348627230180807326753461268559"
+ "385959678786688421103134141790339174982532045466350837038525"
+ "183177847731101708972936115216192881538981857998354449098289"
+ "173408113131230974433096066603129145174088550345854388495636"
+ "765494379926460031453181542793269110787478232865475929357580"
+ "348192936196178107395850207543849907063319379969931169428718"
+ "329942347533981765560805872472322186708756306455763611238082"
+ "951450138207325773702247286660824416431038520521352370291078"
+ "718247251712503010649103184487159314175972977390771951004404"
+ "935285742659293676372796949610394059160197507860285966047861"
+ "411940542821283013449073170622058378826534472881876688512697"
+ "758815111198429044432164893190718808033606471387328883409622"
+ "920327667611981052185172613337770061634130425782297578896747"
+ "215274225504191258419704542303129850621901180024012018244583"
+ "859069664741628533451563101979900751568200425006085702090401"
+ "221537517047980048268055449980601076610965506150742174772246"
+ "118061736140257508229467892560527108358789784539076822640564"
+ "850851810352577863861819577512851607395927299014823941534626"
+ "348696657393457745078724366706324437838188311582720760585617"
+ "487635004508688532062666933131188059377591626964364639542322"
+ "054994079047698970924302742015839080613569097514938471468421"
+ "996493818271996291393146497945863918551953149000943761983830"
+ "636236545375480765488470416349046929644442714477859372568735"
+ "843708739015199069466751627920202433249482821065761826195203"
+ "859723026379941258427585166740391065737087970718105336581850"
+ "268003743156009120998264173899565279323585156937231413010764"
+ "716608523561569725709426913310091413578317885628039213932500"
+ "135284171861048461662744818955691362183779165069982032305970"
+ "876642081013358484182671863168168338174351197426412625098421"
+ "481239711997827391790388986589171883679226337788805245818923"
+ "874607498645601668109872286941958827402018143065273281785872"
+ "847384936953936746391717131732488209980499904305446724778559"
+ "203846472344227623989606643158012375642854007494547242775256"
+ "898117140062170585337487588594307260069257691479046720590527"
+ "237259474018798808190031749318500514291360716338072006978678"
+ "678209533184089369407377832511947183352849291708100854730341"
+ "450938156361786419525775154653957546143580362599388832564788"
+ "354103919236836698740026304968121883147777634511851850370958"
+ "884085902337976245656103068392811534994239396318567712305532"
+ "477169378421492493173704379367954605145484562415027095545060"
+ "831874739575572895083275461127704135960230120513850917554331"
+ "352277278650414100755269190224957237517573174092361876919730"
+ "465289835269438666544826003345857532325281423386809827947616"
+ "676425828491143428807224317894169834736598542769698312957949"
+ "605903203284128114992351808708487688511436903322773652124574"
+ "055471177142349271989998235771191022554548042468832219533624"
+ "049225313628185783780849179599378819912520555522211658107113"
+ "447678746843053930790961744210668515951907105384498734366645"
+ "249428031772015356705436411724477514133655840609854880392450"
+ "949605226182519804314027265530362531560532656953025288585499"
+ "182228921920121831359074541201044664224711170390199159133806"
+ "269332015718061873656943996928324527943031265119266878834003"
+ "362682519426029626295988425859770358488877080196120965282298"
+ "232237612230358616986168510604382051044429343285625121039569"
+ "326126486782398017268335279614177221030172599765237380415252"
+ "503716285229140380445599733136737846363243777324290551807506"
+ "541472429585746028822540006160866496164919640007935962267377"
+ "060789839526907505659662711614828949104249176417092401488510"
+ "615823548277477841813412329397443687705199567361868375111535"
+ "380877143498420444773617475831606309624504731127984157999557"
+ "818660940286424404275144312853627845343063342311866285268837"
+ "422960089441895882484245945054082617645214582938928610352277"
+ "410119555602965075325424443356593793852682899089314976629899"
+ "773835991388717888860719076570986705247088078593793511009142"
+ "474344996635349786568175384138024607561209403361748867467629"
+ "682257007702707626687955791367383934101209955804380644234879"
+ "805395123927491333463152240956446177043487579040223002287264"
+ "756843617701865806869707173187939918037456096349272671452872"
+ "922420893858994027251574788837911846161770227169407508741963"
+ "414729807676477574570702693444290823666440055726552795145348"
+ "219168459767427369197825367869095117877723957392541043867909"
+ "937470060997392012820142238132910823657536940367596076523833"
+ "377812701709657429614832107556695928504222183715979980013356"
+ "323996396963861087268039321030018015202061305161341454716371"
+ "377251261775727795597989586636757177645626856419109247702765"
+ "013583220037644023978372654055269485171726959848928885152966"
+ "097502777563956522973459672620583266843497935454194334506297"
+ "789118714656105011811810822332373521084368112861541360109122"
+ "200791235053695977711430654151451133236893607856092978814379"
+ "881439122150752237064864676736420913214731240701495311353237"
+ "983819572849112853697828591806699104099315306435617990388595"
+ "202795271374965360450205351235544991668088723423877385558163"
+ "617247959486687176509451394010328416791411019672026111081271"
+ "677642426015450739505038057545285042073081841299473107930734"
+ "353837688028012401932104019803872355878454440858434446609098"
+ "280206732652900093156204893287546907987495659518059539534709"
+ "328514027916546796559631836574970153581238433324096828364072"
+ "134400344200269161377205676209909802573933271591397018622517"
+ "645956348413413974664794017053790027535048049046885143930077"
+ "194991519470308057661102259067039984493186760977741752890345"
+ "473192220637893214146475540262942007429381634927003835133941"
+ "914676847385135317162915391223879714190592014303606413170523"
+ "042176230523286150385679951115593656516900591671184538913558"
+ "092816251191243853120415613844777512078954866614360029341206"
+ "576716710688850917256800353066853946058824831651339265256785"
+ "622460269729620332892007335442599404495662483134697945884683"
+ "759795006415186716458374920343394259217852886898131157533184"
+ "894159749247043678238750268753264909309649831534740397743600"
+ "139998210203084676369899478505461752324146318698089839450421"
+ "143076361782530689506566153604543149790375911800793483912288"
+ "188586309176946988353987684054352129570631591985578449323560"
+ "386626892598170269027020282959579435080091825791399174445592"
+ "2683343374046671669930219650268554687499e-4951",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1p-16444L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xb.fffffffffffcp-16448L,
+ -0xb.fffffffffffcp-16448L),
+ TEST ("-5.467799297823711903792608900429129724598576223540345015581"
+ "470730542557532950096605214341062938740807795871021020805296"
+ "652950478448933048254960262113384713508225733871766897517853"
+ "837895708450339634932343848975116093410479690330290902886861"
+ "199931259216523277807574569082153073133673942958789577402321"
+ "393933101298533191266102118889630609532339508457854220031996"
+ "317935940718000325144008438048416150458546268408294693278282"
+ "948818382981756745231443707694395053270779125240469926867881"
+ "019850287125023579685557790983055974962881759919483752202903"
+ "689199564880305684635452065363595791988290536352100701716974"
+ "146329604439226626943340805268641901769971862776194876385604"
+ "059269084172123930049144599166605103175580232672032966645406"
+ "656863031434873551175363941825798425331906382524706572766485"
+ "232874542230564262609161782396887243896247009244068837251567"
+ "783223271286692480010679711347802408351619999199127493689411"
+ "300623337751847138939498426200450305845548565910009066524152"
+ "545480362818290224140170178363735317929685005697363930594593"
+ "881342895328789259362029119598601112899006188879876371854878"
+ "902571753767478028100558334716504784604592507791482451533133"
+ "513128606357440718182123637790769320922442349066328991687862"
+ "072550779316393139037201187579972933016227874898505255743233"
+ "300533498951938156636406532613846576145617323141684480726409"
+ "074184197224754542490884392813625365330881348799432844624838"
+ "960826144439157361917744290729073116318858191758821942010704"
+ "726536748514141391981088590968911224406479710632429529154589"
+ "293799132147906174349149006094094612827453365768213012516958"
+ "693057189940355112250629776318079573232513434098933115589372"
+ "428935891821270739299776803229999720720845111297142577993950"
+ "783716526325576426897121181953632299322177412313472666557946"
+ "026587137818658956285876183561334458426909806227578696972983"
+ "054578648540140777431341495495816167709600470194141141159275"
+ "548586447187051517332624446463129570157208744018317833998766"
+ "292676324122069807882266170905460107352347754465354279502046"
+ "825607840930640910087488682878186052982487934398794575125208"
+ "131434599031355068379234881462786244132403015573059216658125"
+ "100992278732459043154873457532866362865038072260302438341256"
+ "465144627211756104220773841311413109973101672893502315223943"
+ "131161953384837658368750910845308673019625511169535246418667"
+ "822192756475773031982522304934161885363133347824122722726808"
+ "458339668843622993626685401142719276703936351749165952313385"
+ "247253410412444111234661569689109707012146365225868127037807"
+ "653838169759426465847963786308715929383888075292817554540826"
+ "281340379356869541699838857230452874882475626566568389051842"
+ "269616942233880613753230478468266244820792868174047618834373"
+ "911783352591638681513579303490680611741310500871919788283761"
+ "473826205032029153949410495205647160664548204617663407545902"
+ "155255595959035495626212780995301367951250745142427183922194"
+ "679405686105598055836303373290577235698605118096647411642319"
+ "219474157243864921520422978127962037044537385134878691852739"
+ "978563080824265712270538180666161627113218201779779366124407"
+ "844574754753562338454876981852965553927903650323407245581099"
+ "158807518181769597517311013648265985455750620305808055101887"
+ "320313826045110985510052672007356612620966612560448241370561"
+ "199679677792733282710356886335229149926131229035514374201804"
+ "225447070710784729359320523404977483919175478103049697809100"
+ "609955967524096673011016762490361065647326710555615563378359"
+ "408954626110765311053180827944575772439918612038754867514863"
+ "217604919070168030521022438807226197480679192263641289752695"
+ "279367794662267414957708480356805124293407645094292709270568"
+ "454704291549032311245797185365876072558819037766647710690310"
+ "669384727884764603220129302332950334873072394721879741045233"
+ "391084791389282719581455185833551951893903144609338532918282"
+ "071417365794666174600590186688558973292265260457397284219723"
+ "118736526338195892522797003835806498724823327170646268765114"
+ "335047201804332131453475981952420330849091435859688615005340"
+ "662951243478815535510910054031985781353569592327342625691155"
+ "297753939420991863066846663288192966197121277244462515137195"
+ "342887549113968391968700872401047521725534791569882096021521"
+ "725739030856023532346309694644208054801875416636970616158970"
+ "521587368716636562878779650147005687012772946471436217221680"
+ "244104527691159700944328113538972913022260318566564643466194"
+ "762762807772321937689272738612051928757740541051011493615150"
+ "275299712275026278191137262599722341528351699547926563148579"
+ "945678256173476664846284964106409718181820427949855282782538"
+ "418620206551699936257338813616307747712660216941043590501407"
+ "704980849740902536932579576527206665027800420035787899091137"
+ "498285797710848848252835440631389386421149710576503050460098"
+ "225348880547453179874214337446508024003058237008669916793765"
+ "103830790970613932711932541885454647828573565454163547779034"
+ "696478261735426505076787833523027219489668014198674507463022"
+ "589310657355955884354584118602516953160415158848138916494891"
+ "482359394428713333626368035819136954032193064982447142548513"
+ "777798482352540211515117109331361325135068534382485905222012"
+ "689155196601835592087277572480712876900324312948680873379635"
+ "049766825511648515719101185883064389832362822347209928024358"
+ "316443434834701491039800443982197050828044087275939582794327"
+ "098500876914356235193809147621508354816413733354188380887001"
+ "911623409901345292980795015165229743643600614968493977578123"
+ "466095415615447864269417603852427781048383314979868134570808"
+ "915217919397946316940234061179348627230180807326753461268559"
+ "385959678786688421103134141790339174982532045466350837038525"
+ "183177847731101708972936115216192881538981857998354449098289"
+ "173408113131230974433096066603129145174088550345854388495636"
+ "765494379926460031453181542793269110787478232865475929357580"
+ "348192936196178107395850207543849907063319379969931169428718"
+ "329942347533981765560805872472322186708756306455763611238082"
+ "951450138207325773702247286660824416431038520521352370291078"
+ "718247251712503010649103184487159314175972977390771951004404"
+ "935285742659293676372796949610394059160197507860285966047861"
+ "411940542821283013449073170622058378826534472881876688512697"
+ "758815111198429044432164893190718808033606471387328883409622"
+ "920327667611981052185172613337770061634130425782297578896747"
+ "215274225504191258419704542303129850621901180024012018244583"
+ "859069664741628533451563101979900751568200425006085702090401"
+ "221537517047980048268055449980601076610965506150742174772246"
+ "118061736140257508229467892560527108358789784539076822640564"
+ "850851810352577863861819577512851607395927299014823941534626"
+ "348696657393457745078724366706324437838188311582720760585617"
+ "487635004508688532062666933131188059377591626964364639542322"
+ "054994079047698970924302742015839080613569097514938471468421"
+ "996493818271996291393146497945863918551953149000943761983830"
+ "636236545375480765488470416349046929644442714477859372568735"
+ "843708739015199069466751627920202433249482821065761826195203"
+ "859723026379941258427585166740391065737087970718105336581850"
+ "268003743156009120998264173899565279323585156937231413010764"
+ "716608523561569725709426913310091413578317885628039213932500"
+ "135284171861048461662744818955691362183779165069982032305970"
+ "876642081013358484182671863168168338174351197426412625098421"
+ "481239711997827391790388986589171883679226337788805245818923"
+ "874607498645601668109872286941958827402018143065273281785872"
+ "847384936953936746391717131732488209980499904305446724778559"
+ "203846472344227623989606643158012375642854007494547242775256"
+ "898117140062170585337487588594307260069257691479046720590527"
+ "237259474018798808190031749318500514291360716338072006978678"
+ "678209533184089369407377832511947183352849291708100854730341"
+ "450938156361786419525775154653957546143580362599388832564788"
+ "354103919236836698740026304968121883147777634511851850370958"
+ "884085902337976245656103068392811534994239396318567712305532"
+ "477169378421492493173704379367954605145484562415027095545060"
+ "831874739575572895083275461127704135960230120513850917554331"
+ "352277278650414100755269190224957237517573174092361876919730"
+ "465289835269438666544826003345857532325281423386809827947616"
+ "676425828491143428807224317894169834736598542769698312957949"
+ "605903203284128114992351808708487688511436903322773652124574"
+ "055471177142349271989998235771191022554548042468832219533624"
+ "049225313628185783780849179599378819912520555522211658107113"
+ "447678746843053930790961744210668515951907105384498734366645"
+ "249428031772015356705436411724477514133655840609854880392450"
+ "949605226182519804314027265530362531560532656953025288585499"
+ "182228921920121831359074541201044664224711170390199159133806"
+ "269332015718061873656943996928324527943031265119266878834003"
+ "362682519426029626295988425859770358488877080196120965282298"
+ "232237612230358616986168510604382051044429343285625121039569"
+ "326126486782398017268335279614177221030172599765237380415252"
+ "503716285229140380445599733136737846363243777324290551807506"
+ "541472429585746028822540006160866496164919640007935962267377"
+ "060789839526907505659662711614828949104249176417092401488510"
+ "615823548277477841813412329397443687705199567361868375111535"
+ "380877143498420444773617475831606309624504731127984157999557"
+ "818660940286424404275144312853627845343063342311866285268837"
+ "422960089441895882484245945054082617645214582938928610352277"
+ "410119555602965075325424443356593793852682899089314976629899"
+ "773835991388717888860719076570986705247088078593793511009142"
+ "474344996635349786568175384138024607561209403361748867467629"
+ "682257007702707626687955791367383934101209955804380644234879"
+ "805395123927491333463152240956446177043487579040223002287264"
+ "756843617701865806869707173187939918037456096349272671452872"
+ "922420893858994027251574788837911846161770227169407508741963"
+ "414729807676477574570702693444290823666440055726552795145348"
+ "219168459767427369197825367869095117877723957392541043867909"
+ "937470060997392012820142238132910823657536940367596076523833"
+ "377812701709657429614832107556695928504222183715979980013356"
+ "323996396963861087268039321030018015202061305161341454716371"
+ "377251261775727795597989586636757177645626856419109247702765"
+ "013583220037644023978372654055269485171726959848928885152966"
+ "097502777563956522973459672620583266843497935454194334506297"
+ "789118714656105011811810822332373521084368112861541360109122"
+ "200791235053695977711430654151451133236893607856092978814379"
+ "881439122150752237064864676736420913214731240701495311353237"
+ "983819572849112853697828591806699104099315306435617990388595"
+ "202795271374965360450205351235544991668088723423877385558163"
+ "617247959486687176509451394010328416791411019672026111081271"
+ "677642426015450739505038057545285042073081841299473107930734"
+ "353837688028012401932104019803872355878454440858434446609098"
+ "280206732652900093156204893287546907987495659518059539534709"
+ "328514027916546796559631836574970153581238433324096828364072"
+ "134400344200269161377205676209909802573933271591397018622517"
+ "645956348413413974664794017053790027535048049046885143930077"
+ "194991519470308057661102259067039984493186760977741752890345"
+ "473192220637893214146475540262942007429381634927003835133941"
+ "914676847385135317162915391223879714190592014303606413170523"
+ "042176230523286150385679951115593656516900591671184538913558"
+ "092816251191243853120415613844777512078954866614360029341206"
+ "576716710688850917256800353066853946058824831651339265256785"
+ "622460269729620332892007335442599404495662483134697945884683"
+ "759795006415186716458374920343394259217852886898131157533184"
+ "894159749247043678238750268753264909309649831534740397743600"
+ "139998210203084676369899478505461752324146318698089839450421"
+ "143076361782530689506566153604543149790375911800793483912288"
+ "188586309176946988353987684054352129570631591985578449323560"
+ "386626892598170269027020282959579435080091825791399174445592"
+ "26833433740466716699302196502685546875e-4951",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1p-16444L,
+ -0x1p-16444L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L),
+ TEST ("-5.467799297823711903792608900429129724598576223540345015581"
+ "470730542557532950096605214341062938740807795871021020805296"
+ "652950478448933048254960262113384713508225733871766897517853"
+ "837895708450339634932343848975116093410479690330290902886861"
+ "199931259216523277807574569082153073133673942958789577402321"
+ "393933101298533191266102118889630609532339508457854220031996"
+ "317935940718000325144008438048416150458546268408294693278282"
+ "948818382981756745231443707694395053270779125240469926867881"
+ "019850287125023579685557790983055974962881759919483752202903"
+ "689199564880305684635452065363595791988290536352100701716974"
+ "146329604439226626943340805268641901769971862776194876385604"
+ "059269084172123930049144599166605103175580232672032966645406"
+ "656863031434873551175363941825798425331906382524706572766485"
+ "232874542230564262609161782396887243896247009244068837251567"
+ "783223271286692480010679711347802408351619999199127493689411"
+ "300623337751847138939498426200450305845548565910009066524152"
+ "545480362818290224140170178363735317929685005697363930594593"
+ "881342895328789259362029119598601112899006188879876371854878"
+ "902571753767478028100558334716504784604592507791482451533133"
+ "513128606357440718182123637790769320922442349066328991687862"
+ "072550779316393139037201187579972933016227874898505255743233"
+ "300533498951938156636406532613846576145617323141684480726409"
+ "074184197224754542490884392813625365330881348799432844624838"
+ "960826144439157361917744290729073116318858191758821942010704"
+ "726536748514141391981088590968911224406479710632429529154589"
+ "293799132147906174349149006094094612827453365768213012516958"
+ "693057189940355112250629776318079573232513434098933115589372"
+ "428935891821270739299776803229999720720845111297142577993950"
+ "783716526325576426897121181953632299322177412313472666557946"
+ "026587137818658956285876183561334458426909806227578696972983"
+ "054578648540140777431341495495816167709600470194141141159275"
+ "548586447187051517332624446463129570157208744018317833998766"
+ "292676324122069807882266170905460107352347754465354279502046"
+ "825607840930640910087488682878186052982487934398794575125208"
+ "131434599031355068379234881462786244132403015573059216658125"
+ "100992278732459043154873457532866362865038072260302438341256"
+ "465144627211756104220773841311413109973101672893502315223943"
+ "131161953384837658368750910845308673019625511169535246418667"
+ "822192756475773031982522304934161885363133347824122722726808"
+ "458339668843622993626685401142719276703936351749165952313385"
+ "247253410412444111234661569689109707012146365225868127037807"
+ "653838169759426465847963786308715929383888075292817554540826"
+ "281340379356869541699838857230452874882475626566568389051842"
+ "269616942233880613753230478468266244820792868174047618834373"
+ "911783352591638681513579303490680611741310500871919788283761"
+ "473826205032029153949410495205647160664548204617663407545902"
+ "155255595959035495626212780995301367951250745142427183922194"
+ "679405686105598055836303373290577235698605118096647411642319"
+ "219474157243864921520422978127962037044537385134878691852739"
+ "978563080824265712270538180666161627113218201779779366124407"
+ "844574754753562338454876981852965553927903650323407245581099"
+ "158807518181769597517311013648265985455750620305808055101887"
+ "320313826045110985510052672007356612620966612560448241370561"
+ "199679677792733282710356886335229149926131229035514374201804"
+ "225447070710784729359320523404977483919175478103049697809100"
+ "609955967524096673011016762490361065647326710555615563378359"
+ "408954626110765311053180827944575772439918612038754867514863"
+ "217604919070168030521022438807226197480679192263641289752695"
+ "279367794662267414957708480356805124293407645094292709270568"
+ "454704291549032311245797185365876072558819037766647710690310"
+ "669384727884764603220129302332950334873072394721879741045233"
+ "391084791389282719581455185833551951893903144609338532918282"
+ "071417365794666174600590186688558973292265260457397284219723"
+ "118736526338195892522797003835806498724823327170646268765114"
+ "335047201804332131453475981952420330849091435859688615005340"
+ "662951243478815535510910054031985781353569592327342625691155"
+ "297753939420991863066846663288192966197121277244462515137195"
+ "342887549113968391968700872401047521725534791569882096021521"
+ "725739030856023532346309694644208054801875416636970616158970"
+ "521587368716636562878779650147005687012772946471436217221680"
+ "244104527691159700944328113538972913022260318566564643466194"
+ "762762807772321937689272738612051928757740541051011493615150"
+ "275299712275026278191137262599722341528351699547926563148579"
+ "945678256173476664846284964106409718181820427949855282782538"
+ "418620206551699936257338813616307747712660216941043590501407"
+ "704980849740902536932579576527206665027800420035787899091137"
+ "498285797710848848252835440631389386421149710576503050460098"
+ "225348880547453179874214337446508024003058237008669916793765"
+ "103830790970613932711932541885454647828573565454163547779034"
+ "696478261735426505076787833523027219489668014198674507463022"
+ "589310657355955884354584118602516953160415158848138916494891"
+ "482359394428713333626368035819136954032193064982447142548513"
+ "777798482352540211515117109331361325135068534382485905222012"
+ "689155196601835592087277572480712876900324312948680873379635"
+ "049766825511648515719101185883064389832362822347209928024358"
+ "316443434834701491039800443982197050828044087275939582794327"
+ "098500876914356235193809147621508354816413733354188380887001"
+ "911623409901345292980795015165229743643600614968493977578123"
+ "466095415615447864269417603852427781048383314979868134570808"
+ "915217919397946316940234061179348627230180807326753461268559"
+ "385959678786688421103134141790339174982532045466350837038525"
+ "183177847731101708972936115216192881538981857998354449098289"
+ "173408113131230974433096066603129145174088550345854388495636"
+ "765494379926460031453181542793269110787478232865475929357580"
+ "348192936196178107395850207543849907063319379969931169428718"
+ "329942347533981765560805872472322186708756306455763611238082"
+ "951450138207325773702247286660824416431038520521352370291078"
+ "718247251712503010649103184487159314175972977390771951004404"
+ "935285742659293676372796949610394059160197507860285966047861"
+ "411940542821283013449073170622058378826534472881876688512697"
+ "758815111198429044432164893190718808033606471387328883409622"
+ "920327667611981052185172613337770061634130425782297578896747"
+ "215274225504191258419704542303129850621901180024012018244583"
+ "859069664741628533451563101979900751568200425006085702090401"
+ "221537517047980048268055449980601076610965506150742174772246"
+ "118061736140257508229467892560527108358789784539076822640564"
+ "850851810352577863861819577512851607395927299014823941534626"
+ "348696657393457745078724366706324437838188311582720760585617"
+ "487635004508688532062666933131188059377591626964364639542322"
+ "054994079047698970924302742015839080613569097514938471468421"
+ "996493818271996291393146497945863918551953149000943761983830"
+ "636236545375480765488470416349046929644442714477859372568735"
+ "843708739015199069466751627920202433249482821065761826195203"
+ "859723026379941258427585166740391065737087970718105336581850"
+ "268003743156009120998264173899565279323585156937231413010764"
+ "716608523561569725709426913310091413578317885628039213932500"
+ "135284171861048461662744818955691362183779165069982032305970"
+ "876642081013358484182671863168168338174351197426412625098421"
+ "481239711997827391790388986589171883679226337788805245818923"
+ "874607498645601668109872286941958827402018143065273281785872"
+ "847384936953936746391717131732488209980499904305446724778559"
+ "203846472344227623989606643158012375642854007494547242775256"
+ "898117140062170585337487588594307260069257691479046720590527"
+ "237259474018798808190031749318500514291360716338072006978678"
+ "678209533184089369407377832511947183352849291708100854730341"
+ "450938156361786419525775154653957546143580362599388832564788"
+ "354103919236836698740026304968121883147777634511851850370958"
+ "884085902337976245656103068392811534994239396318567712305532"
+ "477169378421492493173704379367954605145484562415027095545060"
+ "831874739575572895083275461127704135960230120513850917554331"
+ "352277278650414100755269190224957237517573174092361876919730"
+ "465289835269438666544826003345857532325281423386809827947616"
+ "676425828491143428807224317894169834736598542769698312957949"
+ "605903203284128114992351808708487688511436903322773652124574"
+ "055471177142349271989998235771191022554548042468832219533624"
+ "049225313628185783780849179599378819912520555522211658107113"
+ "447678746843053930790961744210668515951907105384498734366645"
+ "249428031772015356705436411724477514133655840609854880392450"
+ "949605226182519804314027265530362531560532656953025288585499"
+ "182228921920121831359074541201044664224711170390199159133806"
+ "269332015718061873656943996928324527943031265119266878834003"
+ "362682519426029626295988425859770358488877080196120965282298"
+ "232237612230358616986168510604382051044429343285625121039569"
+ "326126486782398017268335279614177221030172599765237380415252"
+ "503716285229140380445599733136737846363243777324290551807506"
+ "541472429585746028822540006160866496164919640007935962267377"
+ "060789839526907505659662711614828949104249176417092401488510"
+ "615823548277477841813412329397443687705199567361868375111535"
+ "380877143498420444773617475831606309624504731127984157999557"
+ "818660940286424404275144312853627845343063342311866285268837"
+ "422960089441895882484245945054082617645214582938928610352277"
+ "410119555602965075325424443356593793852682899089314976629899"
+ "773835991388717888860719076570986705247088078593793511009142"
+ "474344996635349786568175384138024607561209403361748867467629"
+ "682257007702707626687955791367383934101209955804380644234879"
+ "805395123927491333463152240956446177043487579040223002287264"
+ "756843617701865806869707173187939918037456096349272671452872"
+ "922420893858994027251574788837911846161770227169407508741963"
+ "414729807676477574570702693444290823666440055726552795145348"
+ "219168459767427369197825367869095117877723957392541043867909"
+ "937470060997392012820142238132910823657536940367596076523833"
+ "377812701709657429614832107556695928504222183715979980013356"
+ "323996396963861087268039321030018015202061305161341454716371"
+ "377251261775727795597989586636757177645626856419109247702765"
+ "013583220037644023978372654055269485171726959848928885152966"
+ "097502777563956522973459672620583266843497935454194334506297"
+ "789118714656105011811810822332373521084368112861541360109122"
+ "200791235053695977711430654151451133236893607856092978814379"
+ "881439122150752237064864676736420913214731240701495311353237"
+ "983819572849112853697828591806699104099315306435617990388595"
+ "202795271374965360450205351235544991668088723423877385558163"
+ "617247959486687176509451394010328416791411019672026111081271"
+ "677642426015450739505038057545285042073081841299473107930734"
+ "353837688028012401932104019803872355878454440858434446609098"
+ "280206732652900093156204893287546907987495659518059539534709"
+ "328514027916546796559631836574970153581238433324096828364072"
+ "134400344200269161377205676209909802573933271591397018622517"
+ "645956348413413974664794017053790027535048049046885143930077"
+ "194991519470308057661102259067039984493186760977741752890345"
+ "473192220637893214146475540262942007429381634927003835133941"
+ "914676847385135317162915391223879714190592014303606413170523"
+ "042176230523286150385679951115593656516900591671184538913558"
+ "092816251191243853120415613844777512078954866614360029341206"
+ "576716710688850917256800353066853946058824831651339265256785"
+ "622460269729620332892007335442599404495662483134697945884683"
+ "759795006415186716458374920343394259217852886898131157533184"
+ "894159749247043678238750268753264909309649831534740397743600"
+ "139998210203084676369899478505461752324146318698089839450421"
+ "143076361782530689506566153604543149790375911800793483912288"
+ "188586309176946988353987684054352129570631591985578449323560"
+ "386626892598170269027020282959579435080091825791399174445592"
+ "2683343374046671669930219650268554687501e-4951",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1p-16444L,
+ -0x1p-16444L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0x1p-16444L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0xc.000000000004p-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L),
+ TEST ("5.4677992978237119037926089004291297245985762235403450155814"
+ "707305425575329500966052143410629387408077958710210208052966"
+ "529504784489330482549602621133847135082257338717668975178538"
+ "378957084503396349323438489751160934104796903302909028868611"
+ "999312592165232778075745690821530731336739429587895774023213"
+ "939331012985331912661021188896306095323395084578542200319963"
+ "179359407180003251440084380484161504585462684082946932782829"
+ "488183829817567452314437076943950532707791252404699268678810"
+ "198502871250235796855577909830559749628817599194837522029036"
+ "891995648803056846354520653635957919882905363521007017169741"
+ "463296044392266269433408052686419017699718627761948763856040"
+ "592690841721239300491445991666051031755802326720329666454066"
+ "568630314348735511753639418257984253319063825247065727664852"
+ "328745422305642626091617823968872438962470092440688372515677"
+ "832232712866924800106797113478024083516199991991274936894113"
+ "006233377518471389394984262004503058455485659100090665241525"
+ "454803628182902241401701783637353179296850056973639305945938"
+ "813428953287892593620291195986011128990061888798763718548789"
+ "025717537674780281005583347165047846045925077914824515331335"
+ "131286063574407181821236377907693209224423490663289916878620"
+ "725507793163931390372011875799729330162278748985052557432333"
+ "005334989519381566364065326138465761456173231416844807264090"
+ "741841972247545424908843928136253653308813487994328446248389"
+ "608261444391573619177442907290731163188581917588219420107047"
+ "265367485141413919810885909689112244064797106324295291545892"
+ "937991321479061743491490060940946128274533657682130125169586"
+ "930571899403551122506297763180795732325134340989331155893724"
+ "289358918212707392997768032299997207208451112971425779939507"
+ "837165263255764268971211819536322993221774123134726665579460"
+ "265871378186589562858761835613344584269098062275786969729830"
+ "545786485401407774313414954958161677096004701941411411592755"
+ "485864471870515173326244464631295701572087440183178339987662"
+ "926763241220698078822661709054601073523477544653542795020468"
+ "256078409306409100874886828781860529824879343987945751252081"
+ "314345990313550683792348814627862441324030155730592166581251"
+ "009922787324590431548734575328663628650380722603024383412564"
+ "651446272117561042207738413114131099731016728935023152239431"
+ "311619533848376583687509108453086730196255111695352464186678"
+ "221927564757730319825223049341618853631333478241227227268084"
+ "583396688436229936266854011427192767039363517491659523133852"
+ "472534104124441112346615696891097070121463652258681270378076"
+ "538381697594264658479637863087159293838880752928175545408262"
+ "813403793568695416998388572304528748824756265665683890518422"
+ "696169422338806137532304784682662448207928681740476188343739"
+ "117833525916386815135793034906806117413105008719197882837614"
+ "738262050320291539494104952056471606645482046176634075459021"
+ "552555959590354956262127809953013679512507451424271839221946"
+ "794056861055980558363033732905772356986051180966474116423192"
+ "194741572438649215204229781279620370445373851348786918527399"
+ "785630808242657122705381806661616271132182017797793661244078"
+ "445747547535623384548769818529655539279036503234072455810991"
+ "588075181817695975173110136482659854557506203058080551018873"
+ "203138260451109855100526720073566126209666125604482413705611"
+ "996796777927332827103568863352291499261312290355143742018042"
+ "254470707107847293593205234049774839191754781030496978091006"
+ "099559675240966730110167624903610656473267105556155633783594"
+ "089546261107653110531808279445757724399186120387548675148632"
+ "176049190701680305210224388072261974806791922636412897526952"
+ "793677946622674149577084803568051242934076450942927092705684"
+ "547042915490323112457971853658760725588190377666477106903106"
+ "693847278847646032201293023329503348730723947218797410452333"
+ "910847913892827195814551858335519518939031446093385329182820"
+ "714173657946661746005901866885589732922652604573972842197231"
+ "187365263381958925227970038358064987248233271706462687651143"
+ "350472018043321314534759819524203308490914358596886150053406"
+ "629512434788155355109100540319857813535695923273426256911552"
+ "977539394209918630668466632881929661971212772444625151371953"
+ "428875491139683919687008724010475217255347915698820960215217"
+ "257390308560235323463096946442080548018754166369706161589705"
+ "215873687166365628787796501470056870127729464714362172216802"
+ "441045276911597009443281135389729130222603185665646434661947"
+ "627628077723219376892727386120519287577405410510114936151502"
+ "752997122750262781911372625997223415283516995479265631485799"
+ "456782561734766648462849641064097181818204279498552827825384"
+ "186202065516999362573388136163077477126602169410435905014077"
+ "049808497409025369325795765272066650278004200357878990911374"
+ "982857977108488482528354406313893864211497105765030504600982"
+ "253488805474531798742143374465080240030582370086699167937651"
+ "038307909706139327119325418854546478285735654541635477790346"
+ "964782617354265050767878335230272194896680141986745074630225"
+ "893106573559558843545841186025169531604151588481389164948914"
+ "823593944287133336263680358191369540321930649824471425485137"
+ "777984823525402115151171093313613251350685343824859052220126"
+ "891551966018355920872775724807128769003243129486808733796350"
+ "497668255116485157191011858830643898323628223472099280243583"
+ "164434348347014910398004439821970508280440872759395827943270"
+ "985008769143562351938091476215083548164137333541883808870019"
+ "116234099013452929807950151652297436436006149684939775781234"
+ "660954156154478642694176038524277810483833149798681345708089"
+ "152179193979463169402340611793486272301808073267534612685593"
+ "859596787866884211031341417903391749825320454663508370385251"
+ "831778477311017089729361152161928815389818579983544490982891"
+ "734081131312309744330960666031291451740885503458543884956367"
+ "654943799264600314531815427932691107874782328654759293575803"
+ "481929361961781073958502075438499070633193799699311694287183"
+ "299423475339817655608058724723221867087563064557636112380829"
+ "514501382073257737022472866608244164310385205213523702910787"
+ "182472517125030106491031844871593141759729773907719510044049"
+ "352857426592936763727969496103940591601975078602859660478614"
+ "119405428212830134490731706220583788265344728818766885126977"
+ "588151111984290444321648931907188080336064713873288834096229"
+ "203276676119810521851726133377700616341304257822975788967472"
+ "152742255041912584197045423031298506219011800240120182445838"
+ "590696647416285334515631019799007515682004250060857020904012"
+ "215375170479800482680554499806010766109655061507421747722461"
+ "180617361402575082294678925605271083587897845390768226405648"
+ "508518103525778638618195775128516073959272990148239415346263"
+ "486966573934577450787243667063244378381883115827207605856174"
+ "876350045086885320626669331311880593775916269643646395423220"
+ "549940790476989709243027420158390806135690975149384714684219"
+ "964938182719962913931464979458639185519531490009437619838306"
+ "362365453754807654884704163490469296444427144778593725687358"
+ "437087390151990694667516279202024332494828210657618261952038"
+ "597230263799412584275851667403910657370879707181053365818502"
+ "680037431560091209982641738995652793235851569372314130107647"
+ "166085235615697257094269133100914135783178856280392139325001"
+ "352841718610484616627448189556913621837791650699820323059708"
+ "766420810133584841826718631681683381743511974264126250984214"
+ "812397119978273917903889865891718836792263377888052458189238"
+ "746074986456016681098722869419588274020181430652732817858728"
+ "473849369539367463917171317324882099804999043054467247785592"
+ "038464723442276239896066431580123756428540074945472427752568"
+ "981171400621705853374875885943072600692576914790467205905272"
+ "372594740187988081900317493185005142913607163380720069786786"
+ "782095331840893694073778325119471833528492917081008547303414"
+ "509381563617864195257751546539575461435803625993888325647883"
+ "541039192368366987400263049681218831477776345118518503709588"
+ "840859023379762456561030683928115349942393963185677123055324"
+ "771693784214924931737043793679546051454845624150270955450608"
+ "318747395755728950832754611277041359602301205138509175543313"
+ "522772786504141007552691902249572375175731740923618769197304"
+ "652898352694386665448260033458575323252814233868098279476166"
+ "764258284911434288072243178941698347365985427696983129579496"
+ "059032032841281149923518087084876885114369033227736521245740"
+ "554711771423492719899982357711910225545480424688322195336240"
+ "492253136281857837808491795993788199125205555222116581071134"
+ "476787468430539307909617442106685159519071053844987343666452"
+ "494280317720153567054364117244775141336558406098548803924509"
+ "496052261825198043140272655303625315605326569530252885854991"
+ "822289219201218313590745412010446642247111703901991591338062"
+ "693320157180618736569439969283245279430312651192668788340033"
+ "626825194260296262959884258597703584888770801961209652822982"
+ "322376122303586169861685106043820510444293432856251210395693"
+ "261264867823980172683352796141772210301725997652373804152525"
+ "037162852291403804455997331367378463632437773242905518075065"
+ "414724295857460288225400061608664961649196400079359622673770"
+ "607898395269075056596627116148289491042491764170924014885106"
+ "158235482774778418134123293974436877051995673618683751115353"
+ "808771434984204447736174758316063096245047311279841579995578"
+ "186609402864244042751443128536278453430633423118662852688374"
+ "229600894418958824842459450540826176452145829389286103522774"
+ "101195556029650753254244433565937938526828990893149766298997"
+ "738359913887178888607190765709867052470880785937935110091424"
+ "743449966353497865681753841380246075612094033617488674676296"
+ "822570077027076266879557913673839341012099558043806442348798"
+ "053951239274913334631522409564461770434875790402230022872647"
+ "568436177018658068697071731879399180374560963492726714528729"
+ "224208938589940272515747888379118461617702271694075087419634"
+ "147298076764775745707026934442908236664400557265527951453482"
+ "191684597674273691978253678690951178777239573925410438679099"
+ "374700609973920128201422381329108236575369403675960765238333"
+ "778127017096574296148321075566959285042221837159799800133563"
+ "239963969638610872680393210300180152020613051613414547163713"
+ "772512617757277955979895866367571776456268564191092477027650"
+ "135832200376440239783726540552694851717269598489288851529660"
+ "975027775639565229734596726205832668434979354541943345062977"
+ "891187146561050118118108223323735210843681128615413601091222"
+ "007912350536959777114306541514511332368936078560929788143798"
+ "814391221507522370648646767364209132147312407014953113532379"
+ "838195728491128536978285918066991040993153064356179903885952"
+ "027952713749653604502053512355449916680887234238773855581636"
+ "172479594866871765094513940103284167914110196720261110812716"
+ "776424260154507395050380575452850420730818412994731079307343"
+ "538376880280124019321040198038723558784544408584344466090982"
+ "802067326529000931562048932875469079874956595180595395347093"
+ "285140279165467965596318365749701535812384333240968283640721"
+ "344003442002691613772056762099098025739332715913970186225176"
+ "459563484134139746647940170537900275350480490468851439300771"
+ "949915194703080576611022590670399844931867609777417528903454"
+ "731922206378932141464755402629420074293816349270038351339419"
+ "146768473851353171629153912238797141905920143036064131705230"
+ "421762305232861503856799511155936565169005916711845389135580"
+ "928162511912438531204156138447775120789548666143600293412065"
+ "767167106888509172568003530668539460588248316513392652567856"
+ "224602697296203328920073354425994044956624831346979458846837"
+ "597950064151867164583749203433942592178528868981311575331848"
+ "941597492470436782387502687532649093096498315347403977436001"
+ "399982102030846763698994785054617523241463186980898394504211"
+ "430763617825306895065661536045431497903759118007934839122881"
+ "885863091769469883539876840543521295706315919855784493235603"
+ "866268925981702690270202829595794350800918257913991744455922"
+ "683343374046671669930219650268554687499e-4951",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x0p+0,
+ 0x0p+0,
+ 0x0p+0,
+ 0x4p-1076,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0x8p-16448L,
+ 0x8p-16448L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0x8p-16448L,
+ 0xcp-16448L,
+ 0x8p-16448L,
+ 0xcp-16448L,
+ false,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0xb.fffffffffffcp-16448L,
+ 0xcp-16448L,
+ 0xb.fffffffffffcp-16448L,
+ 0xcp-16448L),
+ TEST ("5.4677992978237119037926089004291297245985762235403450155814"
+ "707305425575329500966052143410629387408077958710210208052966"
+ "529504784489330482549602621133847135082257338717668975178538"
+ "378957084503396349323438489751160934104796903302909028868611"
+ "999312592165232778075745690821530731336739429587895774023213"
+ "939331012985331912661021188896306095323395084578542200319963"
+ "179359407180003251440084380484161504585462684082946932782829"
+ "488183829817567452314437076943950532707791252404699268678810"
+ "198502871250235796855577909830559749628817599194837522029036"
+ "891995648803056846354520653635957919882905363521007017169741"
+ "463296044392266269433408052686419017699718627761948763856040"
+ "592690841721239300491445991666051031755802326720329666454066"
+ "568630314348735511753639418257984253319063825247065727664852"
+ "328745422305642626091617823968872438962470092440688372515677"
+ "832232712866924800106797113478024083516199991991274936894113"
+ "006233377518471389394984262004503058455485659100090665241525"
+ "454803628182902241401701783637353179296850056973639305945938"
+ "813428953287892593620291195986011128990061888798763718548789"
+ "025717537674780281005583347165047846045925077914824515331335"
+ "131286063574407181821236377907693209224423490663289916878620"
+ "725507793163931390372011875799729330162278748985052557432333"
+ "005334989519381566364065326138465761456173231416844807264090"
+ "741841972247545424908843928136253653308813487994328446248389"
+ "608261444391573619177442907290731163188581917588219420107047"
+ "265367485141413919810885909689112244064797106324295291545892"
+ "937991321479061743491490060940946128274533657682130125169586"
+ "930571899403551122506297763180795732325134340989331155893724"
+ "289358918212707392997768032299997207208451112971425779939507"
+ "837165263255764268971211819536322993221774123134726665579460"
+ "265871378186589562858761835613344584269098062275786969729830"
+ "545786485401407774313414954958161677096004701941411411592755"
+ "485864471870515173326244464631295701572087440183178339987662"
+ "926763241220698078822661709054601073523477544653542795020468"
+ "256078409306409100874886828781860529824879343987945751252081"
+ "314345990313550683792348814627862441324030155730592166581251"
+ "009922787324590431548734575328663628650380722603024383412564"
+ "651446272117561042207738413114131099731016728935023152239431"
+ "311619533848376583687509108453086730196255111695352464186678"
+ "221927564757730319825223049341618853631333478241227227268084"
+ "583396688436229936266854011427192767039363517491659523133852"
+ "472534104124441112346615696891097070121463652258681270378076"
+ "538381697594264658479637863087159293838880752928175545408262"
+ "813403793568695416998388572304528748824756265665683890518422"
+ "696169422338806137532304784682662448207928681740476188343739"
+ "117833525916386815135793034906806117413105008719197882837614"
+ "738262050320291539494104952056471606645482046176634075459021"
+ "552555959590354956262127809953013679512507451424271839221946"
+ "794056861055980558363033732905772356986051180966474116423192"
+ "194741572438649215204229781279620370445373851348786918527399"
+ "785630808242657122705381806661616271132182017797793661244078"
+ "445747547535623384548769818529655539279036503234072455810991"
+ "588075181817695975173110136482659854557506203058080551018873"
+ "203138260451109855100526720073566126209666125604482413705611"
+ "996796777927332827103568863352291499261312290355143742018042"
+ "254470707107847293593205234049774839191754781030496978091006"
+ "099559675240966730110167624903610656473267105556155633783594"
+ "089546261107653110531808279445757724399186120387548675148632"
+ "176049190701680305210224388072261974806791922636412897526952"
+ "793677946622674149577084803568051242934076450942927092705684"
+ "547042915490323112457971853658760725588190377666477106903106"
+ "693847278847646032201293023329503348730723947218797410452333"
+ "910847913892827195814551858335519518939031446093385329182820"
+ "714173657946661746005901866885589732922652604573972842197231"
+ "187365263381958925227970038358064987248233271706462687651143"
+ "350472018043321314534759819524203308490914358596886150053406"
+ "629512434788155355109100540319857813535695923273426256911552"
+ "977539394209918630668466632881929661971212772444625151371953"
+ "428875491139683919687008724010475217255347915698820960215217"
+ "257390308560235323463096946442080548018754166369706161589705"
+ "215873687166365628787796501470056870127729464714362172216802"
+ "441045276911597009443281135389729130222603185665646434661947"
+ "627628077723219376892727386120519287577405410510114936151502"
+ "752997122750262781911372625997223415283516995479265631485799"
+ "456782561734766648462849641064097181818204279498552827825384"
+ "186202065516999362573388136163077477126602169410435905014077"
+ "049808497409025369325795765272066650278004200357878990911374"
+ "982857977108488482528354406313893864211497105765030504600982"
+ "253488805474531798742143374465080240030582370086699167937651"
+ "038307909706139327119325418854546478285735654541635477790346"
+ "964782617354265050767878335230272194896680141986745074630225"
+ "893106573559558843545841186025169531604151588481389164948914"
+ "823593944287133336263680358191369540321930649824471425485137"
+ "777984823525402115151171093313613251350685343824859052220126"
+ "891551966018355920872775724807128769003243129486808733796350"
+ "497668255116485157191011858830643898323628223472099280243583"
+ "164434348347014910398004439821970508280440872759395827943270"
+ "985008769143562351938091476215083548164137333541883808870019"
+ "116234099013452929807950151652297436436006149684939775781234"
+ "660954156154478642694176038524277810483833149798681345708089"
+ "152179193979463169402340611793486272301808073267534612685593"
+ "859596787866884211031341417903391749825320454663508370385251"
+ "831778477311017089729361152161928815389818579983544490982891"
+ "734081131312309744330960666031291451740885503458543884956367"
+ "654943799264600314531815427932691107874782328654759293575803"
+ "481929361961781073958502075438499070633193799699311694287183"
+ "299423475339817655608058724723221867087563064557636112380829"
+ "514501382073257737022472866608244164310385205213523702910787"
+ "182472517125030106491031844871593141759729773907719510044049"
+ "352857426592936763727969496103940591601975078602859660478614"
+ "119405428212830134490731706220583788265344728818766885126977"
+ "588151111984290444321648931907188080336064713873288834096229"
+ "203276676119810521851726133377700616341304257822975788967472"
+ "152742255041912584197045423031298506219011800240120182445838"
+ "590696647416285334515631019799007515682004250060857020904012"
+ "215375170479800482680554499806010766109655061507421747722461"
+ "180617361402575082294678925605271083587897845390768226405648"
+ "508518103525778638618195775128516073959272990148239415346263"
+ "486966573934577450787243667063244378381883115827207605856174"
+ "876350045086885320626669331311880593775916269643646395423220"
+ "549940790476989709243027420158390806135690975149384714684219"
+ "964938182719962913931464979458639185519531490009437619838306"
+ "362365453754807654884704163490469296444427144778593725687358"
+ "437087390151990694667516279202024332494828210657618261952038"
+ "597230263799412584275851667403910657370879707181053365818502"
+ "680037431560091209982641738995652793235851569372314130107647"
+ "166085235615697257094269133100914135783178856280392139325001"
+ "352841718610484616627448189556913621837791650699820323059708"
+ "766420810133584841826718631681683381743511974264126250984214"
+ "812397119978273917903889865891718836792263377888052458189238"
+ "746074986456016681098722869419588274020181430652732817858728"
+ "473849369539367463917171317324882099804999043054467247785592"
+ "038464723442276239896066431580123756428540074945472427752568"
+ "981171400621705853374875885943072600692576914790467205905272"
+ "372594740187988081900317493185005142913607163380720069786786"
+ "782095331840893694073778325119471833528492917081008547303414"
+ "509381563617864195257751546539575461435803625993888325647883"
+ "541039192368366987400263049681218831477776345118518503709588"
+ "840859023379762456561030683928115349942393963185677123055324"
+ "771693784214924931737043793679546051454845624150270955450608"
+ "318747395755728950832754611277041359602301205138509175543313"
+ "522772786504141007552691902249572375175731740923618769197304"
+ "652898352694386665448260033458575323252814233868098279476166"
+ "764258284911434288072243178941698347365985427696983129579496"
+ "059032032841281149923518087084876885114369033227736521245740"
+ "554711771423492719899982357711910225545480424688322195336240"
+ "492253136281857837808491795993788199125205555222116581071134"
+ "476787468430539307909617442106685159519071053844987343666452"
+ "494280317720153567054364117244775141336558406098548803924509"
+ "496052261825198043140272655303625315605326569530252885854991"
+ "822289219201218313590745412010446642247111703901991591338062"
+ "693320157180618736569439969283245279430312651192668788340033"
+ "626825194260296262959884258597703584888770801961209652822982"
+ "322376122303586169861685106043820510444293432856251210395693"
+ "261264867823980172683352796141772210301725997652373804152525"
+ "037162852291403804455997331367378463632437773242905518075065"
+ "414724295857460288225400061608664961649196400079359622673770"
+ "607898395269075056596627116148289491042491764170924014885106"
+ "158235482774778418134123293974436877051995673618683751115353"
+ "808771434984204447736174758316063096245047311279841579995578"
+ "186609402864244042751443128536278453430633423118662852688374"
+ "229600894418958824842459450540826176452145829389286103522774"
+ "101195556029650753254244433565937938526828990893149766298997"
+ "738359913887178888607190765709867052470880785937935110091424"
+ "743449966353497865681753841380246075612094033617488674676296"
+ "822570077027076266879557913673839341012099558043806442348798"
+ "053951239274913334631522409564461770434875790402230022872647"
+ "568436177018658068697071731879399180374560963492726714528729"
+ "224208938589940272515747888379118461617702271694075087419634"
+ "147298076764775745707026934442908236664400557265527951453482"
+ "191684597674273691978253678690951178777239573925410438679099"
+ "374700609973920128201422381329108236575369403675960765238333"
+ "778127017096574296148321075566959285042221837159799800133563"
+ "239963969638610872680393210300180152020613051613414547163713"
+ "772512617757277955979895866367571776456268564191092477027650"
+ "135832200376440239783726540552694851717269598489288851529660"
+ "975027775639565229734596726205832668434979354541943345062977"
+ "891187146561050118118108223323735210843681128615413601091222"
+ "007912350536959777114306541514511332368936078560929788143798"
+ "814391221507522370648646767364209132147312407014953113532379"
+ "838195728491128536978285918066991040993153064356179903885952"
+ "027952713749653604502053512355449916680887234238773855581636"
+ "172479594866871765094513940103284167914110196720261110812716"
+ "776424260154507395050380575452850420730818412994731079307343"
+ "538376880280124019321040198038723558784544408584344466090982"
+ "802067326529000931562048932875469079874956595180595395347093"
+ "285140279165467965596318365749701535812384333240968283640721"
+ "344003442002691613772056762099098025739332715913970186225176"
+ "459563484134139746647940170537900275350480490468851439300771"
+ "949915194703080576611022590670399844931867609777417528903454"
+ "731922206378932141464755402629420074293816349270038351339419"
+ "146768473851353171629153912238797141905920143036064131705230"
+ "421762305232861503856799511155936565169005916711845389135580"
+ "928162511912438531204156138447775120789548666143600293412065"
+ "767167106888509172568003530668539460588248316513392652567856"
+ "224602697296203328920073354425994044956624831346979458846837"
+ "597950064151867164583749203433942592178528868981311575331848"
+ "941597492470436782387502687532649093096498315347403977436001"
+ "399982102030846763698994785054617523241463186980898394504211"
+ "430763617825306895065661536045431497903759118007934839122881"
+ "885863091769469883539876840543521295706315919855784493235603"
+ "866268925981702690270202829595794350800918257913991744455922"
+ "6833433740466716699302196502685546875e-4951",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x0p+0,
+ 0x0p+0,
+ 0x0p+0,
+ 0x4p-1076,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ false,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L),
+ TEST ("5.4677992978237119037926089004291297245985762235403450155814"
+ "707305425575329500966052143410629387408077958710210208052966"
+ "529504784489330482549602621133847135082257338717668975178538"
+ "378957084503396349323438489751160934104796903302909028868611"
+ "999312592165232778075745690821530731336739429587895774023213"
+ "939331012985331912661021188896306095323395084578542200319963"
+ "179359407180003251440084380484161504585462684082946932782829"
+ "488183829817567452314437076943950532707791252404699268678810"
+ "198502871250235796855577909830559749628817599194837522029036"
+ "891995648803056846354520653635957919882905363521007017169741"
+ "463296044392266269433408052686419017699718627761948763856040"
+ "592690841721239300491445991666051031755802326720329666454066"
+ "568630314348735511753639418257984253319063825247065727664852"
+ "328745422305642626091617823968872438962470092440688372515677"
+ "832232712866924800106797113478024083516199991991274936894113"
+ "006233377518471389394984262004503058455485659100090665241525"
+ "454803628182902241401701783637353179296850056973639305945938"
+ "813428953287892593620291195986011128990061888798763718548789"
+ "025717537674780281005583347165047846045925077914824515331335"
+ "131286063574407181821236377907693209224423490663289916878620"
+ "725507793163931390372011875799729330162278748985052557432333"
+ "005334989519381566364065326138465761456173231416844807264090"
+ "741841972247545424908843928136253653308813487994328446248389"
+ "608261444391573619177442907290731163188581917588219420107047"
+ "265367485141413919810885909689112244064797106324295291545892"
+ "937991321479061743491490060940946128274533657682130125169586"
+ "930571899403551122506297763180795732325134340989331155893724"
+ "289358918212707392997768032299997207208451112971425779939507"
+ "837165263255764268971211819536322993221774123134726665579460"
+ "265871378186589562858761835613344584269098062275786969729830"
+ "545786485401407774313414954958161677096004701941411411592755"
+ "485864471870515173326244464631295701572087440183178339987662"
+ "926763241220698078822661709054601073523477544653542795020468"
+ "256078409306409100874886828781860529824879343987945751252081"
+ "314345990313550683792348814627862441324030155730592166581251"
+ "009922787324590431548734575328663628650380722603024383412564"
+ "651446272117561042207738413114131099731016728935023152239431"
+ "311619533848376583687509108453086730196255111695352464186678"
+ "221927564757730319825223049341618853631333478241227227268084"
+ "583396688436229936266854011427192767039363517491659523133852"
+ "472534104124441112346615696891097070121463652258681270378076"
+ "538381697594264658479637863087159293838880752928175545408262"
+ "813403793568695416998388572304528748824756265665683890518422"
+ "696169422338806137532304784682662448207928681740476188343739"
+ "117833525916386815135793034906806117413105008719197882837614"
+ "738262050320291539494104952056471606645482046176634075459021"
+ "552555959590354956262127809953013679512507451424271839221946"
+ "794056861055980558363033732905772356986051180966474116423192"
+ "194741572438649215204229781279620370445373851348786918527399"
+ "785630808242657122705381806661616271132182017797793661244078"
+ "445747547535623384548769818529655539279036503234072455810991"
+ "588075181817695975173110136482659854557506203058080551018873"
+ "203138260451109855100526720073566126209666125604482413705611"
+ "996796777927332827103568863352291499261312290355143742018042"
+ "254470707107847293593205234049774839191754781030496978091006"
+ "099559675240966730110167624903610656473267105556155633783594"
+ "089546261107653110531808279445757724399186120387548675148632"
+ "176049190701680305210224388072261974806791922636412897526952"
+ "793677946622674149577084803568051242934076450942927092705684"
+ "547042915490323112457971853658760725588190377666477106903106"
+ "693847278847646032201293023329503348730723947218797410452333"
+ "910847913892827195814551858335519518939031446093385329182820"
+ "714173657946661746005901866885589732922652604573972842197231"
+ "187365263381958925227970038358064987248233271706462687651143"
+ "350472018043321314534759819524203308490914358596886150053406"
+ "629512434788155355109100540319857813535695923273426256911552"
+ "977539394209918630668466632881929661971212772444625151371953"
+ "428875491139683919687008724010475217255347915698820960215217"
+ "257390308560235323463096946442080548018754166369706161589705"
+ "215873687166365628787796501470056870127729464714362172216802"
+ "441045276911597009443281135389729130222603185665646434661947"
+ "627628077723219376892727386120519287577405410510114936151502"
+ "752997122750262781911372625997223415283516995479265631485799"
+ "456782561734766648462849641064097181818204279498552827825384"
+ "186202065516999362573388136163077477126602169410435905014077"
+ "049808497409025369325795765272066650278004200357878990911374"
+ "982857977108488482528354406313893864211497105765030504600982"
+ "253488805474531798742143374465080240030582370086699167937651"
+ "038307909706139327119325418854546478285735654541635477790346"
+ "964782617354265050767878335230272194896680141986745074630225"
+ "893106573559558843545841186025169531604151588481389164948914"
+ "823593944287133336263680358191369540321930649824471425485137"
+ "777984823525402115151171093313613251350685343824859052220126"
+ "891551966018355920872775724807128769003243129486808733796350"
+ "497668255116485157191011858830643898323628223472099280243583"
+ "164434348347014910398004439821970508280440872759395827943270"
+ "985008769143562351938091476215083548164137333541883808870019"
+ "116234099013452929807950151652297436436006149684939775781234"
+ "660954156154478642694176038524277810483833149798681345708089"
+ "152179193979463169402340611793486272301808073267534612685593"
+ "859596787866884211031341417903391749825320454663508370385251"
+ "831778477311017089729361152161928815389818579983544490982891"
+ "734081131312309744330960666031291451740885503458543884956367"
+ "654943799264600314531815427932691107874782328654759293575803"
+ "481929361961781073958502075438499070633193799699311694287183"
+ "299423475339817655608058724723221867087563064557636112380829"
+ "514501382073257737022472866608244164310385205213523702910787"
+ "182472517125030106491031844871593141759729773907719510044049"
+ "352857426592936763727969496103940591601975078602859660478614"
+ "119405428212830134490731706220583788265344728818766885126977"
+ "588151111984290444321648931907188080336064713873288834096229"
+ "203276676119810521851726133377700616341304257822975788967472"
+ "152742255041912584197045423031298506219011800240120182445838"
+ "590696647416285334515631019799007515682004250060857020904012"
+ "215375170479800482680554499806010766109655061507421747722461"
+ "180617361402575082294678925605271083587897845390768226405648"
+ "508518103525778638618195775128516073959272990148239415346263"
+ "486966573934577450787243667063244378381883115827207605856174"
+ "876350045086885320626669331311880593775916269643646395423220"
+ "549940790476989709243027420158390806135690975149384714684219"
+ "964938182719962913931464979458639185519531490009437619838306"
+ "362365453754807654884704163490469296444427144778593725687358"
+ "437087390151990694667516279202024332494828210657618261952038"
+ "597230263799412584275851667403910657370879707181053365818502"
+ "680037431560091209982641738995652793235851569372314130107647"
+ "166085235615697257094269133100914135783178856280392139325001"
+ "352841718610484616627448189556913621837791650699820323059708"
+ "766420810133584841826718631681683381743511974264126250984214"
+ "812397119978273917903889865891718836792263377888052458189238"
+ "746074986456016681098722869419588274020181430652732817858728"
+ "473849369539367463917171317324882099804999043054467247785592"
+ "038464723442276239896066431580123756428540074945472427752568"
+ "981171400621705853374875885943072600692576914790467205905272"
+ "372594740187988081900317493185005142913607163380720069786786"
+ "782095331840893694073778325119471833528492917081008547303414"
+ "509381563617864195257751546539575461435803625993888325647883"
+ "541039192368366987400263049681218831477776345118518503709588"
+ "840859023379762456561030683928115349942393963185677123055324"
+ "771693784214924931737043793679546051454845624150270955450608"
+ "318747395755728950832754611277041359602301205138509175543313"
+ "522772786504141007552691902249572375175731740923618769197304"
+ "652898352694386665448260033458575323252814233868098279476166"
+ "764258284911434288072243178941698347365985427696983129579496"
+ "059032032841281149923518087084876885114369033227736521245740"
+ "554711771423492719899982357711910225545480424688322195336240"
+ "492253136281857837808491795993788199125205555222116581071134"
+ "476787468430539307909617442106685159519071053844987343666452"
+ "494280317720153567054364117244775141336558406098548803924509"
+ "496052261825198043140272655303625315605326569530252885854991"
+ "822289219201218313590745412010446642247111703901991591338062"
+ "693320157180618736569439969283245279430312651192668788340033"
+ "626825194260296262959884258597703584888770801961209652822982"
+ "322376122303586169861685106043820510444293432856251210395693"
+ "261264867823980172683352796141772210301725997652373804152525"
+ "037162852291403804455997331367378463632437773242905518075065"
+ "414724295857460288225400061608664961649196400079359622673770"
+ "607898395269075056596627116148289491042491764170924014885106"
+ "158235482774778418134123293974436877051995673618683751115353"
+ "808771434984204447736174758316063096245047311279841579995578"
+ "186609402864244042751443128536278453430633423118662852688374"
+ "229600894418958824842459450540826176452145829389286103522774"
+ "101195556029650753254244433565937938526828990893149766298997"
+ "738359913887178888607190765709867052470880785937935110091424"
+ "743449966353497865681753841380246075612094033617488674676296"
+ "822570077027076266879557913673839341012099558043806442348798"
+ "053951239274913334631522409564461770434875790402230022872647"
+ "568436177018658068697071731879399180374560963492726714528729"
+ "224208938589940272515747888379118461617702271694075087419634"
+ "147298076764775745707026934442908236664400557265527951453482"
+ "191684597674273691978253678690951178777239573925410438679099"
+ "374700609973920128201422381329108236575369403675960765238333"
+ "778127017096574296148321075566959285042221837159799800133563"
+ "239963969638610872680393210300180152020613051613414547163713"
+ "772512617757277955979895866367571776456268564191092477027650"
+ "135832200376440239783726540552694851717269598489288851529660"
+ "975027775639565229734596726205832668434979354541943345062977"
+ "891187146561050118118108223323735210843681128615413601091222"
+ "007912350536959777114306541514511332368936078560929788143798"
+ "814391221507522370648646767364209132147312407014953113532379"
+ "838195728491128536978285918066991040993153064356179903885952"
+ "027952713749653604502053512355449916680887234238773855581636"
+ "172479594866871765094513940103284167914110196720261110812716"
+ "776424260154507395050380575452850420730818412994731079307343"
+ "538376880280124019321040198038723558784544408584344466090982"
+ "802067326529000931562048932875469079874956595180595395347093"
+ "285140279165467965596318365749701535812384333240968283640721"
+ "344003442002691613772056762099098025739332715913970186225176"
+ "459563484134139746647940170537900275350480490468851439300771"
+ "949915194703080576611022590670399844931867609777417528903454"
+ "731922206378932141464755402629420074293816349270038351339419"
+ "146768473851353171629153912238797141905920143036064131705230"
+ "421762305232861503856799511155936565169005916711845389135580"
+ "928162511912438531204156138447775120789548666143600293412065"
+ "767167106888509172568003530668539460588248316513392652567856"
+ "224602697296203328920073354425994044956624831346979458846837"
+ "597950064151867164583749203433942592178528868981311575331848"
+ "941597492470436782387502687532649093096498315347403977436001"
+ "399982102030846763698994785054617523241463186980898394504211"
+ "430763617825306895065661536045431497903759118007934839122881"
+ "885863091769469883539876840543521295706315919855784493235603"
+ "866268925981702690270202829595794350800918257913991744455922"
+ "683343374046671669930219650268554687501e-4951",
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x0p+0f,
+ 0x8p-152f,
+ 0x0p+0,
+ 0x0p+0,
+ 0x0p+0,
+ 0x4p-1076,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0x8p-16448L,
+ 0x1p-16444L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0x1p-16444L,
+ false,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x0p+0L,
+ 0x4p-1076L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xcp-16448L,
+ 0xc.000000000004p-16448L),
+ TEST ("-5.467799297823711903792608900429129724598576223540345015581"
+ "470730542557532950096605214341062938740807795871021020805296"
+ "652950478448933048254960262113384713508225733871766897517853"
+ "837895708450339634932343848975116093410479690330290902886861"
+ "199931259216523277807574569082153073133673942958789577402321"
+ "393933101298533191266102118889630609532339508457854220031996"
+ "317935940718000325144008438048416150458546268408294693278282"
+ "948818382981756745231443707694395053270779125240469926867881"
+ "019850287125023579685557790983055974962881759919483752202903"
+ "689199564880305684635452065363595791988290536352100701716974"
+ "146329604439226626943340805268641901769971862776194876385604"
+ "059269084172123930049144599166605103175580232672032966645406"
+ "656863031434873551175363941825798425331906382524706572766485"
+ "232874542230564262609161782396887243896247009244068837251567"
+ "783223271286692480010679711347802408351619999199127493689411"
+ "300623337751847138939498426200450305845548565910009066524152"
+ "545480362818290224140170178363735317929685005697363930594593"
+ "881342895328789259362029119598601112899006188879876371854878"
+ "902571753767478028100558334716504784604592507791482451533133"
+ "513128606357440718182123637790769320922442349066328991687862"
+ "072550779316393139037201187579972933016227874898505255743233"
+ "300533498951938156636406532613846576145617323141684480726409"
+ "074184197224754542490884392813625365330881348799432844624838"
+ "960826144439157361917744290729073116318858191758821942010704"
+ "726536748514141391981088590968911224406479710632429529154589"
+ "293799132147906174349149006094094612827453365768213012516958"
+ "693057189940355112250629776318079573232513434098933115589372"
+ "428935891821270739299776803229999720720845111297142577993950"
+ "783716526325576426897121181953632299322177412313472666557946"
+ "026587137818658956285876183561334458426909806227578696972983"
+ "054578648540140777431341495495816167709600470194141141159275"
+ "548586447187051517332624446463129570157208744018317833998766"
+ "292676324122069807882266170905460107352347754465354279502046"
+ "825607840930640910087488682878186052982487934398794575125208"
+ "131434599031355068379234881462786244132403015573059216658125"
+ "100992278732459043154873457532866362865038072260302438341256"
+ "465144627211756104220773841311413109973101672893502315223943"
+ "131161953384837658368750910845308673019625511169535246418667"
+ "822192756475773031982522304934161885363133347824122722726808"
+ "458339668843622993626685401142719276703936351749165952313385"
+ "247253410412444111234661569689109707012146365225868127037807"
+ "653838169759426465847963786308715929383888075292817554540826"
+ "281340379356869541699838857230452874882475626566568389051842"
+ "269616942233880613753230478468266244820792868174047618834373"
+ "911783352591638681513579303490680611741310500871919788283761"
+ "473826205032029153949410495205647160664548204617663407545902"
+ "155255595959035495626212780995301367951250745142427183922194"
+ "679405686105598055836303373290577235698605118096647411642319"
+ "219474157243864921520422978127962037044537385134878691852739"
+ "978563080824265712270538180666161627113218201779779366124407"
+ "844574754753562338454876981852965553927903650323407245581099"
+ "158807518181769597517311013648265985455750620305808055101887"
+ "320313826045110985510052672007356612620966612560448241370561"
+ "199679677792733282710356886335229149926131229035514374201804"
+ "225447070710784729359320523404977483919175478103049697809100"
+ "609955967524096673011016762490361065647326710555615563378359"
+ "408954626110765311053180827944575772439918612038754867514863"
+ "217604919070168030521022438807226197480679192263641289752695"
+ "279367794662267414957708480356805124293407645094292709270568"
+ "454704291549032311245797185365876072558819037766647710690310"
+ "669384727884764603220129302332950334873072394721879741045233"
+ "391084791389282719581455185833551951893903144609338532918282"
+ "071417365794666174600590186688558973292265260457397284219723"
+ "118736526338195892522797003835806498724823327170646268765114"
+ "335047201804332131453475981952420330849091435859688615005340"
+ "662951243478815535510910054031985781353569592327342625691155"
+ "297753939420991863066846663288192966197121277244462515137195"
+ "342887549113968391968700872401047521725534791569882096021521"
+ "725739030856023532346309694644208054801875416636970616158970"
+ "521587368716636562878779650147005687012772946471436217221680"
+ "244104527691159700944328113538972913022260318566564643466194"
+ "762762807772321937689272738612051928757740541051011493615150"
+ "275299712275026278191137262599722341528351699547926563148579"
+ "945678256173476664846284964106409718181820427949855282782538"
+ "418620206551699936257338813616307747712660216941043590501407"
+ "704980849740902536932579576527206665027800420035787899091137"
+ "498285797710848848252835440631389386421149710576503050460098"
+ "225348880547453179874214337446508024003058237008669916793765"
+ "103830790970613932711932541885454647828573565454163547779034"
+ "696478261735426505076787833523027219489668014198674507463022"
+ "589310657355955884354584118602516953160415158848138916494891"
+ "482359394428713333626368035819136954032193064982447142548513"
+ "777798482352540211515117109331361325135068534382485905222012"
+ "689155196601835592087277572480712876900324312948680873379635"
+ "049766825511648515719101185883064389832362822347209928024358"
+ "316443434834701491039800443982197050828044087275939582794327"
+ "098500876914356235193809147621508354816413733354188380887001"
+ "911623409901345292980795015165229743643600614968493977578123"
+ "466095415615447864269417603852427781048383314979868134570808"
+ "915217919397946316940234061179348627230180807326753461268559"
+ "385959678786688421103134141790339174982532045466350837038525"
+ "183177847731101708972936115216192881538981857998354449098289"
+ "173408113131230974433096066603129145174088550345854388495636"
+ "765494379926460031453181542793269110787478232865475929357580"
+ "348192936196178107395850207543849907063319379969931169428718"
+ "329942347533981765560805872472322186708756306455763611238082"
+ "951450138207325773702247286660824416431038520521352370291078"
+ "718247251712503010649103184487159314175972977390771951004404"
+ "935285742659293676372796949610394059160197507860285966047861"
+ "411940542821283013449073170622058378826534472881876688512697"
+ "758815111198429044432164893190718808033606471387328883409622"
+ "920327667611981052185172613337770061634130425782297578896747"
+ "215274225504191258419704542303129850621901180024012018244583"
+ "859069664741628533451563101979900751568200425006085702090401"
+ "221537517047980048268055449980601076610965506150742174772246"
+ "118061736140257508229467892560527108358789784539076822640564"
+ "850851810352577863861819577512851607395927299014823941534626"
+ "348696657393457745078724366706324437838188311582720760585617"
+ "487635004508688532062666933131188059377591626964364639542322"
+ "054994079047698970924302742015839080613569097514938471468421"
+ "996493818271996291393146497945863918551953149000943761983830"
+ "636236545375480765488470416349046929644442714477859372568735"
+ "843708739015199069466751627920202433249482821065761826195203"
+ "859723026379941258427585166740391065737087970718105336581850"
+ "268003743156009120998264173899565279323585156937231413010764"
+ "716608523561569725709426913310091413578317885628039213932500"
+ "135284171861048461662744818955691362183779165069982032305970"
+ "876642081013358484182671863168168338174351197426412625098421"
+ "481239711997827391790388986589171883679226337788805245818923"
+ "874607498645601668109872286941958827402018143065273281785872"
+ "847384936953936746391717131732488209980499904305446724778559"
+ "203846472344227623989606643158012375642854007494547242775256"
+ "898117140062170585337487588594307260069257691479046720590527"
+ "237259474018798808190031749318500514291360716338072006978678"
+ "678209533184089369407377832511947183352849291708100854730341"
+ "450938156361786419525775154653957546143580362599388832564788"
+ "354103919236836698740026304968121883147777634511851850370958"
+ "884085902337976245656103068392811534994239396318567712305532"
+ "477169378421492493173704379367954605145484562415027095545060"
+ "831874739575572895083275461127704135960230120513850917554331"
+ "352277278650414100755269190224957237517573174092361876919730"
+ "465289835269438666544826003345857532325281423386809827947616"
+ "676425828491143428807224317894169834736598542769698312957949"
+ "605903203284128114992351808708487688511436903322773652124574"
+ "055471177142349271989998235771191022554548042468832219533624"
+ "049225313628185783780849179599378819912520555522211658107113"
+ "447678746843053930790961744210668515951907105384498734366645"
+ "249428031772015356705436411724477514133655840609854880392450"
+ "949605226182519804314027265530362531560532656953025288585499"
+ "182228921920121831359074541201044664224711170390199159133806"
+ "269332015718061873656943996928324527943031265119266878834003"
+ "362682519426029626295988425859770358488877080196120965282298"
+ "232237612230358616986168510604382051044429343285625121039569"
+ "326126486782398017268335279614177221030172599765237380415252"
+ "503716285229140380445599733136737846363243777324290551807506"
+ "541472429585746028822540006160866496164919640007935962267377"
+ "060789839526907505659662711614828949104249176417092401488510"
+ "615823548277477841813412329397443687705199567361868375111535"
+ "380877143498420444773617475831606309624504731127984157999557"
+ "818660940286424404275144312853627845343063342311866285268837"
+ "422960089441895882484245945054082617645214582938928610352277"
+ "410119555602965075325424443356593793852682899089314976629899"
+ "773835991388717888860719076570986705247088078593793511009142"
+ "474344996635349786568175384138024607561209403361748867467629"
+ "682257007702707626687955791367383934101209955804380644234879"
+ "805395123927491333463152240956446177043487579040223002287264"
+ "756843617701865806869707173187939918037456096349272671452872"
+ "922420893858994027251574788837911846161770227169407508741963"
+ "414729807676477574570702693444290823666440055726552795145348"
+ "219168459767427369197825367869095117877723957392541043867909"
+ "937470060997392012820142238132910823657536940367596076523833"
+ "377812701709657429614832107556695928504222183715979980013356"
+ "323996396963861087268039321030018015202061305161341454716371"
+ "377251261775727795597989586636757177645626856419109247702765"
+ "013583220037644023978372654055269485171726959848928885152966"
+ "097502777563956522973459672620583266843497935454194334506297"
+ "789118714656105011811810822332373521084368112861541360109122"
+ "200791235053695977711430654151451133236893607856092978814379"
+ "881439122150752237064864676736420913214731240701495311353237"
+ "983819572849112853697828591806699104099315306435617990388595"
+ "202795271374965360450205351235544991668088723423877385558163"
+ "617247959486687176509451394010328416791411019672026111081271"
+ "677642426015450739505038057545285042073081841299473107930734"
+ "353837688028012401932104019803872355878454440858434446609098"
+ "280206732652900093156204893287546907987495659518059539534709"
+ "328514027916546796559631836574970153581238433324096828364072"
+ "134400344200269161377205676209909802573933271591397018622517"
+ "645956348413413974664794017053790027535048049046885143930077"
+ "194991519470308057661102259067039984493186760977741752890345"
+ "473192220637893214146475540262942007429381634927003835133941"
+ "914676847385135317162915391223879714190592014303606413170523"
+ "042176230523286150385679951115593656516900591671184538913558"
+ "092816251191243853120415613844777512078954866614360029341206"
+ "576716710688850917256800353066853946058824831651339265256785"
+ "622460269729620332892007335442599404495662483134697945884683"
+ "759795006415186716458374920343394259217852886898131157533184"
+ "894159749247043678238750268753264909309649831534740397743600"
+ "139998210203084676369899478505461752324146318698089839450421"
+ "143076361782530689506566153604543149790375911800793483912288"
+ "188586309176946988353987684054352129570631591985578449323560"
+ "386626892598170269027020282959579435080091825791399174445592"
+ "2683343374046671669930219650268554687499e-4951",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1p-16444L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xb.fffffffffffcp-16448L,
+ -0xb.fffffffffffcp-16448L),
+ TEST ("-5.467799297823711903792608900429129724598576223540345015581"
+ "470730542557532950096605214341062938740807795871021020805296"
+ "652950478448933048254960262113384713508225733871766897517853"
+ "837895708450339634932343848975116093410479690330290902886861"
+ "199931259216523277807574569082153073133673942958789577402321"
+ "393933101298533191266102118889630609532339508457854220031996"
+ "317935940718000325144008438048416150458546268408294693278282"
+ "948818382981756745231443707694395053270779125240469926867881"
+ "019850287125023579685557790983055974962881759919483752202903"
+ "689199564880305684635452065363595791988290536352100701716974"
+ "146329604439226626943340805268641901769971862776194876385604"
+ "059269084172123930049144599166605103175580232672032966645406"
+ "656863031434873551175363941825798425331906382524706572766485"
+ "232874542230564262609161782396887243896247009244068837251567"
+ "783223271286692480010679711347802408351619999199127493689411"
+ "300623337751847138939498426200450305845548565910009066524152"
+ "545480362818290224140170178363735317929685005697363930594593"
+ "881342895328789259362029119598601112899006188879876371854878"
+ "902571753767478028100558334716504784604592507791482451533133"
+ "513128606357440718182123637790769320922442349066328991687862"
+ "072550779316393139037201187579972933016227874898505255743233"
+ "300533498951938156636406532613846576145617323141684480726409"
+ "074184197224754542490884392813625365330881348799432844624838"
+ "960826144439157361917744290729073116318858191758821942010704"
+ "726536748514141391981088590968911224406479710632429529154589"
+ "293799132147906174349149006094094612827453365768213012516958"
+ "693057189940355112250629776318079573232513434098933115589372"
+ "428935891821270739299776803229999720720845111297142577993950"
+ "783716526325576426897121181953632299322177412313472666557946"
+ "026587137818658956285876183561334458426909806227578696972983"
+ "054578648540140777431341495495816167709600470194141141159275"
+ "548586447187051517332624446463129570157208744018317833998766"
+ "292676324122069807882266170905460107352347754465354279502046"
+ "825607840930640910087488682878186052982487934398794575125208"
+ "131434599031355068379234881462786244132403015573059216658125"
+ "100992278732459043154873457532866362865038072260302438341256"
+ "465144627211756104220773841311413109973101672893502315223943"
+ "131161953384837658368750910845308673019625511169535246418667"
+ "822192756475773031982522304934161885363133347824122722726808"
+ "458339668843622993626685401142719276703936351749165952313385"
+ "247253410412444111234661569689109707012146365225868127037807"
+ "653838169759426465847963786308715929383888075292817554540826"
+ "281340379356869541699838857230452874882475626566568389051842"
+ "269616942233880613753230478468266244820792868174047618834373"
+ "911783352591638681513579303490680611741310500871919788283761"
+ "473826205032029153949410495205647160664548204617663407545902"
+ "155255595959035495626212780995301367951250745142427183922194"
+ "679405686105598055836303373290577235698605118096647411642319"
+ "219474157243864921520422978127962037044537385134878691852739"
+ "978563080824265712270538180666161627113218201779779366124407"
+ "844574754753562338454876981852965553927903650323407245581099"
+ "158807518181769597517311013648265985455750620305808055101887"
+ "320313826045110985510052672007356612620966612560448241370561"
+ "199679677792733282710356886335229149926131229035514374201804"
+ "225447070710784729359320523404977483919175478103049697809100"
+ "609955967524096673011016762490361065647326710555615563378359"
+ "408954626110765311053180827944575772439918612038754867514863"
+ "217604919070168030521022438807226197480679192263641289752695"
+ "279367794662267414957708480356805124293407645094292709270568"
+ "454704291549032311245797185365876072558819037766647710690310"
+ "669384727884764603220129302332950334873072394721879741045233"
+ "391084791389282719581455185833551951893903144609338532918282"
+ "071417365794666174600590186688558973292265260457397284219723"
+ "118736526338195892522797003835806498724823327170646268765114"
+ "335047201804332131453475981952420330849091435859688615005340"
+ "662951243478815535510910054031985781353569592327342625691155"
+ "297753939420991863066846663288192966197121277244462515137195"
+ "342887549113968391968700872401047521725534791569882096021521"
+ "725739030856023532346309694644208054801875416636970616158970"
+ "521587368716636562878779650147005687012772946471436217221680"
+ "244104527691159700944328113538972913022260318566564643466194"
+ "762762807772321937689272738612051928757740541051011493615150"
+ "275299712275026278191137262599722341528351699547926563148579"
+ "945678256173476664846284964106409718181820427949855282782538"
+ "418620206551699936257338813616307747712660216941043590501407"
+ "704980849740902536932579576527206665027800420035787899091137"
+ "498285797710848848252835440631389386421149710576503050460098"
+ "225348880547453179874214337446508024003058237008669916793765"
+ "103830790970613932711932541885454647828573565454163547779034"
+ "696478261735426505076787833523027219489668014198674507463022"
+ "589310657355955884354584118602516953160415158848138916494891"
+ "482359394428713333626368035819136954032193064982447142548513"
+ "777798482352540211515117109331361325135068534382485905222012"
+ "689155196601835592087277572480712876900324312948680873379635"
+ "049766825511648515719101185883064389832362822347209928024358"
+ "316443434834701491039800443982197050828044087275939582794327"
+ "098500876914356235193809147621508354816413733354188380887001"
+ "911623409901345292980795015165229743643600614968493977578123"
+ "466095415615447864269417603852427781048383314979868134570808"
+ "915217919397946316940234061179348627230180807326753461268559"
+ "385959678786688421103134141790339174982532045466350837038525"
+ "183177847731101708972936115216192881538981857998354449098289"
+ "173408113131230974433096066603129145174088550345854388495636"
+ "765494379926460031453181542793269110787478232865475929357580"
+ "348192936196178107395850207543849907063319379969931169428718"
+ "329942347533981765560805872472322186708756306455763611238082"
+ "951450138207325773702247286660824416431038520521352370291078"
+ "718247251712503010649103184487159314175972977390771951004404"
+ "935285742659293676372796949610394059160197507860285966047861"
+ "411940542821283013449073170622058378826534472881876688512697"
+ "758815111198429044432164893190718808033606471387328883409622"
+ "920327667611981052185172613337770061634130425782297578896747"
+ "215274225504191258419704542303129850621901180024012018244583"
+ "859069664741628533451563101979900751568200425006085702090401"
+ "221537517047980048268055449980601076610965506150742174772246"
+ "118061736140257508229467892560527108358789784539076822640564"
+ "850851810352577863861819577512851607395927299014823941534626"
+ "348696657393457745078724366706324437838188311582720760585617"
+ "487635004508688532062666933131188059377591626964364639542322"
+ "054994079047698970924302742015839080613569097514938471468421"
+ "996493818271996291393146497945863918551953149000943761983830"
+ "636236545375480765488470416349046929644442714477859372568735"
+ "843708739015199069466751627920202433249482821065761826195203"
+ "859723026379941258427585166740391065737087970718105336581850"
+ "268003743156009120998264173899565279323585156937231413010764"
+ "716608523561569725709426913310091413578317885628039213932500"
+ "135284171861048461662744818955691362183779165069982032305970"
+ "876642081013358484182671863168168338174351197426412625098421"
+ "481239711997827391790388986589171883679226337788805245818923"
+ "874607498645601668109872286941958827402018143065273281785872"
+ "847384936953936746391717131732488209980499904305446724778559"
+ "203846472344227623989606643158012375642854007494547242775256"
+ "898117140062170585337487588594307260069257691479046720590527"
+ "237259474018798808190031749318500514291360716338072006978678"
+ "678209533184089369407377832511947183352849291708100854730341"
+ "450938156361786419525775154653957546143580362599388832564788"
+ "354103919236836698740026304968121883147777634511851850370958"
+ "884085902337976245656103068392811534994239396318567712305532"
+ "477169378421492493173704379367954605145484562415027095545060"
+ "831874739575572895083275461127704135960230120513850917554331"
+ "352277278650414100755269190224957237517573174092361876919730"
+ "465289835269438666544826003345857532325281423386809827947616"
+ "676425828491143428807224317894169834736598542769698312957949"
+ "605903203284128114992351808708487688511436903322773652124574"
+ "055471177142349271989998235771191022554548042468832219533624"
+ "049225313628185783780849179599378819912520555522211658107113"
+ "447678746843053930790961744210668515951907105384498734366645"
+ "249428031772015356705436411724477514133655840609854880392450"
+ "949605226182519804314027265530362531560532656953025288585499"
+ "182228921920121831359074541201044664224711170390199159133806"
+ "269332015718061873656943996928324527943031265119266878834003"
+ "362682519426029626295988425859770358488877080196120965282298"
+ "232237612230358616986168510604382051044429343285625121039569"
+ "326126486782398017268335279614177221030172599765237380415252"
+ "503716285229140380445599733136737846363243777324290551807506"
+ "541472429585746028822540006160866496164919640007935962267377"
+ "060789839526907505659662711614828949104249176417092401488510"
+ "615823548277477841813412329397443687705199567361868375111535"
+ "380877143498420444773617475831606309624504731127984157999557"
+ "818660940286424404275144312853627845343063342311866285268837"
+ "422960089441895882484245945054082617645214582938928610352277"
+ "410119555602965075325424443356593793852682899089314976629899"
+ "773835991388717888860719076570986705247088078593793511009142"
+ "474344996635349786568175384138024607561209403361748867467629"
+ "682257007702707626687955791367383934101209955804380644234879"
+ "805395123927491333463152240956446177043487579040223002287264"
+ "756843617701865806869707173187939918037456096349272671452872"
+ "922420893858994027251574788837911846161770227169407508741963"
+ "414729807676477574570702693444290823666440055726552795145348"
+ "219168459767427369197825367869095117877723957392541043867909"
+ "937470060997392012820142238132910823657536940367596076523833"
+ "377812701709657429614832107556695928504222183715979980013356"
+ "323996396963861087268039321030018015202061305161341454716371"
+ "377251261775727795597989586636757177645626856419109247702765"
+ "013583220037644023978372654055269485171726959848928885152966"
+ "097502777563956522973459672620583266843497935454194334506297"
+ "789118714656105011811810822332373521084368112861541360109122"
+ "200791235053695977711430654151451133236893607856092978814379"
+ "881439122150752237064864676736420913214731240701495311353237"
+ "983819572849112853697828591806699104099315306435617990388595"
+ "202795271374965360450205351235544991668088723423877385558163"
+ "617247959486687176509451394010328416791411019672026111081271"
+ "677642426015450739505038057545285042073081841299473107930734"
+ "353837688028012401932104019803872355878454440858434446609098"
+ "280206732652900093156204893287546907987495659518059539534709"
+ "328514027916546796559631836574970153581238433324096828364072"
+ "134400344200269161377205676209909802573933271591397018622517"
+ "645956348413413974664794017053790027535048049046885143930077"
+ "194991519470308057661102259067039984493186760977741752890345"
+ "473192220637893214146475540262942007429381634927003835133941"
+ "914676847385135317162915391223879714190592014303606413170523"
+ "042176230523286150385679951115593656516900591671184538913558"
+ "092816251191243853120415613844777512078954866614360029341206"
+ "576716710688850917256800353066853946058824831651339265256785"
+ "622460269729620332892007335442599404495662483134697945884683"
+ "759795006415186716458374920343394259217852886898131157533184"
+ "894159749247043678238750268753264909309649831534740397743600"
+ "139998210203084676369899478505461752324146318698089839450421"
+ "143076361782530689506566153604543149790375911800793483912288"
+ "188586309176946988353987684054352129570631591985578449323560"
+ "386626892598170269027020282959579435080091825791399174445592"
+ "26833433740466716699302196502685546875e-4951",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1p-16444L,
+ -0x1p-16444L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L),
+ TEST ("-5.467799297823711903792608900429129724598576223540345015581"
+ "470730542557532950096605214341062938740807795871021020805296"
+ "652950478448933048254960262113384713508225733871766897517853"
+ "837895708450339634932343848975116093410479690330290902886861"
+ "199931259216523277807574569082153073133673942958789577402321"
+ "393933101298533191266102118889630609532339508457854220031996"
+ "317935940718000325144008438048416150458546268408294693278282"
+ "948818382981756745231443707694395053270779125240469926867881"
+ "019850287125023579685557790983055974962881759919483752202903"
+ "689199564880305684635452065363595791988290536352100701716974"
+ "146329604439226626943340805268641901769971862776194876385604"
+ "059269084172123930049144599166605103175580232672032966645406"
+ "656863031434873551175363941825798425331906382524706572766485"
+ "232874542230564262609161782396887243896247009244068837251567"
+ "783223271286692480010679711347802408351619999199127493689411"
+ "300623337751847138939498426200450305845548565910009066524152"
+ "545480362818290224140170178363735317929685005697363930594593"
+ "881342895328789259362029119598601112899006188879876371854878"
+ "902571753767478028100558334716504784604592507791482451533133"
+ "513128606357440718182123637790769320922442349066328991687862"
+ "072550779316393139037201187579972933016227874898505255743233"
+ "300533498951938156636406532613846576145617323141684480726409"
+ "074184197224754542490884392813625365330881348799432844624838"
+ "960826144439157361917744290729073116318858191758821942010704"
+ "726536748514141391981088590968911224406479710632429529154589"
+ "293799132147906174349149006094094612827453365768213012516958"
+ "693057189940355112250629776318079573232513434098933115589372"
+ "428935891821270739299776803229999720720845111297142577993950"
+ "783716526325576426897121181953632299322177412313472666557946"
+ "026587137818658956285876183561334458426909806227578696972983"
+ "054578648540140777431341495495816167709600470194141141159275"
+ "548586447187051517332624446463129570157208744018317833998766"
+ "292676324122069807882266170905460107352347754465354279502046"
+ "825607840930640910087488682878186052982487934398794575125208"
+ "131434599031355068379234881462786244132403015573059216658125"
+ "100992278732459043154873457532866362865038072260302438341256"
+ "465144627211756104220773841311413109973101672893502315223943"
+ "131161953384837658368750910845308673019625511169535246418667"
+ "822192756475773031982522304934161885363133347824122722726808"
+ "458339668843622993626685401142719276703936351749165952313385"
+ "247253410412444111234661569689109707012146365225868127037807"
+ "653838169759426465847963786308715929383888075292817554540826"
+ "281340379356869541699838857230452874882475626566568389051842"
+ "269616942233880613753230478468266244820792868174047618834373"
+ "911783352591638681513579303490680611741310500871919788283761"
+ "473826205032029153949410495205647160664548204617663407545902"
+ "155255595959035495626212780995301367951250745142427183922194"
+ "679405686105598055836303373290577235698605118096647411642319"
+ "219474157243864921520422978127962037044537385134878691852739"
+ "978563080824265712270538180666161627113218201779779366124407"
+ "844574754753562338454876981852965553927903650323407245581099"
+ "158807518181769597517311013648265985455750620305808055101887"
+ "320313826045110985510052672007356612620966612560448241370561"
+ "199679677792733282710356886335229149926131229035514374201804"
+ "225447070710784729359320523404977483919175478103049697809100"
+ "609955967524096673011016762490361065647326710555615563378359"
+ "408954626110765311053180827944575772439918612038754867514863"
+ "217604919070168030521022438807226197480679192263641289752695"
+ "279367794662267414957708480356805124293407645094292709270568"
+ "454704291549032311245797185365876072558819037766647710690310"
+ "669384727884764603220129302332950334873072394721879741045233"
+ "391084791389282719581455185833551951893903144609338532918282"
+ "071417365794666174600590186688558973292265260457397284219723"
+ "118736526338195892522797003835806498724823327170646268765114"
+ "335047201804332131453475981952420330849091435859688615005340"
+ "662951243478815535510910054031985781353569592327342625691155"
+ "297753939420991863066846663288192966197121277244462515137195"
+ "342887549113968391968700872401047521725534791569882096021521"
+ "725739030856023532346309694644208054801875416636970616158970"
+ "521587368716636562878779650147005687012772946471436217221680"
+ "244104527691159700944328113538972913022260318566564643466194"
+ "762762807772321937689272738612051928757740541051011493615150"
+ "275299712275026278191137262599722341528351699547926563148579"
+ "945678256173476664846284964106409718181820427949855282782538"
+ "418620206551699936257338813616307747712660216941043590501407"
+ "704980849740902536932579576527206665027800420035787899091137"
+ "498285797710848848252835440631389386421149710576503050460098"
+ "225348880547453179874214337446508024003058237008669916793765"
+ "103830790970613932711932541885454647828573565454163547779034"
+ "696478261735426505076787833523027219489668014198674507463022"
+ "589310657355955884354584118602516953160415158848138916494891"
+ "482359394428713333626368035819136954032193064982447142548513"
+ "777798482352540211515117109331361325135068534382485905222012"
+ "689155196601835592087277572480712876900324312948680873379635"
+ "049766825511648515719101185883064389832362822347209928024358"
+ "316443434834701491039800443982197050828044087275939582794327"
+ "098500876914356235193809147621508354816413733354188380887001"
+ "911623409901345292980795015165229743643600614968493977578123"
+ "466095415615447864269417603852427781048383314979868134570808"
+ "915217919397946316940234061179348627230180807326753461268559"
+ "385959678786688421103134141790339174982532045466350837038525"
+ "183177847731101708972936115216192881538981857998354449098289"
+ "173408113131230974433096066603129145174088550345854388495636"
+ "765494379926460031453181542793269110787478232865475929357580"
+ "348192936196178107395850207543849907063319379969931169428718"
+ "329942347533981765560805872472322186708756306455763611238082"
+ "951450138207325773702247286660824416431038520521352370291078"
+ "718247251712503010649103184487159314175972977390771951004404"
+ "935285742659293676372796949610394059160197507860285966047861"
+ "411940542821283013449073170622058378826534472881876688512697"
+ "758815111198429044432164893190718808033606471387328883409622"
+ "920327667611981052185172613337770061634130425782297578896747"
+ "215274225504191258419704542303129850621901180024012018244583"
+ "859069664741628533451563101979900751568200425006085702090401"
+ "221537517047980048268055449980601076610965506150742174772246"
+ "118061736140257508229467892560527108358789784539076822640564"
+ "850851810352577863861819577512851607395927299014823941534626"
+ "348696657393457745078724366706324437838188311582720760585617"
+ "487635004508688532062666933131188059377591626964364639542322"
+ "054994079047698970924302742015839080613569097514938471468421"
+ "996493818271996291393146497945863918551953149000943761983830"
+ "636236545375480765488470416349046929644442714477859372568735"
+ "843708739015199069466751627920202433249482821065761826195203"
+ "859723026379941258427585166740391065737087970718105336581850"
+ "268003743156009120998264173899565279323585156937231413010764"
+ "716608523561569725709426913310091413578317885628039213932500"
+ "135284171861048461662744818955691362183779165069982032305970"
+ "876642081013358484182671863168168338174351197426412625098421"
+ "481239711997827391790388986589171883679226337788805245818923"
+ "874607498645601668109872286941958827402018143065273281785872"
+ "847384936953936746391717131732488209980499904305446724778559"
+ "203846472344227623989606643158012375642854007494547242775256"
+ "898117140062170585337487588594307260069257691479046720590527"
+ "237259474018798808190031749318500514291360716338072006978678"
+ "678209533184089369407377832511947183352849291708100854730341"
+ "450938156361786419525775154653957546143580362599388832564788"
+ "354103919236836698740026304968121883147777634511851850370958"
+ "884085902337976245656103068392811534994239396318567712305532"
+ "477169378421492493173704379367954605145484562415027095545060"
+ "831874739575572895083275461127704135960230120513850917554331"
+ "352277278650414100755269190224957237517573174092361876919730"
+ "465289835269438666544826003345857532325281423386809827947616"
+ "676425828491143428807224317894169834736598542769698312957949"
+ "605903203284128114992351808708487688511436903322773652124574"
+ "055471177142349271989998235771191022554548042468832219533624"
+ "049225313628185783780849179599378819912520555522211658107113"
+ "447678746843053930790961744210668515951907105384498734366645"
+ "249428031772015356705436411724477514133655840609854880392450"
+ "949605226182519804314027265530362531560532656953025288585499"
+ "182228921920121831359074541201044664224711170390199159133806"
+ "269332015718061873656943996928324527943031265119266878834003"
+ "362682519426029626295988425859770358488877080196120965282298"
+ "232237612230358616986168510604382051044429343285625121039569"
+ "326126486782398017268335279614177221030172599765237380415252"
+ "503716285229140380445599733136737846363243777324290551807506"
+ "541472429585746028822540006160866496164919640007935962267377"
+ "060789839526907505659662711614828949104249176417092401488510"
+ "615823548277477841813412329397443687705199567361868375111535"
+ "380877143498420444773617475831606309624504731127984157999557"
+ "818660940286424404275144312853627845343063342311866285268837"
+ "422960089441895882484245945054082617645214582938928610352277"
+ "410119555602965075325424443356593793852682899089314976629899"
+ "773835991388717888860719076570986705247088078593793511009142"
+ "474344996635349786568175384138024607561209403361748867467629"
+ "682257007702707626687955791367383934101209955804380644234879"
+ "805395123927491333463152240956446177043487579040223002287264"
+ "756843617701865806869707173187939918037456096349272671452872"
+ "922420893858994027251574788837911846161770227169407508741963"
+ "414729807676477574570702693444290823666440055726552795145348"
+ "219168459767427369197825367869095117877723957392541043867909"
+ "937470060997392012820142238132910823657536940367596076523833"
+ "377812701709657429614832107556695928504222183715979980013356"
+ "323996396963861087268039321030018015202061305161341454716371"
+ "377251261775727795597989586636757177645626856419109247702765"
+ "013583220037644023978372654055269485171726959848928885152966"
+ "097502777563956522973459672620583266843497935454194334506297"
+ "789118714656105011811810822332373521084368112861541360109122"
+ "200791235053695977711430654151451133236893607856092978814379"
+ "881439122150752237064864676736420913214731240701495311353237"
+ "983819572849112853697828591806699104099315306435617990388595"
+ "202795271374965360450205351235544991668088723423877385558163"
+ "617247959486687176509451394010328416791411019672026111081271"
+ "677642426015450739505038057545285042073081841299473107930734"
+ "353837688028012401932104019803872355878454440858434446609098"
+ "280206732652900093156204893287546907987495659518059539534709"
+ "328514027916546796559631836574970153581238433324096828364072"
+ "134400344200269161377205676209909802573933271591397018622517"
+ "645956348413413974664794017053790027535048049046885143930077"
+ "194991519470308057661102259067039984493186760977741752890345"
+ "473192220637893214146475540262942007429381634927003835133941"
+ "914676847385135317162915391223879714190592014303606413170523"
+ "042176230523286150385679951115593656516900591671184538913558"
+ "092816251191243853120415613844777512078954866614360029341206"
+ "576716710688850917256800353066853946058824831651339265256785"
+ "622460269729620332892007335442599404495662483134697945884683"
+ "759795006415186716458374920343394259217852886898131157533184"
+ "894159749247043678238750268753264909309649831534740397743600"
+ "139998210203084676369899478505461752324146318698089839450421"
+ "143076361782530689506566153604543149790375911800793483912288"
+ "188586309176946988353987684054352129570631591985578449323560"
+ "386626892598170269027020282959579435080091825791399174445592"
+ "2683343374046671669930219650268554687501e-4951",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1p-16444L,
+ -0x1p-16444L,
+ -0x8p-16448L,
+ -0x8p-16448L,
+ -0x1p-16444L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0xc.000000000004p-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L,
+ -0xcp-16448L),
+ TEST ("-0x0.7p-149",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x3.8p-152,
+ -0x3.8p-152,
+ -0x3.8p-152,
+ -0x3.8p-152,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ true,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L,
+ -0x3.8p-152L),
+ TEST ("-0x0.7p-1074",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L,
+ -0x1.cp-1076L),
+ TEST ("-0x0.7p-16445",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x8p-16448L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x4p-16448L,
+ -0x4p-16448L,
+ -0x0p+0L,
+ -0x0p+0L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x3.8p-16448L,
+ -0x3.8p-16448L,
+ -0x3.8p-16448L,
+ -0x3.8p-16448L),
+ TEST ("-0x0.7p-16494",
+ -0x8p-152f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x0p+0f,
+ -0x4p-1076,
+ -0x0p+0,
+ -0x0p+0,
+ -0x0p+0,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x8p-16448L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x4p-16448L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ false,
+ -0x4p-1076L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x4p-16496L,
+ -0x0p+0L,
+ -0x0p+0L,
+ -0x0p+0L),
+};
+
+static int
+test_in_one_mode (const char *s, const struct test_results *expected,
+ bool ld_ok, const char *mode_name)
+{
+ int result = 0;
+ float f = strtof (s, NULL);
+ double d = strtod (s, NULL);
+ long double ld = strtold (s, NULL);
+ if (f != expected->f
+ || copysignf (1.0f, f) != copysignf (1.0f, expected->f))
+ {
+ printf ("strtof (%s) returned %a not %a (%s)\n", s, f,
+ expected->f, mode_name);
+ result = 1;
+ }
+ if (d != expected->d
+ || copysign (1.0, d) != copysign (1.0, expected->d))
+ {
+ printf ("strtod (%s) returned %a not %a (%s)\n", s, d,
+ expected->d, mode_name);
+ result = 1;
+ }
+ if (ld != expected->ld
+ || copysignl (1.0L, ld) != copysignl (1.0L, expected->ld))
+ {
+ printf ("strtold (%s) returned %La not %La (%s)\n", s, ld,
+ expected->ld, mode_name);
+ if (ld_ok)
+ result = 1;
+ else
+ printf ("ignoring this inexact long double result\n");
+ }
+ return result;
+}
+
+static int
+do_test (void)
+{
+ int save_round_mode = fegetround ();
+ int result = 0;
+ for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
+ {
+ result |= test_in_one_mode (tests[i].s, &tests[i].rn, tests[i].ld_ok,
+ "default rounding mode");
+#ifdef FE_DOWNWARD
+ if (!fesetround (FE_DOWNWARD))
+ {
+ result |= test_in_one_mode (tests[i].s, &tests[i].rd, tests[i].ld_ok,
+ "FE_DOWNWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_TOWARDZERO
+ if (!fesetround (FE_TOWARDZERO))
+ {
+ result |= test_in_one_mode (tests[i].s, &tests[i].rz, tests[i].ld_ok,
+ "FE_TOWARDZERO");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_UPWARD
+ if (!fesetround (FE_UPWARD))
+ {
+ result |= test_in_one_mode (tests[i].s, &tests[i].ru, tests[i].ld_ok,
+ "FE_UPWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+ }
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdlib/tst-strtod-underflow.c b/stdlib/tst-strtod-underflow.c
new file mode 100644
index 0000000000..892ef158ac
--- /dev/null
+++ b/stdlib/tst-strtod-underflow.c
@@ -0,0 +1,225 @@
+/* Test for strtod handling of arguments that may cause floating-point
+ underflow.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <fenv.h>
+#include <float.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <tininess.h>
+
+enum underflow_case
+ {
+ /* Result is exact or outside the subnormal range. */
+ UNDERFLOW_NONE,
+ /* Result has magnitude at most half way between the largest
+ subnormal value and the smallest positive normal value, and is
+ not exact, so underflows in all rounding modes and independent
+ of how tininess is detected. */
+ UNDERFLOW_ALWAYS,
+ /* Result is positive, with magnitude larger than half way between
+ the largest subnormal value and the least positive normal
+ value, but would underflow when rounded to nearest to normal
+ precision, so underflows after rounding in all modes except
+ rounding upward. */
+ UNDERFLOW_EXCEPT_UPWARD,
+ /* Likewise, for a negative result, underflowing after rounding
+ except when rounding downward. */
+ UNDERFLOW_EXCEPT_DOWNWARD,
+ /* Result is positive, with magnitude at least three quarters of
+ the way from the largest subnormal value to the smallest
+ positive normal value, so underflows after rounding only when
+ rounding downward or toward zero. */
+ UNDERFLOW_ONLY_DOWNWARD_ZERO,
+ /* Likewise, for a negative result, underflowing after rounding
+ only when rounding upward or toward zero. */
+ UNDERFLOW_ONLY_UPWARD_ZERO,
+ };
+
+struct test
+{
+ const char *s;
+ enum underflow_case c;
+};
+
+static const struct test tests[] =
+ {
+ { "0x1p-1022", UNDERFLOW_NONE },
+ { "-0x1p-1022", UNDERFLOW_NONE },
+ { "0x0p-10000000000000000000000000", UNDERFLOW_NONE },
+ { "-0x0p-10000000000000000000000000", UNDERFLOW_NONE },
+ { "0x1p-10000000000000000000000000", UNDERFLOW_ALWAYS },
+ { "-0x1p-10000000000000000000000000", UNDERFLOW_ALWAYS },
+ { "0x1.000000000000000000001p-1022", UNDERFLOW_NONE },
+ { "-0x1.000000000000000000001p-1022", UNDERFLOW_NONE },
+ { "0x1p-1075", UNDERFLOW_ALWAYS },
+ { "-0x1p-1075", UNDERFLOW_ALWAYS },
+ { "0x1p-1023", UNDERFLOW_NONE },
+ { "-0x1p-1023", UNDERFLOW_NONE },
+ { "0x1p-1074", UNDERFLOW_NONE },
+ { "-0x1p-1074", UNDERFLOW_NONE },
+ { "0x1.ffffffffffffep-1023", UNDERFLOW_NONE },
+ { "-0x1.ffffffffffffep-1023", UNDERFLOW_NONE },
+ { "0x1.fffffffffffffp-1023", UNDERFLOW_ALWAYS },
+ { "-0x1.fffffffffffffp-1023", UNDERFLOW_ALWAYS },
+ { "0x1.fffffffffffff0001p-1023", UNDERFLOW_EXCEPT_UPWARD },
+ { "-0x1.fffffffffffff0001p-1023", UNDERFLOW_EXCEPT_DOWNWARD },
+ { "0x1.fffffffffffff7fffp-1023", UNDERFLOW_EXCEPT_UPWARD },
+ { "-0x1.fffffffffffff7fffp-1023", UNDERFLOW_EXCEPT_DOWNWARD },
+ { "0x1.fffffffffffff8p-1023", UNDERFLOW_ONLY_DOWNWARD_ZERO },
+ { "-0x1.fffffffffffff8p-1023", UNDERFLOW_ONLY_UPWARD_ZERO },
+ { "0x1.fffffffffffffffffp-1023", UNDERFLOW_ONLY_DOWNWARD_ZERO },
+ { "-0x1.fffffffffffffffffp-1023", UNDERFLOW_ONLY_UPWARD_ZERO },
+ };
+
+/* Return whether to expect underflow from a particular testcase, in a
+ given rounding mode. */
+
+static bool
+expect_underflow (enum underflow_case c, int rm)
+{
+ if (c == UNDERFLOW_NONE)
+ return false;
+ if (c == UNDERFLOW_ALWAYS)
+ return true;
+ if (TININESS_AFTER_ROUNDING)
+ {
+ switch (rm)
+ {
+#ifdef FE_DOWNWARD
+ case FE_DOWNWARD:
+ return (c == UNDERFLOW_EXCEPT_UPWARD
+ || c == UNDERFLOW_ONLY_DOWNWARD_ZERO);
+#endif
+
+#ifdef FE_TOWARDZERO
+ case FE_TOWARDZERO:
+ return true;
+#endif
+
+#ifdef FE_UPWARD
+ case FE_UPWARD:
+ return (c == UNDERFLOW_EXCEPT_DOWNWARD
+ || c == UNDERFLOW_ONLY_UPWARD_ZERO);
+#endif
+
+ default:
+ return (c == UNDERFLOW_EXCEPT_UPWARD
+ || c == UNDERFLOW_EXCEPT_DOWNWARD);
+ }
+ }
+ else
+ return true;
+}
+
+static bool support_underflow_exception = false;
+volatile double d = DBL_MIN;
+volatile double dd;
+
+static int
+test_in_one_mode (const char *s, enum underflow_case c, int rm,
+ const char *mode_name)
+{
+ int result = 0;
+ feclearexcept (FE_ALL_EXCEPT);
+ errno = 0;
+ double d = strtod (s, NULL);
+ int got_errno = errno;
+#ifdef FE_UNDERFLOW
+ bool got_fe_underflow = fetestexcept (FE_UNDERFLOW) != 0;
+#else
+ bool got_fe_underflow = false;
+#endif
+ printf ("strtod (%s) (%s) returned %a, errno = %d, %sunderflow exception\n",
+ s, mode_name, d, got_errno, got_fe_underflow ? "" : "no ");
+ bool this_expect_underflow = expect_underflow (c, rm);
+ if (got_errno != 0 && got_errno != ERANGE)
+ {
+ puts ("FAIL: errno neither 0 nor ERANGE");
+ result = 1;
+ }
+ else if (this_expect_underflow != (errno == ERANGE))
+ {
+ puts ("FAIL: underflow from errno differs from expectations");
+ result = 1;
+ }
+ if (support_underflow_exception && got_fe_underflow != this_expect_underflow)
+ {
+ puts ("FAIL: underflow from exceptions differs from expectations");
+ result = 1;
+ }
+ return result;
+}
+
+static int
+do_test (void)
+{
+ int save_round_mode = fegetround ();
+ int result = 0;
+#ifdef FE_TONEAREST
+ const int fe_tonearest = FE_TONEAREST;
+#else
+ const int fe_tonearest = 0;
+# if defined FE_DOWNWARD || defined FE_TOWARDZERO || defined FE_UPWARD
+# error "FE_TONEAREST not defined, but another rounding mode is"
+# endif
+#endif
+#ifdef FE_UNDERFLOW
+ feclearexcept (FE_ALL_EXCEPT);
+ dd = d * d;
+ if (fetestexcept (FE_UNDERFLOW))
+ support_underflow_exception = true;
+ else
+ puts ("underflow exception not supported at runtime, only testing errno");
+#endif
+ for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); i++)
+ {
+ result |= test_in_one_mode (tests[i].s, tests[i].c, fe_tonearest,
+ "default rounding mode");
+#ifdef FE_DOWNWARD
+ if (!fesetround (FE_DOWNWARD))
+ {
+ result |= test_in_one_mode (tests[i].s, tests[i].c, FE_DOWNWARD,
+ "FE_DOWNWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_TOWARDZERO
+ if (!fesetround (FE_TOWARDZERO))
+ {
+ result |= test_in_one_mode (tests[i].s, tests[i].c, FE_TOWARDZERO,
+ "FE_TOWARDZERO");
+ fesetround (save_round_mode);
+ }
+#endif
+#ifdef FE_UPWARD
+ if (!fesetround (FE_UPWARD))
+ {
+ result |= test_in_one_mode (tests[i].s, tests[i].c, FE_UPWARD,
+ "FE_UPWARD");
+ fesetround (save_round_mode);
+ }
+#endif
+ }
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index 738e73ebba..670beb1e4d 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.c
@@ -60,10 +60,10 @@ static const struct ltest tests[] =
{ "0x00.0014p19", 160.0, '\0', 0 },
{ "0x1p-1023",
1.11253692925360069154511635866620203210960799023116591527666e-308,
- '\0', ERANGE },
+ '\0', 0 },
{ "0x0.8p-1022",
1.11253692925360069154511635866620203210960799023116591527666e-308,
- '\0', ERANGE },
+ '\0', 0 },
{ "Inf", HUGE_VAL, '\0', 0 },
{ "-Inf", -HUGE_VAL, '\0', 0 },
{ "+InFiNiTy", HUGE_VAL, '\0', 0 },
diff --git a/stdlib/tst-tininess.c b/stdlib/tst-tininess.c
new file mode 100644
index 0000000000..9312f16eec
--- /dev/null
+++ b/stdlib/tst-tininess.c
@@ -0,0 +1,69 @@
+/* Test that tininess.h is correct for this architecture.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fenv.h>
+#include <float.h>
+#include <stdio.h>
+#include <tininess.h>
+
+volatile float a = 0x1.fffp-126;
+volatile float b = 0x1.0008p-1;
+volatile float c;
+volatile float m = FLT_MIN;
+volatile float mm;
+
+static int
+do_test (void)
+{
+ int result = 0;
+#ifdef FE_UNDERFLOW
+ feclearexcept (FE_ALL_EXCEPT);
+ mm = m * m;
+ if (!fetestexcept (FE_UNDERFLOW))
+ {
+ puts ("underflow exception not supported at runtime, cannot test");
+ return 0;
+ }
+ feclearexcept (FE_ALL_EXCEPT);
+ c = a * b;
+ if (fetestexcept (FE_UNDERFLOW))
+ {
+ if (TININESS_AFTER_ROUNDING)
+ {
+ puts ("tininess.h says after rounding, "
+ "but detected before rounding");
+ result = 1;
+ }
+ }
+ else
+ {
+ if (!TININESS_AFTER_ROUNDING)
+ {
+ puts ("tininess.h says before rounding, "
+ "but detected after rounding");
+ result = 1;
+ }
+ }
+#else
+ puts ("underflow exception not supported at compile time, cannot test");
+#endif
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/string/Makefile b/string/Makefile
index 1628b6adfc..740006e56b 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -49,15 +49,17 @@ strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
strlen strncmp strncpy strpbrk strrchr strspn memmem \
strstr strcasestr strnlen strcasecmp strncasecmp \
- strncat rawmemchr strchrnul
+ strncat rawmemchr strchrnul bcopy bzero
tests := tester inl-tester noinl-tester testcopy test-ffs \
tst-strlen stratcliff tst-svc tst-inlcall \
bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
bug-strtok1 $(addprefix test-,$(strop-tests)) \
bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
- bug-strstr1 bug-strchr1 tst-strtok_r
+ tst-strtok_r
+tests-ifunc := $(strop-tests:%=test-%-ifunc)
+tests += $(tests-ifunc)
include ../Rules
@@ -74,8 +76,9 @@ CFLAGS-stratcliff.c = -fno-builtin
CFLAGS-test-ffs.c = -fno-builtin
CFLAGS-tst-inlcall.c = -fno-builtin
CFLAGS-bug-strstr1.c = -fno-builtin
+CFLAGS-bug-strcasestr1.c = -fno-builtin
-ifeq ($(cross-compiling),no)
+ifeq ($(run-built-tests),yes)
tests: $(objpfx)tst-svc.out
$(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
diff --git a/string/bug-strchr1.c b/string/bug-strchr1.c
deleted file mode 100644
index 21155d8a7f..0000000000
--- a/string/bug-strchr1.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-static int
-do_test (void)
-{
- char s[] __attribute__((aligned(16))) = "\xff";
- char *p = strchr (s, '\xfe');
- printf ("%p\n", p);
- return p != NULL;
-}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
diff --git a/string/bug-strstr1.c b/string/bug-strstr1.c
deleted file mode 100644
index 889de12955..0000000000
--- a/string/bug-strstr1.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-int main (int argc, char** argv)
-{
- const char haystack[] =
- "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_A7_20_EF_BF_BD";
-
- const char needle[] =
- "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
-
- const char* sub = strstr (haystack, needle);
-
- if (sub != NULL)
- {
- int j;
-
- fprintf (stderr, "BUG: expected NULL, got:\n%s\n%s\n", sub, needle);
- for (j = 0; needle[j] != '\0'; ++j)
- putchar (needle[j] == sub[j] ? ' ' : '^');
- puts ("");
- return 1;
- }
-
- return 0;
-}
diff --git a/string/memmem.c b/string/memmem.c
index 625c9cffda..06704cbb7a 100644
--- a/string/memmem.c
+++ b/string/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2008 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -73,5 +73,6 @@ memmem (const void *haystack_start, size_t haystack_len,
else
return two_way_long_needle (haystack, haystack_len, needle, needle_len);
}
+libc_hidden_def (memmem)
#undef LONG_NEEDLE_THRESHOLD
diff --git a/string/str-two-way.h b/string/str-two-way.h
index 1b2a8bd545..d082fe0a09 100644
--- a/string/str-two-way.h
+++ b/string/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
@@ -43,6 +43,7 @@
#include <limits.h>
#include <stdint.h>
+#include <sys/param.h> /* Defines MAX. */
/* We use the Two-Way string matching algorithm, which guarantees
linear complexity with constant space. Additionally, for long
@@ -67,10 +68,6 @@
# define LONG_NEEDLE_THRESHOLD SIZE_MAX
#endif
-#ifndef MAX
-# define MAX(a, b) ((a < b) ? (b) : (a))
-#endif
-
#ifndef CANON_ELEMENT
# define CANON_ELEMENT(c) c
#endif
@@ -78,6 +75,18 @@
# define CMP_FUNC memcmp
#endif
+/* Check for end-of-line in strstr and strcasestr routines.
+ We piggy-back matching procedure for detecting EOL where possible,
+ and use AVAILABLE macro otherwise. */
+#ifndef CHECK_EOL
+# define CHECK_EOL (0)
+#endif
+
+/* Return NULL if argument is '\0'. */
+#ifndef RET0_IF_0
+# define RET0_IF_0(a) /* nothing */
+#endif
+
/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
Return the index of the first byte in the right half, and set
*PERIOD to the global period of the right half.
@@ -233,17 +242,24 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
j = 0;
while (AVAILABLE (haystack, haystack_len, j, needle_len))
{
+ const unsigned char *pneedle;
+ const unsigned char *phaystack;
+
/* Scan for matches in right half. */
i = MAX (suffix, memory);
- while (i < needle_len && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (i < needle_len && (CANON_ELEMENT (*pneedle++)
+ == CANON_ELEMENT (*phaystack++)))
++i;
if (needle_len <= i)
{
/* Scan for matches in left half. */
i = suffix - 1;
- while (memory < i + 1 && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (memory < i + 1 && (CANON_ELEMENT (*pneedle--)
+ == CANON_ELEMENT (*phaystack--)))
--i;
if (i + 1 < memory + 1)
return (RETURN_TYPE) (haystack + j);
@@ -261,32 +277,95 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
}
else
{
+ const unsigned char *phaystack = &haystack[suffix];
+ /* The comparison always starts from needle[suffix], so cache it
+ and use an optimized first-character loop. */
+ unsigned char needle_suffix = CANON_ELEMENT (needle[suffix]);
+
+#if CHECK_EOL
+ /* We start matching from the SUFFIX'th element, so make sure we
+ don't hit '\0' before that. */
+ if (haystack_len < suffix + 1
+ && !AVAILABLE (haystack, haystack_len, 0, suffix + 1))
+ return NULL;
+#endif
+
/* The two halves of needle are distinct; no extra memory is
required, and any mismatch results in a maximal shift. */
period = MAX (suffix, needle_len - suffix) + 1;
j = 0;
- while (AVAILABLE (haystack, haystack_len, j, needle_len))
+ while (1
+#if !CHECK_EOL
+ && AVAILABLE (haystack, haystack_len, j, needle_len)
+#endif
+ )
{
+ unsigned char haystack_char;
+ const unsigned char *pneedle;
+
+ /* TODO: The first-character loop can be sped up by adapting
+ longword-at-a-time implementation of memchr/strchr. */
+ if (needle_suffix
+ != (haystack_char = CANON_ELEMENT (*phaystack++)))
+ {
+ RET0_IF_0 (haystack_char);
+#if !CHECK_EOL
+ ++j;
+#endif
+ continue;
+ }
+
+#if CHECK_EOL
+ /* Calculate J if it wasn't kept up-to-date in the first-character
+ loop. */
+ j = phaystack - &haystack[suffix] - 1;
+#endif
+
/* Scan for matches in right half. */
- i = suffix;
- while (i < needle_len && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
- ++i;
+ i = suffix + 1;
+ pneedle = &needle[i];
+ while (i < needle_len)
+ {
+ if (CANON_ELEMENT (*pneedle++)
+ != (haystack_char = CANON_ELEMENT (*phaystack++)))
+ {
+ RET0_IF_0 (haystack_char);
+ break;
+ }
+ ++i;
+ }
if (needle_len <= i)
{
/* Scan for matches in left half. */
i = suffix - 1;
- while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
- --i;
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (i != SIZE_MAX)
+ {
+ if (CANON_ELEMENT (*pneedle--)
+ != (haystack_char = CANON_ELEMENT (*phaystack--)))
+ {
+ RET0_IF_0 (haystack_char);
+ break;
+ }
+ --i;
+ }
if (i == SIZE_MAX)
return (RETURN_TYPE) (haystack + j);
j += period;
}
else
j += i - suffix + 1;
+
+#if CHECK_EOL
+ if (!AVAILABLE (haystack, haystack_len, j, needle_len))
+ break;
+#endif
+
+ phaystack = &haystack[suffix + j];
}
}
+ ret0: __attribute__ ((unused))
return NULL;
}
@@ -338,6 +417,9 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
j = 0;
while (AVAILABLE (haystack, haystack_len, j, needle_len))
{
+ const unsigned char *pneedle;
+ const unsigned char *phaystack;
+
/* Check the last byte first; if it does not match, then
shift to the next possible match location. */
shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
@@ -357,15 +439,19 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
/* Scan for matches in right half. The last byte has
already been matched, by virtue of the shift table. */
i = MAX (suffix, memory);
- while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (i < needle_len - 1 && (CANON_ELEMENT (*pneedle++)
+ == CANON_ELEMENT (*phaystack++)))
++i;
if (needle_len - 1 <= i)
{
/* Scan for matches in left half. */
i = suffix - 1;
- while (memory < i + 1 && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (memory < i + 1 && (CANON_ELEMENT (*pneedle--)
+ == CANON_ELEMENT (*phaystack--)))
--i;
if (i + 1 < memory + 1)
return (RETURN_TYPE) (haystack + j);
@@ -390,6 +476,9 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
j = 0;
while (AVAILABLE (haystack, haystack_len, j, needle_len))
{
+ const unsigned char *pneedle;
+ const unsigned char *phaystack;
+
/* Check the last byte first; if it does not match, then
shift to the next possible match location. */
shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
@@ -401,15 +490,19 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
/* Scan for matches in right half. The last byte has
already been matched, by virtue of the shift table. */
i = suffix;
- while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (i < needle_len - 1 && (CANON_ELEMENT (*pneedle++)
+ == CANON_ELEMENT (*phaystack++)))
++i;
if (needle_len - 1 <= i)
{
/* Scan for matches in left half. */
i = suffix - 1;
- while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
- == CANON_ELEMENT (haystack[i + j])))
+ pneedle = &needle[i];
+ phaystack = &haystack[i + j];
+ while (i != SIZE_MAX && (CANON_ELEMENT (*pneedle--)
+ == CANON_ELEMENT (*phaystack--)))
--i;
if (i == SIZE_MAX)
return (RETURN_TYPE) (haystack + j);
@@ -423,6 +516,10 @@ two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
}
#undef AVAILABLE
+#undef AVAILABLE1
+#undef AVAILABLE2
+#undef AVAILABLE1_USES_J
#undef CANON_ELEMENT
#undef CMP_FUNC
+#undef RET0_IF_0
#undef RETURN_TYPE
diff --git a/string/strcasestr.c b/string/strcasestr.c
index 9e1bde97ae..6aaf45f3aa 100644
--- a/string/strcasestr.c
+++ b/string/strcasestr.c
@@ -1,6 +1,5 @@
/* Return the offset of one string within another.
- Copyright (C) 1994, 1996-2000, 2004, 2008, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,13 +36,15 @@
#include <stdbool.h>
#include <strings.h>
-#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
+#define TOLOWER(Ch) tolower (Ch)
/* Two-Way algorithm. */
#define RETURN_TYPE char *
#define AVAILABLE(h, h_l, j, n_l) \
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
&& ((h_l) = (j) + (n_l)))
+#define CHECK_EOL (1)
+#define RET0_IF_0(a) if (!a) goto ret0
#define CANON_ELEMENT(c) TOLOWER (c)
#define CMP_FUNC(p1, p2, l) \
__strncasecmp ((const char *) (p1), (const char *) (p2), l)
diff --git a/string/strstr.c b/string/strstr.c
index 10e6fdc7f9..d74cb46975 100644
--- a/string/strstr.c
+++ b/string/strstr.c
@@ -1,6 +1,5 @@
/* Return the offset of one string within another.
- Copyright (C) 1994,1996,1997,2000,2001,2003,2008,2009
- Free Software Foundation, Inc.
+ Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +35,8 @@
#define AVAILABLE(h, h_l, j, n_l) \
(!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \
&& ((h_l) = (j) + (n_l)))
+#define CHECK_EOL (1)
+#define RET0_IF_0(a) if (!a) goto ret0
#include "str-two-way.h"
#undef strstr
diff --git a/string/test-bcopy-ifunc.c b/string/test-bcopy-ifunc.c
new file mode 100644
index 0000000000..21be43cccf
--- /dev/null
+++ b/string/test-bcopy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of bcopy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-bcopy.c"
diff --git a/string/test-bcopy.c b/string/test-bcopy.c
new file mode 100644
index 0000000000..bf9347bcce
--- /dev/null
+++ b/string/test-bcopy.c
@@ -0,0 +1,20 @@
+/* Test and measure bcopy functions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_BCOPY
+#include "test-memmove.c"
diff --git a/string/test-bzero-ifunc.c b/string/test-bzero-ifunc.c
new file mode 100644
index 0000000000..0b3b456717
--- /dev/null
+++ b/string/test-bzero-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of bzero function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-bzero.c"
diff --git a/string/test-bzero.c b/string/test-bzero.c
new file mode 100644
index 0000000000..b59a7e49e1
--- /dev/null
+++ b/string/test-bzero.c
@@ -0,0 +1,19 @@
+/* Test and measure bzero functions.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+#define TEST_BZERO
+#include "test-memset.c"
diff --git a/string/test-memccpy-ifunc.c b/string/test-memccpy-ifunc.c
new file mode 100644
index 0000000000..3efaeff368
--- /dev/null
+++ b/string/test-memccpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memccpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memccpy.c"
diff --git a/string/test-memccpy.c b/string/test-memccpy.c
index 8fa96bc9b7..05940ee2fc 100644
--- a/string/test-memccpy.c
+++ b/string/test-memccpy.c
@@ -1,5 +1,5 @@
/* Test and measure memccpy functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "memccpy"
#include "test-string.h"
void *simple_memccpy (void *, const void *, int, size_t);
diff --git a/string/test-memchr-ifunc.c b/string/test-memchr-ifunc.c
new file mode 100644
index 0000000000..e1e8b44342
--- /dev/null
+++ b/string/test-memchr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memchr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memchr.c"
diff --git a/string/test-memchr.c b/string/test-memchr.c
index 315726dc25..cad639b4a8 100644
--- a/string/test-memchr.c
+++ b/string/test-memchr.c
@@ -1,5 +1,5 @@
/* Test and measure memchr functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "memchr"
#include "test-string.h"
typedef char *(*proto_t) (const char *, int, size_t);
diff --git a/string/test-memcmp-ifunc.c b/string/test-memcmp-ifunc.c
new file mode 100644
index 0000000000..6a8f41828c
--- /dev/null
+++ b/string/test-memcmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memcmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memcmp.c"
diff --git a/string/test-memcmp.c b/string/test-memcmp.c
index 69076d00be..fc9d4d2326 100644
--- a/string/test-memcmp.c
+++ b/string/test-memcmp.c
@@ -19,6 +19,11 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifdef WIDE
+# define TEST_NAME "wmemcmp"
+#else
+# define TEST_NAME "memcmp"
+#endif
#include "test-string.h"
#ifdef WIDE
# include <inttypes.h>
diff --git a/string/test-memcpy-ifunc.c b/string/test-memcpy-ifunc.c
new file mode 100644
index 0000000000..4195bba620
--- /dev/null
+++ b/string/test-memcpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memcpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memcpy.c"
diff --git a/string/test-memcpy.c b/string/test-memcpy.c
index 311b4b4981..1340c75c7e 100644
--- a/string/test-memcpy.c
+++ b/string/test-memcpy.c
@@ -1,5 +1,5 @@
/* Test and measure memcpy functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -21,6 +21,7 @@
# define MEMCPY_RESULT(dst, len) dst
# define MIN_PAGE_SIZE 131072
# define TEST_MAIN
+# define TEST_NAME "memcpy"
# include "test-string.h"
char *simple_memcpy (char *, const char *, size_t);
diff --git a/string/test-memmem-ifunc.c b/string/test-memmem-ifunc.c
new file mode 100644
index 0000000000..12c32d9188
--- /dev/null
+++ b/string/test-memmem-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memmem function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memmem.c"
diff --git a/string/test-memmem.c b/string/test-memmem.c
index 4076029d1b..6ca1188e94 100644
--- a/string/test-memmem.c
+++ b/string/test-memmem.c
@@ -1,5 +1,5 @@
/* Test and measure memmem functions.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@redhat.com>, 2008.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "memmem"
#define BUF1PAGES 20
#define ITERATIONS 500
#include "test-string.h"
@@ -56,8 +57,8 @@ simple_memmem (const void *haystack, size_t haystack_len, const void *needle,
return NULL;
}
-static void
-do_one_test (impl_t *impl, const void *haystack, size_t haystack_len,
+static int
+check_result (impl_t *impl, const void *haystack, size_t haystack_len,
const void *needle, size_t needle_len, const void *expected)
{
void *res;
@@ -68,9 +69,20 @@ do_one_test (impl_t *impl, const void *haystack, size_t haystack_len,
error (0, 0, "Wrong result in function %s %p %p", impl->name,
res, expected);
ret = 1;
- return;
+ return -1;
}
+ return 0;
+}
+
+static void
+do_one_test (impl_t *impl, const void *haystack, size_t haystack_len,
+ const void *needle, size_t needle_len, const void *expected)
+{
+ if (check_result (impl, haystack, haystack_len, needle, needle_len,
+ expected) < 0)
+ return;
+
if (HP_TIMING_AVAIL)
{
hp_timing_t start __attribute ((unused));
@@ -145,6 +157,22 @@ do_random_tests (void)
}
}
+static void
+check1 (void)
+{
+
+ const char search_buf_data[5] = { 0x56, 0x34, 0x12, 0x78, 0x78 };
+ const char pattern[2] = { 0x78, 0x56 };
+ void *search_buf = (void *) buf1 + page_size - sizeof search_buf_data;
+ void *exp_result;
+
+ memcpy (search_buf, search_buf_data, sizeof search_buf_data);
+ exp_result = simple_memmem (search_buf, sizeof search_buf_data,
+ pattern, sizeof pattern);
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, search_buf, sizeof search_buf_data,
+ pattern, sizeof pattern, exp_result);
+}
static const char *const strs[] =
{
@@ -161,6 +189,8 @@ test_main (void)
test_init ();
+ check1 ();
+
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
diff --git a/string/test-memmove-ifunc.c b/string/test-memmove-ifunc.c
new file mode 100644
index 0000000000..377cffd096
--- /dev/null
+++ b/string/test-memmove-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memmove function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memmove.c"
diff --git a/string/test-memmove.c b/string/test-memmove.c
index 7d10712394..13c5aff8a2 100644
--- a/string/test-memmove.c
+++ b/string/test-memmove.c
@@ -1,5 +1,5 @@
/* Test and measure memmove functions.
- Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,13 +18,33 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifdef TEST_BCOPY
+# define TEST_NAME "bcopy"
+#else
+# define TEST_NAME "memmove"
+#endif
#include "test-string.h"
-typedef char *(*proto_t) (char *, const char *, size_t);
char *simple_memmove (char *, const char *, size_t);
+#ifdef TEST_BCOPY
+typedef void (*proto_t) (const char *, char *, size_t);
+void simple_bcopy (const char *, char *, size_t);
+
+IMPL (simple_bcopy, 0)
+IMPL (bcopy, 1)
+
+void
+simple_bcopy (const char *src, char *dst, size_t n)
+{
+ simple_memmove (dst, src, n);
+}
+#else
+typedef char *(*proto_t) (char *, const char *, size_t);
+
IMPL (simple_memmove, 0)
IMPL (memmove, 1)
+#endif
char *
simple_memmove (char *dst, const char *src, size_t n)
@@ -47,9 +67,12 @@ static void
do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
size_t len)
{
+ memcpy (src, orig_src, len);
+#ifdef TEST_BCOPY
+ CALL (impl, src, dst, len);
+#else
char *res;
- memcpy (src, orig_src, len);
res = CALL (impl, dst, src, len);
if (res != dst)
{
@@ -58,6 +81,7 @@ do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
ret = 1;
return;
}
+#endif
if (memcmp (dst, orig_src, len) != 0)
{
@@ -77,7 +101,11 @@ do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
for (i = 0; i < 32; ++i)
{
HP_TIMING_NOW (start);
+#ifdef TEST_BCOPY
+ CALL (impl, src, dst, len);
+#else
CALL (impl, dst, src, len);
+#endif
HP_TIMING_NOW (stop);
HP_TIMING_BEST (best_time, start, stop);
}
@@ -123,7 +151,9 @@ do_random_tests (void)
size_t srcstart, srcend, dststart, dstend;
int c;
unsigned char *p1, *p2;
+#ifndef TEST_BCOPY
unsigned char *res;
+#endif
for (n = 0; n < ITERATIONS; n++)
{
@@ -178,6 +208,9 @@ do_random_tests (void)
{
memset (p2 + dststart, c, dstend - dststart);
memcpy (p2 + srcstart, p1 + srcstart, srcend - srcstart);
+#ifdef TEST_BCOPY
+ CALL (impl, (char *) (p2 + align1), (char *) (p2 + align2), len);
+#else
res = (unsigned char *) CALL (impl,
(char *) (p2 + align2),
(char *) (p2 + align1), len);
@@ -187,6 +220,7 @@ do_random_tests (void)
n, impl->name, align1, align2, len, res, p2 + align2);
ret = 1;
}
+#endif
if (memcmp (p1 + align1, p2 + align2, len))
{
error (0, 0, "Iteration %zd - different strings, %s (%zd, %zd, %zd)",
diff --git a/string/test-mempcpy-ifunc.c b/string/test-mempcpy-ifunc.c
new file mode 100644
index 0000000000..956a23fef9
--- /dev/null
+++ b/string/test-mempcpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of mempcpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-mempcpy.c"
diff --git a/string/test-mempcpy.c b/string/test-mempcpy.c
index c021a66301..1679e9d11f 100644
--- a/string/test-mempcpy.c
+++ b/string/test-mempcpy.c
@@ -1,5 +1,5 @@
/* Test and measure mempcpy functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -19,6 +19,7 @@
#define MEMCPY_RESULT(dst, len) (dst) + (len)
#define TEST_MAIN
+#define TEST_NAME "mempcpy"
#include "test-string.h"
char *simple_mempcpy (char *, const char *, size_t);
diff --git a/string/test-memset-ifunc.c b/string/test-memset-ifunc.c
new file mode 100644
index 0000000000..3e26aa395b
--- /dev/null
+++ b/string/test-memset-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of memset function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-memset.c"
diff --git a/string/test-memset.c b/string/test-memset.c
index 839b8a1802..af85a28762 100644
--- a/string/test-memset.c
+++ b/string/test-memset.c
@@ -1,5 +1,5 @@
/* Test and measure memset functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,11 +18,38 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifdef TEST_BZERO
+# define TEST_NAME "bzero"
+#else
+# define TEST_NAME "memset"
+#endif
#define MIN_PAGE_SIZE 131072
#include "test-string.h"
-typedef char *(*proto_t) (char *, int, size_t);
char *simple_memset (char *, int, size_t);
+
+#ifdef TEST_BZERO
+typedef void (*proto_t) (char *, size_t);
+void simple_bzero (char *, size_t);
+void builtin_bzero (char *, size_t);
+
+IMPL (simple_bzero, 0)
+IMPL (builtin_bzero, 0)
+IMPL (bzero, 1)
+
+void
+simple_bzero (char *s, size_t n)
+{
+ simple_memset (s, 0, n);
+}
+
+void
+builtin_bzero (char *s, size_t n)
+{
+ __builtin_bzero (s, n);
+}
+#else
+typedef char *(*proto_t) (char *, int, size_t);
char *builtin_memset (char *, int, size_t);
IMPL (simple_memset, 0)
@@ -30,6 +57,13 @@ IMPL (builtin_memset, 0)
IMPL (memset, 1)
char *
+builtin_memset (char *s, int c, size_t n)
+{
+ return __builtin_memset (s, c, n);
+}
+#endif
+
+char *
simple_memset (char *s, int c, size_t n)
{
char *r = s, *end = s + n;
@@ -38,20 +72,20 @@ simple_memset (char *s, int c, size_t n)
return s;
}
-char *
-builtin_memset (char *s, int c, size_t n)
-{
- return __builtin_memset (s, c, n);
-}
-
static void
-do_one_test (impl_t *impl, char *s, int c, size_t n)
+do_one_test (impl_t *impl, char *s, int c __attribute ((unused)), size_t n)
{
- char *res = CALL (impl, s, c, n);
char tstbuf[n];
+#ifdef TEST_BZERO
+ simple_bzero (tstbuf, n);
+ CALL (impl, s, n);
+ if (memcmp (s, tstbuf, n) != 0)
+#else
+ char *res = CALL (impl, s, c, n);
if (res != s
|| simple_memset (tstbuf, c, n) != tstbuf
|| memcmp (s, tstbuf, n) != 0)
+#endif
{
error (0, 0, "Wrong result in function %s", impl->name);
ret = 1;
@@ -68,7 +102,12 @@ do_one_test (impl_t *impl, char *s, int c, size_t n)
for (i = 0; i < 32; ++i)
{
HP_TIMING_NOW (start);
+#ifdef TEST_BZERO
+ CALL (impl, s, n);
+#else
CALL (impl, s, c, n);
+#endif
+
HP_TIMING_NOW (stop);
HP_TIMING_BEST (best_time, start, stop);
}
@@ -94,6 +133,7 @@ do_test (size_t align, int c, size_t len)
putchar ('\n');
}
+#ifndef TEST_BZERO
static void
do_random_tests (void)
{
@@ -178,12 +218,13 @@ do_random_tests (void)
}
}
}
+#endif
int
test_main (void)
{
size_t i;
- int c;
+ int c = 0;
test_init ();
@@ -192,7 +233,9 @@ test_main (void)
printf ("\t%s", impl->name);
putchar ('\n');
+#ifndef TEST_BZERO
for (c = -65; c <= 130; c += 65)
+#endif
{
for (i = 0; i < 18; ++i)
do_test (0, c, 1 << i);
@@ -208,7 +251,10 @@ test_main (void)
do_test (2, c, 25);
}
+#ifndef TEST_BZERO
do_random_tests ();
+#endif
+
return ret;
}
diff --git a/sysdeps/mach/hurd/dl-cache.c b/string/test-rawmemchr-ifunc.c
index 5c01c3d6dd..61818173f3 100644
--- a/sysdeps/mach/hurd/dl-cache.c
+++ b/string/test-rawmemchr-ifunc.c
@@ -1,5 +1,5 @@
-/* Stubby version of dl-cache; the Hurd doesn't support this "feature".
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Test and measure IFUNC implementations of rawmemchr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,13 +16,5 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-const char *
-_dl_load_cache_lookup (const char *name)
-{
- return 0;
-}
-
-void
-_dl_unload_cache (void)
-{
-}
+#define TEST_IFUNC 1
+#include "test-rawmemchr.c"
diff --git a/string/test-rawmemchr.c b/string/test-rawmemchr.c
index c8000d68c4..a3f2c1113d 100644
--- a/string/test-rawmemchr.c
+++ b/string/test-rawmemchr.c
@@ -1,5 +1,5 @@
/* Test and measure memchr functions.
- Copyright (C) 1999,2002,2003,2005,2009,2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -20,6 +20,7 @@
#include <assert.h>
#define TEST_MAIN
+#define TEST_NAME "rawmemchr"
#include "test-string.h"
typedef char *(*proto_t) (const char *, int);
diff --git a/string/test-stpcpy-ifunc.c b/string/test-stpcpy-ifunc.c
new file mode 100644
index 0000000000..071569990a
--- /dev/null
+++ b/string/test-stpcpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of stpcpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-stpcpy.c"
diff --git a/string/test-stpcpy.c b/string/test-stpcpy.c
index accc05c449..6a7af0cdcc 100644
--- a/string/test-stpcpy.c
+++ b/string/test-stpcpy.c
@@ -1,5 +1,5 @@
/* Test and measure stpcpy functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -19,6 +19,7 @@
#define STRCPY_RESULT(dst, len) ((dst) + (len))
#define TEST_MAIN
+#define TEST_NAME "stpcpy"
#include "test-string.h"
char *simple_stpcpy (char *, const char *);
diff --git a/string/test-stpncpy-ifunc.c b/string/test-stpncpy-ifunc.c
new file mode 100644
index 0000000000..f61c367bdc
--- /dev/null
+++ b/string/test-stpncpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of stpncpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-stpncpy.c"
diff --git a/string/test-stpncpy.c b/string/test-stpncpy.c
index 8fb6d799be..8647299f3b 100644
--- a/string/test-stpncpy.c
+++ b/string/test-stpncpy.c
@@ -1,5 +1,5 @@
/* Test and measure stpncpy functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -19,6 +19,7 @@
#define STRNCPY_RESULT(dst, len, n) ((dst) + ((len) > (n) ? (n) : (len)))
#define TEST_MAIN
+#define TEST_NAME "stpncpy"
#include "test-string.h"
char *simple_stpncpy (char *, const char *, size_t);
diff --git a/string/test-strcasecmp-ifunc.c b/string/test-strcasecmp-ifunc.c
new file mode 100644
index 0000000000..f260dc8e1f
--- /dev/null
+++ b/string/test-strcasecmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcasecmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcasecmp.c"
diff --git a/string/test-strcasecmp.c b/string/test-strcasecmp.c
index 039d9c1e3c..202ac60cea 100644
--- a/string/test-strcasecmp.c
+++ b/string/test-strcasecmp.c
@@ -1,5 +1,5 @@
/* Test and measure strcasecmp functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -19,6 +19,7 @@
#include <ctype.h>
#define TEST_MAIN
+#define TEST_NAME "strcasecmp"
#include "test-string.h"
typedef int (*proto_t) (const char *, const char *);
diff --git a/string/test-strcasestr-ifunc.c b/string/test-strcasestr-ifunc.c
new file mode 100644
index 0000000000..ae0d1bdb28
--- /dev/null
+++ b/string/test-strcasestr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcasestr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcasestr.c"
diff --git a/string/test-strcasestr.c b/string/test-strcasestr.c
index 6c1a878617..9a0f30c690 100644
--- a/string/test-strcasestr.c
+++ b/string/test-strcasestr.c
@@ -1,5 +1,5 @@
/* Test and measure strcasestr functions.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@redhat.com>, 2010.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strcasestr"
#include "test-string.h"
@@ -57,8 +58,9 @@ IMPL (simple_strcasestr, 0)
IMPL (strcasestr, 1)
-static void
-do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
+static int
+check_result (impl_t *impl, const char *s1, const char *s2,
+ char *exp_result)
{
char *result = CALL (impl, s1, s2);
if (result != exp_result)
@@ -66,8 +68,16 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
error (0, 0, "Wrong result in function %s %s %s", impl->name,
result, exp_result);
ret = 1;
- return;
+ return -1;
}
+ return 0;
+}
+
+static void
+do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
+{
+ if (check_result (impl, s1, s2, exp_result) < 0)
+ return;
if (HP_TIMING_AVAIL)
{
@@ -136,12 +146,25 @@ do_test (size_t align1, size_t align2, size_t len1, size_t len2,
putchar ('\n');
}
+static void
+check1 (void)
+{
+ const char s1[] = "AOKB";
+ const char s2[] = "OK";
+ char *exp_result;
+
+ exp_result = stupid_strcasestr (s1, s2);
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1, s2, exp_result);
+}
static int
test_main (void)
{
test_init ();
+ check1 ();
+
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
diff --git a/string/test-strcat-ifunc.c b/string/test-strcat-ifunc.c
new file mode 100644
index 0000000000..cf71c67c50
--- /dev/null
+++ b/string/test-strcat-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcat function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcat.c"
diff --git a/string/test-strcat.c b/string/test-strcat.c
index 7dcd7bc5b9..2d90d52efc 100644
--- a/string/test-strcat.c
+++ b/string/test-strcat.c
@@ -1,5 +1,5 @@
/* Test and measure strcat functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strcat"
#include "test-string.h"
typedef char *(*proto_t) (char *, const char *);
diff --git a/string/test-strchr-ifunc.c b/string/test-strchr-ifunc.c
new file mode 100644
index 0000000000..b97b296649
--- /dev/null
+++ b/string/test-strchr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strchr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strchr.c"
diff --git a/string/test-strchr.c b/string/test-strchr.c
index e544aa7158..1ed6966665 100644
--- a/string/test-strchr.c
+++ b/string/test-strchr.c
@@ -1,5 +1,5 @@
/* Test and measure STRCHR functions.
- Copyright (C) 1999, 2002, 2003, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wcschr support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
@@ -19,6 +19,15 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifndef WIDE
+# ifdef USE_FOR_STRCHRNUL
+# define TEST_NAME "strchrnul"
+# else
+# define TEST_NAME "strchr"
+# endif
+#else
+# define TEST_NAME "wcschr"
+#endif
#include "test-string.h"
#ifndef WIDE
@@ -79,8 +88,8 @@ IMPL (stupid_STRCHR, 0)
IMPL (simple_STRCHR, 0)
IMPL (STRCHR, 1)
-static void
-do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
+static int
+check_result (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
{
CHAR *res = CALL (impl, s, c);
if (res != exp_res)
@@ -88,8 +97,16 @@ do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
error (0, 0, "Wrong result in function %s %#x %p %p", impl->name,
c, res, exp_res);
ret = 1;
- return;
+ return -1;
}
+ return 0;
+}
+
+static void
+do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
+{
+ if (check_result (impl, s, c, exp_res) < 0)
+ return;
if (HP_TIMING_AVAIL)
{
@@ -224,6 +241,17 @@ do_random_tests (void)
}
}
+static void
+check1 (void)
+{
+ char s[] __attribute__((aligned(16))) = "\xff";
+ char c = '\xfe';
+ char *exp_result = stupid_STRCHR (s, c);
+
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s, c, exp_result);
+}
+
int
test_main (void)
{
@@ -231,6 +259,8 @@ test_main (void)
test_init ();
+ check1 ();
+
printf ("%20s", "");
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
diff --git a/string/test-strchrnul-ifunc.c b/string/test-strchrnul-ifunc.c
new file mode 100644
index 0000000000..aacedb939e
--- /dev/null
+++ b/string/test-strchrnul-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strchrnul function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strchrnul.c"
diff --git a/string/test-strcmp-ifunc.c b/string/test-strcmp-ifunc.c
new file mode 100644
index 0000000000..8cc1aad4a5
--- /dev/null
+++ b/string/test-strcmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcmp.c"
diff --git a/string/test-strcmp.c b/string/test-strcmp.c
index 000c51091c..f186fd6cd9 100644
--- a/string/test-strcmp.c
+++ b/string/test-strcmp.c
@@ -19,6 +19,11 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifdef WIDE
+# define TEST_NAME "wcscmp"
+#else
+# define TEST_NAME "strcmp"
+#endif
#include "test-string.h"
#ifdef WIDE
diff --git a/string/test-strcpy-ifunc.c b/string/test-strcpy-ifunc.c
new file mode 100644
index 0000000000..b21a98b84e
--- /dev/null
+++ b/string/test-strcpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcpy.c"
diff --git a/string/test-strcpy.c b/string/test-strcpy.c
index 3a0b118afb..de57c68aeb 100644
--- a/string/test-strcpy.c
+++ b/string/test-strcpy.c
@@ -1,5 +1,5 @@
/* Test and measure strcpy functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wcscpy support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
@@ -42,6 +42,11 @@
#ifndef STRCPY_RESULT
# define STRCPY_RESULT(dst, len) dst
# define TEST_MAIN
+# ifndef WIDE
+# define TEST_NAME "strcpy"
+# else
+# define TEST_NAME "wcscpy"
+# endif
# include "test-string.h"
# ifndef WIDE
# define SIMPLE_STRCPY simple_strcpy
diff --git a/string/test-strcspn-ifunc.c b/string/test-strcspn-ifunc.c
new file mode 100644
index 0000000000..380a371d69
--- /dev/null
+++ b/string/test-strcspn-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strcspn function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strcspn.c"
diff --git a/string/test-strcspn.c b/string/test-strcspn.c
index d80947a10a..e2863c783d 100644
--- a/string/test-strcspn.c
+++ b/string/test-strcspn.c
@@ -1,5 +1,5 @@
/* Test and measure strcspn functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -20,6 +20,7 @@
#define STRPBRK_RESULT(s, pos) (pos)
#define RES_TYPE size_t
#define TEST_MAIN
+#define TEST_NAME "strcspn"
#include "test-string.h"
typedef size_t (*proto_t) (const char *, const char *);
diff --git a/string/test-string.h b/string/test-string.h
index c94d822b33..102702c5ce 100644
--- a/string/test-string.h
+++ b/string/test-string.h
@@ -50,6 +50,7 @@ extern impl_t __start_impls[], __stop_impls[];
#include <error.h>
#include <errno.h>
#include <time.h>
+#include <ifunc-impl-list.h>
#define GL(x) _##x
#define GLRO(x) _##x
#include <hp-timing.h>
@@ -106,9 +107,57 @@ size_t iterations = 100000;
#define CALL(impl, ...) \
(* (proto_t) (impl)->fn) (__VA_ARGS__)
-#define FOR_EACH_IMPL(impl, notall) \
+#if defined TEST_IFUNC && defined TEST_NAME
+/* Increase size of FUNC_LIST if assert is triggered at run-time. */
+static struct libc_ifunc_impl func_list[32];
+static int func_count;
+static int impl_count = -1;
+static impl_t *impl_array;
+
+# define FOR_EACH_IMPL(impl, notall) \
+ impl_t *impl; \
+ int count; \
+ if (impl_count == -1) \
+ { \
+ impl_count = 0; \
+ if (func_count != 0) \
+ { \
+ int f; \
+ impl_t *skip = NULL, *a; \
+ for (impl = __start_impls; impl < __stop_impls; ++impl) \
+ if (strcmp (impl->name, TEST_NAME) == 0) \
+ skip = impl; \
+ else \
+ impl_count++; \
+ a = impl_array = malloc ((impl_count + func_count) * \
+ sizeof (impl_t)); \
+ for (impl = __start_impls; impl < __stop_impls; ++impl) \
+ if (impl != skip) \
+ *a++ = *impl; \
+ for (f = 0; f < func_count; f++) \
+ if (func_list[f].usable) \
+ { \
+ a->name = func_list[f].name; \
+ a->fn = func_list[f].fn; \
+ a->test = 1; \
+ a++; \
+ } \
+ impl_count = a - impl_array; \
+ } \
+ else \
+ { \
+ impl_count = __stop_impls - __start_impls; \
+ impl_array = __start_impls; \
+ } \
+ } \
+ impl = impl_array; \
+ for (count = 0; count < impl_count; ++count, ++impl) \
+ if (!notall || impl->test)
+#else
+# define FOR_EACH_IMPL(impl, notall) \
for (impl_t *impl = __start_impls; impl < __stop_impls; ++impl) \
if (!notall || impl->test)
+#endif
#define HP_TIMING_BEST(best_time, start, end) \
do \
@@ -127,6 +176,12 @@ size_t iterations = 100000;
static void
test_init (void)
{
+#if defined TEST_IFUNC && defined TEST_NAME
+ func_count = __libc_ifunc_impl_list (TEST_NAME, func_list,
+ (sizeof func_list
+ / sizeof func_list[0]));
+#endif
+
page_size = 2 * getpagesize ();
#ifdef MIN_PAGE_SIZE
if (page_size < MIN_PAGE_SIZE)
diff --git a/string/test-strlen-ifunc.c b/string/test-strlen-ifunc.c
new file mode 100644
index 0000000000..4d87cc8f5b
--- /dev/null
+++ b/string/test-strlen-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strlen function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strlen.c"
diff --git a/string/test-strlen.c b/string/test-strlen.c
index 0ac5184bc8..6be7e43d31 100644
--- a/string/test-strlen.c
+++ b/string/test-strlen.c
@@ -1,5 +1,5 @@
/* Test and measure STRLEN functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wcslen support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
@@ -19,6 +19,11 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifndef WIDE
+# define TEST_NAME "strlen"
+#else
+# define TEST_NAME "wcslen"
+#endif
#include "test-string.h"
#ifndef WIDE
diff --git a/string/test-strncasecmp-ifunc.c b/string/test-strncasecmp-ifunc.c
new file mode 100644
index 0000000000..9bf05d09d3
--- /dev/null
+++ b/string/test-strncasecmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strncasecmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strncasecmp.c"
diff --git a/string/test-strncasecmp.c b/string/test-strncasecmp.c
index 6c17530408..95664f3a97 100644
--- a/string/test-strncasecmp.c
+++ b/string/test-strncasecmp.c
@@ -1,5 +1,5 @@
/* Test and measure strncasecmp functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -19,6 +19,7 @@
#include <ctype.h>
#define TEST_MAIN
+#define TEST_NAME "strncasecmp"
#include "test-string.h"
typedef int (*proto_t) (const char *, const char *, size_t);
@@ -251,9 +252,9 @@ do_random_tests (void)
}
}
-
+/* Regression test for BZ #12205 */
static void
-check1 (void)
+bz12205 (void)
{
static char cp [4096+16] __attribute__ ((aligned(4096)));
static char gotrel[4096] __attribute__ ((aligned(4096)));
@@ -270,6 +271,15 @@ check1 (void)
check_result (impl, s1, s2, n, exp_result);
}
+/* Regression test for BZ #14195 */
+static void
+bz14195 (void)
+{
+ const char *empty_string = "";
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, empty_string, "", 5, 0);
+}
+
int
test_main (void)
{
@@ -277,7 +287,8 @@ test_main (void)
test_init ();
- check1 ();
+ bz12205 ();
+ bz14195 ();
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)
diff --git a/string/test-strncat-ifunc.c b/string/test-strncat-ifunc.c
new file mode 100644
index 0000000000..28e832fe07
--- /dev/null
+++ b/string/test-strncat-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strncat function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strncat.c"
diff --git a/string/test-strncat.c b/string/test-strncat.c
index 69c8c0b21d..0cdaa4f6a8 100644
--- a/string/test-strncat.c
+++ b/string/test-strncat.c
@@ -1,5 +1,5 @@
/* Test and measure strncat functions.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strncat"
#include "test-string.h"
typedef char *(*proto_t) (char *, const char *, size_t);
diff --git a/string/test-strncmp-ifunc.c b/string/test-strncmp-ifunc.c
new file mode 100644
index 0000000000..100a06837e
--- /dev/null
+++ b/string/test-strncmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strncmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strncmp.c"
diff --git a/string/test-strncmp.c b/string/test-strncmp.c
index 266781bc44..a66a125686 100644
--- a/string/test-strncmp.c
+++ b/string/test-strncmp.c
@@ -1,5 +1,5 @@
/* Test and measure strncmp functions.
- Copyright (C) 1999, 2002, 2003, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strncmp"
#include "test-string.h"
typedef int (*proto_t) (const char *, const char *, size_t);
diff --git a/string/test-strncpy-ifunc.c b/string/test-strncpy-ifunc.c
new file mode 100644
index 0000000000..834291b009
--- /dev/null
+++ b/string/test-strncpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strncpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strncpy.c"
diff --git a/string/test-strncpy.c b/string/test-strncpy.c
index f683f7d743..ba1050f347 100644
--- a/string/test-strncpy.c
+++ b/string/test-strncpy.c
@@ -1,5 +1,5 @@
/* Test and measure strncpy functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -20,6 +20,7 @@
#ifndef STRNCPY_RESULT
# define STRNCPY_RESULT(dst, len, n) dst
# define TEST_MAIN
+# define TEST_NAME "strncpy"
# include "test-string.h"
char *simple_strncpy (char *, const char *, size_t);
diff --git a/string/test-strnlen-ifunc.c b/string/test-strnlen-ifunc.c
new file mode 100644
index 0000000000..3810de7d31
--- /dev/null
+++ b/string/test-strnlen-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strnlen function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strnlen.c"
diff --git a/string/test-strnlen.c b/string/test-strnlen.c
index 547df45ad8..17a2e22db9 100644
--- a/string/test-strnlen.c
+++ b/string/test-strnlen.c
@@ -1,5 +1,5 @@
/* Test and measure strlen functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strnlen"
#include "test-string.h"
typedef size_t (*proto_t) (const char *, size_t);
diff --git a/string/test-strpbrk-ifunc.c b/string/test-strpbrk-ifunc.c
new file mode 100644
index 0000000000..896510ba6e
--- /dev/null
+++ b/string/test-strpbrk-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strpbrk function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strpbrk.c"
diff --git a/string/test-strpbrk.c b/string/test-strpbrk.c
index 263a7fdfb6..8a3d2bb2a0 100644
--- a/string/test-strpbrk.c
+++ b/string/test-strpbrk.c
@@ -1,5 +1,5 @@
/* Test and measure strpbrk functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -21,6 +21,7 @@
# define STRPBRK_RESULT(s, pos) ((s)[(pos)] ? (s) + (pos) : NULL)
# define RES_TYPE char *
# define TEST_MAIN
+# define TEST_NAME "strpbrk"
# include "test-string.h"
typedef char *(*proto_t) (const char *, const char *);
diff --git a/string/test-strrchr-ifunc.c b/string/test-strrchr-ifunc.c
new file mode 100644
index 0000000000..77b1e69df8
--- /dev/null
+++ b/string/test-strrchr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strrchr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strrchr.c"
diff --git a/string/test-strrchr.c b/string/test-strrchr.c
index c63c8dea6f..a58435fd57 100644
--- a/string/test-strrchr.c
+++ b/string/test-strrchr.c
@@ -1,5 +1,5 @@
/* Test and measure STRCHR functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wcsrrchr support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>,
@@ -20,6 +20,11 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#ifdef WIDE
+# define TEST_NAME "wcsrchr"
+#else
+# define TEST_NAME "strrchr"
+#endif
#include "test-string.h"
#ifdef WIDE
diff --git a/string/test-strspn-ifunc.c b/string/test-strspn-ifunc.c
new file mode 100644
index 0000000000..b836dfb0aa
--- /dev/null
+++ b/string/test-strspn-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strspn function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strspn.c"
diff --git a/string/test-strspn.c b/string/test-strspn.c
index 743bc0ae40..557db0af92 100644
--- a/string/test-strspn.c
+++ b/string/test-strspn.c
@@ -1,5 +1,5 @@
/* Test and measure strspn functions.
- Copyright (C) 1999,2002,2003,2005 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strspn"
#include "test-string.h"
typedef size_t (*proto_t) (const char *, const char *);
diff --git a/string/test-strstr-ifunc.c b/string/test-strstr-ifunc.c
new file mode 100644
index 0000000000..4d43dda3ee
--- /dev/null
+++ b/string/test-strstr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of strstr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-strstr.c"
diff --git a/string/test-strstr.c b/string/test-strstr.c
index 6be460168c..22a00f92b9 100644
--- a/string/test-strstr.c
+++ b/string/test-strstr.c
@@ -1,5 +1,5 @@
/* Test and measure strstr functions.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@redhat.com>, 2010.
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#define TEST_MAIN
+#define TEST_NAME "strstr"
#include "test-string.h"
@@ -55,8 +56,9 @@ IMPL (simple_strstr, 0)
IMPL (strstr, 1)
-static void
-do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
+static int
+check_result (impl_t *impl, const char *s1, const char *s2,
+ char *exp_result)
{
char *result = CALL (impl, s1, s2);
if (result != exp_result)
@@ -64,9 +66,18 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
error (0, 0, "Wrong result in function %s %s %s", impl->name,
result, exp_result);
ret = 1;
- return;
+ return -1;
}
+ return 0;
+}
+
+static void
+do_one_test (impl_t *impl, const char *s1, const char *s2, char *exp_result)
+{
+ if (check_result (impl, s1, s2, exp_result) < 0)
+ return;
+
if (HP_TIMING_AVAIL)
{
hp_timing_t start __attribute ((unused));
@@ -133,12 +144,43 @@ do_test (size_t align1, size_t align2, size_t len1, size_t len2,
putchar ('\n');
}
+static void
+check1 (void)
+{
+ const char s1[] =
+ "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD_C3_A7_20_EF_BF_BD";
+ const char s2[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD";
+ char *exp_result;
+
+ exp_result = stupid_strstr (s1, s2);
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1, s2, exp_result);
+}
+
+static void
+check2 (void)
+{
+ const char s1[] = ", enable_static, \0, enable_shared, ";
+ char *exp_result;
+ char *s2 = (void *) buf1 + page_size - 18;
+
+ strcpy (s2, s1);
+ exp_result = stupid_strstr (s1, s1 + 18);
+ FOR_EACH_IMPL (impl, 0)
+ {
+ check_result (impl, s1, s1 + 18, exp_result);
+ check_result (impl, s2, s1 + 18, exp_result);
+ }
+}
static int
test_main (void)
{
test_init ();
+ check1 ();
+ check2 ();
+
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)
printf ("\t%s", impl->name);
diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
index 06d951aa6a..2103b10d5f 100644
--- a/sunrpc/rpc_main.c
+++ b/sunrpc/rpc_main.c
@@ -75,12 +75,9 @@ struct commandline
static const char *cmdname;
-#define SVR4_CPP "/usr/ccs/lib/cpp"
-#define SUNOS_CPP "/lib/cpp"
-
static const char *svcclosetime = "120";
static int cppDefined; /* explicit path for C preprocessor */
-static const char *CPP = SUNOS_CPP;
+static const char *CPP = "/lib/cpp";
static const char CPPFLAGS[] = "-C";
static char *pathbuf;
static int cpp_pid;
@@ -327,23 +324,17 @@ find_cpp (void)
{
struct stat buf;
- if (stat (CPP, &buf) < 0)
- { /* /lib/cpp or explicit cpp does not exist */
- if (cppDefined)
- {
- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP);
- crash ();
- }
- else
- { /* try the other one */
- CPP = SVR4_CPP;
- if (stat (CPP, &buf) < 0)
- { /* can't find any cpp */
- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout);
- crash ();
- }
- }
+ if (stat (CPP, &buf) == 0)
+ return;
+
+ if (cppDefined) /* user specified cpp but it does not exist */
+ {
+ fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP);
+ crash ();
}
+
+ /* fall back to system CPP */
+ CPP = "cpp";
}
/*
@@ -374,8 +365,13 @@ open_input (const char *infile, const char *define)
close (1);
dup2 (pd[1], 1);
close (pd[0]);
- execv (arglist[0], (char **) arglist);
- perror ("execv");
+ execvp (arglist[0], (char **) arglist);
+ if (errno == ENOENT)
+ {
+ fprintf (stderr, _ ("cannot find C preprocessor: %s\n"), CPP);
+ exit (1);
+ }
+ perror ("execvp");
exit (1);
case -1:
perror ("fork");
diff --git a/sysdeps/generic/_G_config.h b/sysdeps/generic/_G_config.h
index 6f756829e7..f44a3d4eee 100644
--- a/sysdeps/generic/_G_config.h
+++ b/sysdeps/generic/_G_config.h
@@ -18,7 +18,6 @@
# define __need_wint_t
#endif
#include <wchar.h>
-#define _G_size_t size_t
typedef struct
{
__off_t __pos;
@@ -29,14 +28,6 @@ typedef struct
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
-#define _G_ssize_t __ssize_t
-#define _G_off_t __off_t
-#define _G_off64_t __off_t
-#define _G_pid_t __pid_t
-#define _G_uid_t __uid_t
-#define _G_wchar_t wchar_t
-#define _G_wint_t wint_t
-#define _G_stat64 stat
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
typedef union
@@ -50,25 +41,11 @@ typedef union
} _G_iconv_t;
#endif
-typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
-typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
-typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
-typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
-
-#define _G_HAVE_BOOL 1
-
/* These library features are always available in the GNU C library. */
-#define _G_HAVE_ATEXIT 1
-#define _G_HAVE_SYS_WAIT 1
-#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list
-#define _G_HAVE_PRINTF_FP 1
#define _G_HAVE_MMAP 1
-#define _G_HAVE_LONG_DOUBLE_IO 1
-#define _G_HAVE_IO_FILE_OPEN 1
-#define _G_HAVE_IO_GETLINE_INFO 1
#define _G_IO_IO_FILE_VERSION 0x20001
@@ -77,9 +54,4 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
#define _G_BUFSIZ 8192
-/* These are the vtbl details for ELF. */
-#define _G_NAMES_HAVE_UNDERSCORE 0
-#define _G_VTABLE_LABEL_PREFIX "_vt."
-#define _G_VTABLE_LABEL_HAS_LENGTH 1
-
#endif /* _G_config.h */
diff --git a/sysdeps/generic/eloop-threshold.h b/sysdeps/generic/eloop-threshold.h
new file mode 100644
index 0000000000..2342d29a23
--- /dev/null
+++ b/sysdeps/generic/eloop-threshold.h
@@ -0,0 +1,72 @@
+/* Threshold at which to diagnose ELOOP. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _ELOOP_THRESHOLD_H
+#define _ELOOP_THRESHOLD_H 1
+
+#include <limits.h>
+#include <sys/param.h>
+
+/* POSIX specifies SYMLOOP_MAX as the "Maximum number of symbolic
+ links that can be reliably traversed in the resolution of a
+ pathname in the absence of a loop." This makes it a minimum that
+ we should certainly accept. But it leaves open the possibility
+ that more might sometimes work--just not "reliably".
+
+ For example, Linux implements a complex policy whereby there is a
+ small limit on the number of direct symlink traversals (a symlink
+ to a symlink to a symlink), but larger limit on the total number of
+ symlink traversals overall. Hence the SYMLOOP_MAX number should be
+ the small one, but the limit library functions enforce on users
+ should be the larger one.
+
+ So, we use the larger of the reported SYMLOOP_MAX (if any) and our
+ own constant MIN_ELOOP_THRESHOLD, below. This constant should be
+ large enough that it never rules out a file name and directory tree
+ that the underlying system (i.e. calls to 'open' et al) would
+ resolve successfully. It should be small enough that actual loops
+ are detected without a huge number of iterations. */
+
+#ifndef MIN_ELOOP_THRESHOLD
+# define MIN_ELOOP_THRESHOLD 40
+#endif
+
+/* Return the maximum number of symlink traversals to permit
+ before diagnosing ELOOP. */
+static inline unsigned int __attribute__ ((const))
+__eloop_threshold (void)
+{
+#ifdef SYMLOOP_MAX
+ const int symloop_max = SYMLOOP_MAX;
+#else
+ /* The function is marked 'const' even though we use memory and
+ call a function, because sysconf is required to return the
+ same value in every call and so it must always be safe to
+ call __eloop_threshold exactly once and reuse the value. */
+ static long int sysconf_symloop_max;
+ if (sysconf_symloop_max == 0)
+ sysconf_symloop_max = __sysconf (_SC_SYMLOOP_MAX);
+ const unsigned int symloop_max = (sysconf_symloop_max <= 0
+ ? _POSIX_SYMLOOP_MAX
+ : sysconf_symloop_max);
+#endif
+
+ return MAX (symloop_max, MIN_ELOOP_THRESHOLD);
+}
+
+#endif /* eloop-threshold.h */
diff --git a/sysdeps/generic/fips-private.h b/sysdeps/generic/fips-private.h
new file mode 100644
index 0000000000..0dff087c11
--- /dev/null
+++ b/sysdeps/generic/fips-private.h
@@ -0,0 +1,36 @@
+/* Dummy implementation of FIPS compliance status test.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _FIPS_PRIVATE_H
+#define _FIPS_PRIVATE_H
+
+#include <stdbool.h>
+
+/* Return true if compliance with the FIPS security standards is
+ enabled.
+
+ This is only relevant within crypt, to tell whether MD5 and DES
+ algorithms should be rejected. */
+
+static inline bool
+fips_enabled_p (void)
+{
+ return false;
+}
+
+#endif /* _FIPS_PRIVATE_H */
diff --git a/sysdeps/generic/get-rounding-mode.h b/sysdeps/generic/get-rounding-mode.h
new file mode 100644
index 0000000000..0ecaddd7bf
--- /dev/null
+++ b/sysdeps/generic/get-rounding-mode.h
@@ -0,0 +1,124 @@
+/* Determine floating-point rounding mode within libc. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _GET_ROUNDING_MODE_H
+#define _GET_ROUNDING_MODE_H 1
+
+#include <fpu_control.h>
+
+/* Define values for FE_* modes not defined for this architecture. */
+#ifdef FE_DOWNWARD
+# define ORIG_FE_DOWNWARD FE_DOWNWARD
+#else
+# define ORIG_FE_DOWNWARD 0
+#endif
+#ifdef FE_TONEAREST
+# define ORIG_FE_TONEAREST FE_TONEAREST
+#else
+# define ORIG_FE_TONEAREST 0
+#endif
+#ifdef FE_TOWARDZERO
+# define ORIG_FE_TOWARDZERO FE_TOWARDZERO
+#else
+# define ORIG_FE_TOWARDZERO 0
+#endif
+#ifdef FE_UPWARD
+# define ORIG_FE_UPWARD FE_UPWARD
+#else
+# define ORIG_FE_UPWARD 0
+#endif
+#define FE_CONSTRUCT_DISTINCT_VALUE(X, Y, Z) \
+ ((((X) & 1) | ((Y) & 2) | ((Z) & 4)) ^ 7)
+#ifndef FE_DOWNWARD
+# define FE_DOWNWARD FE_CONSTRUCT_DISTINCT_VALUE (ORIG_FE_TONEAREST, \
+ ORIG_FE_TOWARDZERO, \
+ ORIG_FE_UPWARD)
+#endif
+#ifndef FE_TONEAREST
+# define FE_TONEAREST FE_CONSTRUCT_DISTINCT_VALUE (FE_DOWNWARD, \
+ ORIG_FE_TOWARDZERO, \
+ ORIG_FE_UPWARD)
+#endif
+#ifndef FE_TOWARDZERO
+# define FE_TOWARDZERO FE_CONSTRUCT_DISTINCT_VALUE (FE_DOWNWARD, \
+ FE_TONEAREST, \
+ ORIG_FE_UPWARD)
+#endif
+#ifndef FE_UPWARD
+# define FE_UPWARD FE_CONSTRUCT_DISTINCT_VALUE (FE_DOWNWARD, \
+ FE_TONEAREST, \
+ FE_TOWARDZERO)
+#endif
+
+/* Return the floating-point rounding mode. */
+
+static inline int
+get_rounding_mode (void)
+{
+#if (defined _FPU_RC_DOWN \
+ || defined _FPU_RC_NEAREST \
+ || defined _FPU_RC_ZERO \
+ || defined _FPU_RC_UP)
+ fpu_control_t fc;
+ const fpu_control_t mask = (0
+# ifdef _FPU_RC_DOWN
+ | _FPU_RC_DOWN
+# endif
+# ifdef _FPU_RC_NEAREST
+ | _FPU_RC_NEAREST
+# endif
+# ifdef _FPU_RC_ZERO
+ | _FPU_RC_ZERO
+# endif
+# ifdef _FPU_RC_UP
+ | _FPU_RC_UP
+# endif
+ );
+
+ _FPU_GETCW (fc);
+ switch (fc & mask)
+ {
+# ifdef _FPU_RC_DOWN
+ case _FPU_RC_DOWN:
+ return FE_DOWNWARD;
+# endif
+
+# ifdef _FPU_RC_NEAREST
+ case _FPU_RC_NEAREST:
+ return FE_TONEAREST;
+# endif
+
+# ifdef _FPU_RC_ZERO
+ case _FPU_RC_ZERO:
+ return FE_TOWARDZERO;
+# endif
+
+# ifdef _FPU_RC_UP
+ case _FPU_RC_UP:
+ return FE_UPWARD;
+# endif
+
+ default:
+ abort ();
+ }
+#else
+ return FE_TONEAREST;
+#endif
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 39c633904a..c667e34244 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -41,6 +41,12 @@
__BEGIN_DECLS
+#define VERSYMIDX(sym) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (sym))
+#define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
+ + DT_EXTRANUM + DT_VALTAGIDX (tag))
+#define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
+ + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
+
/* We use this macro to refer to ELF types independent of the native wordsize.
`ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type)
@@ -272,7 +278,7 @@ struct rtld_global
/* Search table for unique objects. */
struct unique_sym_table
{
- __rtld_lock_recursive_t lock;
+ __rtld_lock_define_recursive (, lock)
struct unique_sym
{
uint32_t hashval;
diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-machine.h
index 03e9de5fd8..851978a4de 100644
--- a/sysdeps/generic/malloc-machine.h
+++ b/sysdeps/generic/malloc-machine.h
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,10 +34,11 @@
be based on atomic test-and-set operations, for example. */
typedef int mutex_t;
-# define mutex_init(m) (*(m) = 0)
-# define mutex_lock(m) ((*(m) = 1), 0)
-# define mutex_trylock(m) (*(m) ? 1 : ((*(m) = 1), 0))
-# define mutex_unlock(m) (*(m) = 0)
+# define mutex_init(m) (*(m) = 0)
+# define mutex_lock(m) ((*(m) = 1), 0)
+# define mutex_trylock(m) (*(m) ? 1 : ((*(m) = 1), 0))
+# define mutex_unlock(m) (*(m) = 0)
+# define MUTEX_INITIALIZER (0)
typedef void *tsd_key_t;
# define tsd_key_create(key, destr) do {} while(0)
diff --git a/sysdeps/generic/malloc-sysdep.h b/sysdeps/generic/malloc-sysdep.h
new file mode 100644
index 0000000000..bbc48c04f0
--- /dev/null
+++ b/sysdeps/generic/malloc-sysdep.h
@@ -0,0 +1,25 @@
+/* System-specific malloc support functions. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Force an unmap when the heap shrinks in a secure exec. This ensures that
+ the old data pages immediately cease to be accessible. */
+static inline bool
+check_may_shrink_heap (void)
+{
+ return __libc_enable_secure;
+}
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index 5267ec327b..b375bc0c56 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -364,6 +364,13 @@ extern double __slowexp (double __x);
extern double __slowpow (double __x, double __y, double __z);
extern void __docos (double __x, double __dx, double __v[]);
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+extern float __x2y2m1f (float x, float y);
+extern double __x2y2m1 (double x, double y);
+extern long double __x2y2m1l (long double x, long double y);
+
#ifndef math_opt_barrier
# define math_opt_barrier(x) \
({ __typeof (x) __x = (x); __asm ("" : "+m" (__x)); __x; })
diff --git a/sysdeps/generic/siglist.h b/sysdeps/generic/siglist.h
index d2ad1db369..7ecb8ab184 100644
--- a/sysdeps/generic/siglist.h
+++ b/sysdeps/generic/siglist.h
@@ -1,5 +1,5 @@
/* Canonical list of all signal names.
- Copyright (C) 1996,97,98,99 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,7 +50,6 @@
init_sig (SIGXFSZ, "XFSZ", N_("File size limit exceeded"))
init_sig (SIGVTALRM, "VTALRM", N_("Virtual timer expired"))
init_sig (SIGPROF, "PROF", N_("Profiling timer expired"))
- init_sig (SIGWINCH, "WINCH", N_("Window changed"))
init_sig (SIGUSR1, "USR1", N_("User defined signal 1"))
init_sig (SIGUSR2, "USR2", N_("User defined signal 2"))
@@ -72,3 +71,6 @@
#ifdef SIGLOST
init_sig (SIGLOST, "LOST", N_("Resource lost"))
#endif
+#ifdef SIGWINCH
+ init_sig (SIGWINCH, "WINCH", N_("Window changed"))
+#endif
diff --git a/sysdeps/generic/sys/param.h b/sysdeps/generic/sys/param.h
deleted file mode 100644
index 0e10a0ea94..0000000000
--- a/sysdeps/generic/sys/param.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* This file should contain various parameter macros appropriate for the
- machine and operating system. There is no standard set of macros; this
- file is just for compatibility with programs written for Unix that
- expect it to define things. On Unix systems that do not have their own
- sysdep version of this file, it is generated at build time by examining
- the installed headers on the system. */
-
-#include <limits.h>
-
-#define MAXSYMLINKS 1
-#define MAXPATHLEN 256
-
-/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
diff --git a/sysdeps/generic/tininess.h b/sysdeps/generic/tininess.h
new file mode 100644
index 0000000000..fd01739950
--- /dev/null
+++ b/sysdeps/generic/tininess.h
@@ -0,0 +1,33 @@
+/* Specify architecture-specific rules for determining tininess of
+ floating-point results. Generic version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _TININESS_H
+#define _TININESS_H 1
+
+/* Under IEEE 754, an architecture may determine tininess of
+ floating-point results either "before rounding" or "after
+ rounding", but must do so in the same way for all operations
+ returning binary results. Define TININESS_AFTER_ROUNDING to 1 for
+ "after rounding" architectures, 0 for "before rounding"
+ architectures. The test stdlib/tst-tininess will fail if the
+ definition is incorrect. */
+
+#define TININESS_AFTER_ROUNDING 0
+
+#endif /* tininess.h */
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index 44bdb20b37..7b3683f600 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -1,124 +1,4 @@
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -163,56 +43,6 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
-$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } && {
- ac_pattern='conftest\.S'
- { ac_try='readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
-$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
if ${libc_cv_cc_sse4+:} false; then :
@@ -350,3 +180,4 @@ fi
$as_echo "$libc_cv_cc_novzeroupper" >&6; }
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index 399f737ef8..36cb3e46e0 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -5,39 +5,6 @@ AC_CHECK_HEADER([cpuid.h], ,
[AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
[/* No default includes. */])
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
- ac_pattern='conftest\.S'
- AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
-
dnl Check if -msse4 works.
AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no])
diff --git a/sysdeps/i386/fpu/e_acosh.S b/sysdeps/i386/fpu/e_acosh.S
index f1970f6112..474f5c9352 100644
--- a/sysdeps/i386/fpu/e_acosh.S
+++ b/sysdeps/i386/fpu/e_acosh.S
@@ -22,10 +22,10 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_acoshf.S b/sysdeps/i386/fpu/e_acoshf.S
index 5c17e345a2..456fe46990 100644
--- a/sysdeps/i386/fpu/e_acoshf.S
+++ b/sysdeps/i386/fpu/e_acoshf.S
@@ -22,10 +22,10 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_acoshl.S b/sysdeps/i386/fpu/e_acoshl.S
index 05dbdfdbfb..d9b3add138 100644
--- a/sysdeps/i386/fpu/e_acoshl.S
+++ b/sysdeps/i386/fpu/e_acoshl.S
@@ -25,13 +25,13 @@
/* Please note that we use double value for 1.0. This number
has an exact representation and so we don't get accuracy
problems. The advantage is that the code is simpler. */
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_atanh.S b/sysdeps/i386/fpu/e_atanh.S
index bef30de38d..b8ae6ef358 100644
--- a/sysdeps/i386/fpu/e_atanh.S
+++ b/sysdeps/i386/fpu/e_atanh.S
@@ -22,16 +22,16 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(half,@object)
+ .type half,@object
half: .double 0.5
ASM_SIZE_DIRECTIVE(half)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(ln2_2,@object)
+ .type ln2_2,@object
ln2_2: .tfloat 0.3465735902799726547086160
ASM_SIZE_DIRECTIVE(ln2_2)
diff --git a/sysdeps/i386/fpu/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S
index edb6053840..c63748537d 100644
--- a/sysdeps/i386/fpu/e_atanhf.S
+++ b/sysdeps/i386/fpu/e_atanhf.S
@@ -22,17 +22,17 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(half,@object)
+ .type half,@object
half: .double 0.5
ASM_SIZE_DIRECTIVE(half)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(ln2_2,@object)
+ .type ln2_2,@object
ln2_2: .tfloat 0.3465735902799726547086160
ASM_SIZE_DIRECTIVE(ln2_2)
diff --git a/sysdeps/i386/fpu/e_atanhl.S b/sysdeps/i386/fpu/e_atanhl.S
index 3d74f366fb..9e22e89f80 100644
--- a/sysdeps/i386/fpu/e_atanhl.S
+++ b/sysdeps/i386/fpu/e_atanhl.S
@@ -25,20 +25,20 @@
/* Please note that we use double values for 0.5 and 1.0. These
numbers have exact representations and so we don't get accuracy
problems. The advantage is that the code is simpler. */
- ASM_TYPE_DIRECTIVE(half,@object)
+ .type half,@object
half: .double 0.5
ASM_SIZE_DIRECTIVE(half)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(ln2_2,@object)
+ .type ln2_2,@object
ln2_2: .tfloat 0.3465735902799726547086160
ASM_SIZE_DIRECTIVE(ln2_2)
diff --git a/sysdeps/i386/fpu/e_expl.S b/sysdeps/i386/fpu/e_expl.S
index e42c9a1213..af339f0ff4 100644
--- a/sysdeps/i386/fpu/e_expl.S
+++ b/sysdeps/i386/fpu/e_expl.S
@@ -42,26 +42,26 @@
.p2align 4
#ifdef USE_AS_EXP10L
- ASM_TYPE_DIRECTIVE(c0,@object)
+ .type c0,@object
c0: .byte 0, 0, 0, 0, 0, 0, 0x9a, 0xd4, 0x00, 0x40
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c0)
- ASM_TYPE_DIRECTIVE(c1,@object)
+ .type c1,@object
c1: .byte 0x58, 0x92, 0xfc, 0x15, 0x37, 0x9a, 0x97, 0xf0, 0xef, 0x3f
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c1)
#else
- ASM_TYPE_DIRECTIVE(c0,@object)
+ .type c0,@object
c0: .byte 0, 0, 0, 0, 0, 0, 0xaa, 0xb8, 0xff, 0x3f
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c0)
- ASM_TYPE_DIRECTIVE(c1,@object)
+ .type c1,@object
c1: .byte 0x20, 0xfa, 0xee, 0xc2, 0x5f, 0x70, 0xa5, 0xec, 0xed, 0x3f
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c1)
#endif
#ifndef USE_AS_EXPM1L
- ASM_TYPE_DIRECTIVE(csat,@object)
+ .type csat,@object
csat: .byte 0, 0, 0, 0, 0, 0, 0, 0x80, 0x0e, 0x40
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(csat)
diff --git a/sysdeps/i386/fpu/e_log.S b/sysdeps/i386/fpu/e_log.S
index e4fffb80d3..0877924998 100644
--- a/sysdeps/i386/fpu/e_log.S
+++ b/sysdeps/i386/fpu/e_log.S
@@ -10,13 +10,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_log10.S b/sysdeps/i386/fpu/e_log10.S
index b54bf0ed0e..ce6a81abb6 100644
--- a/sysdeps/i386/fpu/e_log10.S
+++ b/sysdeps/i386/fpu/e_log10.S
@@ -10,13 +10,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_log10f.S b/sysdeps/i386/fpu/e_log10f.S
index 344110c1a4..8c20723555 100644
--- a/sysdeps/i386/fpu/e_log10f.S
+++ b/sysdeps/i386/fpu/e_log10f.S
@@ -11,13 +11,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_log10l.S b/sysdeps/i386/fpu/e_log10l.S
index eeb49c6636..cde987b137 100644
--- a/sysdeps/i386/fpu/e_log10l.S
+++ b/sysdeps/i386/fpu/e_log10l.S
@@ -12,13 +12,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_log2.S b/sysdeps/i386/fpu/e_log2.S
index cc377637f6..a202bc731d 100644
--- a/sysdeps/i386/fpu/e_log2.S
+++ b/sysdeps/i386/fpu/e_log2.S
@@ -11,13 +11,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_log2f.S b/sysdeps/i386/fpu/e_log2f.S
index 59f4f212e3..f4f9a8c3bf 100644
--- a/sysdeps/i386/fpu/e_log2f.S
+++ b/sysdeps/i386/fpu/e_log2f.S
@@ -11,13 +11,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_log2l.S b/sysdeps/i386/fpu/e_log2l.S
index 4693f6c717..bd51b5651e 100644
--- a/sysdeps/i386/fpu/e_log2l.S
+++ b/sysdeps/i386/fpu/e_log2l.S
@@ -11,13 +11,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_logf.S b/sysdeps/i386/fpu/e_logf.S
index e277a2f5ec..485180e909 100644
--- a/sysdeps/i386/fpu/e_logf.S
+++ b/sysdeps/i386/fpu/e_logf.S
@@ -11,13 +11,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_logl.S b/sysdeps/i386/fpu/e_logl.S
index 7b52b3b2d4..d7a459a627 100644
--- a/sysdeps/i386/fpu/e_logl.S
+++ b/sysdeps/i386/fpu/e_logl.S
@@ -11,13 +11,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/e_pow.S b/sysdeps/i386/fpu/e_pow.S
index 73d2421162..de850226db 100644
--- a/sysdeps/i386/fpu/e_pow.S
+++ b/sysdeps/i386/fpu/e_pow.S
@@ -23,31 +23,31 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p63,@object)
+ .type p63,@object
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
- ASM_TYPE_DIRECTIVE(p10,@object)
+ .type p10,@object
p10: .byte 0, 0, 0, 0, 0, 0, 0x90, 0x40
ASM_SIZE_DIRECTIVE(p10)
.section .rodata.cst16,"aM",@progbits,16
.p2align 3
- ASM_TYPE_DIRECTIVE(infinity,@object)
+ .type infinity,@object
inf_zero:
infinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
ASM_SIZE_DIRECTIVE(infinity)
- ASM_TYPE_DIRECTIVE(zero,@object)
+ .type zero,@object
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
- ASM_TYPE_DIRECTIVE(minf_mzero,@object)
+ .type minf_mzero,@object
minf_mzero:
minfinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
diff --git a/sysdeps/i386/fpu/e_powf.S b/sysdeps/i386/fpu/e_powf.S
index 529a96f953..4c622fc569 100644
--- a/sysdeps/i386/fpu/e_powf.S
+++ b/sysdeps/i386/fpu/e_powf.S
@@ -23,28 +23,28 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p31,@object)
+ .type p31,@object
p31: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x41
ASM_SIZE_DIRECTIVE(p31)
.section .rodata.cst16,"aM",@progbits,16
.p2align 3
- ASM_TYPE_DIRECTIVE(infinity,@object)
+ .type infinity,@object
inf_zero:
infinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
ASM_SIZE_DIRECTIVE(infinity)
- ASM_TYPE_DIRECTIVE(zero,@object)
+ .type zero,@object
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
- ASM_TYPE_DIRECTIVE(minf_mzero,@object)
+ .type minf_mzero,@object
minf_mzero:
minfinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S
index 5b166eab4b..933418cf82 100644
--- a/sysdeps/i386/fpu/e_powl.S
+++ b/sysdeps/i386/fpu/e_powl.S
@@ -23,34 +23,34 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p63,@object)
+ .type p63,@object
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
- ASM_TYPE_DIRECTIVE(p64,@object)
+ .type p64,@object
p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
ASM_SIZE_DIRECTIVE(p64)
- ASM_TYPE_DIRECTIVE(p78,@object)
+ .type p78,@object
p78: .byte 0, 0, 0, 0, 0, 0, 0xd0, 0x44
ASM_SIZE_DIRECTIVE(p78)
.section .rodata.cst16,"aM",@progbits,16
.p2align 3
- ASM_TYPE_DIRECTIVE(infinity,@object)
+ .type infinity,@object
inf_zero:
infinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
ASM_SIZE_DIRECTIVE(infinity)
- ASM_TYPE_DIRECTIVE(zero,@object)
+ .type zero,@object
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
- ASM_TYPE_DIRECTIVE(minf_mzero,@object)
+ .type minf_mzero,@object
minf_mzero:
minfinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
diff --git a/sysdeps/i386/fpu/e_scalb.S b/sysdeps/i386/fpu/e_scalb.S
index 1d8d2dd01f..20d489efde 100644
--- a/sysdeps/i386/fpu/e_scalb.S
+++ b/sysdeps/i386/fpu/e_scalb.S
@@ -10,7 +10,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(zero_nan,@object)
+ .type zero_nan,@object
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
diff --git a/sysdeps/i386/fpu/e_scalbf.S b/sysdeps/i386/fpu/e_scalbf.S
index 0967dbdc2d..b6dd02122a 100644
--- a/sysdeps/i386/fpu/e_scalbf.S
+++ b/sysdeps/i386/fpu/e_scalbf.S
@@ -11,7 +11,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(zero_nan,@object)
+ .type zero_nan,@object
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
diff --git a/sysdeps/i386/fpu/e_scalbl.S b/sysdeps/i386/fpu/e_scalbl.S
index 434fce46f3..83f17b233b 100644
--- a/sysdeps/i386/fpu/e_scalbl.S
+++ b/sysdeps/i386/fpu/e_scalbl.S
@@ -12,7 +12,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(zero_nan,@object)
+ .type zero_nan,@object
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index f832e17a20..239da44a79 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -223,8 +223,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -249,8 +253,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -293,8 +301,12 @@ ldouble: 1
# cacosh
Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -304,8 +316,12 @@ Test "Real part of: cacosh (+0 + 1.5 i) == 1.19476321728710930411193082851909052
double: 1
idouble: 1
Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -315,8 +331,12 @@ Test "Real part of: cacosh (+0 - 1.5 i) == 1.19476321728710930411193082851909052
double: 1
idouble: 1
Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -326,8 +346,12 @@ Test "Real part of: cacosh (-0 + 1.5 i) == 1.19476321728710930411193082851909052
double: 1
idouble: 1
Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -343,11 +367,19 @@ Test "Imaginary part of: cacosh (-0.5 - 0 i) == +0 - 2.0943951023931954923084289
double: 1
idouble: 1
Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 9
@@ -366,11 +398,19 @@ Test "Real part of: cacosh (0.75 + 1.25 i) == 1.13239363160530819522266333696834
ildouble: 1
ldouble: 1
Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# casin
Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
@@ -389,8 +429,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -415,8 +459,12 @@ float: 1
idouble: 2
ifloat: 1
Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -516,11 +564,19 @@ ifloat: 6
ildouble: 5
ldouble: 5
Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
+double: 1
float: 1
+idouble: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -789,6 +845,12 @@ ildouble: 1
ldouble: 1
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i":
ildouble: 1
ldouble: 1
@@ -818,6 +880,18 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x0.ffffffffffffffffp0 + 0x0.ffffffffffffffffp-15000 i) == -5.421010862427522170184200798202494495630e-20 + 3.548665303440282824232502561095699343814e-4516 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-100 i) == 8.237022655933121125560939513260027133767e-5 + 8.974094312218060110948251664314290484113e-31 i":
+float: 1
+ifloat: 1
Test "Real part of: clog (0x1.234566p-30 + 1.0 i) == 5.614163921211322622623353961365728040115e-19 + 1.570796325735258575254858696548386439740 i":
ildouble: 1
ldouble: 1
@@ -836,6 +910,9 @@ ldouble: 1
Test "Real part of: clog (0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - 0 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 5.0844550531823026520677817684239496041087e-32 + 1.2627468605458094918919206628466016525397 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
ildouble: 1
ldouble: 1
@@ -854,6 +931,9 @@ ldouble: 1
Test "Real part of: clog (0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 4.4469229730850767799109418892826021157328e-20 + 1.2046235979300843056806465045930070146351 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
float: 1
ifloat: 1
@@ -869,6 +949,20 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-0x1.234566p-40 - 1.0 i) == 2.325249110681915353442924915876654139373e-25 - 6.821881769213700828789403802671540158935e-1 i":
float: 1
ifloat: 1
@@ -986,6 +1080,29 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.ffffffffffffffffp0 + 0x0.ffffffffffffffffp-15000 i) == -2.354315103889861110220423157644627849164e-20 + 1.541165759405643564697852372112893034397e-4516 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
float: 1
ifloat: 1
@@ -1025,6 +1142,29 @@ ldouble: 1
Test "Real part of: clog10 (0x1.fp+16383 - 0x1p-16445 i) == 4932.061660674182269085496060792589701158 - 0 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x11682p-23 + 0x7ffed1p-23 i) == 5.0916490233953865181284669870035717560498e-13 + 0.6784968969384861816694467029319146542069 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
double: 1
idouble: 1
@@ -1105,6 +1245,73 @@ ifloat: 1
Test "Real part of: clog10 (0x1p-8190 + 1.0 i) == 2.920285685286322365786846845062520925172e-4932 + 6.821881769209206737428918127156778851051e-1 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659b70ab7971bp-53 + 0x1f5d111e08abecp-53 i) == -1.0893543813872082317104059174982092534059e-30 + 0.5954257879188711495921161433751775633232 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 1.0529283395205396881397407610630442563938e-37 + 0.4947949395762683446121140513971996916447 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x81b7efa81fc35ad1p-65 + 0x1ef4b835f1c79d812p-65 i) == -4.3074341162203896332989394770760901408798e-39 + 0.5709443672155660428417571212549720987784 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -4.2289432987513243393180377141513840878196e-30 + 0.4252020027092323591068799049905597805296 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
double: 1
idouble: 1
@@ -1386,7 +1593,9 @@ ildouble: 2
ldouble: 2
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i) == 0.75 + 1.25 i":
@@ -1394,9 +1603,9 @@ float: 1
ifloat: 1
Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
double: 2
-float: 3
+float: 4
idouble: 2
-ifloat: 3
+ifloat: 4
ildouble: 3
ldouble: 3
Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
@@ -1608,6 +1817,8 @@ ldouble: 1
# ctan
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
+float: 1
+ifloat: 1
double: 1
idouble: 1
ildouble: 1
@@ -1701,6 +1912,8 @@ Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) ==
ildouble: 1
ldouble: 1
Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
@@ -1731,9 +1944,9 @@ ildouble: 2
ldouble: 2
Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i) == -2.287733242885645987394874673945769518150e7 + 7.334008549954377778731880988481078535821e-31 i":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 1
ldouble: 1
@@ -1844,6 +2057,8 @@ ifloat: 3
ildouble: 4
ldouble: 4
Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -1858,9 +2073,9 @@ ildouble: 1
ldouble: 1
Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i) == 7.334008549954377778731880988481078535821e-31 - 2.287733242885645987394874673945769518150e7 i":
@@ -2302,6 +2517,10 @@ ldouble: 1
Test "sin (-0x1p65) == 0.047183876212354673805106149805700013943218":
float: 1
ifloat: 1
+Test "sin (0x1.fffff8p+127) == 4.85786063130487339701113680434728152037092e-02":
+float: 1
+Test "sin (0x1p+127) == 6.23385512955870240370428801097126489001833e-01":
+float: 1
Test "sin (0x1p65) == -0.047183876212354673805106149805700013943218":
float: 1
ifloat: 1
@@ -2460,6 +2679,10 @@ ifloat: 1
Test "sincos (-0x1p65, &sin_res, &cos_res) puts 0.047183876212354673805106149805700013943218 in sin_res":
float: 1
ifloat: 1
+Test "sincos (0x1.fffff8p+127, &sin_res, &cos_res) puts 4.85786063130487339701113680434728152037092e-02 in sin_res":
+float: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 6.23385512955870240370428801097126489001833e-01 in sin_res":
+float: 1
Test "sincos (0x1p65, &sin_res, &cos_res) puts -0.047183876212354673805106149805700013943218 in sin_res":
float: 1
ifloat: 1
@@ -3154,11 +3377,17 @@ ildouble: 1
ldouble: 1
Function: Real part of "clog":
+double: 1
float: 1
+idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Function: Imaginary part of "clog":
+ildouble: 1
+ldouble: 1
+
Function: Real part of "clog10":
double: 1
float: 1
@@ -3333,6 +3562,8 @@ ildouble: 1
ldouble: 1
Function: Real part of "ctan_towardzero":
+float: 1
+ifloat: 1
double: 1
idouble: 1
ildouble: 1
@@ -3352,9 +3583,9 @@ ldouble: 2
Function: Imaginary part of "ctan_upward":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 4
ldouble: 4
@@ -3405,6 +3636,8 @@ ildouble: 4
ldouble: 4
Function: Imaginary part of "ctanh_towardzero":
+float: 1
+ifloat: 1
double: 1
idouble: 1
ildouble: 1
@@ -3412,9 +3645,9 @@ ldouble: 1
Function: Real part of "ctanh_upward":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 4
ldouble: 4
diff --git a/sysdeps/i386/fpu/s_asinh.S b/sysdeps/i386/fpu/s_asinh.S
index f101f36d60..8bdcfcc92f 100644
--- a/sysdeps/i386/fpu/s_asinh.S
+++ b/sysdeps/i386/fpu/s_asinh.S
@@ -22,13 +22,13 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(huge,@object)
+ .type huge,@object
huge: .double 1e+300
ASM_SIZE_DIRECTIVE(huge)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/s_asinhf.S b/sysdeps/i386/fpu/s_asinhf.S
index aa72676b4a..86a49a3fa9 100644
--- a/sysdeps/i386/fpu/s_asinhf.S
+++ b/sysdeps/i386/fpu/s_asinhf.S
@@ -22,13 +22,13 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(huge,@object)
+ .type huge,@object
huge: .double 1e+36
ASM_SIZE_DIRECTIVE(huge)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/s_asinhl.S b/sysdeps/i386/fpu/s_asinhl.S
index ec24343642..4ec5c10213 100644
--- a/sysdeps/i386/fpu/s_asinhl.S
+++ b/sysdeps/i386/fpu/s_asinhl.S
@@ -22,20 +22,20 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(huge,@object)
+ .type huge,@object
huge: .tfloat 1e+4930
ASM_SIZE_DIRECTIVE(huge)
.align ALIGNARG(4)
/* Please note that we use double value for 1.0. This number
has an exact representation and so we don't get accuracy
problems. The advantage is that the code is simpler. */
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/fpu/s_cbrt.S b/sysdeps/i386/fpu/s_cbrt.S
index 15b25a42ad..aca0b5a92b 100644
--- a/sysdeps/i386/fpu/s_cbrt.S
+++ b/sysdeps/i386/fpu/s_cbrt.S
@@ -23,25 +23,25 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f7,@object)
+ .type f7,@object
f7: .double -0.145263899385486377
ASM_SIZE_DIRECTIVE(f7)
- ASM_TYPE_DIRECTIVE(f6,@object)
+ .type f6,@object
f6: .double 0.784932344976639262
ASM_SIZE_DIRECTIVE(f6)
- ASM_TYPE_DIRECTIVE(f5,@object)
+ .type f5,@object
f5: .double -1.83469277483613086
ASM_SIZE_DIRECTIVE(f5)
- ASM_TYPE_DIRECTIVE(f4,@object)
+ .type f4,@object
f4: .double 2.44693122563534430
ASM_SIZE_DIRECTIVE(f4)
- ASM_TYPE_DIRECTIVE(f3,@object)
+ .type f3,@object
f3: .double -2.11499494167371287
ASM_SIZE_DIRECTIVE(f3)
- ASM_TYPE_DIRECTIVE(f2,@object)
+ .type f2,@object
f2: .double 1.50819193781584896
ASM_SIZE_DIRECTIVE(f2)
- ASM_TYPE_DIRECTIVE(f1,@object)
+ .type f1,@object
f1: .double 0.354895765043919860
ASM_SIZE_DIRECTIVE(f1)
@@ -50,7 +50,7 @@ f1: .double 0.354895765043919860
#define SQR_CBRT2 1.5874010519681994748
#define ONE_SQR_CBRT2 0.629960524947436582364439673883
- ASM_TYPE_DIRECTIVE(factor,@object)
+ .type factor,@object
factor: .double ONE_SQR_CBRT2
.double ONE_CBRT2
.double 1.0
@@ -58,7 +58,7 @@ factor: .double ONE_SQR_CBRT2
.double SQR_CBRT2
ASM_SIZE_DIRECTIVE(factor)
- ASM_TYPE_DIRECTIVE(two54,@object)
+ .type two54,@object
two54: .byte 0, 0, 0, 0, 0, 0, 0x50, 0x43
ASM_SIZE_DIRECTIVE(two54)
diff --git a/sysdeps/i386/fpu/s_cbrtf.S b/sysdeps/i386/fpu/s_cbrtf.S
index be16b3cb73..c3ba2fa2ec 100644
--- a/sysdeps/i386/fpu/s_cbrtf.S
+++ b/sysdeps/i386/fpu/s_cbrtf.S
@@ -23,13 +23,13 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f3,@object)
+ .type f3,@object
f3: .double 0.191502161678719066
ASM_SIZE_DIRECTIVE(f3)
- ASM_TYPE_DIRECTIVE(f2,@object)
+ .type f2,@object
f2: .double 0.697570460207922770
ASM_SIZE_DIRECTIVE(f2)
- ASM_TYPE_DIRECTIVE(f1,@object)
+ .type f1,@object
f1: .double 0.492659620528969547
ASM_SIZE_DIRECTIVE(f1)
@@ -38,7 +38,7 @@ f1: .double 0.492659620528969547
#define SQR_CBRT2 1.5874010519681994748
#define ONE_SQR_CBRT2 0.629960524947436582364439673883
- ASM_TYPE_DIRECTIVE(factor,@object)
+ .type factor,@object
.align ALIGNARG(4)
factor: .double ONE_SQR_CBRT2
.double ONE_CBRT2
@@ -47,7 +47,7 @@ factor: .double ONE_SQR_CBRT2
.double SQR_CBRT2
ASM_SIZE_DIRECTIVE(factor)
- ASM_TYPE_DIRECTIVE(two25,@object)
+ .type two25,@object
two25: .byte 0, 0, 0, 0x4c
ASM_SIZE_DIRECTIVE(two25)
diff --git a/sysdeps/i386/fpu/s_cbrtl.S b/sysdeps/i386/fpu/s_cbrtl.S
index e92547e8ad..8b50ba4b69 100644
--- a/sysdeps/i386/fpu/s_cbrtl.S
+++ b/sysdeps/i386/fpu/s_cbrtl.S
@@ -23,35 +23,35 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f8,@object)
+ .type f8,@object
f8: .tfloat 0.161617097923756032
ASM_SIZE_DIRECTIVE(f8)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f7,@object)
+ .type f7,@object
f7: .tfloat -0.988553671195413709
ASM_SIZE_DIRECTIVE(f7)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f6,@object)
+ .type f6,@object
f6: .tfloat 2.65298938441952296
ASM_SIZE_DIRECTIVE(f6)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f5,@object)
+ .type f5,@object
f5: .tfloat -4.11151425200350531
ASM_SIZE_DIRECTIVE(f5)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f4,@object)
+ .type f4,@object
f4: .tfloat 4.09559907378707839
ASM_SIZE_DIRECTIVE(f4)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f3,@object)
+ .type f3,@object
f3: .tfloat -2.82414939754975962
ASM_SIZE_DIRECTIVE(f3)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f2,@object)
+ .type f2,@object
f2: .tfloat 1.67595307700780102
ASM_SIZE_DIRECTIVE(f2)
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(f1,@object)
+ .type f1,@object
f1: .tfloat 0.338058687610520237
ASM_SIZE_DIRECTIVE(f1)
@@ -62,7 +62,7 @@ f1: .tfloat 0.338058687610520237
/* We make the entries in the following table all 16 bytes
wide to avoid having to implement a multiplication by 10. */
- ASM_TYPE_DIRECTIVE(factor,@object)
+ .type factor,@object
.align ALIGNARG(4)
factor: .tfloat ONE_SQR_CBRT2
.byte 0, 0, 0, 0, 0, 0
@@ -75,7 +75,7 @@ factor: .tfloat ONE_SQR_CBRT2
.tfloat SQR_CBRT2
ASM_SIZE_DIRECTIVE(factor)
- ASM_TYPE_DIRECTIVE(two64,@object)
+ .type two64,@object
.align ALIGNARG(4)
two64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
ASM_SIZE_DIRECTIVE(two64)
diff --git a/sysdeps/i386/fpu/s_expm1.S b/sysdeps/i386/fpu/s_expm1.S
index d2754de911..2aad34c055 100644
--- a/sysdeps/i386/fpu/s_expm1.S
+++ b/sysdeps/i386/fpu/s_expm1.S
@@ -27,13 +27,13 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(minus1,@object)
+ .type minus1,@object
minus1: .double -1.0
ASM_SIZE_DIRECTIVE(minus1)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(l2e,@object)
+ .type l2e,@object
l2e: .tfloat 1.442695040888963407359924681002
ASM_SIZE_DIRECTIVE(l2e)
diff --git a/sysdeps/i386/fpu/s_expm1f.S b/sysdeps/i386/fpu/s_expm1f.S
index fc82b92341..b039049bd5 100644
--- a/sysdeps/i386/fpu/s_expm1f.S
+++ b/sysdeps/i386/fpu/s_expm1f.S
@@ -27,13 +27,13 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(minus1,@object)
+ .type minus1,@object
minus1: .double -1.0
ASM_SIZE_DIRECTIVE(minus1)
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(l2e,@object)
+ .type l2e,@object
l2e: .tfloat 1.442695040888963407359924681002
ASM_SIZE_DIRECTIVE(l2e)
diff --git a/sysdeps/i386/fpu/s_frexp.S b/sysdeps/i386/fpu/s_frexp.S
index 27c494ef00..e76732dc8b 100644
--- a/sysdeps/i386/fpu/s_frexp.S
+++ b/sysdeps/i386/fpu/s_frexp.S
@@ -24,7 +24,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(two54,@object)
+ .type two54,@object
two54: .byte 0, 0, 0, 0, 0, 0, 0x50, 0x43
ASM_SIZE_DIRECTIVE(two54)
diff --git a/sysdeps/i386/fpu/s_frexpf.S b/sysdeps/i386/fpu/s_frexpf.S
index 18bc7615a0..af0dc8ee3d 100644
--- a/sysdeps/i386/fpu/s_frexpf.S
+++ b/sysdeps/i386/fpu/s_frexpf.S
@@ -24,7 +24,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(two25,@object)
+ .type two25,@object
two25: .byte 0, 0, 0, 0x4c
ASM_SIZE_DIRECTIVE(two25)
diff --git a/sysdeps/i386/fpu/s_frexpl.S b/sysdeps/i386/fpu/s_frexpl.S
index e683c2bac2..6f464a89d6 100644
--- a/sysdeps/i386/fpu/s_frexpl.S
+++ b/sysdeps/i386/fpu/s_frexpl.S
@@ -24,7 +24,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(two64,@object)
+ .type two64,@object
two64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
ASM_SIZE_DIRECTIVE(two64)
diff --git a/sysdeps/i386/i386-mcount.S b/sysdeps/i386/i386-mcount.S
index 11f7493c3a..dfe19a280a 100644
--- a/sysdeps/i386/i386-mcount.S
+++ b/sysdeps/i386/i386-mcount.S
@@ -27,7 +27,7 @@
- some (future) systems might want to pass parameters in registers. */
.globl C_SYMBOL_NAME(_mcount)
- ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+ .type C_SYMBOL_NAME(_mcount), @function
.align ALIGNARG(4)
C_LABEL(_mcount)
/* Save the caller-clobbered registers. */
@@ -55,7 +55,7 @@ weak_alias (_mcount, mcount)
/* Same as above, but doesn't require a frame pointer */
.globl C_SYMBOL_NAME(__fentry__)
- ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
+ .type C_SYMBOL_NAME(__fentry__), @function
.align ALIGNARG(4)
C_LABEL(__fentry__)
/* Save the caller-clobbered registers. */
diff --git a/sysdeps/i386/i686/fpu/e_logl.S b/sysdeps/i386/i686/fpu/e_logl.S
index be2116cb36..8a86222b13 100644
--- a/sysdeps/i386/i686/fpu/e_logl.S
+++ b/sysdeps/i386/i686/fpu/e_logl.S
@@ -12,13 +12,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/i386/i686/fpu/multiarch/Makefile b/sysdeps/i386/i686/fpu/multiarch/Makefile
index 1de37fe4aa..7d9089232f 100644
--- a/sysdeps/i386/i686/fpu/multiarch/Makefile
+++ b/sysdeps/i386/i686/fpu/multiarch/Makefile
@@ -1,3 +1,4 @@
ifeq ($(subdir),math)
-libm-sysdep_routines += e_expf-sse2 e_expf-ia32
+libm-sysdep_routines += e_expf-sse2 e_expf-ia32 s_sinf-sse2 s_cosf-sse2 \
+ s_sincosf-sse2
endif
diff --git a/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S
index 31cdffdb00..111838aab6 100644
--- a/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S
+++ b/sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S
@@ -243,82 +243,82 @@ L(DP_T): /* table of double precision values 2^(j/K) for j=[0..K-1] */
.long 0xee615a27, 0x3ffefa1b
.long 0x5b6e4540, 0x3fff5076
.long 0x819e90d8, 0x3fffa7c1
- ASM_TYPE_DIRECTIVE(L(DP_T), @object)
+ .type L(DP_T), @object
ASM_SIZE_DIRECTIVE(L(DP_T))
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
L(DP_KLN2): /* double precision K/log(2) */
.long 0x652b82fe, 0x40571547
- ASM_TYPE_DIRECTIVE(L(DP_KLN2), @object)
+ .type L(DP_KLN2), @object
ASM_SIZE_DIRECTIVE(L(DP_KLN2))
.p2align 3
L(DP_NLN2K): /* double precision -log(2)/K */
.long 0xfefa39ef, 0xbf862e42
- ASM_TYPE_DIRECTIVE(L(DP_NLN2K), @object)
+ .type L(DP_NLN2K), @object
ASM_SIZE_DIRECTIVE(L(DP_NLN2K))
.p2align 3
L(DP_RS): /* double precision 2^23+2^22 */
.long 0x00000000, 0x41680000
- ASM_TYPE_DIRECTIVE(L(DP_RS), @object)
+ .type L(DP_RS), @object
ASM_SIZE_DIRECTIVE(L(DP_RS))
.p2align 3
L(DP_P3): /* double precision polynomial coefficient P3 */
.long 0xeb78fa85, 0x3fa56420
- ASM_TYPE_DIRECTIVE(L(DP_P3), @object)
+ .type L(DP_P3), @object
ASM_SIZE_DIRECTIVE(L(DP_P3))
.p2align 3
L(DP_P1): /* double precision polynomial coefficient P1 */
.long 0x008d6118, 0x3fe00000
- ASM_TYPE_DIRECTIVE(L(DP_P1), @object)
+ .type L(DP_P1), @object
ASM_SIZE_DIRECTIVE(L(DP_P1))
.p2align 3
L(DP_P2): /* double precision polynomial coefficient P2 */
.long 0xda752d4f, 0x3fc55550
- ASM_TYPE_DIRECTIVE(L(DP_P2), @object)
+ .type L(DP_P2), @object
ASM_SIZE_DIRECTIVE(L(DP_P2))
.p2align 3
L(DP_P0): /* double precision polynomial coefficient P0 */
.long 0xffffe7c6, 0x3fefffff
- ASM_TYPE_DIRECTIVE(L(DP_P0), @object)
+ .type L(DP_P0), @object
ASM_SIZE_DIRECTIVE(L(DP_P0))
.p2align 2
L(SP_INF_0):
.long 0x7f800000 /* single precision Inf */
.long 0 /* single precision zero */
- ASM_TYPE_DIRECTIVE(L(SP_INF_0), @object)
+ .type L(SP_INF_0), @object
ASM_SIZE_DIRECTIVE(L(SP_INF_0))
.section .rodata.cst4,"aM",@progbits,4
.p2align 2
L(SP_RS): /* single precision 2^23+2^22 */
.long 0x4b400000
- ASM_TYPE_DIRECTIVE(L(SP_RS), @object)
+ .type L(SP_RS), @object
ASM_SIZE_DIRECTIVE(L(SP_RS))
.p2align 2
L(SP_SMALL): /* single precision small value 2^(-100) */
.long 0x0d800000
- ASM_TYPE_DIRECTIVE(L(SP_SMALL), @object)
+ .type L(SP_SMALL), @object
ASM_SIZE_DIRECTIVE(L(SP_SMALL))
.p2align 2
L(SP_LARGE): /* single precision large value 2^100 */
.long 0x71800000
- ASM_TYPE_DIRECTIVE(L(SP_LARGE), @object)
+ .type L(SP_LARGE), @object
ASM_SIZE_DIRECTIVE(L(SP_LARGE))
.p2align 2
L(SP_ONE): /* single precision 1.0 */
.long 0x3f800000
- ASM_TYPE_DIRECTIVE(L(SP_ONE), @object)
+ .type L(SP_ONE), @object
ASM_SIZE_DIRECTIVE(L(SP_ONE))
strong_alias (__ieee754_expf_sse2, __expf_finite_sse2)
diff --git a/sysdeps/i386/i686/fpu/multiarch/e_expf.c b/sysdeps/i386/i686/fpu/multiarch/e_expf.c
index 65858a3113..1966400d1b 100644
--- a/sysdeps/i386/i686/fpu/multiarch/e_expf.c
+++ b/sysdeps/i386/i686/fpu/multiarch/e_expf.c
@@ -1,3 +1,21 @@
+/* Multiple versions of expf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
#include <init-arch.h>
extern double __ieee754_expf_sse2 (double);
diff --git a/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S
new file mode 100644
index 0000000000..405c6ea4c8
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S
@@ -0,0 +1,553 @@
+/* Optimized with sse2 version of cosf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#define __need_Emath
+#include <bits/errno.h>
+
+/* Short algorithm description:
+ *
+ * 1) if |x| == 0: return 1.0-|x|.
+ * 2) if |x| < 2^-27: return 1.0-|x|.
+ * 3) if |x| < 2^-5 : return 1.0+x^2*DP_COS2_0+x^5*DP_COS2_1.
+ * 4) if |x| < Pi/4: return 1.0+x^2*(C0+x^2*(C1+x^2*(C2+x^2*(C3+x^2*C4)))).
+ * 5) if |x| < 9*Pi/4:
+ * 5.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+3,
+ * t=|x|-j*Pi/4.
+ * 5.2) Reconstruction:
+ * s = (-1.0)^((n>>2)&1)
+ * if(n&2 != 0) {
+ * using cos(t) polynomial for |t|<Pi/4, result is
+ * s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4))))).
+ * } else {
+ * using sin(t) polynomial for |t|<Pi/4, result is
+ * s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4))))).
+ * }
+ * 6) if |x| < 2^23, large args:
+ * 6.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+3,
+ * t=|x|-j*Pi/4.
+ * 6.2) Reconstruction same as (5.2).
+ * 7) if |x| >= 2^23, very large args:
+ * 7.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+3,
+ * t=|x|-j*Pi/4.
+ * 7.2) Reconstruction same as (5.2).
+ * 8) if x is Inf, return x-x, and set errno=EDOM.
+ * 9) if x is NaN, return x-x.
+ *
+ * Special cases:
+ * cos(+-0) = 1 not raising inexact,
+ * cos(subnormal) raises inexact,
+ * cos(min_normalized) raises inexact,
+ * cos(normalized) raises inexact,
+ * cos(Inf) = NaN, raises invalid, sets errno to EDOM,
+ * cos(NaN) = NaN.
+ */
+
+#ifdef PIC
+# define MO1(symbol) L(symbol)##@GOTOFF(%ebx)
+# define MO2(symbol,reg2,_scale) L(symbol)##@GOTOFF(%ebx,reg2,_scale)
+# define CFI_PUSH(REG) cfi_adjust_cfa_offset(4); cfi_rel_offset(REG,0)
+# define CFI_POP(REG) cfi_adjust_cfa_offset(-4); cfi_restore(REG)
+# define PUSH(REG) pushl REG; CFI_PUSH(REG)
+# define POP(REG) popl REG; CFI_POP(REG)
+# define ENTRANCE PUSH(%ebx); LOAD_PIC_REG(bx)
+# define RETURN POP(%ebx); ret; CFI_PUSH(%ebx)
+# define ARG_X 8(%esp)
+#else
+# define MO1(symbol) L(symbol)
+# define MO2(symbol,reg2,_scale) L(symbol)(,reg2,_scale)
+# define ENTRANCE
+# define RETURN ret
+# define ARG_X 4(%esp)
+#endif
+
+ .text
+ENTRY(__cosf_sse2)
+ /* Input: single precision x on stack at address ARG_X */
+
+ ENTRANCE
+ movl ARG_X, %eax /* Bits of x */
+ cvtss2sd ARG_X, %xmm0 /* DP x */
+ andl $0x7fffffff, %eax /* |x| */
+
+ cmpl $0x3f490fdb, %eax /* |x|<Pi/4? */
+ jb L(arg_less_pio4)
+
+ /* Here if |x|>=Pi/4 */
+ movd %eax, %xmm3 /* SP |x| */
+ andpd MO1(DP_ABS_MASK),%xmm0 /* DP |x| */
+ movss MO1(SP_INVPIO4), %xmm2 /* SP 1/(Pi/4) */
+
+ cmpl $0x40e231d6, %eax /* |x|<9*Pi/4? */
+ jae L(large_args)
+
+ /* Here if Pi/4<=|x|<9*Pi/4 */
+ mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+ cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+ addl $1, %eax /* k+1 */
+ movl $0x0e, %edx
+ andl %eax, %edx /* j = (k+1)&0x0e */
+ addl $2, %eax /* n */
+ subsd MO2(PIO4J,%edx,8), %xmm0 /* t = |x| - j * Pi/4 */
+
+L(reconstruction):
+ /* Input: %eax=n, %xmm0=t */
+ testl $2, %eax /* n&2 != 0? */
+ jz L(sin_poly)
+
+/*L(cos_poly):*/
+ /* Here if cos(x) calculated using cos(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))))
+ */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd MO1(DP_C4), %xmm4 /* C4 */
+ mulsd %xmm0, %xmm4 /* z*C4 */
+ movsd MO1(DP_C3), %xmm3 /* C3 */
+ mulsd %xmm0, %xmm3 /* z*C3 */
+ addsd MO1(DP_C2), %xmm4 /* C2+z*C4 */
+ mulsd %xmm0, %xmm4 /* z*(C2+z*C4) */
+ lea -8(%esp), %esp /* Borrow 4 bytes of stack frame */
+ addsd MO1(DP_C1), %xmm3 /* C1+z*C3 */
+ mulsd %xmm0, %xmm3 /* z*(C1+z*C3) */
+ addsd MO1(DP_C0), %xmm4 /* C0+z*(C2+z*C4) */
+ mulsd %xmm1, %xmm4 /* y*(C0+z*(C2+z*C4)) */
+
+ addsd %xmm4, %xmm3 /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ /* 1.0+y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd MO1(DP_ONES), %xmm3
+
+ mulsd MO2(DP_ONES,%eax,8), %xmm3 /* DP result */
+ movsd %xmm3, 0(%esp) /* Move result from sse... */
+ fldl 0(%esp) /* ...to FPU. */
+ /* Return back 4 bytes of stack frame */
+ lea 8(%esp), %esp
+ RETURN
+
+ .p2align 4
+L(sin_poly):
+ /* Here if cos(x) calculated using sin(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))))
+ */
+
+ movaps %xmm0, %xmm4 /* t */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd MO1(DP_S4), %xmm2 /* S4 */
+ mulsd %xmm0, %xmm2 /* z*S4 */
+ movsd MO1(DP_S3), %xmm3 /* S3 */
+ mulsd %xmm0, %xmm3 /* z*S3 */
+ lea -8(%esp), %esp /* Borrow 4 bytes of stack frame */
+ addsd MO1(DP_S2), %xmm2 /* S2+z*S4 */
+ mulsd %xmm0, %xmm2 /* z*(S2+z*S4) */
+ addsd MO1(DP_S1), %xmm3 /* S1+z*S3 */
+ mulsd %xmm0, %xmm3 /* z*(S1+z*S3) */
+ addsd MO1(DP_S0), %xmm2 /* S0+z*(S2+z*S4) */
+ mulsd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+ /* t*s, where s = sign(x) * (-1.0)^((n>>2)&1) */
+ mulsd MO2(DP_ONES,%eax,8), %xmm4
+ addsd %xmm2, %xmm3 /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ /* t*s*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ mulsd %xmm4, %xmm3
+ /* t*s*(1.0+y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm4, %xmm3
+ movsd %xmm3, 0(%esp) /* Move result from sse... */
+ fldl 0(%esp) /* ...to FPU. */
+ /* Return back 4 bytes of stack frame */
+ lea 8(%esp), %esp
+ RETURN
+
+ .p2align 4
+L(large_args):
+ /* Here if |x|>=9*Pi/4 */
+ cmpl $0x7f800000, %eax /* x is Inf or NaN? */
+ jae L(arg_inf_or_nan)
+
+ /* Here if finite |x|>=9*Pi/4 */
+ cmpl $0x4b000000, %eax /* |x|<2^23? */
+ jae L(very_large_args)
+
+ /* Here if 9*Pi/4<=|x|<2^23 */
+ movsd MO1(DP_INVPIO4), %xmm1 /* 1/(Pi/4) */
+ mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+ cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+ addl $1, %eax /* k+1 */
+ movl %eax, %edx
+ andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+ cvtsi2sdl %edx, %xmm4 /* DP j */
+ movsd MO1(DP_PIO4HI), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+ mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+ movsd MO1(DP_PIO4LO), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+ addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+ addl $2, %eax /* n */
+ mulsd %xmm3, %xmm4 /* j*PIO4LO */
+ addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+ jmp L(reconstruction)
+
+ .p2align 4
+L(very_large_args):
+ /* Here if finite |x|>=2^23 */
+
+ /* bitpos = (ix>>23) - BIAS_32 + 59; */
+ shrl $23, %eax /* eb = biased exponent of x */
+ /* bitpos = eb - 0x7f + 59, where 0x7f is exponent bias */
+ subl $68, %eax
+ movl $28, %ecx /* %cl=28 */
+ movl %eax, %edx /* bitpos copy */
+
+ /* j = bitpos/28; */
+ div %cl /* j in register %al=%ax/%cl */
+ movapd %xmm0, %xmm3 /* |x| */
+ /* clear unneeded remainder from %ah */
+ andl $0xff, %eax
+
+ imull $28, %eax, %ecx /* j*28 */
+ movsd MO1(DP_HI_MASK), %xmm4 /* DP_HI_MASK */
+ movapd %xmm0, %xmm5 /* |x| */
+ mulsd -2*8+MO2(_FPI,%eax,8), %xmm3 /* tmp3 = FPI[j-2]*|x| */
+ movapd %xmm0, %xmm1 /* |x| */
+ mulsd -1*8+MO2(_FPI,%eax,8), %xmm5 /* tmp2 = FPI[j-1]*|x| */
+ mulsd 0*8+MO2(_FPI,%eax,8), %xmm0 /* tmp0 = FPI[j]*|x| */
+ addl $19, %ecx /* j*28+19 */
+ mulsd 1*8+MO2(_FPI,%eax,8), %xmm1 /* tmp1 = FPI[j+1]*|x| */
+ cmpl %ecx, %edx /* bitpos>=j*28+19? */
+ jl L(very_large_skip1)
+
+ /* Here if bitpos>=j*28+19 */
+ andpd %xmm3, %xmm4 /* HI(tmp3) */
+ subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+L(very_large_skip1):
+
+ movsd MO1(DP_2POW52), %xmm6
+ movapd %xmm5, %xmm2 /* tmp2 copy */
+ addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+ movl $1, %edx
+ addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+ movsd 8+MO1(DP_2POW52), %xmm4
+ movd %xmm6, %eax /* k = I64_LO(tmp6); */
+ addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+ comisd %xmm5, %xmm4 /* tmp4 > tmp5? */
+ jbe L(very_large_skip2)
+
+ /* Here if tmp4 > tmp5 */
+ subl $1, %eax /* k-- */
+ addsd 8+MO1(DP_ONES), %xmm4 /* tmp4 -= 1.0 */
+L(very_large_skip2):
+
+ andl %eax, %edx /* k&1 */
+ subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+ addsd MO2(DP_ZERONE,%edx,8), %xmm3 /* t = DP_ZERONE[k&1] + tmp3 */
+ addsd %xmm2, %xmm3 /* t += tmp2 */
+ addsd %xmm3, %xmm0 /* t += tmp0 */
+ addl $3, %eax /* n=k+3 */
+ addsd %xmm1, %xmm0 /* t += tmp1 */
+ mulsd MO1(DP_PIO4), %xmm0 /* t *= PI04 */
+
+ jmp L(reconstruction) /* end of very_large_args peth */
+
+ .p2align 4
+L(arg_less_pio4):
+ /* Here if |x|<Pi/4 */
+ cmpl $0x3d000000, %eax /* |x|<2^-5? */
+ jl L(arg_less_2pn5)
+
+ /* Here if 2^-5<=|x|<Pi/4 */
+ mulsd %xmm0, %xmm0 /* y=x^2 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=x^4 */
+ movsd MO1(DP_C4), %xmm3 /* C4 */
+ mulsd %xmm0, %xmm3 /* z*C4 */
+ movsd MO1(DP_C3), %xmm5 /* C3 */
+ mulsd %xmm0, %xmm5 /* z*C3 */
+ addsd MO1(DP_C2), %xmm3 /* C2+z*C4 */
+ mulsd %xmm0, %xmm3 /* z*(C2+z*C4) */
+ addsd MO1(DP_C1), %xmm5 /* C1+z*C3 */
+ mulsd %xmm0, %xmm5 /* z*(C1+z*C3) */
+ addsd MO1(DP_C0), %xmm3 /* C0+z*(C2+z*C4) */
+ mulsd %xmm1, %xmm3 /* y*(C0+z*(C2+z*C4)) */
+ addsd %xmm5, %xmm3 /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ /* 1.0 + y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd MO1(DP_ONES), %xmm3
+ cvtsd2ss %xmm3, %xmm3 /* SP result */
+
+L(epilogue):
+ lea -4(%esp), %esp /* Borrow 4 bytes of stack frame */
+ movss %xmm3, 0(%esp) /* Move result from sse... */
+ flds 0(%esp) /* ...to FPU. */
+ /* Return back 4 bytes of stack frame */
+ lea 4(%esp), %esp
+ RETURN
+
+ .p2align 4
+L(arg_less_2pn5):
+ /* Here if |x|<2^-5 */
+ cmpl $0x32000000, %eax /* |x|<2^-27? */
+ jl L(arg_less_2pn27)
+
+ /* Here if 2^-27<=|x|<2^-5 */
+ mulsd %xmm0, %xmm0 /* DP x^2 */
+ movsd MO1(DP_COS2_1), %xmm3 /* DP DP_COS2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_COS2_1 */
+ addsd MO1(DP_COS2_0), %xmm3 /* DP DP_COS2_0+x^2*DP_COS2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_COS2_0+x^4*DP_COS2_1 */
+ /* DP 1.0+x^2*DP_COS2_0+x^4*DP_COS2_1 */
+ addsd MO1(DP_ONES), %xmm3
+ cvtsd2ss %xmm3, %xmm3 /* SP result */
+ jmp L(epilogue)
+
+ .p2align 4
+L(arg_less_2pn27):
+ /* Here if |x|<2^-27 */
+ movss ARG_X, %xmm0 /* x */
+ andps MO1(SP_ABS_MASK),%xmm0 /* |x| */
+ movss MO1(SP_ONE), %xmm3 /* 1.0 */
+ subss %xmm0, %xmm3 /* result is 1.0-|x| */
+ jmp L(epilogue)
+
+ .p2align 4
+L(arg_inf_or_nan):
+ /* Here if |x| is Inf or NAN */
+ jne L(skip_errno_setting) /* in case of x is NaN */
+
+ /* Here if x is Inf. Set errno to EDOM. */
+ call JUMPTARGET(__errno_location)
+ movl $EDOM, (%eax)
+
+ .p2align 4
+L(skip_errno_setting):
+ /* Here if |x| is Inf or NAN. Continued. */
+ movss ARG_X, %xmm3 /* load x */
+ subss %xmm3, %xmm3 /* Result is NaN */
+ jmp L(epilogue)
+END(__cosf_sse2)
+
+ .section .rodata, "a"
+ .p2align 3
+L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+ .long 0x00000000,0x00000000
+ .long 0x54442d18,0x3fe921fb
+ .long 0x54442d18,0x3ff921fb
+ .long 0x7f3321d2,0x4002d97c
+ .long 0x54442d18,0x400921fb
+ .long 0x2955385e,0x400f6a7a
+ .long 0x7f3321d2,0x4012d97c
+ .long 0xe9bba775,0x4015fdbb
+ .long 0x54442d18,0x401921fb
+ .long 0xbeccb2bb,0x401c463a
+ .long 0x2955385e,0x401f6a7a
+ .type L(PIO4J), @object
+ ASM_SIZE_DIRECTIVE(L(PIO4J))
+
+ .p2align 3
+L(_FPI): /* 4/Pi broken into sum of positive DP values */
+ .long 0x00000000,0x00000000
+ .long 0x6c000000,0x3ff45f30
+ .long 0x2a000000,0x3e3c9c88
+ .long 0xa8000000,0x3c54fe13
+ .long 0xd0000000,0x3aaf47d4
+ .long 0x6c000000,0x38fbb81b
+ .long 0xe0000000,0x3714acc9
+ .long 0x7c000000,0x3560e410
+ .long 0x56000000,0x33bca2c7
+ .long 0xac000000,0x31fbd778
+ .long 0xe0000000,0x300b7246
+ .long 0xe8000000,0x2e5d2126
+ .long 0x48000000,0x2c970032
+ .long 0xe8000000,0x2ad77504
+ .long 0xe0000000,0x290921cf
+ .long 0xb0000000,0x274deb1c
+ .long 0xe0000000,0x25829a73
+ .long 0xbe000000,0x23fd1046
+ .long 0x10000000,0x2224baed
+ .long 0x8e000000,0x20709d33
+ .long 0x80000000,0x1e535a2f
+ .long 0x64000000,0x1cef904e
+ .long 0x30000000,0x1b0d6398
+ .long 0x24000000,0x1964ce7d
+ .long 0x16000000,0x17b908bf
+ .type L(_FPI), @object
+ ASM_SIZE_DIRECTIVE(L(_FPI))
+
+/* Coefficients of polynomial
+ for cos(x)~=1.0+x^2*DP_COS2_0+x^4*DP_COS2_1, |x|<2^-5. */
+ .p2align 3
+L(DP_COS2_0):
+ .long 0xff5cc6fd,0xbfdfffff
+ .type L(DP_COS2_0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_COS2_0))
+
+ .p2align 3
+L(DP_COS2_1):
+ .long 0xb178dac5,0x3fa55514
+ .type L(DP_COS2_1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_COS2_1))
+
+ .p2align 3
+L(DP_ZERONE):
+ .long 0x00000000,0x00000000 /* 0.0 */
+ .long 0x00000000,0xbff00000 /* 1.0 */
+ .type L(DP_ZERONE),@object
+ ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+
+ .p2align 3
+L(DP_ONES):
+ .long 0x00000000,0x3ff00000 /* +1.0 */
+ .long 0x00000000,0xbff00000 /* -1.0 */
+ .type L(DP_ONES), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ONES))
+
+/* Coefficients of polynomial
+ for sin(t)~=t+t^3*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_S3):
+ .long 0x64e6b5b4,0x3ec71d72
+ .type L(DP_S3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S3))
+
+ .p2align 3
+L(DP_S1):
+ .long 0x10c2688b,0x3f811111
+ .type L(DP_S1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S1))
+
+ .p2align 3
+L(DP_S4):
+ .long 0x1674b58a,0xbe5a947e
+ .type L(DP_S4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S4))
+
+ .p2align 3
+L(DP_S2):
+ .long 0x8b4bd1f9,0xbf2a019f
+ .type L(DP_S2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S2))
+
+ .p2align 3
+L(DP_S0):
+ .long 0x55551cd9,0xbfc55555
+ .type L(DP_S0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S0))
+
+/* Coefficients of polynomial
+ for cos(t)~=1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_C3):
+ .long 0x9ac43cc0,0x3efa00eb
+ .type L(DP_C3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C3))
+
+ .p2align 3
+L(DP_C1):
+ .long 0x545c50c7,0x3fa55555
+ .type L(DP_C1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C1))
+
+ .p2align 3
+L(DP_C4):
+ .long 0xdd8844d7,0xbe923c97
+ .type L(DP_C4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C4))
+
+ .p2align 3
+L(DP_C2):
+ .long 0x348b6874,0xbf56c16b
+ .type L(DP_C2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C2))
+
+ .p2align 3
+L(DP_C0):
+ .long 0xfffe98ae,0xbfdfffff
+ .type L(DP_C0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C0))
+
+ .p2align 3
+L(DP_PIO4):
+ .long 0x54442d18,0x3fe921fb /* Pi/4 */
+ .type L(DP_PIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+
+ .p2align 3
+L(DP_2POW52):
+ .long 0x00000000,0x43300000 /* +2^52 */
+ .long 0x00000000,0xc3300000 /* -2^52 */
+ .type L(DP_2POW52), @object
+ ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+
+ .p2align 3
+L(DP_INVPIO4):
+ .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+ .type L(DP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+
+ .p2align 3
+L(DP_PIO4HI):
+ .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+ .type L(DP_PIO4HI), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+
+ .p2align 3
+L(DP_PIO4LO):
+ .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+ .type L(DP_PIO4LO), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+
+ .p2align 2
+L(SP_INVPIO4):
+ .long 0x3fa2f983 /* 4/Pi */
+ .type L(SP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+
+ .p2align 4
+L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+ .long 0xffffffff,0x7fffffff
+ .long 0xffffffff,0x7fffffff
+ .type L(DP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+
+ .p2align 3
+L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+ .long 0x00000000,0xffffffff
+ .type L(DP_HI_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+
+ .p2align 4
+L(SP_ABS_MASK): /* Mask for getting SP absolute value */
+ .long 0x7fffffff,0x7fffffff
+ .long 0x7fffffff,0x7fffffff
+ .type L(SP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ABS_MASK))
+
+ .p2align 2
+L(SP_ONE):
+ .long 0x3f800000 /* 1.0 */
+ .type L(SP_ONE), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ONE))
+
+weak_alias (__cosf, cosf)
diff --git a/sysdeps/i386/i686/fpu/multiarch/s_cosf.c b/sysdeps/i386/i686/fpu/multiarch/s_cosf.c
new file mode 100644
index 0000000000..f07c3e5103
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/multiarch/s_cosf.c
@@ -0,0 +1,29 @@
+/* Multiple versions of cosf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <init-arch.h>
+
+extern float __cosf_sse2 (float);
+extern float __cosf_ia32 (float);
+float __cosf (float);
+
+libm_ifunc (__cosf, HAS_SSE2 ? __cosf_sse2 : __cosf_ia32);
+weak_alias (__cosf, cosf);
+
+#define COSF __cosf_ia32
+#include <sysdeps/ieee754/flt-32/s_cosf.c>
diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S
new file mode 100644
index 0000000000..622f07ac8d
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S
@@ -0,0 +1,586 @@
+/* Optimized with sse2 version of sincosf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#define __need_Emath
+#include <bits/errno.h>
+
+/* Short algorithm description:
+ *
+ * 1) if |x|==0: sin(x)=x,
+ * cos(x)=1.
+ * 2) if |x|<2^-27: sin(x)=x-x*DP_SMALL, raising underflow only when needed,
+ * cos(x)=1-|x|.
+ * 3) if |x|<2^-5 : sin(x)=x+x*x^2*DP_SIN2_0+x^5*DP_SIN2_1,
+ * cos(x)=1+1*x^2*DP_COS2_0+x^5*DP_COS2_1
+ * 4) if |x|< Pi/4: sin(x)=x+x*x^2*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))),
+ * cos(x)=1+1*x^2*(C0+x^2*(C1+x^2*(C2+x^2*(C3+x^2*C4)))).
+ * 5) if |x| < 9*Pi/4:
+ * 5.1) Range reduction:
+ * k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+1, t=|x|-j*Pi/4.
+ * 5.2) Reconstruction:
+ * sign_sin = sign(x) * (-1.0)^(( n >>2)&1)
+ * sign_cos = (-1.0)^(((n+2)>>2)&1)
+ * poly_sin = ((((S4*t^2 + S3)*t^2 + S2)*t^2 + S1)*t^2 + S0)*t^2*t+t
+ * poly_cos = ((((C4*t^2 + C3)*t^2 + C2)*t^2 + C1)*t^2 + C0)*t^2*s+s
+ * if(n&2 != 0) {
+ * using cos(t) and sin(t) polynomials for |t|<Pi/4, results are
+ * cos(x) = poly_sin * sign_cos
+ * sin(x) = poly_cos * sign_sin
+ * } else {
+ * sin(x) = poly_sin * sign_sin
+ * cos(x) = poly_cos * sign_cos
+ * }
+ * 6) if |x| < 2^23, large args:
+ * 6.1) Range reduction:
+ * k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1, t=|x|-j*Pi/4
+ * 6.2) Reconstruction same as (5.2).
+ * 7) if |x| >= 2^23, very large args:
+ * 7.1) Range reduction:
+ * k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1, t=|x|-j*Pi/4.
+ * 7.2) Reconstruction same as (5.2).
+ * 8) if x is Inf, return x-x, and set errno=EDOM.
+ * 9) if x is NaN, return x-x.
+ *
+ * Special cases:
+ * sin/cos(+-0) = +-0/1 not raising inexact/underflow,
+ * sin/cos(subnormal) raises inexact/underflow,
+ * sin/cos(min_normalized) raises inexact/underflow,
+ * sin/cos(normalized) raises inexact,
+ * sin/cos(Inf) = NaN, raises invalid, sets errno to EDOM,
+ * sin/cos(NaN) = NaN.
+ */
+
+#ifdef PIC
+# define MO1(symbol) L(symbol)##@GOTOFF(%ebx)
+# define MO2(symbol,reg2,_scale) L(symbol)##@GOTOFF(%ebx,reg2,_scale)
+# define CFI_PUSH(REG) cfi_adjust_cfa_offset(4); cfi_rel_offset(REG,0)
+# define CFI_POP(REG) cfi_adjust_cfa_offset(-4); cfi_restore(REG)
+# define PUSH(REG) pushl REG; CFI_PUSH(REG)
+# define POP(REG) popl REG; CFI_POP(REG)
+# define ENTRANCE PUSH(%ebx); LOAD_PIC_REG(bx)
+# define RETURN POP(%ebx); ret; CFI_PUSH(%ebx)
+# define ARG_X 8(%esp)
+# define ARG_SIN_PTR 12(%esp)
+# define ARG_COS_PTR 16(%esp)
+#else
+# define MO1(symbol) L(symbol)
+# define MO2(symbol,reg2,_scale) L(symbol)(,reg2,_scale)
+# define ENTRANCE
+# define RETURN ret
+# define ARG_X 4(%esp)
+# define ARG_SIN_PTR 8(%esp)
+# define ARG_COS_PTR 12(%esp)
+#endif
+
+ .text
+ENTRY(__sincosf_sse2)
+ /* Input: single precision x on stack at address ARG_X */
+ /* pointer to sin result on stack at address ARG_SIN_PTR */
+ /* pointer to cos result on stack at address ARG_COS_PTR */
+
+ ENTRANCE
+ movl ARG_X, %eax /* Bits of x */
+ cvtss2sd ARG_X, %xmm0 /* DP x */
+ andl $0x7fffffff, %eax /* |x| */
+
+ cmpl $0x3f490fdb, %eax /* |x|<Pi/4 ? */
+ jb L(arg_less_pio4)
+
+ /* Here if |x|>=Pi/4 */
+ movd %eax, %xmm3 /* SP |x| */
+ andpd MO1(DP_ABS_MASK),%xmm0 /* DP |x| */
+ movss MO1(SP_INVPIO4), %xmm2 /* SP 1/(Pi/4) */
+
+ cmpl $0x40e231d6, %eax /* |x|<9*Pi/4 ? */
+ jae L(large_args)
+
+ /* Here if Pi/4<=|x|<9*Pi/4 */
+ mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+ movl ARG_X, %ecx /* Load x */
+ cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+ shrl $29, %ecx /* (sign of x) << 2 */
+ addl $1, %eax /* k+1 */
+ movl $0x0e, %edx
+ andl %eax, %edx /* j = (k+1)&0x0e */
+ subsd MO2(PIO4J,%edx,8), %xmm0/* t = |x| - j * Pi/4 */
+
+L(reconstruction):
+ /* Input: %eax=n, %xmm0=t, %ecx=sign(x) */
+
+ movaps %xmm0, %xmm4 /* t */
+ movhpd MO1(DP_ONES), %xmm4 /* 1|t */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ movl $2, %edx
+ unpcklpd %xmm0, %xmm0 /* y|y */
+ addl %eax, %edx /* k+2 */
+ movaps %xmm0, %xmm1 /* y|y */
+ mulpd %xmm0, %xmm0 /* z=t^4|z=t^4 */
+
+ movaps MO1(DP_SC4), %xmm2 /* S4 */
+ mulpd %xmm0, %xmm2 /* z*S4 */
+ movaps MO1(DP_SC3), %xmm3 /* S3 */
+ mulpd %xmm0, %xmm3 /* z*S3 */
+ xorl %eax, %ecx /* (sign_x ^ (k>>2))<<2 */
+ addpd MO1(DP_SC2), %xmm2 /* S2+z*S4 */
+ mulpd %xmm0, %xmm2 /* z*(S2+z*S4) */
+ shrl $2, %edx /* (k+2)>>2 */
+ addpd MO1(DP_SC1), %xmm3 /* S1+z*S3 */
+ mulpd %xmm0, %xmm3 /* z*(S1+z*S3) */
+ shrl $2, %ecx /* sign_x ^ k>>2 */
+ addpd MO1(DP_SC0), %xmm2 /* S0+z*(S2+z*S4) */
+ andl $1, %edx /* sign_cos = ((k+2)>>2)&1 */
+ mulpd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+ andl $1, %ecx /* sign_sin = sign_x ^ ((k>>2)&1) */
+ addpd %xmm2, %xmm3 /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ mulpd %xmm4, %xmm3 /*t*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))))*/
+ testl $2, %eax /* n&2 != 0 ? */
+ addpd %xmm4, %xmm3 /*t+t*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))*/
+ jnz L(sin_result_sin_poly)
+
+/*L(sin_result_cos_poly):*/
+ /*
+ * Here if
+ * cos(x) = poly_sin * sign_cos
+ * sin(x) = poly_cos * sign_sin
+ */
+ movsd MO2(DP_ONES,%ecx,8), %xmm4/* 0|sign_sin */
+ movhpd MO2(DP_ONES,%edx,8), %xmm4/* sign_cos|sign_sin */
+ mulpd %xmm4, %xmm3 /* result_cos|result_sin */
+ movl ARG_SIN_PTR, %eax
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movl ARG_COS_PTR, %ecx
+ movss %xmm0, (%eax) /* store sin(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move cos(x) to xmm0[0] */
+ movss %xmm0, (%ecx) /* store cos(x) */
+ RETURN
+
+ .p2align 4
+L(sin_result_sin_poly):
+ /*
+ * Here if
+ * sin(x) = poly_sin * sign_sin
+ * cos(x) = poly_cos * sign_cos
+ */
+ movsd MO2(DP_ONES,%edx,8), %xmm4/* 0|sign_cos */
+ movhpd MO2(DP_ONES,%ecx,8), %xmm4/* sign_sin|sign_cos */
+ mulpd %xmm4, %xmm3 /* result_sin|result_cos */
+ movl ARG_SIN_PTR, %eax
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movl ARG_COS_PTR, %ecx
+ movss %xmm0, (%ecx) /* store cos(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move sin(x) to xmm0[0] */
+ movss %xmm0, (%eax) /* store sin(x) */
+ RETURN
+
+ .p2align 4
+L(large_args):
+ /* Here if |x|>=9*Pi/4 */
+ cmpl $0x7f800000, %eax /* x is Inf or NaN ? */
+ jae L(arg_inf_or_nan)
+
+ /* Here if finite |x|>=9*Pi/4 */
+ cmpl $0x4b000000, %eax /* |x|<2^23 ? */
+ jae L(very_large_args)
+
+ /* Here if 9*Pi/4<=|x|<2^23 */
+ movsd MO1(DP_INVPIO4), %xmm1 /* 1/(Pi/4) */
+ mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+ cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+ addl $1, %eax /* k+1 */
+ movl %eax, %edx
+ andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+ cvtsi2sdl %edx, %xmm4 /* DP j */
+ movl ARG_X, %ecx /* Load x */
+ movsd MO1(DP_PIO4HI), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+ shrl $29, %ecx /* (sign of x) << 2 */
+ mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+ movsd MO1(DP_PIO4LO), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+ addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+ mulsd %xmm3, %xmm4 /* j*PIO4LO */
+ addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+ jmp L(reconstruction)
+
+ .p2align 4
+L(very_large_args):
+ /* Here if finite |x|>=2^23 */
+
+ /* bitpos = (ix>>23) - BIAS_32 + 59; */
+ shrl $23, %eax /* eb = biased exponent of x */
+ subl $68, %eax /* bitpos=eb-0x7f+59, where 0x7f */
+ /*is exponent bias */
+ movl $28, %ecx /* %cl=28 */
+ movl %eax, %edx /* bitpos copy */
+
+ /* j = bitpos/28; */
+ div %cl /* j in register %al=%ax/%cl */
+ movapd %xmm0, %xmm3 /* |x| */
+ andl $0xff, %eax /* clear unneeded remainder from %ah*/
+
+ imull $28, %eax, %ecx /* j*28 */
+ movsd MO1(DP_HI_MASK), %xmm4 /* DP_HI_MASK */
+ movapd %xmm0, %xmm5 /* |x| */
+ mulsd -2*8+MO2(_FPI,%eax,8), %xmm3/* tmp3 = FPI[j-2]*|x| */
+ movapd %xmm0, %xmm1 /* |x| */
+ mulsd -1*8+MO2(_FPI,%eax,8), %xmm5/* tmp2 = FPI[j-1]*|x| */
+ mulsd 0*8+MO2(_FPI,%eax,8), %xmm0/* tmp0 = FPI[j]*|x| */
+ addl $19, %ecx /* j*28+19 */
+ mulsd 1*8+MO2(_FPI,%eax,8), %xmm1/* tmp1 = FPI[j+1]*|x| */
+ cmpl %ecx, %edx /* bitpos>=j*28+19 ? */
+ jl L(very_large_skip1)
+
+ /* Here if bitpos>=j*28+19 */
+ andpd %xmm3, %xmm4 /* HI(tmp3) */
+ subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+L(very_large_skip1):
+
+ movsd MO1(DP_2POW52), %xmm6
+ movapd %xmm5, %xmm2 /* tmp2 copy */
+ addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+ movl $1, %edx
+ addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+ movsd 8+MO1(DP_2POW52), %xmm4
+ movd %xmm6, %eax /* k = I64_LO(tmp6); */
+ addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+ movl ARG_X, %ecx /* Load x */
+ comisd %xmm5, %xmm4 /* tmp4 > tmp5 ? */
+ jbe L(very_large_skip2)
+
+ /* Here if tmp4 > tmp5 */
+ subl $1, %eax /* k-- */
+ addsd 8+MO1(DP_ONES), %xmm4 /* tmp4 -= 1.0 */
+L(very_large_skip2):
+
+ andl %eax, %edx /* k&1 */
+ subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+ addsd MO2(DP_ZERONE,%edx,8), %xmm3/* t = DP_ZERONE[k&1] + tmp3 */
+ addsd %xmm2, %xmm3 /* t += tmp2 */
+ shrl $29, %ecx /* (sign of x) << 2 */
+ addsd %xmm3, %xmm0 /* t += tmp0 */
+ addl $1, %eax /* n=k+1 */
+ addsd %xmm1, %xmm0 /* t += tmp1 */
+ mulsd MO1(DP_PIO4), %xmm0 /* t *= PI04 */
+
+ jmp L(reconstruction) /* end of very_large_args peth */
+
+ .p2align 4
+L(arg_less_pio4):
+ /* Here if |x|<Pi/4 */
+ cmpl $0x3d000000, %eax /* |x|<2^-5 ? */
+ jl L(arg_less_2pn5)
+
+ /* Here if 2^-5<=|x|<Pi/4 */
+ movaps %xmm0, %xmm3 /* DP x */
+ movhpd MO1(DP_ONES), %xmm3 /* DP 1|x */
+ mulsd %xmm0, %xmm0 /* DP y=x^2 */
+ unpcklpd %xmm0, %xmm0 /* DP y|y */
+ movaps %xmm0, %xmm1 /* y|y */
+ mulpd %xmm0, %xmm0 /* z=x^4|z=x^4 */
+
+ movapd MO1(DP_SC4), %xmm4 /* S4 */
+ mulpd %xmm0, %xmm4 /* z*S4 */
+ movapd MO1(DP_SC3), %xmm5 /* S3 */
+ mulpd %xmm0, %xmm5 /* z*S3 */
+ addpd MO1(DP_SC2), %xmm4 /* S2+z*S4 */
+ mulpd %xmm0, %xmm4 /* z*(S2+z*S4) */
+ addpd MO1(DP_SC1), %xmm5 /* S1+z*S3 */
+ mulpd %xmm0, %xmm5 /* z*(S1+z*S3) */
+ addpd MO1(DP_SC0), %xmm4 /* S0+z*(S2+z*S4) */
+ mulpd %xmm1, %xmm4 /* y*(S0+z*(S2+z*S4)) */
+ mulpd %xmm3, %xmm5 /* x*z*(S1+z*S3) */
+ mulpd %xmm3, %xmm4 /* x*y*(S0+z*(S2+z*S4)) */
+ addpd %xmm5, %xmm4 /*x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))))*/
+ movl ARG_SIN_PTR, %eax
+ addpd %xmm4, %xmm3 /*x+x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))*/
+ movl ARG_COS_PTR, %ecx
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movss %xmm0, (%eax) /* store sin(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move cos(x) to xmm0[0] */
+ movss %xmm0, (%ecx) /* store cos(x) */
+ RETURN
+
+ .p2align 4
+L(arg_less_2pn5):
+ /* Here if |x|<2^-5 */
+ cmpl $0x32000000, %eax /* |x|<2^-27 ? */
+ jl L(arg_less_2pn27)
+
+ /* Here if 2^-27<=|x|<2^-5 */
+ movaps %xmm0, %xmm1 /* DP x */
+ movhpd MO1(DP_ONES), %xmm1 /* DP 1|x */
+ mulsd %xmm0, %xmm0 /* DP x^2 */
+ unpcklpd %xmm0, %xmm0 /* DP x^2|x^2 */
+
+ movaps MO1(DP_SINCOS2_1), %xmm3/* DP DP_SIN2_1 */
+ mulpd %xmm0, %xmm3 /* DP x^2*DP_SIN2_1 */
+ addpd MO1(DP_SINCOS2_0), %xmm3/* DP DP_SIN2_0+x^2*DP_SIN2_1 */
+ mulpd %xmm0, %xmm3 /* DP x^2*DP_SIN2_0+x^4*DP_SIN2_1 */
+ mulpd %xmm1, %xmm3 /* DP x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ addpd %xmm1, %xmm3 /* DP x+x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ movl ARG_SIN_PTR, %eax
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movl ARG_COS_PTR, %ecx
+ movss %xmm0, (%eax) /* store sin(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move cos(x) to xmm0[0] */
+ movss %xmm0, (%ecx) /* store cos(x) */
+ RETURN
+
+ .p2align 4
+L(arg_less_2pn27):
+ movss ARG_X, %xmm7 /* SP x */
+ cmpl $0, %eax /* x=0 ? */
+ je L(arg_zero) /* in case x=0 return sin(+-0)==+-0 */
+ /* Here if |x|<2^-27 */
+ /*
+ * Special cases here:
+ * sin(subnormal) raises inexact/underflow
+ * sin(min_normalized) raises inexact/underflow
+ * sin(normalized) raises inexact
+ * cos(here)=1-|x| (raising inexact)
+ */
+ movaps %xmm0, %xmm3 /* DP x */
+ mulsd MO1(DP_SMALL), %xmm0 /* DP x*DP_SMALL */
+ subsd %xmm0, %xmm3 /* DP sin result is x-x*DP_SMALL */
+ andps MO1(SP_ABS_MASK), %xmm7 /* SP |x| */
+ cvtsd2ss %xmm3, %xmm0 /* sin(x) */
+ movl ARG_SIN_PTR, %eax
+ movss MO1(SP_ONE), %xmm1 /* SP 1.0 */
+ movss %xmm0, (%eax) /* sin(x) store */
+ movl ARG_COS_PTR, %ecx
+ subss %xmm7, %xmm1 /* cos(x) */
+ movss %xmm1, (%ecx) /* cos(x) store */
+ RETURN
+
+ .p2align 4
+L(arg_zero):
+ movss MO1(SP_ONE), %xmm0 /* 1.0 */
+ movl ARG_SIN_PTR, %eax
+ movl ARG_COS_PTR, %ecx
+ movss %xmm7, (%eax) /* sin(+-0)==x */
+ movss %xmm0, (%ecx) /* cos(+-0)==1 */
+ RETURN
+
+ .p2align 4
+L(arg_inf_or_nan):
+ movss ARG_X, %xmm7 /* SP x */
+ /* Here if |x| is Inf or NAN */
+ jne L(skip_errno_setting) /* in case of x is NaN */
+
+ /* Here if x is Inf. Set errno to EDOM. */
+ call JUMPTARGET(__errno_location)
+ movl $EDOM, (%eax)
+
+ .p2align 4
+L(skip_errno_setting):
+ /* Here if |x| is Inf or NAN. Continued. */
+ subss %xmm7, %xmm7 /* x-x, result is NaN */
+ movl ARG_SIN_PTR, %eax
+ movl ARG_COS_PTR, %ecx
+ movss %xmm7, (%eax)
+ movss %xmm7, (%ecx)
+ RETURN
+END(__sincosf_sse2)
+
+ .section .rodata, "a"
+ .p2align 3
+L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+ .long 0x00000000,0x00000000
+ .long 0x54442d18,0x3fe921fb
+ .long 0x54442d18,0x3ff921fb
+ .long 0x7f3321d2,0x4002d97c
+ .long 0x54442d18,0x400921fb
+ .long 0x2955385e,0x400f6a7a
+ .long 0x7f3321d2,0x4012d97c
+ .long 0xe9bba775,0x4015fdbb
+ .long 0x54442d18,0x401921fb
+ .long 0xbeccb2bb,0x401c463a
+ .long 0x2955385e,0x401f6a7a
+ .type L(PIO4J), @object
+ ASM_SIZE_DIRECTIVE(L(PIO4J))
+
+ .p2align 3
+L(_FPI): /* 4/Pi broken into sum of positive DP values */
+ .long 0x00000000,0x00000000
+ .long 0x6c000000,0x3ff45f30
+ .long 0x2a000000,0x3e3c9c88
+ .long 0xa8000000,0x3c54fe13
+ .long 0xd0000000,0x3aaf47d4
+ .long 0x6c000000,0x38fbb81b
+ .long 0xe0000000,0x3714acc9
+ .long 0x7c000000,0x3560e410
+ .long 0x56000000,0x33bca2c7
+ .long 0xac000000,0x31fbd778
+ .long 0xe0000000,0x300b7246
+ .long 0xe8000000,0x2e5d2126
+ .long 0x48000000,0x2c970032
+ .long 0xe8000000,0x2ad77504
+ .long 0xe0000000,0x290921cf
+ .long 0xb0000000,0x274deb1c
+ .long 0xe0000000,0x25829a73
+ .long 0xbe000000,0x23fd1046
+ .long 0x10000000,0x2224baed
+ .long 0x8e000000,0x20709d33
+ .long 0x80000000,0x1e535a2f
+ .long 0x64000000,0x1cef904e
+ .long 0x30000000,0x1b0d6398
+ .long 0x24000000,0x1964ce7d
+ .long 0x16000000,0x17b908bf
+ .type L(_FPI), @object
+ ASM_SIZE_DIRECTIVE(L(_FPI))
+
+/* Coefficients of polynomials for */
+/* sin(x)~=x+x*x^2*(DP_SIN2_0+x^2*DP_SIN2_1) in low DP part, */
+/* cos(x)~=1+1*x^2*(DP_COS2_0+x^2*DP_COS2_1) in high DP part, */
+/* for |x|<2^-5. */
+ .p2align 4
+L(DP_SINCOS2_0):
+ .long 0x5543d49d,0xbfc55555
+ .long 0xff5cc6fd,0xbfdfffff
+ .type L(DP_SINCOS2_0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SINCOS2_0))
+
+ .p2align 4
+L(DP_SINCOS2_1):
+ .long 0x75cec8c5,0x3f8110f4
+ .long 0xb178dac5,0x3fa55514
+ .type L(DP_SINCOS2_1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SINCOS2_1))
+
+ .p2align 3
+L(DP_ZERONE):
+ .long 0x00000000,0x00000000 /* 0.0 */
+ .long 0x00000000,0xbff00000 /* 1.0 */
+ .type L(DP_ZERONE), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+
+ .p2align 3
+L(DP_ONES):
+ .long 0x00000000,0x3ff00000 /* +1.0 */
+ .long 0x00000000,0xbff00000 /* -1.0 */
+ .type L(DP_ONES), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ONES))
+
+/* Coefficients of polynomials for */
+/* sin(t)~=t+t*t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))) in low DP part, */
+/* cos(t)~=1+1*t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))) in high DP part, */
+/* for |t|<Pi/4. */
+ .p2align 4
+L(DP_SC4):
+ .long 0x1674b58a,0xbe5a947e
+ .long 0xdd8844d7,0xbe923c97
+ .type L(DP_SC4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC4))
+
+ .p2align 4
+L(DP_SC3):
+ .long 0x64e6b5b4,0x3ec71d72
+ .long 0x9ac43cc0,0x3efa00eb
+ .type L(DP_SC3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC3))
+
+ .p2align 4
+L(DP_SC2):
+ .long 0x8b4bd1f9,0xbf2a019f
+ .long 0x348b6874,0xbf56c16b
+ .type L(DP_SC2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC2))
+
+ .p2align 4
+L(DP_SC1):
+ .long 0x10c2688b,0x3f811111
+ .long 0x545c50c7,0x3fa55555
+ .type L(DP_SC1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC1))
+
+ .p2align 4
+L(DP_SC0):
+ .long 0x55551cd9,0xbfc55555
+ .long 0xfffe98ae,0xbfdfffff
+ .type L(DP_SC0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC0))
+
+ .p2align 3
+L(DP_SMALL):
+ .long 0x00000000,0x3cd00000 /* 2^(-50) */
+ .type L(DP_SMALL), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SMALL))
+
+ .p2align 3
+L(DP_PIO4):
+ .long 0x54442d18,0x3fe921fb /* Pi/4 */
+ .type L(DP_PIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+
+ .p2align 3
+L(DP_2POW52):
+ .long 0x00000000,0x43300000 /* +2^52 */
+ .long 0x00000000,0xc3300000 /* -2^52 */
+ .type L(DP_2POW52), @object
+ ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+
+ .p2align 3
+L(DP_INVPIO4):
+ .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+ .type L(DP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+
+ .p2align 3
+L(DP_PIO4HI):
+ .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+ .type L(DP_PIO4HI), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+
+ .p2align 3
+L(DP_PIO4LO):
+ .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+ .type L(DP_PIO4LO), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+
+ .p2align 2
+L(SP_INVPIO4):
+ .long 0x3fa2f983 /* 4/Pi */
+ .type L(SP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+
+ .p2align 4
+L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+ .long 0xffffffff,0x7fffffff
+ .long 0xffffffff,0x7fffffff
+ .type L(DP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+
+ .p2align 3
+L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+ .long 0x00000000,0xffffffff
+ .type L(DP_HI_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+
+ .p2align 4
+L(SP_ABS_MASK): /* Mask for getting SP absolute value */
+ .long 0x7fffffff,0x7fffffff
+ .long 0x7fffffff,0x7fffffff
+ .type L(SP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ABS_MASK))
+
+ .p2align 2
+L(SP_ONE):
+ .long 0x3f800000 /* 1.0 */
+ .type L(SP_ONE), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ONE))
+
+weak_alias(__sincosf, sincosf)
diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c b/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c
new file mode 100644
index 0000000000..c5e856a214
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c
@@ -0,0 +1,29 @@
+/* Multiple versions of sincosf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <init-arch.h>
+
+extern void __sincosf_sse2 (float, float *, float *);
+extern void __sincosf_ia32 (float, float *, float *);
+void __sincosf (float, float *, float *);
+
+libm_ifunc (__sincosf, HAS_SSE2 ? __sincosf_sse2 : __sincosf_ia32);
+weak_alias (__sincosf, sincosf);
+
+#define SINCOSF __sincosf_ia32
+#include <sysdeps/ieee754/flt-32/s_sincosf.c>
diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S b/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S
new file mode 100644
index 0000000000..49d59b5972
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S
@@ -0,0 +1,566 @@
+/* Optimized with sse2 version of sinf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#define __need_Emath
+#include <bits/errno.h>
+
+/* Short algorithm description:
+ *
+ * 1) if |x| == 0: return x.
+ * 2) if |x| < 2^-27: return x-x*DP_SMALL, raise underflow only when needed.
+ * 3) if |x| < 2^-5 : return x+x^3*DP_SIN2_0+x^5*DP_SIN2_1.
+ * 4) if |x| < Pi/4: return x+x^3*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))).
+ * 5) if |x| < 9*Pi/4:
+ * 5.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+1,
+ * t=|x|-j*Pi/4.
+ * 5.2) Reconstruction:
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * if(n&2 != 0) {
+ * using cos(t) polynomial for |t|<Pi/4, result is
+ * s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4))))).
+ * } else {
+ * using sin(t) polynomial for |t|<Pi/4, result is
+ * s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4))))).
+ * }
+ * 6) if |x| < 2^23, large args:
+ * 6.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
+ * t=|x|-j*Pi/4.
+ * 6.2) Reconstruction same as (5.2).
+ * 7) if |x| >= 2^23, very large args:
+ * 7.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
+ * t=|x|-j*Pi/4.
+ * 7.2) Reconstruction same as (5.2).
+ * 8) if x is Inf, return x-x, and set errno=EDOM.
+ * 9) if x is NaN, return x-x.
+ *
+ * Special cases:
+ * sin(+-0) = +-0 not raising inexact/underflow,
+ * sin(subnormal) raises inexact/underflow,
+ * sin(min_normalized) raises inexact/underflow,
+ * sin(normalized) raises inexact,
+ * sin(Inf) = NaN, raises invalid, sets errno to EDOM,
+ * sin(NaN) = NaN.
+ */
+
+#ifdef PIC
+# define MO1(symbol) L(symbol)##@GOTOFF(%ebx)
+# define MO2(symbol,reg2,_scale) L(symbol)##@GOTOFF(%ebx,reg2,_scale)
+# define CFI_PUSH(REG) cfi_adjust_cfa_offset(4); cfi_rel_offset(REG,0)
+# define CFI_POP(REG) cfi_adjust_cfa_offset(-4); cfi_restore(REG)
+# define PUSH(REG) pushl REG; CFI_PUSH(REG)
+# define POP(REG) popl REG; CFI_POP(REG)
+# define ENTRANCE PUSH(%ebx); LOAD_PIC_REG(bx)
+# define RETURN POP(%ebx); ret; CFI_PUSH(%ebx)
+# define ARG_X 8(%esp)
+#else
+# define MO1(symbol) L(symbol)
+# define MO2(symbol,reg2,_scale) L(symbol)(,reg2,_scale)
+# define ENTRANCE
+# define RETURN ret
+# define ARG_X 4(%esp)
+#endif
+
+ .text
+ENTRY(__sinf_sse2)
+ /* Input: single precision x on stack at address ARG_X */
+
+ ENTRANCE
+ movl ARG_X, %eax /* Bits of x */
+ cvtss2sd ARG_X, %xmm0 /* DP x */
+ andl $0x7fffffff, %eax /* |x| */
+
+ cmpl $0x3f490fdb, %eax /* |x|<Pi/4? */
+ jb L(arg_less_pio4)
+
+ /* Here if |x|>=Pi/4 */
+ movd %eax, %xmm3 /* SP |x| */
+ andpd MO1(DP_ABS_MASK),%xmm0 /* DP |x| */
+ movss MO1(SP_INVPIO4), %xmm2 /* SP 1/(Pi/4) */
+
+ cmpl $0x40e231d6, %eax /* |x|<9*Pi/4? */
+ jae L(large_args)
+
+ /* Here if Pi/4<=|x|<9*Pi/4 */
+ mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+ movl ARG_X, %ecx /* Load x */
+ cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+ shrl $31, %ecx /* sign of x */
+ addl $1, %eax /* k+1 */
+ movl $0x0e, %edx
+ andl %eax, %edx /* j = (k+1)&0x0e */
+ subsd MO2(PIO4J,%edx,8), %xmm0 /* t = |x| - j * Pi/4 */
+
+L(reconstruction):
+ /* Input: %eax=n, %xmm0=t, %ecx=sign(x) */
+ testl $2, %eax /* n&2 != 0? */
+ jz L(sin_poly)
+
+/*L(cos_poly):*/
+ /* Here if sin(x) calculated using cos(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))))
+ */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd MO1(DP_C4), %xmm4 /* C4 */
+ mulsd %xmm0, %xmm4 /* z*C4 */
+ xorl %eax, %ecx /* (-1.0)^((n>>2)&1) XOR sign(x) */
+ movsd MO1(DP_C3), %xmm3 /* C3 */
+ mulsd %xmm0, %xmm3 /* z*C3 */
+ addsd MO1(DP_C2), %xmm4 /* C2+z*C4 */
+ mulsd %xmm0, %xmm4 /* z*(C2+z*C4) */
+ lea -8(%esp), %esp /* Borrow 4 bytes of stack frame */
+ addsd MO1(DP_C1), %xmm3 /* C1+z*C3 */
+ mulsd %xmm0, %xmm3 /* z*(C1+z*C3) */
+ addsd MO1(DP_C0), %xmm4 /* C0+z*(C2+z*C4) */
+ mulsd %xmm1, %xmm4 /* y*(C0+z*(C2+z*C4)) */
+
+ addsd %xmm4, %xmm3 /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ /* 1.0+y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd MO1(DP_ONES), %xmm3
+
+ mulsd MO2(DP_ONES,%ecx,8), %xmm3 /* DP result */
+ movsd %xmm3, 0(%esp) /* Move result from sse... */
+ fldl 0(%esp) /* ...to FPU. */
+ /* Return back 4 bytes of stack frame */
+ lea 8(%esp), %esp
+ RETURN
+
+ .p2align 4
+L(sin_poly):
+ /* Here if sin(x) calculated using sin(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))))
+ */
+
+ movaps %xmm0, %xmm4 /* t */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ xorl %eax, %ecx /* (-1.0)^((n>>2)&1) XOR sign(x) */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd MO1(DP_S4), %xmm2 /* S4 */
+ mulsd %xmm0, %xmm2 /* z*S4 */
+ movsd MO1(DP_S3), %xmm3 /* S3 */
+ mulsd %xmm0, %xmm3 /* z*S3 */
+ lea -8(%esp), %esp /* Borrow 4 bytes of stack frame */
+ addsd MO1(DP_S2), %xmm2 /* S2+z*S4 */
+ mulsd %xmm0, %xmm2 /* z*(S2+z*S4) */
+ addsd MO1(DP_S1), %xmm3 /* S1+z*S3 */
+ mulsd %xmm0, %xmm3 /* z*(S1+z*S3) */
+ addsd MO1(DP_S0), %xmm2 /* S0+z*(S2+z*S4) */
+ mulsd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+ /* t*s, where s = sign(x) * (-1.0)^((n>>2)&1) */
+ mulsd MO2(DP_ONES,%ecx,8), %xmm4
+ addsd %xmm2, %xmm3 /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ /* t*s*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ mulsd %xmm4, %xmm3
+ /* t*s*(1.0+y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm4, %xmm3
+ movsd %xmm3, 0(%esp) /* Move result from sse... */
+ fldl 0(%esp) /* ...to FPU. */
+ /* Return back 4 bytes of stack frame */
+ lea 8(%esp), %esp
+ RETURN
+
+ .p2align 4
+L(large_args):
+ /* Here if |x|>=9*Pi/4 */
+ cmpl $0x7f800000, %eax /* x is Inf or NaN? */
+ jae L(arg_inf_or_nan)
+
+ /* Here if finite |x|>=9*Pi/4 */
+ cmpl $0x4b000000, %eax /* |x|<2^23? */
+ jae L(very_large_args)
+
+ /* Here if 9*Pi/4<=|x|<2^23 */
+ movsd MO1(DP_INVPIO4), %xmm1 /* 1/(Pi/4) */
+ mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+ cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+ addl $1, %eax /* k+1 */
+ movl %eax, %edx
+ andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+ cvtsi2sdl %edx, %xmm4 /* DP j */
+ movl ARG_X, %ecx /* Load x */
+ movsd MO1(DP_PIO4HI), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+ shrl $31, %ecx /* sign bit of x */
+ mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+ movsd MO1(DP_PIO4LO), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+ addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+ mulsd %xmm3, %xmm4 /* j*PIO4LO */
+ addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+ jmp L(reconstruction)
+
+ .p2align 4
+L(very_large_args):
+ /* Here if finite |x|>=2^23 */
+
+ /* bitpos = (ix>>23) - BIAS_32 + 59; */
+ shrl $23, %eax /* eb = biased exponent of x */
+ /* bitpos = eb - 0x7f + 59, where 0x7f is exponent bias */
+ subl $68, %eax
+ movl $28, %ecx /* %cl=28 */
+ movl %eax, %edx /* bitpos copy */
+
+ /* j = bitpos/28; */
+ div %cl /* j in register %al=%ax/%cl */
+ movapd %xmm0, %xmm3 /* |x| */
+ /* clear unneeded remainder from %ah */
+ andl $0xff, %eax
+
+ imull $28, %eax, %ecx /* j*28 */
+ movsd MO1(DP_HI_MASK), %xmm4 /* DP_HI_MASK */
+ movapd %xmm0, %xmm5 /* |x| */
+ mulsd -2*8+MO2(_FPI,%eax,8), %xmm3 /* tmp3 = FPI[j-2]*|x| */
+ movapd %xmm0, %xmm1 /* |x| */
+ mulsd -1*8+MO2(_FPI,%eax,8), %xmm5 /* tmp2 = FPI[j-1]*|x| */
+ mulsd 0*8+MO2(_FPI,%eax,8), %xmm0 /* tmp0 = FPI[j]*|x| */
+ addl $19, %ecx /* j*28+19 */
+ mulsd 1*8+MO2(_FPI,%eax,8), %xmm1 /* tmp1 = FPI[j+1]*|x| */
+ cmpl %ecx, %edx /* bitpos>=j*28+19? */
+ jl L(very_large_skip1)
+
+ /* Here if bitpos>=j*28+19 */
+ andpd %xmm3, %xmm4 /* HI(tmp3) */
+ subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+L(very_large_skip1):
+
+ movsd MO1(DP_2POW52), %xmm6
+ movapd %xmm5, %xmm2 /* tmp2 copy */
+ addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+ movl $1, %edx
+ addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+ movsd 8+MO1(DP_2POW52), %xmm4
+ movd %xmm6, %eax /* k = I64_LO(tmp6); */
+ addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+ movl ARG_X, %ecx /* Load x */
+ comisd %xmm5, %xmm4 /* tmp4 > tmp5? */
+ jbe L(very_large_skip2)
+
+ /* Here if tmp4 > tmp5 */
+ subl $1, %eax /* k-- */
+ addsd 8+MO1(DP_ONES), %xmm4 /* tmp4 -= 1.0 */
+L(very_large_skip2):
+
+ andl %eax, %edx /* k&1 */
+ subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+ addsd MO2(DP_ZERONE,%edx,8), %xmm3 /* t = DP_ZERONE[k&1] + tmp3 */
+ addsd %xmm2, %xmm3 /* t += tmp2 */
+ shrl $31, %ecx /* sign of x */
+ addsd %xmm3, %xmm0 /* t += tmp0 */
+ addl $1, %eax /* n=k+1 */
+ addsd %xmm1, %xmm0 /* t += tmp1 */
+ mulsd MO1(DP_PIO4), %xmm0 /* t *= PI04 */
+
+ jmp L(reconstruction) /* end of very_large_args peth */
+
+ .p2align 4
+L(arg_less_pio4):
+ /* Here if |x|<Pi/4 */
+ cmpl $0x3d000000, %eax /* |x|<2^-5? */
+ jl L(arg_less_2pn5)
+
+ /* Here if 2^-5<=|x|<Pi/4 */
+ movaps %xmm0, %xmm3 /* x */
+ mulsd %xmm0, %xmm0 /* y=x^2 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=x^4 */
+ movsd MO1(DP_S4), %xmm4 /* S4 */
+ mulsd %xmm0, %xmm4 /* z*S4 */
+ movsd MO1(DP_S3), %xmm5 /* S3 */
+ mulsd %xmm0, %xmm5 /* z*S3 */
+ addsd MO1(DP_S2), %xmm4 /* S2+z*S4 */
+ mulsd %xmm0, %xmm4 /* z*(S2+z*S4) */
+ addsd MO1(DP_S1), %xmm5 /* S1+z*S3 */
+ mulsd %xmm0, %xmm5 /* z*(S1+z*S3) */
+ addsd MO1(DP_S0), %xmm4 /* S0+z*(S2+z*S4) */
+ mulsd %xmm1, %xmm4 /* y*(S0+z*(S2+z*S4)) */
+ mulsd %xmm3, %xmm5 /* x*z*(S1+z*S3) */
+ mulsd %xmm3, %xmm4 /* x*y*(S0+z*(S2+z*S4)) */
+ /* x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm5, %xmm4
+ /* x + x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm4, %xmm3
+ cvtsd2ss %xmm3, %xmm3 /* SP result */
+
+L(epilogue):
+ lea -4(%esp), %esp /* Borrow 4 bytes of stack frame */
+ movss %xmm3, 0(%esp) /* Move result from sse... */
+ flds 0(%esp) /* ...to FPU. */
+ /* Return back 4 bytes of stack frame */
+ lea 4(%esp), %esp
+ RETURN
+
+ .p2align 4
+L(arg_less_2pn5):
+ /* Here if |x|<2^-5 */
+ cmpl $0x32000000, %eax /* |x|<2^-27? */
+ jl L(arg_less_2pn27)
+
+ /* Here if 2^-27<=|x|<2^-5 */
+ movaps %xmm0, %xmm1 /* DP x */
+ mulsd %xmm0, %xmm0 /* DP x^2 */
+ movsd MO1(DP_SIN2_1), %xmm3 /* DP DP_SIN2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_SIN2_1 */
+ addsd MO1(DP_SIN2_0), %xmm3 /* DP DP_SIN2_0+x^2*DP_SIN2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_SIN2_0+x^4*DP_SIN2_1 */
+ mulsd %xmm1, %xmm3 /* DP x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ addsd %xmm1, %xmm3 /* DP x+x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ cvtsd2ss %xmm3, %xmm3 /* SP result */
+ jmp L(epilogue)
+
+ .p2align 4
+L(arg_less_2pn27):
+ movss ARG_X, %xmm3 /* SP x */
+ cmpl $0, %eax /* x=0? */
+ je L(epilogue) /* in case x=0 return sin(+-0)==+-0 */
+ /* Here if |x|<2^-27 */
+ /*
+ * Special cases here:
+ * sin(subnormal) raises inexact/underflow
+ * sin(min_normalized) raises inexact/underflow
+ * sin(normalized) raises inexact
+ */
+ movaps %xmm0, %xmm3 /* Copy of DP x */
+ mulsd MO1(DP_SMALL), %xmm0 /* x*DP_SMALL */
+ subsd %xmm0, %xmm3 /* Result is x-x*DP_SMALL */
+ cvtsd2ss %xmm3, %xmm3 /* Result converted to SP */
+ jmp L(epilogue)
+
+ .p2align 4
+L(arg_inf_or_nan):
+ /* Here if |x| is Inf or NAN */
+ jne L(skip_errno_setting) /* in case of x is NaN */
+
+ /* Here if x is Inf. Set errno to EDOM. */
+ call JUMPTARGET(__errno_location)
+ movl $EDOM, (%eax)
+
+ .p2align 4
+L(skip_errno_setting):
+ /* Here if |x| is Inf or NAN. Continued. */
+ movss ARG_X, %xmm3 /* load x */
+ subss %xmm3, %xmm3 /* Result is NaN */
+ jmp L(epilogue)
+END(__sinf_sse2)
+
+ .section .rodata, "a"
+ .p2align 3
+L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+ .long 0x00000000,0x00000000
+ .long 0x54442d18,0x3fe921fb
+ .long 0x54442d18,0x3ff921fb
+ .long 0x7f3321d2,0x4002d97c
+ .long 0x54442d18,0x400921fb
+ .long 0x2955385e,0x400f6a7a
+ .long 0x7f3321d2,0x4012d97c
+ .long 0xe9bba775,0x4015fdbb
+ .long 0x54442d18,0x401921fb
+ .long 0xbeccb2bb,0x401c463a
+ .long 0x2955385e,0x401f6a7a
+ .type L(PIO4J), @object
+ ASM_SIZE_DIRECTIVE(L(PIO4J))
+
+ .p2align 3
+L(_FPI): /* 4/Pi broken into sum of positive DP values */
+ .long 0x00000000,0x00000000
+ .long 0x6c000000,0x3ff45f30
+ .long 0x2a000000,0x3e3c9c88
+ .long 0xa8000000,0x3c54fe13
+ .long 0xd0000000,0x3aaf47d4
+ .long 0x6c000000,0x38fbb81b
+ .long 0xe0000000,0x3714acc9
+ .long 0x7c000000,0x3560e410
+ .long 0x56000000,0x33bca2c7
+ .long 0xac000000,0x31fbd778
+ .long 0xe0000000,0x300b7246
+ .long 0xe8000000,0x2e5d2126
+ .long 0x48000000,0x2c970032
+ .long 0xe8000000,0x2ad77504
+ .long 0xe0000000,0x290921cf
+ .long 0xb0000000,0x274deb1c
+ .long 0xe0000000,0x25829a73
+ .long 0xbe000000,0x23fd1046
+ .long 0x10000000,0x2224baed
+ .long 0x8e000000,0x20709d33
+ .long 0x80000000,0x1e535a2f
+ .long 0x64000000,0x1cef904e
+ .long 0x30000000,0x1b0d6398
+ .long 0x24000000,0x1964ce7d
+ .long 0x16000000,0x17b908bf
+ .type L(_FPI), @object
+ ASM_SIZE_DIRECTIVE(L(_FPI))
+
+/* Coefficients of polynomial
+ for sin(x)~=x+x^3*DP_SIN2_0+x^5*DP_SIN2_1, |x|<2^-5. */
+ .p2align 3
+L(DP_SIN2_0):
+ .long 0x5543d49d,0xbfc55555
+ .type L(DP_SIN2_0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SIN2_0))
+
+ .p2align 3
+L(DP_SIN2_1):
+ .long 0x75cec8c5,0x3f8110f4
+ .type L(DP_SIN2_1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SIN2_1))
+
+ .p2align 3
+L(DP_ZERONE):
+ .long 0x00000000,0x00000000 /* 0.0 */
+ .long 0x00000000,0xbff00000 /* 1.0 */
+ .type L(DP_ZERONE), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+
+ .p2align 3
+L(DP_ONES):
+ .long 0x00000000,0x3ff00000 /* +1.0 */
+ .long 0x00000000,0xbff00000 /* -1.0 */
+ .type L(DP_ONES), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ONES))
+
+/* Coefficients of polynomial
+ for sin(t)~=t+t^3*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_S3):
+ .long 0x64e6b5b4,0x3ec71d72
+ .type L(DP_S3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S3))
+
+ .p2align 3
+L(DP_S1):
+ .long 0x10c2688b,0x3f811111
+ .type L(DP_S1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S1))
+
+ .p2align 3
+L(DP_S4):
+ .long 0x1674b58a,0xbe5a947e
+ .type L(DP_S4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S4))
+
+ .p2align 3
+L(DP_S2):
+ .long 0x8b4bd1f9,0xbf2a019f
+ .type L(DP_S2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S2))
+
+ .p2align 3
+L(DP_S0):
+ .long 0x55551cd9,0xbfc55555
+ .type L(DP_S0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S0))
+
+ .p2align 3
+L(DP_SMALL):
+ .long 0x00000000,0x3cd00000 /* 2^(-50) */
+ .type L(DP_SMALL), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SMALL))
+
+/* Coefficients of polynomial
+ for cos(t)~=1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_C3):
+ .long 0x9ac43cc0,0x3efa00eb
+ .type L(DP_C3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C3))
+
+ .p2align 3
+L(DP_C1):
+ .long 0x545c50c7,0x3fa55555
+ .type L(DP_C1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C1))
+
+ .p2align 3
+L(DP_C4):
+ .long 0xdd8844d7,0xbe923c97
+ .type L(DP_C4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C4))
+
+ .p2align 3
+L(DP_C2):
+ .long 0x348b6874,0xbf56c16b
+ .type L(DP_C2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C2))
+
+ .p2align 3
+L(DP_C0):
+ .long 0xfffe98ae,0xbfdfffff
+ .type L(DP_C0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C0))
+
+ .p2align 3
+L(DP_PIO4):
+ .long 0x54442d18,0x3fe921fb /* Pi/4 */
+ .type L(DP_PIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+
+ .p2align 3
+L(DP_2POW52):
+ .long 0x00000000,0x43300000 /* +2^52 */
+ .long 0x00000000,0xc3300000 /* -2^52 */
+ .type L(DP_2POW52), @object
+ ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+
+ .p2align 3
+L(DP_INVPIO4):
+ .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+ .type L(DP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+
+ .p2align 3
+L(DP_PIO4HI):
+ .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+ .type L(DP_PIO4HI), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+
+ .p2align 3
+L(DP_PIO4LO):
+ .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+ .type L(DP_PIO4LO), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+
+ .p2align 2
+L(SP_INVPIO4):
+ .long 0x3fa2f983 /* 4/Pi */
+ .type L(SP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+
+ .p2align 4
+L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+ .long 0xffffffff,0x7fffffff
+ .long 0xffffffff,0x7fffffff
+ .type L(DP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+
+ .p2align 3
+L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+ .long 0x00000000,0xffffffff
+ .type L(DP_HI_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+
+weak_alias (__sinf, sinf)
diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sinf.c b/sysdeps/i386/i686/fpu/multiarch/s_sinf.c
new file mode 100644
index 0000000000..80b2fd6875
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/multiarch/s_sinf.c
@@ -0,0 +1,28 @@
+/* Multiple versions of sinf
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <init-arch.h>
+
+extern float __sinf_sse2 (float);
+extern float __sinf_ia32 (float);
+float __sinf (float);
+
+libm_ifunc (__sinf, HAS_SSE2 ? __sinf_sse2 : __sinf_ia32);
+weak_alias (__sinf, sinf);
+#define SINF __sinf_ia32
+#include <sysdeps/ieee754/flt-32/s_sinf.c>
diff --git a/sysdeps/i386/i686/multiarch/bcopy.S b/sysdeps/i386/i686/multiarch/bcopy.S
index 9db3424688..b0744daf73 100644
--- a/sysdeps/i386/i686/multiarch/bcopy.S
+++ b/sysdeps/i386/i686/multiarch/bcopy.S
@@ -1,4 +1,5 @@
/* Multiple versions of bcopy
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -67,6 +68,8 @@ END(bcopy)
# define ENTRY(name) \
.type __bcopy_ia32, @function; \
.p2align 4; \
+ .globl __bcopy_ia32; \
+ .hidden __bcopy_ia32; \
__bcopy_ia32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/bzero.S b/sysdeps/i386/i686/multiarch/bzero.S
index 86db169a81..150c24c04f 100644
--- a/sysdeps/i386/i686/multiarch/bzero.S
+++ b/sysdeps/i386/i686/multiarch/bzero.S
@@ -1,4 +1,5 @@
/* Multiple versions of bzero
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -67,6 +68,8 @@ END(__bzero)
# define ENTRY(name) \
.type __bzero_ia32, @function; \
.p2align 4; \
+ .globl __bzero_ia32; \
+ .hidden __bzero_ia32; \
__bzero_ia32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/ifunc-impl-list.c b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c
new file mode 100644
index 0000000000..005c286df5
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/ifunc-impl-list.c
@@ -0,0 +1,326 @@
+/* Enumerate available IFUNC implementations of a function. i686 version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include <string.h>
+#include <wchar.h>
+#include <ifunc-impl-list.h>
+#include "init-arch.h"
+
+/* Maximum number of IFUNC implementations. */
+#define MAX_IFUNC 3
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+ NAME and return the number of valid entries. */
+
+size_t
+__libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
+ size_t max)
+{
+ assert (max >= MAX_IFUNC);
+
+ size_t i = 0;
+
+ /* Support sysdeps/i386/i686/multiarch/bcopy.S. */
+ IFUNC_IMPL (i, name, bcopy,
+ IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSSE3,
+ __bcopy_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, bcopy, HAS_SSSE3, __bcopy_ssse3)
+ IFUNC_IMPL_ADD (array, i, bcopy, 1, __bcopy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/bzero.S. */
+ IFUNC_IMPL (i, name, bzero,
+ IFUNC_IMPL_ADD (array, i, bzero, HAS_SSE2, __bzero_sse2_rep)
+ IFUNC_IMPL_ADD (array, i, bzero, HAS_SSE2, __bzero_sse2)
+ IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memchr.S. */
+ IFUNC_IMPL (i, name, memchr,
+ IFUNC_IMPL_ADD (array, i, memchr, HAS_SSE2,
+ __memchr_sse2_bsf)
+ IFUNC_IMPL_ADD (array, i, memchr, HAS_SSE2, __memchr_sse2)
+ IFUNC_IMPL_ADD (array, i, memchr, 1, __memchr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memcmp.S. */
+ IFUNC_IMPL (i, name, memcmp,
+ IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSE4_2,
+ __memcmp_sse4_2)
+ IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSSE3, __memcmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memmove_chk.S. */
+ IFUNC_IMPL (i, name, __memmove_chk,
+ IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3,
+ __memmove_chk_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3,
+ __memmove_chk_ssse3)
+ IFUNC_IMPL_ADD (array, i, __memmove_chk, 1,
+ __memmove_chk_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memmove.S. */
+ IFUNC_IMPL (i, name, memmove,
+ IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3,
+ __memmove_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3,
+ __memmove_ssse3)
+ IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memrchr.S. */
+ IFUNC_IMPL (i, name, memrchr,
+ IFUNC_IMPL_ADD (array, i, memrchr, HAS_SSE2,
+ __memrchr_sse2_bsf)
+ IFUNC_IMPL_ADD (array, i, memrchr, HAS_SSE2, __memrchr_sse2)
+ IFUNC_IMPL_ADD (array, i, memrchr, 1, __memrchr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memset_chk.S. */
+ IFUNC_IMPL (i, name, __memset_chk,
+ IFUNC_IMPL_ADD (array, i, __memset_chk, HAS_SSE2,
+ __memset_chk_sse2_rep)
+ IFUNC_IMPL_ADD (array, i, __memset_chk, HAS_SSE2,
+ __memset_chk_sse2)
+ IFUNC_IMPL_ADD (array, i, __memset_chk, 1,
+ __memset_chk_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memset.S. */
+ IFUNC_IMPL (i, name, memset,
+ IFUNC_IMPL_ADD (array, i, memset, HAS_SSE2,
+ __memset_sse2_rep)
+ IFUNC_IMPL_ADD (array, i, memset, HAS_SSE2, __memset_sse2)
+ IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/rawmemchr.S. */
+ IFUNC_IMPL (i, name, rawmemchr,
+ IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE2,
+ __rawmemchr_sse2_bsf)
+ IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE2,
+ __rawmemchr_sse2)
+ IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/stpncpy.S. */
+ IFUNC_IMPL (i, name, stpncpy,
+ IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSSE3,
+ __stpncpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSE2, __stpncpy_sse2)
+ IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/stpcpy.S. */
+ IFUNC_IMPL (i, name, stpcpy,
+ IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSSE3, __stpcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSE2, __stpcpy_sse2)
+ IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcasecmp.S. */
+ IFUNC_IMPL (i, name, strcasecmp,
+ IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSE4_2,
+ __strcasecmp_sse4_2)
+ IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSSE3,
+ __strcasecmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcasecmp_l.S. */
+ IFUNC_IMPL (i, name, strcasecmp_l,
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSE4_2,
+ __strcasecmp_l_sse4_2)
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSSE3,
+ __strcasecmp_l_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1,
+ __strcasecmp_l_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcasestr.c. */
+ IFUNC_IMPL (i, name, strcasestr,
+ IFUNC_IMPL_ADD (array, i, strcasestr, HAS_SSE4_2,
+ __strcasestr_sse42)
+ IFUNC_IMPL_ADD (array, i, strcasestr, 1, __strcasestr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcat.S. */
+ IFUNC_IMPL (i, name, strcat,
+ IFUNC_IMPL_ADD (array, i, strcat, HAS_SSSE3, __strcat_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcat, HAS_SSE2, __strcat_sse2)
+ IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strchr.S. */
+ IFUNC_IMPL (i, name, strchr,
+ IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE2,
+ __strchr_sse2_bsf)
+ IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE2, __strchr_sse2)
+ IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcmp.S. */
+ IFUNC_IMPL (i, name, strcmp,
+ IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSE4_2,
+ __strcmp_sse4_2)
+ IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSSE3, __strcmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcmp, 1, __strcmp_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcpy.S. */
+ IFUNC_IMPL (i, name, strcpy,
+ IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSSE3, __strcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSE2, __strcpy_sse2)
+ IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strcspn.S. */
+ IFUNC_IMPL (i, name, strcspn,
+ IFUNC_IMPL_ADD (array, i, strcspn, HAS_SSE4_2,
+ __strcspn_sse42)
+ IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strncase.S. */
+ IFUNC_IMPL (i, name, strncasecmp,
+ IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSE4_2,
+ __strncasecmp_sse4_2)
+ IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSSE3,
+ __strncasecmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncasecmp, 1,
+ __strncasecmp_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strncase_l.S. */
+ IFUNC_IMPL (i, name, strncasecmp_l,
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l,
+ HAS_SSE4_2, __strncasecmp_l_sse4_2)
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l,
+ HAS_SSSE3, __strncasecmp_l_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1,
+ __strncasecmp_l_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strncat.S. */
+ IFUNC_IMPL (i, name, strncat,
+ IFUNC_IMPL_ADD (array, i, strncat, HAS_SSSE3,
+ __strncat_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncat, HAS_SSE2, __strncat_sse2)
+ IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strncpy.S. */
+ IFUNC_IMPL (i, name, strncpy,
+ IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSSE3,
+ __strncpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSE2, __strncpy_sse2)
+ IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strnlen.S. */
+ IFUNC_IMPL (i, name, strnlen,
+ IFUNC_IMPL_ADD (array, i, strnlen, HAS_SSE2, __strnlen_sse2)
+ IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strpbrk.S. */
+ IFUNC_IMPL (i, name, strpbrk,
+ IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2,
+ __strpbrk_sse42)
+ IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strrchr.S. */
+ IFUNC_IMPL (i, name, strrchr,
+ IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE2,
+ __strrchr_sse2_bsf)
+ IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE2, __strrchr_sse2)
+ IFUNC_IMPL_ADD (array, i, strrchr, 1, __strrchr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strspn.S. */
+ IFUNC_IMPL (i, name, strspn,
+ IFUNC_IMPL_ADD (array, i, strspn, HAS_SSE4_2, __strspn_sse42)
+ IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strstr-c.c. */
+ IFUNC_IMPL (i, name, strstr,
+ IFUNC_IMPL_ADD (array, i, strstr, HAS_SSE4_2, __strstr_sse42)
+ IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/wcschr.S. */
+ IFUNC_IMPL (i, name, wcschr,
+ IFUNC_IMPL_ADD (array, i, wcschr, HAS_SSE2, __wcschr_sse2)
+ IFUNC_IMPL_ADD (array, i, wcschr, 1, __wcschr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/wcscmp.S. */
+ IFUNC_IMPL (i, name, wcscmp,
+ IFUNC_IMPL_ADD (array, i, wcscmp, HAS_SSE2, __wcscmp_sse2)
+ IFUNC_IMPL_ADD (array, i, wcscmp, 1, __wcscmp_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/wcscpy.S. */
+ IFUNC_IMPL (i, name, wcscpy,
+ IFUNC_IMPL_ADD (array, i, wcscpy, HAS_SSSE3, __wcscpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/wcslen.S. */
+ IFUNC_IMPL (i, name, wcslen,
+ IFUNC_IMPL_ADD (array, i, wcslen, HAS_SSE2, __wcslen_sse2)
+ IFUNC_IMPL_ADD (array, i, wcslen, 1, __wcslen_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/wcsrchr.S. */
+ IFUNC_IMPL (i, name, wcsrchr,
+ IFUNC_IMPL_ADD (array, i, wcsrchr, HAS_SSE2, __wcsrchr_sse2)
+ IFUNC_IMPL_ADD (array, i, wcsrchr, 1, __wcsrchr_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/wmemcmp.S. */
+ IFUNC_IMPL (i, name, wmemcmp,
+ IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSE4_2,
+ __wmemcmp_sse4_2)
+ IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSSE3,
+ __wmemcmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_ia32))
+
+#ifdef SHARED
+ /* Support sysdeps/i386/i686/multiarch/memcpy_chk.S. */
+ IFUNC_IMPL (i, name, __memcpy_chk,
+ IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3,
+ __memcpy_chk_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3,
+ __memcpy_chk_ssse3)
+ IFUNC_IMPL_ADD (array, i, __memcpy_chk, 1,
+ __memcpy_chk_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/memcpy.S. */
+ IFUNC_IMPL (i, name, memcpy,
+ IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3,
+ __memcpy_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3, __memcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/mempcpy_chk.S. */
+ IFUNC_IMPL (i, name, __mempcpy_chk,
+ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3,
+ __mempcpy_chk_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3,
+ __mempcpy_chk_ssse3)
+ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, 1,
+ __mempcpy_chk_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/mempcpy.S. */
+ IFUNC_IMPL (i, name, mempcpy,
+ IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3,
+ __mempcpy_ssse3_rep)
+ IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3,
+ __mempcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strlen.S. */
+ IFUNC_IMPL (i, name, strlen,
+ IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE2,
+ __strlen_sse2_bsf)
+ IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE2, __strlen_sse2)
+ IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_ia32))
+
+ /* Support sysdeps/i386/i686/multiarch/strncmp.S. */
+ IFUNC_IMPL (i, name, strncmp,
+ IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSE4_2,
+ __strncmp_sse4_2)
+ IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSSE3,
+ __strncmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncmp, 1, __strncmp_ia32))
+#endif
+
+ return i;
+}
diff --git a/sysdeps/i386/i686/multiarch/memchr.S b/sysdeps/i386/i686/multiarch/memchr.S
index 2cf45426a6..8b0344b961 100644
--- a/sysdeps/i386/i686/multiarch/memchr.S
+++ b/sysdeps/i386/i686/multiarch/memchr.S
@@ -1,4 +1,5 @@
/* Multiple versions of memchr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/memcmp.S b/sysdeps/i386/i686/multiarch/memcmp.S
index d8076b9276..7b9c1c4d1c 100644
--- a/sysdeps/i386/i686/multiarch/memcmp.S
+++ b/sysdeps/i386/i686/multiarch/memcmp.S
@@ -1,4 +1,5 @@
/* Multiple versions of memcmp
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -67,6 +68,8 @@ END(memcmp)
# define ENTRY(name) \
.type __memcmp_ia32, @function; \
.p2align 4; \
+ .globl __memcmp_ia32; \
+ .hidden __memcmp_ia32; \
__memcmp_ia32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/memcpy.S b/sysdeps/i386/i686/multiarch/memcpy.S
index 558c04ff3d..0d4a101b9a 100644
--- a/sysdeps/i386/i686/multiarch/memcpy.S
+++ b/sysdeps/i386/i686/multiarch/memcpy.S
@@ -1,4 +1,5 @@
/* Multiple versions of memcpy
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -51,6 +52,8 @@ END(memcpy)
# define ENTRY(name) \
.type __memcpy_ia32, @function; \
.p2align 4; \
+ .globl __memcpy_ia32; \
+ .hidden __memcpy_ia32; \
__memcpy_ia32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/memcpy_chk.S b/sysdeps/i386/i686/multiarch/memcpy_chk.S
index 40deada687..d9d7e1f956 100644
--- a/sysdeps/i386/i686/multiarch/memcpy_chk.S
+++ b/sysdeps/i386/i686/multiarch/memcpy_chk.S
@@ -1,4 +1,5 @@
/* Multiple versions of __memcpy_chk
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/memmove.S b/sysdeps/i386/i686/multiarch/memmove.S
index b8892c065e..b692f47f7c 100644
--- a/sysdeps/i386/i686/multiarch/memmove.S
+++ b/sysdeps/i386/i686/multiarch/memmove.S
@@ -1,4 +1,5 @@
/* Multiple versions of memmove
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -50,6 +51,8 @@ END(memmove)
# define ENTRY(name) \
.type __memmove_ia32, @function; \
.p2align 4; \
+ .globl __memmove_ia32; \
+ .hidden __memmove_ia32; \
__memmove_ia32: cfi_startproc; \
CALL_MCOUNT
# else
diff --git a/sysdeps/i386/i686/multiarch/memmove_chk.S b/sysdeps/i386/i686/multiarch/memmove_chk.S
index 8139cd96bb..20dc3e3a8a 100644
--- a/sysdeps/i386/i686/multiarch/memmove_chk.S
+++ b/sysdeps/i386/i686/multiarch/memmove_chk.S
@@ -1,4 +1,5 @@
/* Multiple versions of __memmove_chk
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/mempcpy.S b/sysdeps/i386/i686/multiarch/mempcpy.S
index 95bda46353..500e6e72e9 100644
--- a/sysdeps/i386/i686/multiarch/mempcpy.S
+++ b/sysdeps/i386/i686/multiarch/mempcpy.S
@@ -1,4 +1,5 @@
/* Multiple versions of mempcpy
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -51,6 +52,8 @@ END(__mempcpy)
# define ENTRY(name) \
.type __mempcpy_ia32, @function; \
.p2align 4; \
+ .globl __mempcpy_ia32; \
+ .hidden __mempcpy_ia32; \
__mempcpy_ia32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/mempcpy_chk.S b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
index e491f94291..12f34532aa 100644
--- a/sysdeps/i386/i686/multiarch/mempcpy_chk.S
+++ b/sysdeps/i386/i686/multiarch/mempcpy_chk.S
@@ -1,4 +1,5 @@
/* Multiple versions of __mempcpy_chk
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/memrchr.S b/sysdeps/i386/i686/multiarch/memrchr.S
index 762489d770..f94862b3ea 100644
--- a/sysdeps/i386/i686/multiarch/memrchr.S
+++ b/sysdeps/i386/i686/multiarch/memrchr.S
@@ -1,4 +1,5 @@
/* Multiple versions of memrchr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/memset.S b/sysdeps/i386/i686/multiarch/memset.S
index 8878340244..65745d4a2f 100644
--- a/sysdeps/i386/i686/multiarch/memset.S
+++ b/sysdeps/i386/i686/multiarch/memset.S
@@ -1,4 +1,5 @@
/* Multiple versions of memset
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/memset_chk.S b/sysdeps/i386/i686/multiarch/memset_chk.S
index 02649df192..d499b8c527 100644
--- a/sysdeps/i386/i686/multiarch/memset_chk.S
+++ b/sysdeps/i386/i686/multiarch/memset_chk.S
@@ -1,4 +1,5 @@
/* Multiple versions of __memset_chk
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/rawmemchr.S b/sysdeps/i386/i686/multiarch/rawmemchr.S
index 5bea20bdc8..f2af368f25 100644
--- a/sysdeps/i386/i686/multiarch/rawmemchr.S
+++ b/sysdeps/i386/i686/multiarch/rawmemchr.S
@@ -1,4 +1,5 @@
/* Multiple versions of rawmemchr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/stpcpy.S b/sysdeps/i386/i686/multiarch/stpcpy.S
index b63d308edc..ee81ab6ae3 100644
--- a/sysdeps/i386/i686/multiarch/stpcpy.S
+++ b/sysdeps/i386/i686/multiarch/stpcpy.S
@@ -1,3 +1,5 @@
+/* Multiple versions of stpcpy
+ All versions must be listed in ifunc-impl-list.c. */
#define USE_AS_STPCPY
#define STRCPY __stpcpy
#include "strcpy.S"
diff --git a/sysdeps/i386/i686/multiarch/stpncpy.S b/sysdeps/i386/i686/multiarch/stpncpy.S
index ff89a89491..2698ca6a8c 100644
--- a/sysdeps/i386/i686/multiarch/stpncpy.S
+++ b/sysdeps/i386/i686/multiarch/stpncpy.S
@@ -1,3 +1,5 @@
+/* Multiple versions of stpncpy
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCPY __stpncpy
#define USE_AS_STPCPY
#define USE_AS_STRNCPY
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp.S b/sysdeps/i386/i686/multiarch/strcasecmp.S
index fbd2de3985..cf83e6e97e 100644
--- a/sysdeps/i386/i686/multiarch/strcasecmp.S
+++ b/sysdeps/i386/i686/multiarch/strcasecmp.S
@@ -1,4 +1,5 @@
/* Entry point for multi-version x86 strcasecmp.
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l.S b/sysdeps/i386/i686/multiarch/strcasecmp_l.S
index 1322bd86da..711c09b0dc 100644
--- a/sysdeps/i386/i686/multiarch/strcasecmp_l.S
+++ b/sysdeps/i386/i686/multiarch/strcasecmp_l.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strcasecmp_l
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCMP __strcasecmp_l
#define USE_AS_STRCASECMP_L
#include "strcmp.S"
diff --git a/sysdeps/i386/i686/multiarch/strcasestr-c.c b/sysdeps/i386/i686/multiarch/strcasestr-c.c
index 0d52b0e47a..c1d6dac1dd 100644
--- a/sysdeps/i386/i686/multiarch/strcasestr-c.c
+++ b/sysdeps/i386/i686/multiarch/strcasestr-c.c
@@ -1,2 +1,4 @@
+/* Multiple versions of strcasestr
+ All versions must be listed in ifunc-impl-list.c. */
#define __strcasestr_sse2 __strcasestr_ia32
#include <sysdeps/x86_64/multiarch/strcasestr-c.c>
diff --git a/sysdeps/i386/i686/multiarch/strcat.S b/sysdeps/i386/i686/multiarch/strcat.S
index e68fecafb3..a7d322421c 100644
--- a/sysdeps/i386/i686/multiarch/strcat.S
+++ b/sysdeps/i386/i686/multiarch/strcat.S
@@ -1,4 +1,5 @@
/* Multiple versions of strcat
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -94,6 +95,8 @@ END(STRCAT)
# define ENTRY(name) \
.type STRCAT_IA32, @function; \
.align 16; \
+ .globl STRCAT_IA32; \
+ .hidden STRCAT_IA32; \
STRCAT_IA32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/strchr.S b/sysdeps/i386/i686/multiarch/strchr.S
index e236d607c9..c6205daf51 100644
--- a/sysdeps/i386/i686/multiarch/strchr.S
+++ b/sysdeps/i386/i686/multiarch/strchr.S
@@ -1,4 +1,5 @@
/* Multiple versions of strchr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
index 5e6321e539..9735ad00ca 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
@@ -2445,7 +2445,7 @@ L(less16bytes_sncmp):
# endif
jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
cmp $1, REM
je L(eq_sncmp)
diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S
index b3b9eb87bc..76ac1f8ebc 100644
--- a/sysdeps/i386/i686/multiarch/strcmp.S
+++ b/sysdeps/i386/i686/multiarch/strcmp.S
@@ -1,4 +1,5 @@
/* Multiple versions of strcmp
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -95,6 +96,8 @@ END(STRCMP)
# define ENTRY(name) \
.type __STRCMP_IA32, @function; \
.p2align 4; \
+ .globl __STRCMP_IA32; \
+ .hidden __STRCMP_IA32; \
__STRCMP_IA32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/strcpy.S b/sysdeps/i386/i686/multiarch/strcpy.S
index 71eee768ac..44fa6d218f 100644
--- a/sysdeps/i386/i686/multiarch/strcpy.S
+++ b/sysdeps/i386/i686/multiarch/strcpy.S
@@ -1,4 +1,5 @@
/* Multiple versions of strcpy
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -110,6 +111,8 @@ END(STRCPY)
# define ENTRY(name) \
.type STRCPY_IA32, @function; \
.align 16; \
+ .globl STRCPY_IA32; \
+ .hidden STRCPY_IA32; \
STRCPY_IA32: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/i386/i686/multiarch/strcspn.S b/sysdeps/i386/i686/multiarch/strcspn.S
index 8a00a020aa..84954306ab 100644
--- a/sysdeps/i386/i686/multiarch/strcspn.S
+++ b/sysdeps/i386/i686/multiarch/strcspn.S
@@ -1,4 +1,5 @@
/* Multiple versions of strcspn
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2009, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strlen.S b/sysdeps/i386/i686/multiarch/strlen.S
index 310765cb05..c1d8b6c323 100644
--- a/sysdeps/i386/i686/multiarch/strlen.S
+++ b/sysdeps/i386/i686/multiarch/strlen.S
@@ -1,4 +1,5 @@
/* Multiple versions of strlen
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strncase.S b/sysdeps/i386/i686/multiarch/strncase.S
index 37fccb85e6..ca5f863195 100644
--- a/sysdeps/i386/i686/multiarch/strncase.S
+++ b/sysdeps/i386/i686/multiarch/strncase.S
@@ -1,4 +1,5 @@
/* Entry point for multi-version x86 strncasecmp.
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strncase_l.S b/sysdeps/i386/i686/multiarch/strncase_l.S
index a808c8cd71..8a74ee8574 100644
--- a/sysdeps/i386/i686/multiarch/strncase_l.S
+++ b/sysdeps/i386/i686/multiarch/strncase_l.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncasecmp_l
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCMP __strncasecmp_l
#define USE_AS_STRNCASECMP_L
#include "strcmp.S"
diff --git a/sysdeps/i386/i686/multiarch/strncat.S b/sysdeps/i386/i686/multiarch/strncat.S
index fd569c2234..5c1bf41453 100644
--- a/sysdeps/i386/i686/multiarch/strncat.S
+++ b/sysdeps/i386/i686/multiarch/strncat.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncat
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCAT strncat
#define USE_AS_STRNCAT
#include "strcat.S"
diff --git a/sysdeps/i386/i686/multiarch/strncmp.S b/sysdeps/i386/i686/multiarch/strncmp.S
index b6814315fb..150d4786d2 100644
--- a/sysdeps/i386/i686/multiarch/strncmp.S
+++ b/sysdeps/i386/i686/multiarch/strncmp.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncmp
+ All versions must be listed in ifunc-impl-list.c. */
#define USE_AS_STRNCMP
#define STRCMP strncmp
#include "strcmp.S"
diff --git a/sysdeps/i386/i686/multiarch/strncpy.S b/sysdeps/i386/i686/multiarch/strncpy.S
index 30a5bd2f9d..9c257efc6e 100644
--- a/sysdeps/i386/i686/multiarch/strncpy.S
+++ b/sysdeps/i386/i686/multiarch/strncpy.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncpy
+ All versions must be listed in ifunc-impl-list.c. */
#define USE_AS_STRNCPY
#define STRCPY strncpy
#include "strcpy.S"
diff --git a/sysdeps/i386/i686/multiarch/strnlen.S b/sysdeps/i386/i686/multiarch/strnlen.S
index 44ad0b357e..b82052e969 100644
--- a/sysdeps/i386/i686/multiarch/strnlen.S
+++ b/sysdeps/i386/i686/multiarch/strnlen.S
@@ -1,4 +1,5 @@
/* Multiple versions of strnlen
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strpbrk.S b/sysdeps/i386/i686/multiarch/strpbrk.S
index ed5bca6a94..7201d6376f 100644
--- a/sysdeps/i386/i686/multiarch/strpbrk.S
+++ b/sysdeps/i386/i686/multiarch/strpbrk.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strpbrk
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCSPN strpbrk
#define USE_AS_STRPBRK
#include "strcspn.S"
diff --git a/sysdeps/i386/i686/multiarch/strrchr.S b/sysdeps/i386/i686/multiarch/strrchr.S
index f851b7781e..37468f1248 100644
--- a/sysdeps/i386/i686/multiarch/strrchr.S
+++ b/sysdeps/i386/i686/multiarch/strrchr.S
@@ -1,4 +1,5 @@
/* Multiple versions of strrchr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strspn.S b/sysdeps/i386/i686/multiarch/strspn.S
index 8170f9cb8d..f90df63ef8 100644
--- a/sysdeps/i386/i686/multiarch/strspn.S
+++ b/sysdeps/i386/i686/multiarch/strspn.S
@@ -1,4 +1,5 @@
/* Multiple versions of strspn
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2009,2010,2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/strstr-c.c b/sysdeps/i386/i686/multiarch/strstr-c.c
index 1fcb00edac..7516c7ffee 100644
--- a/sysdeps/i386/i686/multiarch/strstr-c.c
+++ b/sysdeps/i386/i686/multiarch/strstr-c.c
@@ -1,3 +1,6 @@
+/* Multiple versions of strstr
+ All versions must be listed in ifunc-impl-list.c. */
+
#include "init-arch.h"
#define STRSTR __strstr_ia32
@@ -7,9 +10,20 @@
__hidden_ver1 (__strstr_ia32, __GI_strstr, __strstr_ia32);
#endif
+/* Redefine strstr so that the compiler won't complain about the type
+ mismatch with the IFUNC selector in strong_alias, below. */
+#undef strstr
+#define strstr __redirect_strstr
+
#include "string/strstr.c"
-extern char *__strstr_sse42 (const char *, const char *) attribute_hidden;
-extern __typeof (__strstr_ia32) __strstr_ia32 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_ia32 attribute_hidden;
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+ ifunc symbol properly. */
+extern __typeof (__redirect_strstr) __libc_strstr;
+libc_ifunc (__libc_strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_ia32)
-libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_ia32);
+#undef strstr
+strong_alias (__libc_strstr, strstr)
diff --git a/sysdeps/i386/i686/multiarch/wcschr.S b/sysdeps/i386/i686/multiarch/wcschr.S
index 34ea47df66..03fe3ca367 100644
--- a/sysdeps/i386/i686/multiarch/wcschr.S
+++ b/sysdeps/i386/i686/multiarch/wcschr.S
@@ -1,4 +1,5 @@
/* Multiple versions of wcschr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/wcscmp.S b/sysdeps/i386/i686/multiarch/wcscmp.S
index d458476011..e23ba05ac9 100644
--- a/sysdeps/i386/i686/multiarch/wcscmp.S
+++ b/sysdeps/i386/i686/multiarch/wcscmp.S
@@ -1,4 +1,5 @@
/* Multiple versions of wcscmp
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/wcscpy.S b/sysdeps/i386/i686/multiarch/wcscpy.S
index 8c3ba1d28b..6eea48a667 100644
--- a/sysdeps/i386/i686/multiarch/wcscpy.S
+++ b/sysdeps/i386/i686/multiarch/wcscpy.S
@@ -1,4 +1,5 @@
/* Multiple versions of wcscpy
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/wcslen.S b/sysdeps/i386/i686/multiarch/wcslen.S
index f8b2fab901..cdae51693d 100644
--- a/sysdeps/i386/i686/multiarch/wcslen.S
+++ b/sysdeps/i386/i686/multiarch/wcslen.S
@@ -1,4 +1,5 @@
/* Multiple versions of wcslen
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr.S b/sysdeps/i386/i686/multiarch/wcsrchr.S
index ec550b0825..f4b0618c26 100644
--- a/sysdeps/i386/i686/multiarch/wcsrchr.S
+++ b/sysdeps/i386/i686/multiarch/wcsrchr.S
@@ -1,4 +1,5 @@
/* Multiple versions of wcsrchr
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp.S b/sysdeps/i386/i686/multiarch/wmemcmp.S
index 61d55cd2f3..7c485f7312 100644
--- a/sysdeps/i386/i686/multiarch/wmemcmp.S
+++ b/sysdeps/i386/i686/multiarch/wmemcmp.S
@@ -1,4 +1,5 @@
/* Multiple versions of wmemcmp
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i686/strtok.S b/sysdeps/i386/i686/strtok.S
index 92d52556dc..5589ae5360 100644
--- a/sysdeps/i386/i686/strtok.S
+++ b/sysdeps/i386/i686/strtok.S
@@ -1,6 +1,6 @@
/* strtok (str, delim) -- Return next DELIM separated token from STR.
For Intel 80686.
- Copyright (C) 1998, 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -43,7 +43,7 @@
#else
.bss
.local save_ptr
- ASM_TYPE_DIRECTIVE (save_ptr, @object)
+ .type save_ptr, @object
.size save_ptr, 4
save_ptr:
# if __BOUNDED_POINTERS__
diff --git a/sysdeps/i386/init-first.c b/sysdeps/i386/init-first.c
deleted file mode 100644
index edea7f2697..0000000000
--- a/sysdeps/i386/init-first.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Initialization code run first thing by the ELF startup code. For i386/Unix.
- Copyright (C) 1995-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <ctype.h>
-#include <unistd.h>
-
-extern void __libc_init (int, char **, char **);
-#ifdef USE_NONOPTION_FLAGS
-extern void __getopt_clean_environment (char **);
-#endif
-extern void __libc_global_ctors (void);
-
-int __libc_multiple_libcs attribute_hidden = 1;
-
-static void
-init (int *data)
-{
- int argc = *data;
- char **argv = (void *) (data + 1);
- char **envp = &argv[argc + 1];
-
- __environ = envp;
- __libc_init (argc, argv, envp);
-
-#ifdef USE_NONOPTION_FLAGS
- /* This is a hack to make the special getopt in GNU libc working. */
- __getopt_clean_environment (envp);
-#endif
-
- /* Initialize ctype data. */
- __ctype_init ();
-}
-
-#ifdef SHARED
-/* This function is called to initialize the shared C library.
- It is called just before the user _start code from i386/start.S,
- with the stack set up as that code gets it. */
-
-/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
- pointer in the dynamic section based solely on that. It is convention
- for this function to be in the `.init' section, but the symbol name is
- the only thing that really matters!! */
-/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
-
-void
-_init (int argc, ...)
-{
- init (&argc);
-
-#ifndef NO_CTORS_DTORS_SECTIONS
- __libc_global_ctors ();
-#endif
-}
-#endif
-
-
-void
-__libc_init_first (int argc __attribute__ ((unused)), ...)
-{
-#ifndef SHARED
- init (&argc);
-#endif
-}
diff --git a/sysdeps/i386/strtok.S b/sysdeps/i386/strtok.S
index e936fc19f1..3b222aff3d 100644
--- a/sysdeps/i386/strtok.S
+++ b/sysdeps/i386/strtok.S
@@ -1,6 +1,6 @@
/* strtok (str, delim) -- Return next DELIM separated token from STR.
For Intel 80x86, x>=3.
- Copyright (C) 1996-1998,2000,2001,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -43,7 +43,7 @@
#else
.bss
.local save_ptr
- ASM_TYPE_DIRECTIVE (save_ptr, @object)
+ .type save_ptr, @object
.size save_ptr, 4
save_ptr:
# if __BOUNDED_POINTERS__
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index 01e6817919..4ea7202fd4 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -50,8 +50,6 @@
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
@@ -61,12 +59,9 @@
incomplete stabs information. Fake some entries here which specify
the current source file. */
#define ENTRY(name) \
- STABS_CURRENT_FILE1("") \
- STABS_CURRENT_FILE(name) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(4); \
- STABS_FUN(name) \
C_LABEL(name) \
cfi_startproc; \
CALL_MCOUNT
@@ -74,35 +69,11 @@
#undef END
#define END(name) \
cfi_endproc; \
- ASM_SIZE_DIRECTIVE(name) \
- STABS_FUN_END(name)
+ ASM_SIZE_DIRECTIVE(name)
#define ENTRY_CHK(name) ENTRY (name)
#define END_CHK(name) END (name)
-#ifdef HAVE_CPP_ASM_DEBUGINFO
-/* Disable that goop, because we just pass -g through to the assembler
- and it generates proper line number information directly. */
-# define STABS_CURRENT_FILE1(name)
-# define STABS_CURRENT_FILE(name)
-# define STABS_FUN(name)
-# define STABS_FUN_END(name)
-#else
-/* Remove the following two lines once the gdb bug is fixed. */
-#define STABS_CURRENT_FILE(name) \
- STABS_CURRENT_FILE1 (#name)
-#define STABS_CURRENT_FILE1(name) \
- 1: .stabs name,100,0,0,1b;
-/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
- the same way gcc does it. */
-#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1))
-#define STABS_FUN2(name, namestr) \
- .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
- .stabs #namestr,36,0,0,name;
-#define STABS_FUN_END(name) \
- 1: .stabs "",36,0,0,1b-name;
-#endif
-
/* If compiled for profiling, call `mcount' at the start of each function. */
#ifdef PROF
/* The mcount code relies on a normal frame pointer being on the stack
diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c
index ce3bd36fac..155a773e36 100644
--- a/sysdeps/ieee754/dbl-64/s_fma.c
+++ b/sysdeps/ieee754/dbl-64/s_fma.c
@@ -22,6 +22,7 @@
#include <fenv.h>
#include <ieee754.h>
#include <math_private.h>
+#include <tininess.h>
/* This implementation uses rounding to odd to avoid problems with
double rounding. See a paper by Boldo and Melquiond:
@@ -49,6 +50,11 @@ __fma (double x, double y, double z)
&& u.ieee.exponent != 0x7ff
&& v.ieee.exponent != 0x7ff)
return (z + x) + y;
+ /* If z is zero and x are y are nonzero, compute the result
+ as x * y to avoid the wrong sign of a zero result if x * y
+ underflows to 0. */
+ if (z == 0 && x != 0 && y != 0)
+ return x * y;
/* If x or y or z is Inf/NaN, or if fma will certainly overflow,
or if x * y is less than half of DBL_DENORM_MIN,
compute as x * y + z. */
@@ -128,6 +134,11 @@ __fma (double x, double y, double z)
y = v.d;
z = w.d;
}
+
+ /* Ensure correct sign of exact 0 + 0. */
+ if (__builtin_expect ((x == 0 || y == 0) && z == 0, 0))
+ return x * y + z;
+
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
#define C ((1 << (DBL_MANT_DIG + 1) / 2) + 1)
double x1 = x * C;
@@ -198,22 +209,27 @@ __fma (double x, double y, double z)
for proper rounding. */
if (v.ieee.exponent == 106)
{
- /* v.ieee.mantissa1 & 2 is LSB bit of the result before rounding,
- v.ieee.mantissa1 & 1 is the round bit and j is our sticky
- bit. In round-to-nearest 001 rounds down like 00,
- 011 rounds up, even though 01 rounds down (thus we need
- to adjust), 101 rounds down like 10 and 111 rounds up
- like 11. */
- if ((v.ieee.mantissa1 & 3) == 1)
+ /* If the exponent would be in the normal range when
+ rounding to normal precision with unbounded exponent
+ range, the exact result is known and spurious underflows
+ must be avoided on systems detecting tininess after
+ rounding. */
+ if (TININESS_AFTER_ROUNDING)
{
- v.d *= 0x1p-106;
- if (v.ieee.negative)
- return v.d - 0x1p-1074 /* __DBL_DENORM_MIN__ */;
- else
- return v.d + 0x1p-1074 /* __DBL_DENORM_MIN__ */;
+ w.d = a1 + u.d;
+ if (w.ieee.exponent == 107)
+ return w.d * 0x1p-106;
}
- else
- return v.d * 0x1p-106;
+ /* v.ieee.mantissa1 & 2 is LSB bit of the result before rounding,
+ v.ieee.mantissa1 & 1 is the round bit and j is our sticky
+ bit. */
+ w.d = 0.0;
+ w.ieee.mantissa1 = ((v.ieee.mantissa1 & 3) << 1) | j;
+ w.ieee.negative = v.ieee.negative;
+ v.ieee.mantissa1 &= ~3U;
+ v.d *= 0x1p-106;
+ w.d *= 0x1p-2;
+ return v.d + w.d;
}
v.ieee.mantissa1 |= j;
return v.d * 0x1p-106;
diff --git a/sysdeps/ieee754/dbl-64/s_fmaf.c b/sysdeps/ieee754/dbl-64/s_fmaf.c
index e7a0650f0f..a4f12d9f76 100644
--- a/sysdeps/ieee754/dbl-64/s_fmaf.c
+++ b/sysdeps/ieee754/dbl-64/s_fmaf.c
@@ -32,8 +32,15 @@ float
__fmaf (float x, float y, float z)
{
fenv_t env;
+
/* Multiplication is always exact. */
double temp = (double) x * (double) y;
+
+ /* Ensure correct sign of an exact zero result by performing the
+ addition in the original rounding mode in that case. */
+ if (temp == -z)
+ return (float) temp + z;
+
union ieee754_double u;
libc_feholdexcept_setround (&env, FE_TOWARDZERO);
diff --git a/sysdeps/ieee754/dbl-64/x2y2m1.c b/sysdeps/ieee754/dbl-64/x2y2m1.c
new file mode 100644
index 0000000000..4badde3be4
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/x2y2m1.c
@@ -0,0 +1,111 @@
+/* Compute x^2 + y^2 - 1, without large cancellation error.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <float.h>
+#include <stdlib.h>
+
+/* Calculate X + Y exactly and store the result in *HI + *LO. It is
+ given that |X| >= |Y| and the values are small enough that no
+ overflow occurs. */
+
+static inline void
+add_split (double *hi, double *lo, double x, double y)
+{
+ /* Apply Dekker's algorithm. */
+ *hi = x + y;
+ *lo = (x - *hi) + y;
+}
+
+/* Calculate X * Y exactly and store the result in *HI + *LO. It is
+ given that the values are small enough that no overflow occurs and
+ large enough (or zero) that no underflow occurs. */
+
+static inline void
+mul_split (double *hi, double *lo, double x, double y)
+{
+#ifdef __FP_FAST_FMA
+ /* Fast built-in fused multiply-add. */
+ *hi = x * y;
+ *lo = __builtin_fma (x, y, -*hi);
+#elif defined FP_FAST_FMA
+ /* Fast library fused multiply-add, compiler before GCC 4.6. */
+ *hi = x * y;
+ *lo = __fma (x, y, -*hi);
+#else
+ /* Apply Dekker's algorithm. */
+ *hi = x * y;
+# define C ((1 << (DBL_MANT_DIG + 1) / 2) + 1)
+ double x1 = x * C;
+ double y1 = y * C;
+# undef C
+ x1 = (x - x1) + x1;
+ y1 = (y - y1) + y1;
+ double x2 = x - x1;
+ double y2 = y - y1;
+ *lo = (((x1 * y1 - *hi) + x1 * y2) + x2 * y1) + x2 * y2;
+#endif
+}
+
+/* Compare absolute values of floating-point values pointed to by P
+ and Q for qsort. */
+
+static int
+compare (const void *p, const void *q)
+{
+ double pd = fabs (*(const double *) p);
+ double qd = fabs (*(const double *) q);
+ if (pd < qd)
+ return -1;
+ else if (pd == qd)
+ return 0;
+ else
+ return 1;
+}
+
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+
+double
+__x2y2m1 (double x, double y)
+{
+ double vals[4];
+ SET_RESTORE_ROUND (FE_TONEAREST);
+ mul_split (&vals[1], &vals[0], x, x);
+ mul_split (&vals[3], &vals[2], y, y);
+ if (x >= 0.75)
+ vals[1] -= 1.0;
+ else
+ {
+ vals[1] -= 0.5;
+ vals[3] -= 0.5;
+ }
+ qsort (vals, 4, sizeof (double), compare);
+ /* Add up the values so that each element of VALS has absolute value
+ at most equal to the last set bit of the next nonzero
+ element. */
+ for (size_t i = 0; i <= 2; i++)
+ {
+ add_split (&vals[i + 1], &vals[i], vals[i + 1], vals[i]);
+ qsort (vals + i + 1, 3 - i, sizeof (double), compare);
+ }
+ /* Now any error from this addition will be small. */
+ return vals[3] + vals[2] + vals[1] + vals[0];
+}
diff --git a/sysdeps/ieee754/dbl-64/x2y2m1f.c b/sysdeps/ieee754/dbl-64/x2y2m1f.c
new file mode 100644
index 0000000000..fcaa70851c
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/x2y2m1f.c
@@ -0,0 +1,32 @@
+/* Compute x^2 + y^2 - 1, without large cancellation error.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <float.h>
+
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+
+float
+__x2y2m1f (float x, float y)
+{
+ double dx = x, dy = y;
+ return (float) ((dx - 1) * (dx + 1) + dy * dy);
+}
diff --git a/sysdeps/ieee754/flt-32/s_cosf.c b/sysdeps/ieee754/flt-32/s_cosf.c
index f4bd81904b..864ab27a4f 100644
--- a/sysdeps/ieee754/flt-32/s_cosf.c
+++ b/sysdeps/ieee754/flt-32/s_cosf.c
@@ -23,7 +23,13 @@ static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $";
static const float one=1.0;
-float __cosf(float x)
+#ifndef COSF
+# define COSF_FUNC __cosf
+#else
+# define COSF_FUNC COSF
+#endif
+
+float COSF_FUNC(float x)
{
float y[2],z=0.0;
int32_t n,ix;
@@ -53,4 +59,7 @@ float __cosf(float x)
}
}
}
+
+#ifndef COSF
weak_alias (__cosf, cosf)
+#endif
diff --git a/sysdeps/ieee754/flt-32/s_sincosf.c b/sysdeps/ieee754/flt-32/s_sincosf.c
index 1b4d000e11..c3bd998ab7 100644
--- a/sysdeps/ieee754/flt-32/s_sincosf.c
+++ b/sysdeps/ieee754/flt-32/s_sincosf.c
@@ -21,9 +21,14 @@
#include <math_private.h>
+#ifndef SINCOSF
+# define SINCOSF_FUNC __sincosf
+#else
+# define SINCOSF_FUNC SINCOSF
+#endif
void
-__sincosf (float x, float *sinx, float *cosx)
+SINCOSF_FUNC (float x, float *sinx, float *cosx)
{
int32_t ix;
@@ -70,4 +75,7 @@ __sincosf (float x, float *sinx, float *cosx)
}
}
}
+
+#ifndef SINCOSF
weak_alias (__sincosf, sincosf)
+#endif
diff --git a/sysdeps/ieee754/flt-32/s_sinf.c b/sysdeps/ieee754/flt-32/s_sinf.c
index 02fa29f23b..916e345571 100644
--- a/sysdeps/ieee754/flt-32/s_sinf.c
+++ b/sysdeps/ieee754/flt-32/s_sinf.c
@@ -21,7 +21,13 @@ static char rcsid[] = "$NetBSD: s_sinf.c,v 1.4 1995/05/10 20:48:16 jtc Exp $";
#include <math.h>
#include <math_private.h>
-float __sinf(float x)
+#ifndef SINF
+# define SINF_FUNC __sinf
+#else
+# define SINF_FUNC SINF
+#endif
+
+float SINF_FUNC(float x)
{
float y[2],z=0.0;
int32_t n, ix;
@@ -51,4 +57,7 @@ float __sinf(float x)
}
}
}
+
+#ifndef SINF
weak_alias (__sinf, sinf)
+#endif
diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c
index 4e65bb16ce..cd3123046b 100644
--- a/sysdeps/ieee754/k_standard.c
+++ b/sysdeps/ieee754/k_standard.c
@@ -1003,6 +1003,7 @@ __kernel_standard_f(float x, float y, int type)
return __kernel_standard(x, y, type);
}
+#ifndef __NO_LONG_DOUBLE_MATH
long double
__kernel_standard_l (long double x, long double y, int type)
{
@@ -1082,3 +1083,4 @@ __kernel_standard_l (long double x, long double y, int type)
return __kernel_standard (dx, dy, type);
}
}
+#endif
diff --git a/sysdeps/ieee754/ldbl-128/bits/huge_vall.h b/sysdeps/ieee754/ldbl-128/bits/huge_vall.h
deleted file mode 100644
index 89b207331a..0000000000
--- a/sysdeps/ieee754/ldbl-128/bits/huge_vall.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* `HUGE_VALL' constant for IEEE 754 machines (where it is infinity).
- Used by <stdlib.h> and <math.h> functions for overflow.
- Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _MATH_H
-# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
-#endif
-
-/* IEEE positive infinity (-HUGE_VAL is negative infinity). */
-
-#if __GNUC_PREREQ(3,3)
-# define HUGE_VALL (__builtin_huge_vall())
-#elif __GNUC_PREREQ(2,96)
-# define HUGE_VALL (__extension__ 0x1.0p32767L)
-#else
-# include <endian.h>
-
-typedef union { unsigned char __c[16]; long double __ld; } __huge_vall_t;
-
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __HUGE_VALL_bytes { 0x7f, 0xff, 0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
-# endif
-# if __BYTE_ORDER == __LITTLE_ENDIAN
-# define __HUGE_VALL_bytes { 0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0xff, 0x7f }
-# endif
-
-# ifdef __GNUC__
-# define HUGE_VALL (__extension__ \
- ((__huge_vall_t) { __c : __HUGE_VALL_bytes }).__ld)
-# else
-static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
-# define HUGE_VALL (__huge_vall.__ld)
-# endif
-#endif
diff --git a/sysdeps/ieee754/ldbl-128/s_fma.c b/sysdeps/ieee754/ldbl-128/s_fma.c
index 355b60ebbb..b08ff29c04 100644
--- a/sysdeps/ieee754/ldbl-128/s_fma.c
+++ b/sysdeps/ieee754/ldbl-128/s_fma.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -33,6 +33,12 @@ __fma (double x, double y, double z)
fenv_t env;
/* Multiplication is always exact. */
long double temp = (long double) x * (long double) y;
+
+ /* Ensure correct sign of an exact zero result by performing the
+ addition in the original rounding mode in that case. */
+ if (temp == -z)
+ return (double) temp + z;
+
union ieee854_long_double u;
feholdexcept (&env);
fesetround (FE_TOWARDZERO);
diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c
index 963bbd7345..201bff94ca 100644
--- a/sysdeps/ieee754/ldbl-128/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-128/s_fmal.c
@@ -22,6 +22,7 @@
#include <fenv.h>
#include <ieee754.h>
#include <math_private.h>
+#include <tininess.h>
/* This implementation uses rounding to odd to avoid problems with
double rounding. See a paper by Boldo and Melquiond:
@@ -50,6 +51,11 @@ __fmal (long double x, long double y, long double z)
&& u.ieee.exponent != 0x7fff
&& v.ieee.exponent != 0x7fff)
return (z + x) + y;
+ /* If z is zero and x are y are nonzero, compute the result
+ as x * y to avoid the wrong sign of a zero result if x * y
+ underflows to 0. */
+ if (z == 0 && x != 0 && y != 0)
+ return x * y;
/* If x or y or z is Inf/NaN, or if fma will certainly overflow,
or if x * y is less than half of LDBL_DENORM_MIN,
compute as x * y + z. */
@@ -129,6 +135,11 @@ __fmal (long double x, long double y, long double z)
y = v.d;
z = w.d;
}
+
+ /* Ensure correct sign of exact 0 + 0. */
+ if (__builtin_expect ((x == 0 || y == 0) && z == 0, 0))
+ return x * y + z;
+
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
#define C ((1LL << (LDBL_MANT_DIG + 1) / 2) + 1)
long double x1 = x * C;
@@ -199,22 +210,27 @@ __fmal (long double x, long double y, long double z)
for proper rounding. */
if (v.ieee.exponent == 226)
{
- /* v.ieee.mantissa3 & 2 is LSB bit of the result before rounding,
- v.ieee.mantissa3 & 1 is the round bit and j is our sticky
- bit. In round-to-nearest 001 rounds down like 00,
- 011 rounds up, even though 01 rounds down (thus we need
- to adjust), 101 rounds down like 10 and 111 rounds up
- like 11. */
- if ((v.ieee.mantissa3 & 3) == 1)
+ /* If the exponent would be in the normal range when
+ rounding to normal precision with unbounded exponent
+ range, the exact result is known and spurious underflows
+ must be avoided on systems detecting tininess after
+ rounding. */
+ if (TININESS_AFTER_ROUNDING)
{
- v.d *= 0x1p-226L;
- if (v.ieee.negative)
- return v.d - 0x1p-16494L /* __LDBL_DENORM_MIN__ */;
- else
- return v.d + 0x1p-16494L /* __LDBL_DENORM_MIN__ */;
+ w.d = a1 + u.d;
+ if (w.ieee.exponent == 227)
+ return w.d * 0x1p-226L;
}
- else
- return v.d * 0x1p-226L;
+ /* v.ieee.mantissa3 & 2 is LSB bit of the result before rounding,
+ v.ieee.mantissa3 & 1 is the round bit and j is our sticky
+ bit. */
+ w.d = 0.0L;
+ w.ieee.mantissa3 = ((v.ieee.mantissa3 & 3) << 1) | j;
+ w.ieee.negative = v.ieee.negative;
+ v.ieee.mantissa3 &= ~3U;
+ v.d *= 0x1p-226L;
+ w.d *= 0x1p-2L;
+ return v.d + w.d;
}
v.ieee.mantissa3 |= j;
return v.d * 0x1p-226L;
diff --git a/sysdeps/ieee754/ldbl-128/x2y2m1l.c b/sysdeps/ieee754/ldbl-128/x2y2m1l.c
new file mode 100644
index 0000000000..a249cd3479
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/x2y2m1l.c
@@ -0,0 +1,111 @@
+/* Compute x^2 + y^2 - 1, without large cancellation error.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <float.h>
+#include <stdlib.h>
+
+/* Calculate X + Y exactly and store the result in *HI + *LO. It is
+ given that |X| >= |Y| and the values are small enough that no
+ overflow occurs. */
+
+static inline void
+add_split (long double *hi, long double *lo, long double x, long double y)
+{
+ /* Apply Dekker's algorithm. */
+ *hi = x + y;
+ *lo = (x - *hi) + y;
+}
+
+/* Calculate X * Y exactly and store the result in *HI + *LO. It is
+ given that the values are small enough that no overflow occurs and
+ large enough (or zero) that no underflow occurs. */
+
+static inline void
+mul_split (long double *hi, long double *lo, long double x, long double y)
+{
+#ifdef __FP_FAST_FMAL
+ /* Fast built-in fused multiply-add. */
+ *hi = x * y;
+ *lo = __builtin_fmal (x, y, -*hi);
+#elif defined FP_FAST_FMAL
+ /* Fast library fused multiply-add, compiler before GCC 4.6. */
+ *hi = x * y;
+ *lo = __fmal (x, y, -*hi);
+#else
+ /* Apply Dekker's algorithm. */
+ *hi = x * y;
+# define C ((1LL << (LDBL_MANT_DIG + 1) / 2) + 1)
+ long double x1 = x * C;
+ long double y1 = y * C;
+# undef C
+ x1 = (x - x1) + x1;
+ y1 = (y - y1) + y1;
+ long double x2 = x - x1;
+ long double y2 = y - y1;
+ *lo = (((x1 * y1 - *hi) + x1 * y2) + x2 * y1) + x2 * y2;
+#endif
+}
+
+/* Compare absolute values of floating-point values pointed to by P
+ and Q for qsort. */
+
+static int
+compare (const void *p, const void *q)
+{
+ long double pld = fabsl (*(const long double *) p);
+ long double qld = fabsl (*(const long double *) q);
+ if (pld < qld)
+ return -1;
+ else if (pld == qld)
+ return 0;
+ else
+ return 1;
+}
+
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+
+long double
+__x2y2m1l (long double x, long double y)
+{
+ long double vals[4];
+ SET_RESTORE_ROUNDL (FE_TONEAREST);
+ mul_split (&vals[1], &vals[0], x, x);
+ mul_split (&vals[3], &vals[2], y, y);
+ if (x >= 0.75L)
+ vals[1] -= 1.0L;
+ else
+ {
+ vals[1] -= 0.5L;
+ vals[3] -= 0.5L;
+ }
+ qsort (vals, 4, sizeof (long double), compare);
+ /* Add up the values so that each element of VALS has absolute value
+ at most equal to the last set bit of the next nonzero
+ element. */
+ for (size_t i = 0; i <= 2; i++)
+ {
+ add_split (&vals[i + 1], &vals[i], vals[i + 1], vals[i]);
+ qsort (vals + i + 1, 3 - i, sizeof (long double), compare);
+ }
+ /* Now any error from this addition will be small. */
+ return vals[3] + vals[2] + vals[1] + vals[0];
+}
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c b/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c
index fe5c8bd8dc..3e0535561c 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c
@@ -65,7 +65,8 @@ __ieee754_atan2l(long double y, long double x)
if(((ix)>0x7ff0000000000000LL)||
((iy)>0x7ff0000000000000LL)) /* x or y is NaN */
return x+y;
- if(((hx-0x3ff0000000000000LL))==0) return __atanl(y); /* x=1.0L */
+ if(((hx-0x3ff0000000000000LL))==0
+ && (lx&0x7fffffffffffffff)==0) return __atanl(y); /* x=1.0L */
m = ((hy>>63)&1)|((hx>>62)&2); /* 2*sign(x)+sign(y) */
/* when y = 0 */
diff --git a/sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c b/sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c
new file mode 100644
index 0000000000..4379b68c3c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c
@@ -0,0 +1,128 @@
+/* Compute x^2 + y^2 - 1, without large cancellation error.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <float.h>
+
+/* Calculate X + Y exactly and store the result in *HI + *LO. It is
+ given that |X| >= |Y| and the values are small enough that no
+ overflow occurs. */
+
+static inline void
+add_split (double *hi, double *lo, double x, double y)
+{
+ /* Apply Dekker's algorithm. */
+ *hi = x + y;
+ *lo = (x - *hi) + y;
+}
+
+/* Calculate X * Y exactly and store the result in *HI + *LO. It is
+ given that the values are small enough that no overflow occurs and
+ large enough (or zero) that no underflow occurs. */
+
+static inline void
+mul_split (double *hi, double *lo, double x, double y)
+{
+#ifdef __FP_FAST_FMA
+ /* Fast built-in fused multiply-add. */
+ *hi = x * y;
+ *lo = __builtin_fma (x, y, -*hi);
+#elif defined FP_FAST_FMA
+ /* Fast library fused multiply-add, compiler before GCC 4.6. */
+ *hi = x * y;
+ *lo = __fma (x, y, -*hi);
+#else
+ /* Apply Dekker's algorithm. */
+ *hi = x * y;
+# define C ((1 << (DBL_MANT_DIG + 1) / 2) + 1)
+ double x1 = x * C;
+ double y1 = y * C;
+# undef C
+ x1 = (x - x1) + x1;
+ y1 = (y - y1) + y1;
+ double x2 = x - x1;
+ double y2 = y - y1;
+ *lo = (((x1 * y1 - *hi) + x1 * y2) + x2 * y1) + x2 * y2;
+#endif
+}
+
+/* Compare absolute values of floating-point values pointed to by P
+ and Q for qsort. */
+
+static int
+compare (const void *p, const void *q)
+{
+ double pd = fabs (*(const double *) p);
+ double qd = fabs (*(const double *) q);
+ if (pd < qd)
+ return -1;
+ else if (pd == qd)
+ return 0;
+ else
+ return 1;
+}
+
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+
+long double
+__x2y2m1l (long double x, long double y)
+{
+ double vals[12];
+ SET_RESTORE_ROUND (FE_TONEAREST);
+ union ibm_extended_long_double xu, yu;
+ xu.d = x;
+ yu.d = y;
+ if (fabs (xu.dd[1]) < 0x1p-500)
+ xu.dd[1] = 0.0;
+ if (fabs (yu.dd[1]) < 0x1p-500)
+ yu.dd[1] = 0.0;
+ mul_split (&vals[1], &vals[0], xu.dd[0], xu.dd[0]);
+ mul_split (&vals[3], &vals[2], xu.dd[0], xu.dd[1]);
+ vals[2] *= 2.0;
+ vals[3] *= 2.0;
+ mul_split (&vals[5], &vals[4], xu.dd[1], xu.dd[1]);
+ mul_split (&vals[7], &vals[6], yu.dd[0], yu.dd[0]);
+ mul_split (&vals[9], &vals[8], yu.dd[0], yu.dd[1]);
+ vals[8] *= 2.0;
+ vals[9] *= 2.0;
+ mul_split (&vals[11], &vals[10], yu.dd[1], yu.dd[1]);
+ if (xu.dd[0] >= 0.75)
+ vals[1] -= 1.0;
+ else
+ {
+ vals[1] -= 0.5;
+ vals[7] -= 0.5;
+ }
+ qsort (vals, 12, sizeof (double), compare);
+ /* Add up the values so that each element of VALS has absolute value
+ at most equal to the last set bit of the next nonzero
+ element. */
+ for (size_t i = 0; i <= 10; i++)
+ {
+ add_split (&vals[i + 1], &vals[i], vals[i + 1], vals[i]);
+ qsort (vals + i + 1, 11 - i, sizeof (double), compare);
+ }
+ /* Now any error from this addition will be small. */
+ long double retval = (long double) vals[11];
+ for (size_t i = 10; i != (size_t) -1; i--)
+ retval += (long double) vals[i];
+ return retval;
+}
diff --git a/sysdeps/ieee754/ldbl-96/s_fma.c b/sysdeps/ieee754/ldbl-96/s_fma.c
index 78c0b0db18..001d8063d4 100644
--- a/sysdeps/ieee754/ldbl-96/s_fma.c
+++ b/sysdeps/ieee754/ldbl-96/s_fma.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -38,6 +38,10 @@ __fma (double x, double y, double z)
return (x * y) + z;
}
+ /* Ensure correct sign of exact 0 + 0. */
+ if (__builtin_expect ((x == 0 || y == 0) && z == 0, 0))
+ return x * y + z;
+
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
#define C ((1ULL << (LDBL_MANT_DIG + 1) / 2) + 1)
long double x1 = (long double) x * C;
diff --git a/sysdeps/ieee754/ldbl-96/s_fmal.c b/sysdeps/ieee754/ldbl-96/s_fmal.c
index ca1e0905a7..91333af353 100644
--- a/sysdeps/ieee754/ldbl-96/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-96/s_fmal.c
@@ -22,6 +22,7 @@
#include <fenv.h>
#include <ieee754.h>
#include <math_private.h>
+#include <tininess.h>
/* This implementation uses rounding to odd to avoid problems with
double rounding. See a paper by Boldo and Melquiond:
@@ -50,6 +51,11 @@ __fmal (long double x, long double y, long double z)
&& u.ieee.exponent != 0x7fff
&& v.ieee.exponent != 0x7fff)
return (z + x) + y;
+ /* If z is zero and x are y are nonzero, compute the result
+ as x * y to avoid the wrong sign of a zero result if x * y
+ underflows to 0. */
+ if (z == 0 && x != 0 && y != 0)
+ return x * y;
/* If x or y or z is Inf/NaN, or if fma will certainly overflow,
or if x * y is less than half of LDBL_DENORM_MIN,
compute as x * y + z. */
@@ -129,6 +135,11 @@ __fmal (long double x, long double y, long double z)
y = v.d;
z = w.d;
}
+
+ /* Ensure correct sign of exact 0 + 0. */
+ if (__builtin_expect ((x == 0 || y == 0) && z == 0, 0))
+ return x * y + z;
+
/* Multiplication m1 + m2 = x * y using Dekker's algorithm. */
#define C ((1LL << (LDBL_MANT_DIG + 1) / 2) + 1)
long double x1 = x * C;
@@ -199,22 +210,27 @@ __fmal (long double x, long double y, long double z)
for proper rounding. */
if (v.ieee.exponent == 128)
{
- /* v.ieee.mantissa1 & 2 is LSB bit of the result before rounding,
- v.ieee.mantissa1 & 1 is the round bit and j is our sticky
- bit. In round-to-nearest 001 rounds down like 00,
- 011 rounds up, even though 01 rounds down (thus we need
- to adjust), 101 rounds down like 10 and 111 rounds up
- like 11. */
- if ((v.ieee.mantissa1 & 3) == 1)
+ /* If the exponent would be in the normal range when
+ rounding to normal precision with unbounded exponent
+ range, the exact result is known and spurious underflows
+ must be avoided on systems detecting tininess after
+ rounding. */
+ if (TININESS_AFTER_ROUNDING)
{
- v.d *= 0x1p-128L;
- if (v.ieee.negative)
- return v.d - 0x1p-16445L /* __LDBL_DENORM_MIN__ */;
- else
- return v.d + 0x1p-16445L /* __LDBL_DENORM_MIN__ */;
+ w.d = a1 + u.d;
+ if (w.ieee.exponent == 129)
+ return w.d * 0x1p-128L;
}
- else
- return v.d * 0x1p-128L;
+ /* v.ieee.mantissa1 & 2 is LSB bit of the result before rounding,
+ v.ieee.mantissa1 & 1 is the round bit and j is our sticky
+ bit. */
+ w.d = 0.0L;
+ w.ieee.mantissa1 = ((v.ieee.mantissa1 & 3) << 1) | j;
+ w.ieee.negative = v.ieee.negative;
+ v.ieee.mantissa1 &= ~3U;
+ v.d *= 0x1p-128L;
+ w.d *= 0x1p-2L;
+ return v.d + w.d;
}
v.ieee.mantissa1 |= j;
return v.d * 0x1p-128L;
diff --git a/sysdeps/ieee754/ldbl-96/s_sincosl.c b/sysdeps/ieee754/ldbl-96/s_sincosl.c
index 2858954b32..2a819592c1 100644
--- a/sysdeps/ieee754/ldbl-96/s_sincosl.c
+++ b/sysdeps/ieee754/ldbl-96/s_sincosl.c
@@ -1,5 +1,5 @@
/* Compute sine and cosine of argument.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -25,7 +25,7 @@
void
__sincosl (long double x, long double *sinx, long double *cosx)
{
- int32_t se, i0, i1;
+ int32_t se, i0, i1 __attribute__ ((unused));
/* High word of x. */
GET_LDOUBLE_WORDS (se, i0, i1, x);
diff --git a/sysdeps/ieee754/ldbl-96/x2y2m1.c b/sysdeps/ieee754/ldbl-96/x2y2m1.c
new file mode 100644
index 0000000000..3086fa2c80
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/x2y2m1.c
@@ -0,0 +1,39 @@
+/* Compute x^2 + y^2 - 1, without large cancellation error.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <float.h>
+
+#if FLT_EVAL_METHOD == 0
+
+# include <sysdeps/ieee754/dbl-64/x2y2m1.c>
+
+#else
+
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+
+double
+__x2y2m1 (double x, double y)
+{
+ return (double) __x2y2m1l (x, y);
+}
+
+#endif
diff --git a/sysdeps/ieee754/ldbl-96/x2y2m1l.c b/sysdeps/ieee754/ldbl-96/x2y2m1l.c
new file mode 100644
index 0000000000..a249cd3479
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/x2y2m1l.c
@@ -0,0 +1,111 @@
+/* Compute x^2 + y^2 - 1, without large cancellation error.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <float.h>
+#include <stdlib.h>
+
+/* Calculate X + Y exactly and store the result in *HI + *LO. It is
+ given that |X| >= |Y| and the values are small enough that no
+ overflow occurs. */
+
+static inline void
+add_split (long double *hi, long double *lo, long double x, long double y)
+{
+ /* Apply Dekker's algorithm. */
+ *hi = x + y;
+ *lo = (x - *hi) + y;
+}
+
+/* Calculate X * Y exactly and store the result in *HI + *LO. It is
+ given that the values are small enough that no overflow occurs and
+ large enough (or zero) that no underflow occurs. */
+
+static inline void
+mul_split (long double *hi, long double *lo, long double x, long double y)
+{
+#ifdef __FP_FAST_FMAL
+ /* Fast built-in fused multiply-add. */
+ *hi = x * y;
+ *lo = __builtin_fmal (x, y, -*hi);
+#elif defined FP_FAST_FMAL
+ /* Fast library fused multiply-add, compiler before GCC 4.6. */
+ *hi = x * y;
+ *lo = __fmal (x, y, -*hi);
+#else
+ /* Apply Dekker's algorithm. */
+ *hi = x * y;
+# define C ((1LL << (LDBL_MANT_DIG + 1) / 2) + 1)
+ long double x1 = x * C;
+ long double y1 = y * C;
+# undef C
+ x1 = (x - x1) + x1;
+ y1 = (y - y1) + y1;
+ long double x2 = x - x1;
+ long double y2 = y - y1;
+ *lo = (((x1 * y1 - *hi) + x1 * y2) + x2 * y1) + x2 * y2;
+#endif
+}
+
+/* Compare absolute values of floating-point values pointed to by P
+ and Q for qsort. */
+
+static int
+compare (const void *p, const void *q)
+{
+ long double pld = fabsl (*(const long double *) p);
+ long double qld = fabsl (*(const long double *) q);
+ if (pld < qld)
+ return -1;
+ else if (pld == qld)
+ return 0;
+ else
+ return 1;
+}
+
+/* Return X^2 + Y^2 - 1, computed without large cancellation error.
+ It is given that 1 > X >= Y >= epsilon / 2, and that either X >=
+ 0.75 or Y >= 0.5. */
+
+long double
+__x2y2m1l (long double x, long double y)
+{
+ long double vals[4];
+ SET_RESTORE_ROUNDL (FE_TONEAREST);
+ mul_split (&vals[1], &vals[0], x, x);
+ mul_split (&vals[3], &vals[2], y, y);
+ if (x >= 0.75L)
+ vals[1] -= 1.0L;
+ else
+ {
+ vals[1] -= 0.5L;
+ vals[3] -= 0.5L;
+ }
+ qsort (vals, 4, sizeof (long double), compare);
+ /* Add up the values so that each element of VALS has absolute value
+ at most equal to the last set bit of the next nonzero
+ element. */
+ for (size_t i = 0; i <= 2; i++)
+ {
+ add_split (&vals[i + 1], &vals[i], vals[i + 1], vals[i]);
+ qsort (vals + i + 1, 3 - i, sizeof (long double), compare);
+ }
+ /* Now any error from this addition will be small. */
+ return vals[3] + vals[2] + vals[1] + vals[0];
+}
diff --git a/sysdeps/ieee754/ldbl-opt/configure b/sysdeps/ieee754/ldbl-opt/configure
index d1f3177cfd..6e69038b93 100644
--- a/sysdeps/ieee754/ldbl-opt/configure
+++ b/sysdeps/ieee754/ldbl-opt/configure
@@ -1,123 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/ieee754/ldbl-opt/.
diff --git a/sysdeps/mach/bits/libc-lock.h b/sysdeps/mach/bits/libc-lock.h
index 110e25e965..94877e0ea7 100644
--- a/sysdeps/mach/bits/libc-lock.h
+++ b/sysdeps/mach/bits/libc-lock.h
@@ -137,7 +137,6 @@ void *__libc_getspecific (__libc_key_t key);
#define __libc_lock_lock_recursive __libc_lock_lock
#define __rtld_lock_define_initialized_recursive __libc_lock_define_initialized
-#define __rtld_lock_init_recursive __libc_lock_init
#define __rtld_lock_fini_recursive __libc_lock_fini
#define __rtld_lock_trylock_recursive __libc_lock_trylock
#define __rtld_lock_unlock_recursive __libc_lock_unlock
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
index b41449e803..33cf09bd71 100644
--- a/sysdeps/mach/configure
+++ b/sysdeps/mach/configure
@@ -1,102 +1,4 @@
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# ac_fn_c_try_cpp LINENO
# ----------------------
@@ -288,45 +190,7 @@ $as_echo_n "checking for task_t in mach/mach_types.h... " >&6; }
if ${libc_cv_mach_task_t+:} false; then :
$as_echo_n "(cached) " >&6
else
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mach/mach_types.h>
int
diff --git a/sysdeps/mach/hurd/Makeconfig b/sysdeps/mach/hurd/Makeconfig
index 1b65bb07aa..fe3b7c553e 100644
--- a/sysdeps/mach/hurd/Makeconfig
+++ b/sysdeps/mach/hurd/Makeconfig
@@ -2,3 +2,6 @@
# See Makefile in this directory for the rule that builds this.
# We must define this variable earlier than sysdeps Makefiles are included.
static-start-installed-name = crt0.o
+
+# GNU libc on the Hurd is always reentrant.
+libc-reentrant = yes
diff --git a/sysdeps/mach/hurd/_G_config.h b/sysdeps/mach/hurd/_G_config.h
deleted file mode 100644
index 9ecd4aad39..0000000000
--- a/sysdeps/mach/hurd/_G_config.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* This file is needed by libio to define various configuration parameters.
- These are always the same in the GNU C library. */
-
-#ifndef _G_config_h
-#define _G_config_h 1
-
-/* Define types for libio in terms of the standard internal type names. */
-
-#include <bits/types.h>
-#define __need_size_t
-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-# define __need_wchar_t
-#endif
-#define __need_NULL
-#include <stddef.h>
-#define __need_mbstate_t
-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-# define __need_wint_t
-#endif
-#include <wchar.h>
-#define _G_size_t size_t
-typedef struct
-{
- __off_t __pos;
- __mbstate_t __state;
-} _G_fpos_t;
-typedef struct
-{
- __off64_t __pos;
- __mbstate_t __state;
-} _G_fpos64_t;
-#define _G_ssize_t __ssize_t
-#define _G_off_t __off_t
-#define _G_off64_t __off64_t
-#define _G_pid_t __pid_t
-#define _G_uid_t __uid_t
-#define _G_wchar_t wchar_t
-#define _G_wint_t wint_t
-#define _G_stat64 stat64
-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-# include <gconv.h>
-typedef union
-{
- struct __gconv_info __cd;
- struct
- {
- struct __gconv_info __cd;
- struct __gconv_step_data __data;
- } __combined;
-} _G_iconv_t;
-#endif
-
-typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
-typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
-typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
-typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
-
-#define _G_HAVE_BOOL 1
-
-
-/* These library features are always available in the GNU C library. */
-#define _G_HAVE_ATEXIT 1
-#define _G_HAVE_SYS_WAIT 1
-#define _G_NEED_STDARG_H 1
-#define _G_va_list __gnuc_va_list
-
-#define _G_HAVE_PRINTF_FP 1
-#define _G_HAVE_MMAP 1
-#define _G_HAVE_LONG_DOUBLE_IO 1
-#define _G_HAVE_IO_FILE_OPEN 1
-#define _G_HAVE_IO_GETLINE_INFO 1
-
-#define _G_IO_IO_FILE_VERSION 0x20001
-
-#define _G_OPEN64 __open64
-#define _G_LSEEK64 __lseek64
-#define _G_MMAP64 __mmap64
-#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
-
-/* This is defined by <bits/stat.h> if `st_blksize' exists. */
-#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
-
-#define _G_BUFSIZ 8192
-
-/* These are the vtbl details for ELF. */
-#define _G_NAMES_HAVE_UNDERSCORE 0
-#define _G_VTABLE_LABEL_HAS_LENGTH 1
-#define _G_USING_THUNKS 1
-#define _G_VTABLE_LABEL_PREFIX "__vt_"
-#define _G_VTABLE_LABEL_PREFIX_ID __vt_
-
-#endif /* _G_config.h */
diff --git a/sysdeps/mach/hurd/bits/libc-lock.h b/sysdeps/mach/hurd/bits/libc-lock.h
index d18a10c457..e8cb71bfdd 100644
--- a/sysdeps/mach/hurd/bits/libc-lock.h
+++ b/sysdeps/mach/hurd/bits/libc-lock.h
@@ -119,8 +119,6 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
})
-#define __rtld_lock_init_recursive(NAME) \
- __libc_lock_init_recursive (NAME)
#define __rtld_lock_initialize(NAME) \
(void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER)
#define __rtld_lock_trylock_recursive(NAME) \
diff --git a/sysdeps/mach/hurd/bits/local_lim.h b/sysdeps/mach/hurd/bits/local_lim.h
index 48411d071c..c957dad767 100644
--- a/sysdeps/mach/hurd/bits/local_lim.h
+++ b/sysdeps/mach/hurd/bits/local_lim.h
@@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. Hurd version.
- Copyright (C) 1993,94,96,98,2002 Free Software Foundation, Inc.
+ Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,14 +32,3 @@
suitable, and `sysconf' will return a number at least as large. */
#define NGROUPS_MAX 256
-
-/* The maximum number of symbolic links that are allowed in a single file
- name resolution. When a further link is encountered, the call returns
- ELOOP. This name is a GNU extension; POSIX.1 has no such limit, and BSD
- calls it MAXSYMLINKS in <sys/param.h>. (We define the name under
- _BSD_SOURCE even without _GNU_SOURCE because our <sys/param.h> uses it
- to define MAXSYMLINKS.) */
-
-#if defined __USE_GNU || defined __USE_BSD /* 1003.1a defines this */
-#define SYMLOOP_MAX 8
-#endif
diff --git a/sysdeps/mach/hurd/sys/param.h b/sysdeps/mach/hurd/bits/param.h
index 42f4f46e7d..d52c1edcb6 100644
--- a/sysdeps/mach/hurd/sys/param.h
+++ b/sysdeps/mach/hurd/bits/param.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,1994,1995,1997,1999,2011 Free Software Foundation, Inc.
+/* Old-style Unix parameters and limits. Hurd version.
+ Copyright (C) 1993-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,6 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _SYS_PARAM_H
+# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
+#endif
+
/* This file is deprecated and is provided only for compatibility with
Unix systems. It is unwise to include this file on programs which
are intended only for GNU systems.
@@ -52,24 +57,6 @@
*/
-#ifndef _SYS_PARAM_H
-
-#define _SYS_PARAM_H 1
-#include <features.h>
-
-#define __need_NULL
-#include <stddef.h>
-
-#include <sys/types.h>
-#include <errno.h>
-#include <signal.h>
-#include <endian.h>
-#include <limits.h>
-#ifdef notyet
-# include <ufs/param.h>
-#endif
-
-
/* What versions of BSD we are compatible with. */
#define BSD 199306 /* System version (year & month). */
#define BSD4_3 1
@@ -81,47 +68,12 @@
/* BSD names for some <limits.h> values. We do not define the BSD names
for the values which are not statically limited, such as NOFILE. */
-#define NBBY CHAR_BIT
-#define NGROUPS NGROUPS_MAX
-#define MAXSYMLINKS SYMLOOP_MAX
-#define CANBSIZ MAX_CANON /* XXX ? */
-
-/* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to
- compare against some fixed limit. */
-#define NCARGS INT_MAX
/* There is nothing quite equivalent in GNU to Unix "mounts", but there is
no limit on the number of simultaneously attached filesystems. */
#define NMOUNT INT_MAX
-/* Magical constants. */
-#define NOGROUP 65535 /* Marker for empty group set member. */
-#define NODEV ((dev_t) -1) /* Non-existent device. */
-
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-# define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
-#define powerof2(x) ((((x)-1)&(x))==0)
-
-/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
-
-/* Unit of `st_blocks'. */
-#define DEV_BSIZE 512
-
-
/* Scale factor for scaled integers used to count %cpu time and load avgs.
The number of CPU `tick's that map to a unique `%age' can be expressed
diff --git a/sysdeps/mach/hurd/bits/typesizes.h b/sysdeps/mach/hurd/bits/typesizes.h
index efc13143e7..af132669ff 100644
--- a/sysdeps/mach/hurd/bits/typesizes.h
+++ b/sysdeps/mach/hurd/bits/typesizes.h
@@ -51,7 +51,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE __S32_TYPE
diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure
index 3c90a665aa..84948a549c 100644
--- a/sysdeps/mach/hurd/configure
+++ b/sysdeps/mach/hurd/configure
@@ -1,128 +1,5 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
-# GNU libc on the Hurd is always reentrant.
-DEFINES="$DEFINES -D_LIBC_REENTRANT"
-
$as_echo "#define NO_HIDDEN 1" >>confdefs.h
diff --git a/sysdeps/mach/hurd/configure.in b/sysdeps/mach/hurd/configure.in
index 6220142265..ad915a568b 100644
--- a/sysdeps/mach/hurd/configure.in
+++ b/sysdeps/mach/hurd/configure.in
@@ -1,8 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# GNU libc on the Hurd is always reentrant.
-DEFINES="$DEFINES -D_LIBC_REENTRANT"
-
dnl We need this setting because of the need for PLT calls in ld.so.
AC_DEFINE([NO_HIDDEN])
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 0fdeeac094..78269d2623 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -660,26 +660,6 @@ _dl_show_auxv (void)
}
-/* Return an array of useful/necessary hardware capability names. */
-const struct r_strlenpair *
-internal_function
-_dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
- size_t *max_capstrlen)
-{
- struct r_strlenpair *result;
-
- /* Return an empty array. Hurd has no hardware capabilities. */
- result = (struct r_strlenpair *) malloc (sizeof (*result));
- if (result == NULL)
- _dl_signal_error (ENOMEM, NULL, NULL, "cannot create capability list");
-
- result[0].str = (char *) result; /* Does not really matter. */
- result[0].len = 0;
-
- *sz = 1;
- return result;
-}
-
void weak_function
_dl_init_first (int argc, ...)
{
diff --git a/sysdeps/mach/hurd/eloop-threshold.h b/sysdeps/mach/hurd/eloop-threshold.h
new file mode 100644
index 0000000000..b8fae16449
--- /dev/null
+++ b/sysdeps/mach/hurd/eloop-threshold.h
@@ -0,0 +1,37 @@
+/* Threshold at which to diagnose ELOOP. Hurd version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _ELOOP_THRESHOLD_H
+#define _ELOOP_THRESHOLD_H 1
+
+/* Return the maximum number of symlink traversals to permit
+ before diagnosing ELOOP.
+
+ In the Hurd version, here we are actually setting the only policy
+ there is on the system. We use a literal number here rather than
+ defining SYMLOOP_MAX so that programs don't compile in a number
+ but instead use sysconf and the number can be changed here to
+ affect sysconf's result. */
+
+static inline unsigned int __attribute__ ((const))
+__eloop_threshold (void)
+{
+ return 32;
+}
+
+#endif /* eloop-threshold.h */
diff --git a/sysdeps/mach/hurd/fdatasync.c b/sysdeps/mach/hurd/fdatasync.c
index 19d7a4a58a..22c1d103d4 100644
--- a/sysdeps/mach/hurd/fdatasync.c
+++ b/sysdeps/mach/hurd/fdatasync.c
@@ -26,6 +26,12 @@ fdatasync (int fd)
{
error_t err = HURD_DPORT_USE (fd, __file_sync (port, 1, 1));
if (err)
- return __hurd_dfail (fd, err);
+ {
+ if (err == EOPNOTSUPP)
+ /* If the file descriptor does not support sync, return EINVAL
+ as POSIX specifies. */
+ err = EINVAL;
+ return __hurd_dfail (fd, err);
+ }
return 0;
}
diff --git a/sysdeps/mach/hurd/fsync.c b/sysdeps/mach/hurd/fsync.c
index a474c8a356..fe3e044a3a 100644
--- a/sysdeps/mach/hurd/fsync.c
+++ b/sysdeps/mach/hurd/fsync.c
@@ -27,6 +27,12 @@ fsync (fd)
{
error_t err = HURD_DPORT_USE (fd, __file_sync (port, 1, 0));
if (err)
- return __hurd_dfail (fd, err);
+ {
+ if (err == EOPNOTSUPP)
+ /* If the file descriptor does not support sync, return EINVAL
+ as POSIX specifies. */
+ err = EINVAL;
+ return __hurd_dfail (fd, err);
+ }
return 0;
}
diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h
index 4a8bd16e6c..16e054fe5d 100644
--- a/sysdeps/mach/hurd/malloc-machine.h
+++ b/sysdeps/mach/hurd/malloc-machine.h
@@ -66,8 +66,9 @@ __libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
#include <sys/mman.h>
-#undef madvise
-#define madvise(addr, len, advice) ((void) (addr), (void) (len), (void) (advice))
+#undef __madvise
+#define __madvise(addr, len, advice) \
+ ((void) (addr), (void) (len), (void) (advice))
#include <sysdeps/generic/malloc-machine.h>
diff --git a/sysdeps/mach/hurd/ptrace.c b/sysdeps/mach/hurd/ptrace.c
index bb5627284d..bccb265fbf 100644
--- a/sysdeps/mach/hurd/ptrace.c
+++ b/sysdeps/mach/hurd/ptrace.c
@@ -160,7 +160,7 @@ ptrace (enum __ptrace_request request, ... )
case PTRACE_SINGLESTEP:
/* This is a machine-dependent kernel RPC on
machines that support it. Punt. */
- return EOPNOTSUPP;
+ return __hurd_fail (EOPNOTSUPP);
case PTRACE_ATTACH:
case PTRACE_DETACH:
@@ -227,7 +227,7 @@ ptrace (enum __ptrace_request request, ... )
case PTRACE_PEEKUSER:
case PTRACE_POKEUSER:
/* U area, what's that? */
- return EOPNOTSUPP;
+ return __hurd_fail (EOPNOTSUPP);
case PTRACE_GETREGS:
case PTRACE_SETREGS:
@@ -248,7 +248,7 @@ ptrace (enum __ptrace_request request, ... )
return get_regs (MACHINE_THREAD_FLOAT_STATE_FLAVOR,
MACHINE_THREAD_FLOAT_STATE_COUNT);
#else
- return EOPNOTSUPP;
+ return __hurd_fail (EOPNOTSUPP);
#endif
case PTRACE_GETFPAREGS:
@@ -261,7 +261,7 @@ ptrace (enum __ptrace_request request, ... )
return get_regs (MACHINE_THREAD_FPA_STATE_FLAVOR,
MACHINE_THREAD_FPA_STATE_COUNT);
#else
- return EOPNOTSUPP;
+ return __hurd_fail (EOPNOTSUPP);
#endif
case PTRACE_POKETEXT:
diff --git a/sysdeps/mach/hurd/renameat.c b/sysdeps/mach/hurd/renameat.c
new file mode 100644
index 0000000000..8ab5906a67
--- /dev/null
+++ b/sysdeps/mach/hurd/renameat.c
@@ -0,0 +1,51 @@
+/* Rename a file using relative source and destination names. Hurd version.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdio.h>
+#include <hurd.h>
+#include <hurd/fd.h>
+
+/* Rename the file OLD relative to OLDFD to NEW relative to NEWFD. */
+int
+renameat (oldfd, old, newfd, new)
+ int oldfd;
+ const char *old;
+ int newfd;
+ const char *new;
+{
+ error_t err;
+ file_t olddir, newdir;
+ const char *oldname, *newname;
+
+ olddir = __directory_name_split_at (oldfd, old, (char **) &oldname);
+ if (olddir == MACH_PORT_NULL)
+ return -1;
+ newdir = __directory_name_split_at (newfd, new, (char **) &newname);
+ if (newdir == MACH_PORT_NULL)
+ {
+ __mach_port_deallocate (__mach_task_self (), olddir);
+ return -1;
+ }
+
+ err = __dir_rename (olddir, oldname, newdir, newname, 0);
+ __mach_port_deallocate (__mach_task_self (), olddir);
+ __mach_port_deallocate (__mach_task_self (), newdir);
+ if (err)
+ return __hurd_fail (err);
+ return 0;
+}
diff --git a/sysdeps/mach/hurd/sysconf.c b/sysdeps/mach/hurd/sysconf.c
new file mode 100644
index 0000000000..6d1666d93c
--- /dev/null
+++ b/sysdeps/mach/hurd/sysconf.c
@@ -0,0 +1,26 @@
+/* Return values of system parameters. Hurd version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <limits.h>
+#include <unistd.h>
+
+#include <eloop-threshold.h>
+
+#define SYMLOOP_MAX (__eloop_threshold ())
+
+#include <sysdeps/posix/sysconf.c>
diff --git a/sysdeps/unix/alarm.c b/sysdeps/posix/alarm.c
index 730f2c4c77..730f2c4c77 100644
--- a/sysdeps/unix/alarm.c
+++ b/sysdeps/posix/alarm.c
diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
index 938877e937..678257b3aa 100644
--- a/sysdeps/posix/clock_getres.c
+++ b/sysdeps/posix/clock_getres.c
@@ -1,5 +1,5 @@
/* clock_getres -- Get the resolution of a POSIX clockid_t.
- Copyright (C) 1999,2000,2001,2003,2004,2008 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -115,3 +115,4 @@ clock_getres (clockid_t clock_id, struct timespec *res)
return retval;
}
+strong_alias (clock_getres, __clock_getres)
diff --git a/sysdeps/unix/closedir.c b/sysdeps/posix/closedir.c
index 41abf28c6f..41abf28c6f 100644
--- a/sysdeps/unix/closedir.c
+++ b/sysdeps/posix/closedir.c
diff --git a/sysdeps/unix/dirfd.c b/sysdeps/posix/dirfd.c
index 536c44e30e..536c44e30e 100644
--- a/sysdeps/unix/dirfd.c
+++ b/sysdeps/posix/dirfd.c
diff --git a/sysdeps/unix/dirstream.h b/sysdeps/posix/dirstream.h
index 6ca290471d..6ca290471d 100644
--- a/sysdeps/unix/dirstream.h
+++ b/sysdeps/posix/dirstream.h
diff --git a/sysdeps/unix/fdopendir.c b/sysdeps/posix/fdopendir.c
index beddcbe029..0ffd3f963e 100644
--- a/sysdeps/unix/fdopendir.c
+++ b/sysdeps/posix/fdopendir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
+#include <stddef.h>
#include <sys/stat.h>
#include <not-cancel.h>
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 78a2474b10..3cc244b7fd 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -832,8 +832,13 @@ gaih_inet (const char *name, const struct gaih_service *service,
while (!no_more)
{
no_data = 0;
- nss_gethostbyname4_r fct4
- = __nss_lookup_function (nip, "gethostbyname4_r");
+ nss_gethostbyname4_r fct4 = NULL;
+
+ /* gethostbyname4_r sends out parallel A and AAAA queries and
+ is thus only suitable for PF_UNSPEC. */
+ if (req->ai_family == PF_UNSPEC)
+ fct4 = __nss_lookup_function (nip, "gethostbyname4_r");
+
if (fct4 != NULL)
{
int herrno;
@@ -1364,10 +1369,6 @@ static const struct scopeentry
/* Link-local addresses: scope 2. */
{ { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
{ { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
- /* Site-local addresses: scope 5. */
- { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
- { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
- { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
/* Default: scope 14. */
{ { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
};
@@ -1855,8 +1856,41 @@ static int gaiconf_reload_flag;
static int gaiconf_reload_flag_ever_set;
/* Last modification time. */
+#ifdef _STATBUF_ST_NSEC
+
static struct timespec gaiconf_mtime;
+static inline void
+save_gaiconf_mtime (const struct stat64 *st)
+{
+ gaiconf_mtime = st->st_mtim;
+}
+
+static inline bool
+check_gaiconf_mtime (const struct stat64 *st)
+{
+ return (st->st_mtim.tv_sec == gaiconf_mtime.tv_sec
+ && st->st_mtim.tv_nsec == gaiconf_mtime.tv_nsec);
+}
+
+#else
+
+static time_t gaiconf_mtime;
+
+static inline void
+save_gaiconf_mtime (const struct stat64 *st)
+{
+ gaiconf_mtime = st->st_mtime;
+}
+
+static inline bool
+check_gaiconf_mtime (const struct stat64 *st)
+{
+ return st->st_mtime == gaiconf_mtime;
+}
+
+#endif
+
libc_freeres_fn(fini)
{
@@ -2298,7 +2332,7 @@ gaiconf_init (void)
if (oldscope != default_scopes)
free ((void *) oldscope);
- gaiconf_mtime = st.st_mtim;
+ save_gaiconf_mtime (&st);
}
else
{
@@ -2320,7 +2354,7 @@ gaiconf_reload (void)
{
struct stat64 st;
if (__xstat64 (_STAT_VER, GAICONF_FNAME, &st) != 0
- || memcmp (&st.st_mtim, &gaiconf_mtime, sizeof (gaiconf_mtime)) != 0)
+ || !check_gaiconf_mtime (&st))
gaiconf_init ();
}
@@ -2638,7 +2672,7 @@ getaddrinfo (const char *name, const char *service,
}
libc_hidden_def (getaddrinfo)
-static_link_warning (getaddrinfo)
+nss_interface_function (getaddrinfo)
void
freeaddrinfo (struct addrinfo *ai)
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index 1dc45e8ee2..911cbfab5d 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -401,8 +401,10 @@ __getcwd (buf, size)
goto lose;
}
+#ifdef _DIRENT_HAVE_D_TYPE
if (d->d_type != DT_DIR && d->d_type != DT_UNKNOWN)
continue;
+#endif
if (d->d_name[0] == '.'
&& (d->d_name[1] == '\0'
|| (d->d_name[1] == '.' && d->d_name[2] == '\0')))
diff --git a/sysdeps/unix/mkfifo.c b/sysdeps/posix/mkfifo.c
index 70329bd12a..70329bd12a 100644
--- a/sysdeps/unix/mkfifo.c
+++ b/sysdeps/posix/mkfifo.c
diff --git a/sysdeps/unix/mkfifoat.c b/sysdeps/posix/mkfifoat.c
index 33fa6bde71..33fa6bde71 100644
--- a/sysdeps/unix/mkfifoat.c
+++ b/sysdeps/posix/mkfifoat.c
diff --git a/sysdeps/unix/nice.c b/sysdeps/posix/nice.c
index b986ffbf30..b986ffbf30 100644
--- a/sysdeps/unix/nice.c
+++ b/sysdeps/posix/nice.c
diff --git a/sysdeps/unix/opendir.c b/sysdeps/posix/opendir.c
index e093142f62..f1cc1aeb57 100644
--- a/sysdeps/unix/opendir.c
+++ b/sysdeps/posix/opendir.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991-1996,98,2000-2003,2005,2007,2009,2011
- Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +32,11 @@
#include <not-cancel.h>
#include <kernel-features.h>
+/* The st_blksize value of the directory is used as a hint for the
+ size of the buffer which receives struct dirent values from the
+ kernel. st_blksize is limited to MAX_DIR_BUFFER_SIZE, in case the
+ file system provides a bogus value. */
+#define MAX_DIR_BUFFER_SIZE 1048576U
/* opendir() must not accidentally open something other than a directory.
Some OS's have kernel support for that, some don't. In the worst
@@ -192,8 +196,11 @@ __alloc_dir (int fd, bool close_fd, int flags, const struct stat64 *statp)
? sizeof (struct dirent64) : BUFSIZ);
size_t allocation = default_allocation;
#ifdef _STATBUF_ST_BLKSIZE
- if (statp != NULL && default_allocation < statp->st_blksize)
- allocation = statp->st_blksize;
+ /* Increase allocation if requested, but not if the value appears to
+ be bogus. */
+ if (statp != NULL)
+ allocation = MIN (MAX ((size_t) statp->st_blksize, default_allocation),
+ MAX_DIR_BUFFER_SIZE);
#endif
DIR *dirp = (DIR *) malloc (sizeof (DIR) + allocation);
diff --git a/sysdeps/posix/pwrite64.c b/sysdeps/posix/pwrite64.c
index d9ec10f38d..61c193bea3 100644
--- a/sysdeps/posix/pwrite64.c
+++ b/sysdeps/posix/pwrite64.c
@@ -1,6 +1,6 @@
/* Write block to given position in file without changing file pointer.
POSIX version.
- Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -56,7 +56,6 @@ __libc_pwrite64 (int fd, const void *buf, size_t nbyte, off64_t offset)
return result;
}
#ifndef __libc_pwrite64
-libc_hidden_def (__libc_pwrite64)
weak_alias (__libc_pwrite64, __pwrite64)
libc_hidden_weak (__pwrite64)
weak_alias (__libc_pwrite64, pwrite64)
diff --git a/sysdeps/unix/readdir.c b/sysdeps/posix/readdir.c
index be0fcaee9f..be0fcaee9f 100644
--- a/sysdeps/unix/readdir.c
+++ b/sysdeps/posix/readdir.c
diff --git a/sysdeps/unix/readdir_r.c b/sysdeps/posix/readdir_r.c
index bfa2c0b8f5..bfa2c0b8f5 100644
--- a/sysdeps/unix/readdir_r.c
+++ b/sysdeps/posix/readdir_r.c
diff --git a/sysdeps/unix/rewinddir.c b/sysdeps/posix/rewinddir.c
index f8eefea542..f8eefea542 100644
--- a/sysdeps/unix/rewinddir.c
+++ b/sysdeps/posix/rewinddir.c
diff --git a/sysdeps/unix/seekdir.c b/sysdeps/posix/seekdir.c
index 88e34ee28f..88e34ee28f 100644
--- a/sysdeps/unix/seekdir.c
+++ b/sysdeps/posix/seekdir.c
diff --git a/sysdeps/posix/sleep.c b/sysdeps/posix/sleep.c
index dfd7420acf..b3c9e27f11 100644
--- a/sysdeps/posix/sleep.c
+++ b/sysdeps/posix/sleep.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
+/* Sleep for a given number of seconds. POSIX.1 version.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,20 +16,12 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <signal.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
+#include <sys/param.h>
-/* SIGALRM signal handler for `sleep'. This does nothing but return,
- but SIG_IGN isn't supposed to break `pause'. */
-static void
-sleep_handler (int sig)
-{
- return;
-}
-
/* Make the process sleep for SECONDS seconds, or until a signal arrives
and is not ignored. The function returns the number of seconds less
than SECONDS which it actually slept (zero if it slept the full time).
@@ -39,67 +32,44 @@ sleep_handler (int sig)
unsigned int
__sleep (unsigned int seconds)
{
- unsigned int remaining, slept;
- time_t before, after;
- sigset_t set, oset;
- struct sigaction act, oact;
- int save = errno;
-
- if (seconds == 0)
- return 0;
-
- /* Block SIGALRM signals while frobbing the handler. */
- if (sigemptyset (&set) < 0 ||
- sigaddset (&set, SIGALRM) < 0 ||
- sigprocmask (SIG_BLOCK, &set, &oset))
- return seconds;
-
- act.sa_handler = sleep_handler;
- act.sa_flags = 0;
- act.sa_mask = oset; /* execute handler with original mask */
- if (sigaction (SIGALRM, &act, &oact) < 0)
- return seconds;
-
- before = time ((time_t *) NULL);
- remaining = alarm (seconds);
-
- if (remaining > 0 && remaining < seconds)
+ /* This is not necessary but some buggy programs depend on it. */
+ if (__builtin_expect (seconds == 0, 0))
{
- /* The user's alarm will expire before our own would.
- Restore the user's signal action state and let his alarm happen. */
- (void) sigaction (SIGALRM, &oact, (struct sigaction *) NULL);
- alarm (remaining); /* Restore sooner alarm. */
- sigsuspend (&oset); /* Wait for it to go off. */
- after = time ((time_t *) NULL);
+#ifdef CANCELLATION_P
+ CANCELLATION_P (THREAD_SELF);
+#endif
+ return 0;
}
- else
- {
- /* Atomically restore the old signal mask
- (which had better not block SIGALRM),
- and wait for a signal to arrive. */
- sigsuspend (&oset);
- after = time ((time_t *) NULL);
+ int save_errno = errno;
- /* Restore the old signal action state. */
- (void) sigaction (SIGALRM, &oact, (struct sigaction *) NULL);
+ const unsigned int max
+ = (unsigned int) (((unsigned long int) (~((time_t) 0))) >> 1);
+ struct timespec ts = { 0, 0 };
+ do
+ {
+ if (sizeof (ts.tv_sec) <= sizeof (seconds))
+ {
+ /* Since SECONDS is unsigned assigning the value to .tv_sec can
+ overflow it. In this case we have to wait in steps. */
+ ts.tv_sec += MIN (seconds, max);
+ seconds -= (unsigned int) ts.tv_sec;
+ }
+ else
+ {
+ ts.tv_sec = (time_t) seconds;
+ seconds = 0;
+ }
+
+ if (__nanosleep (&ts, &ts) < 0)
+ /* We were interrupted.
+ Return the number of (whole) seconds we have not yet slept. */
+ return seconds + ts.tv_sec;
}
+ while (seconds > 0);
- /* Notice how long we actually slept. */
- slept = after - before;
-
- /* Restore the user's alarm if we have not already past it.
- If we have, be sure to turn off the alarm in case a signal
- other than SIGALRM was what woke us up. */
- (void) alarm (remaining > slept ? remaining - slept : 0);
-
- /* Restore the original signal mask. */
- (void) sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
-
- /* Restore the `errno' value we started with.
- Some of the calls we made might have failed, but we didn't care. */
- __set_errno (save);
+ __set_errno (save_errno);
- return slept > seconds ? 0 : seconds - slept;
+ return 0;
}
weak_alias (__sleep, sleep)
diff --git a/sysdeps/posix/spawni.c b/sysdeps/posix/spawni.c
index abbf956226..2d3ae941dd 100644
--- a/sysdeps/posix/spawni.c
+++ b/sysdeps/posix/spawni.c
@@ -1,5 +1,5 @@
/* Guts of POSIX spawn interface. Generic POSIX.1 version.
- Copyright (C) 2000-2005, 2006, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <paths.h>
#include <spawn.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
index d9b3c83ab7..bfe28b47ee 100644
--- a/sysdeps/posix/sysconf.c
+++ b/sysdeps/posix/sysconf.c
@@ -1227,6 +1227,7 @@ __sysconf (name)
case _SC_LEVEL3_CACHE_LINESIZE:
case _SC_LEVEL4_CACHE_SIZE:
case _SC_LEVEL4_CACHE_ASSOC:
+ case _SC_LEVEL4_CACHE_LINESIZE:
/* In general we cannot determine these values. Therefore we
return zero which indicates that no information is
available. */
diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c
index c4d65bf128..5973b6265d 100644
--- a/sysdeps/posix/system.c
+++ b/sysdeps/posix/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2000,2002,2003,2005,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -70,13 +70,13 @@ do_system (const char *line)
{
if (__sigaction (SIGINT, &sa, &intr) < 0)
{
- SUB_REF ();
+ (void) SUB_REF ();
goto out;
}
if (__sigaction (SIGQUIT, &sa, &quit) < 0)
{
save = errno;
- SUB_REF ();
+ (void) SUB_REF ();
goto out_restore_sigint;
}
}
diff --git a/sysdeps/unix/telldir.c b/sysdeps/posix/telldir.c
index 4a3ad25b1d..4a3ad25b1d 100644
--- a/sysdeps/unix/telldir.c
+++ b/sysdeps/posix/telldir.c
diff --git a/sysdeps/unix/time.c b/sysdeps/posix/time.c
index e026a384df..e026a384df 100644
--- a/sysdeps/unix/time.c
+++ b/sysdeps/posix/time.c
diff --git a/sysdeps/unix/utime.c b/sysdeps/posix/utime.c
index a750ecc290..a750ecc290 100644
--- a/sysdeps/unix/utime.c
+++ b/sysdeps/posix/utime.c
diff --git a/sysdeps/powerpc/configure b/sysdeps/powerpc/configure
index c3ad67f012..4afbc29ab3 100644
--- a/sysdeps/powerpc/configure
+++ b/sysdeps/powerpc/configure
@@ -1,85 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/powerpc.
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index ffb8e3a952..b378065828 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -760,6 +760,35 @@ float: 2
ifloat: 2
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - pi i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
float: 3
ifloat: 3
@@ -773,15 +802,71 @@ ldouble: 2
Test "Imaginary part of: clog (0.75 + 1.25 i) == 0.376885901188190075998919126749298416 + 1.03037682652431246378774332703115153 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: clog (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 709.8942846690411016323109979483151967689 + 0.4636476090008061606231772164674799632783 i":
double: 1
idouble: 1
+Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + +0 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i) == 88.69109041335841930424871526389807508374 - 0 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x11682p-23 + 0x7ffed1p-23 i) == 1.1723955140027907954461000991619077811832e-12 + 1.5622968405332756349813737986164832897108 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x155f8afc4c48685bf63610p-85 + 0x17d0cf2652cdbeb1294e19p-85 i) == -4.7775669192897997174762089350332738583822e-50 + 0.8393953487996880419413728440067635213372 i":
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog (0x15cfbd1990d1ffp-53 + 0x176a3973e09a9ap-53 i) == 1.0168910106364605304135563536838075568606e-30 + 0.8208373755522359859870890246475340086663 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x187190c1a334497bdbde5a95f48p-106 + 0x3b25f08062d0a095c4cfbbc338dp-106 i) == -1.7471844652198029695350765775994001163767e-63 + 1.1789110097072986038243729592318526094314 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
double: 1
idouble: 1
Test "Real part of: clog (0x1p-147 + 0x1p-147 i) == -101.5460619520319878296245057936228672231 + pi/4 i":
float: 1
ifloat: 1
+Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 + pi/2 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i) == 88.69109041335841930424871526389807508374 - pi/2 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x4d4ep-15 + 0x6605p-15 i) == -1.6298145321400412054744424587143483169412e-08 + 0.9223574537155056772124552172295398141249 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog (0x4d9c37e2b5cb4533p-63 + 0x65c98be2385a042ep-63 i) == 6.4064442119814669184296141278612389400075e-37 + 0.9193591364645830864185131402313014890145 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6241ef0da53f539f02fad67dabp-106 + 0x3fb46641182f7efd9caa769dac0p-106 i) == 4.3299788920664682288477984749202524623248e-63 + 1.4746938237585656250866370987773473745867 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xa1f2c1p-24 + 0xc643aep-24 i) == -1.0480505352462576151523512837107080269981e-13 + 0.8858771987699967480545613322309315260313 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xa4722f19346cp-51 + 0x7f9631c5e7f07p-51 i) == -6.2122796286154679676173624516405339768606e-30 + 1.4904138780720095276446375492434049214172 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xf2p-10 + 0x3e3p-10 i) == 6.1988446308070710970664736815277450078106e-06 + 1.3322126499153926210226335249558203898460 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
+float: 1
+ifloat: 1
# clog10
Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
@@ -798,6 +883,69 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+ildouble: 2
+ldouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i) == 308.2409272754311106024666378243768099991 - 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i) == 38.51805116050395969095658815123105801479 + 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i) == 38.51805116050395969095658815123105801479 - 1.364376353841841347485783625431355770210 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i) == 2.556638434669064077889576526006849923281e-13 + 1.364375882602207106407956770293808181427 i":
+double: 1
+idouble: 1
Test "Real part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
double: 1
idouble: 1
@@ -870,8 +1018,40 @@ ldouble: 1
Test "Real part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
float: 2
ifloat: 2
-ildouble: 3
-ldouble: 3
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i) == 2.217530356103816369479108963807448194409e-31 + 6.821881769209202348667823902864283966959e-1 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i) == 2.114801746467415208319767917450504756866e-37 + 6.821881769209206733143018621078368211515e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i) == 38.68235441693561449174780668781319348761 + pi/4*log10(e) i":
double: 1
float: 1
@@ -890,11 +1070,45 @@ ldouble: 1
Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 308.3031705664207720674749211936626341569 + 0.2013595981366865903254995612594728746470 i":
double: 1
idouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x155f8afc4c48685bf63610p-85 + 0x17d0cf2652cdbeb1294e19p-85 i) == -2.0748709499710785084693619097712106753591e-50 + 0.3645447681189598740620098186365764884771 i":
+ildouble: 2
+ldouble: 2
+Test "Real part of: clog10 (0x15d8ab6ed05ca514086ac3a1e84p-105 + 0x1761e480aa094c0b10b34b09ce9p-105 i) == 4.3548095442952115860848857519953610343042e-63 + 0.3558376234889641500775150477035448866763 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i) == -323.1557003452838130619487034867432642357 + pi/4*log10(e) i":
double: 1
idouble: 1
@@ -903,6 +1117,11 @@ double: 1
idouble: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i) == 308.2409272754311106024666378243768099991 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i) == -44.10089436477324509881274807713822842154 + pi/4*log10(e) i":
double: 1
float: 1
@@ -910,6 +1129,13 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 + 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i) == -44.70295435610120748924022586658721447508 + pi/4*log10(e) i":
double: 1
float: 1
@@ -917,6 +1143,102 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i) == 38.51805116050395969095658815123105801479 - 0.6821881769209206737428918127156778851051 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i) == 7.730698388614835910296270976605350994446e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i) == 1.932674597153708977574067744151337748612e-308 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i) == 4.831686492884272443935169360378344371529e-309 + 6.821881769209206737428918127156778851051e-1 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i) == 4.084085680564517578238994467153626207224e-38 + 6.821881769209206735545466044044889962925e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i) == 1.021021420141129394559748616788406551878e-38 + 6.821881769209206736487192085600834406988e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i) == 2.552553550352823486399371541971016379740e-39 + 6.821881769209206736958055106378806629019e-1 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x298c62cb546588a7p-63 + 0x7911b1dfcc4ecdaep-63 i) == -5.1816837072162316773907242302011632570857e-37 + 0.5386167838952956925896424154370364458140 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x81b7efa81fc35ad1p-65 + 0x1ef4b835f1c79d812p-65 i) == -4.3074341162203896332989394770760901408798e-39 + 0.5709443672155660428417571212549720987784 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
double: 1
float: 1
@@ -947,6 +1269,12 @@ ildouble: 1
ldouble: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (16.0) == -0.9576594803233846418996372326511034717803":
ildouble: 2
ldouble: 2
@@ -1128,6 +1456,8 @@ double: 1
float: 4
idouble: 1
ifloat: 4
+ildouble: 2
+ldouble: 2
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
float: 1
ifloat: 1
@@ -1141,6 +1471,8 @@ double: 2
float: 4
idouble: 2
ifloat: 4
+ildouble: 4
+ldouble: 4
Test "Imaginary part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i) == 0.0846958290317209430433805274189191353 + 0.513285749182902449043287190519090481 i":
float: 1
ifloat: 1
@@ -1255,6 +1587,9 @@ ildouble: 1
ldouble: 1
# csqrt
+Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i) == 4.934094449071842328766868579214125217132e-20 - 1.191195773697904627170323731331667740087e-19 i":
+double: 1
+idouble: 1
Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
float: 1
ifloat: 1
@@ -1273,6 +1608,9 @@ idouble: 1
Test "Imaginary part of: csqrt (0 - 1 i) == M_SQRT_2_2 - M_SQRT_2_2 i":
double: 1
idouble: 1
+Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i) == 1.191195773697904627170323731331667740087e-19 + 4.934094449071842328766868579214125217132e-20 i":
+double: 1
+idouble: 1
Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i) == 1.844674352395372953599975585936590505260e+19 + 2.710505511993121390769065968615872097053e-20 i":
float: 1
ifloat: 1
@@ -1293,6 +1631,9 @@ idouble: 1
Test "Imaginary part of: csqrt (0x1p-1073 + 0x1p-1073 i) == 3.453664695497464982856905711457966660085e-162 + 1.430554756764195530630723976279903095110e-162 i":
double: 1
idouble: 1
+Test "Imaginary part of: csqrt (0x1p-1074 + 0x1p-1074 i) == 2.442109726130830256743814843868934877597e-162 + 1.011554969366634726113090867589031782487e-162 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: csqrt (0x1p-147 + 0x1p-147 i) == 8.225610928685557596194006925540350401606e-23 + 3.407159605465907500737319471202779419102e-23 i":
double: 1
idouble: 1
@@ -1391,8 +1732,8 @@ ldouble: 1
# ctan_towardzero
Test "Real part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
-ldouble: 4
ildouble: 4
+ldouble: 4
Test "Imaginary part of: ctan_towardzero (0x1.921fb54442d18p+0 + 0x1p-1074 i) == 1.633123935319536975596773704152891653086e16 + 1.317719414943508315995636961402669067843e-291 i":
ildouble: 13
ldouble: 13
@@ -1435,9 +1776,8 @@ ldouble: 1
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
double: 1
float: 2
-idouble: 1
-ifloat: 2
idouble: 2
+ifloat: 2
ildouble: 2
ldouble: 2
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
@@ -1469,8 +1809,8 @@ Test "Real part of: ctanh (1 + 0x1p1023 i) == 0.87860631188830686954625402262198
ildouble: 1
ldouble: 1
Test "Imaginary part of: ctanh (1 + 0x1p1023 i) == 0.8786063118883068695462540226219865087189 - 0.2254627924997545057926782581695274244229 i":
-idouble: 1
double: 1
+idouble: 1
Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
double: 1
float: 1
@@ -2114,6 +2454,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
float: 1
@@ -2185,6 +2531,60 @@ double: 1
idouble: 1
# tan
+Test "tan (-0xc.908p-4) == -0.9997603425502441410973077452249560802034":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90cp-4) == -0.9998823910588060302788513970802357770031":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90ep-4) == -0.9999434208994808753305784795924711152508":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90f8p-4) == -0.9999891957244072765118898375645469865764":
+ildouble: 2
+ldouble: 2
+Test "tan (-0xc.90fcp-4) == -0.9999968250656122402859679132395522927393":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.90fd8p-4) == -0.9999996860835706212861509874451585282616":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.90fdap-4) == -0.9999999245021033010474530133665235922808":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.92p-4) == -1.0004928571392300571266638743539017593717":
+ildouble: 1
+ldouble: 1
+Test "tan (-0xc.9p-4) == -0.9995162902115457818029468900654150261381":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.908p-4) == 0.9997603425502441410973077452249560802034":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90cp-4) == 0.9998823910588060302788513970802357770031":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90ep-4) == 0.9999434208994808753305784795924711152508":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90f8p-4) == 0.9999891957244072765118898375645469865764":
+ildouble: 2
+ldouble: 2
+Test "tan (0xc.90fcp-4) == 0.9999968250656122402859679132395522927393":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.90fd8p-4) == 0.9999996860835706212861509874451585282616":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.90fdap-4) == 0.9999999245021033010474530133665235922808":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.92p-4) == 1.0004928571392300571266638743539017593717":
+ildouble: 1
+ldouble: 1
+Test "tan (0xc.9p-4) == 0.9995162902115457818029468900654150261381":
+ildouble: 1
+ldouble: 1
Test "tan (pi/4) == 1":
double: 1
idouble: 1
@@ -2721,32 +3121,32 @@ double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 2
-ldouble: 2
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "clog":
double: 1
float: 3
idouble: 1
ifloat: 3
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: Real part of "clog10":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
-ildouble: 3
-ldouble: 3
+ildouble: 2
+ldouble: 2
Function: Imaginary part of "clog10":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "cos":
double: 2
@@ -2809,8 +3209,8 @@ double: 2
float: 5
idouble: 2
ifloat: 5
-ildouble: 2
-ldouble: 2
+ildouble: 4
+ldouble: 4
Function: Imaginary part of "cpow":
double: 2
@@ -3223,8 +3623,8 @@ idouble: 1
Function: "tan":
double: 1
idouble: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "tan_downward":
float: 1
diff --git a/sysdeps/powerpc/powerpc32/configure b/sysdeps/powerpc/powerpc32/configure
index 86ecfdcf4a..31c571d9ab 100644
--- a/sysdeps/powerpc/powerpc32/configure
+++ b/sysdeps/powerpc/powerpc32/configure
@@ -1,85 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/powerpc/powerpc32.
diff --git a/sysdeps/powerpc/powerpc32/power6/wcschr.c b/sysdeps/powerpc/powerpc32/power6/wcschr.c
new file mode 100644
index 0000000000..a981427f72
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/power6/wcschr.c
@@ -0,0 +1,88 @@
+/* wcschr.c - Wide Character Search for powerpc32/power6.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <http://www.gnu.org/licenses/>. */
+
+#include <wchar.h>
+
+
+/* Find the first occurrence of WC in WCS. */
+wchar_t *
+wcschr (wcs, wc)
+ register const wchar_t *wcs;
+ register const wchar_t wc;
+{
+ register const wchar_t *wcs2 = wcs + 1;
+
+ if (*wcs == wc)
+ return (wchar_t *) wcs;
+ if (*wcs == L'\0')
+ return NULL;
+
+ do
+ {
+ wcs += 2;
+
+ if (*wcs2 == wc)
+ return (wchar_t *) wcs2;
+ if (*wcs2 == L'\0')
+ return NULL;
+ wcs2 += 2;
+
+ if (*wcs == wc)
+ return (wchar_t *) wcs;
+ if (*wcs == L'\0')
+ return NULL;
+ wcs += 2;
+
+ if (*wcs2 == wc)
+ return (wchar_t *) wcs2;
+ if (*wcs2 == L'\0')
+ return NULL;
+ wcs2 += 2;
+
+ if (*wcs == wc)
+ return (wchar_t *) wcs;
+ if (*wcs == L'\0')
+ return NULL;
+ wcs += 2;
+
+ if (*wcs2 == wc)
+ return (wchar_t *) wcs2;
+ if (*wcs2 == L'\0')
+ return NULL;
+ wcs2 += 2;
+
+ if (*wcs == wc)
+ return (wchar_t *) wcs;
+ if (*wcs == L'\0')
+ return NULL;
+ wcs += 2;
+
+ if (*wcs2 == wc)
+ return (wchar_t *) wcs2;
+ if (*wcs2 == L'\0')
+ return NULL;
+ wcs2 += 2;
+
+ if (*wcs == wc)
+ return (wchar_t *) wcs;
+ }
+ while (*wcs != L'\0');
+
+ return NULL;
+}
+libc_hidden_def (wcschr)
diff --git a/sysdeps/powerpc/powerpc32/power6/wcscpy.c b/sysdeps/powerpc/powerpc32/power6/wcscpy.c
new file mode 100644
index 0000000000..9bd907788e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/power6/wcscpy.c
@@ -0,0 +1,104 @@
+/* wcscpy.c - Wide Character Copy for powerpc32/power6.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+#include <wchar.h>
+
+
+/* Copy SRC to DEST. */
+wchar_t *
+wcscpy (dest, src)
+ wchar_t *dest;
+ const wchar_t *src;
+{
+ wint_t c,d;
+ wchar_t *wcp, *wcp2;
+
+ if (__alignof__ (wchar_t) >= sizeof (wchar_t))
+ {
+ const ptrdiff_t off = dest - src;
+
+ wcp = (wchar_t *) src;
+ wcp2 = wcp + 1 ;
+
+ do
+ {
+ d = *wcp;
+ wcp[off] = d;
+ if (d == L'\0')
+ return dest;
+ wcp += 2;
+
+ c = *wcp2;
+ wcp2[off] = c;
+ if (c == L'\0')
+ return dest;
+ wcp2 += 2;
+
+ d = *wcp;
+ wcp[off] = d;
+ if (d == L'\0')
+ return dest;
+ wcp += 2;
+
+ c = *wcp2;
+ wcp2[off] = c;
+ if (c == L'\0')
+ return dest;
+ wcp2 += 2;
+
+ d = *wcp;
+ wcp[off] = d;
+ if (d == L'\0')
+ return dest;
+ wcp += 2;
+
+ c = *wcp2;
+ wcp2[off] = c;
+ if (c == L'\0')
+ return dest;
+ wcp2 += 2;
+
+ d = *wcp;
+ wcp[off] = d;
+ if (d == L'\0')
+ return dest;
+ wcp += 2;
+
+ c = *wcp2;
+ wcp2[off] = c;
+ if (c == L'\0')
+ return dest;
+ wcp2 += 2;
+ }
+ while (c != L'\0');
+
+ }
+ else
+ {
+ wcp = dest;
+
+ do
+ {
+ c = *src++;
+ *wcp++ = c;
+ }
+ while (c != L'\0');
+ }
+ return dest;
+}
diff --git a/sysdeps/powerpc/powerpc32/power6/wcsrchr.c b/sysdeps/powerpc/powerpc32/power6/wcsrchr.c
new file mode 100644
index 0000000000..f9db8f8b53
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/power6/wcsrchr.c
@@ -0,0 +1,88 @@
+/* wcsrchr.c - Wide Character Reverse Search for powerpc32/power6.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <http://www.gnu.org/licenses/>. */
+
+#include <wchar.h>
+
+
+/* Find the last occurrence of WC in WCS. */
+wchar_t *
+wcsrchr (wcs, wc)
+ register const wchar_t *wcs;
+ register const wchar_t wc;
+{
+ register const wchar_t *wcs2 = wcs + 1;
+ const wchar_t *retval = NULL;
+
+ if (*wcs == wc)
+ retval = wcs;
+
+ if (*wcs == L'\0') return (wchar_t *) retval;
+
+ do
+ {
+ wcs+=2;
+
+ if (*wcs2 == wc)
+ retval = wcs2;
+ if (*wcs2 == L'\0')
+ return (wchar_t *) retval;
+ wcs2+=2;
+
+ if (*wcs == wc)
+ retval = wcs;
+ if (*wcs == L'\0')
+ return (wchar_t *) retval;
+ wcs+=2;
+
+ if (*wcs2 == wc)
+ retval = wcs2;
+ if (*wcs2 == L'\0')
+ return (wchar_t *) retval;
+ wcs2+=2;
+
+ if (*wcs == wc)
+ retval = wcs;
+ if (*wcs == L'\0')
+ return (wchar_t *) retval;
+ wcs+=2;
+
+ if (*wcs2 == wc)
+ retval = wcs2;
+ if (*wcs2 == L'\0')
+ return (wchar_t *) retval;
+ wcs2+=2;
+
+ if (*wcs == wc)
+ retval = wcs;
+ if (*wcs == L'\0')
+ return (wchar_t *) retval;
+ wcs+=2;
+
+ if (*wcs2 == wc)
+ retval = wcs2;
+ if (*wcs2 == L'\0')
+ return (wchar_t *) retval;
+ wcs2+=2;
+
+ if (*wcs == wc)
+ retval = wcs;
+ }
+ while (*wcs != L'\0');
+
+ return (wchar_t *) retval;
+}
diff --git a/sysdeps/powerpc/powerpc32/power7/memchr.S b/sysdeps/powerpc/powerpc32/power7/memchr.S
index 85cc2999ae..ca2bc49579 100644
--- a/sysdeps/powerpc/powerpc32/power7/memchr.S
+++ b/sysdeps/powerpc/powerpc32/power7/memchr.S
@@ -1,5 +1,5 @@
/* Optimized memchr implementation for PowerPC32/POWER7 using cmpb insn.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
@@ -33,19 +33,23 @@ ENTRY (BP_SYM (__memchr))
cmplwi r5,16
ble L(small_range)
- cmplw cr7,r3,r7 /* Is the address equal or less than r3? If
- it's equal or less, it means size is either 0
- or a negative number. */
+ cmplw cr7,r3,r7 /* Compare the starting address (r3) with the
+ ending address (r7). If (r3 >= r7), the size
+ passed in is zero or negative. */
ble cr7,L(proceed)
- li r7,-1 /* Make r11 the biggest if r4 <= 0. */
+ li r7,-1 /* Artificially set our ending address (r7)
+ such that we will exit early. */
L(proceed):
rlwinm r6,r3,3,27,28 /* Calculate padding. */
+ cmpli cr6,r6,0 /* cr6 == Do we have padding? */
lwz r12,0(r8) /* Load word from memory. */
cmpb r10,r12,r4 /* Check for BYTE's in WORD1. */
+ beq cr6,L(proceed_no_padding)
slw r10,r10,r6
srw r10,r10,r6
- cmplwi cr7,r10,0 /* If r10 == 0, no BYTE's have been found. */
+L(proceed_no_padding):
+ cmplwi cr7,r10,0 /* If r10 == 0, no BYTEs have been found. */
bne cr7,L(done)
/* Are we done already? */
@@ -73,7 +77,7 @@ L(proceed):
L(loop_setup):
sub r5,r7,r9
srwi r6,r5,3 /* Number of loop iterations. */
- mtctr r6 /* Setup the counter. */
+ mtctr r6 /* Setup the counter. */
b L(loop)
/* Main loop to look for BYTE backwards in the string. Since
it's a small loop (< 8 instructions), align it to 32-bytes. */
@@ -82,7 +86,6 @@ L(loop):
/* Load two words, compare and merge in a
single register for speed. This is an attempt
to speed up the byte-checking process for bigger strings. */
-
lwz r12,4(r8)
lwzu r11,8(r8)
cmpb r10,r12,r4
@@ -91,11 +94,11 @@ L(loop):
cmplwi cr7,r5,0
bne cr7,L(found)
bdnz L(loop)
+
/* We're here because the counter reached 0, and that means we
- didn't have any matches for BYTE in the whole range. Just
- return the original range. */
- addi r9,r8,4
- cmplw cr6,r9,r7
+ didn't have any matches for BYTE in the whole range. */
+ subi r11,r7,4
+ cmplw cr6,r8,r11
blt cr6,L(loop_small)
b L(null)
@@ -118,8 +121,7 @@ L(found):
/* r10 has the output of the cmpb instruction, that is, it contains
0xff in the same position as BYTE in the original
word from the string. Use that to calculate the pointer.
- We need to make sure BYTE is *before* the end of the
- range. */
+ We need to make sure BYTE is *before* the end of the range. */
L(done):
cntlzw r0,r10 /* Count leading zeroes before the match. */
srwi r0,r0,3 /* Convert leading zeroes to bytes. */
@@ -137,13 +139,15 @@ L(null):
.align 4
L(small_range):
cmplwi r5,0
- beq L(null)
-
rlwinm r6,r3,3,27,28 /* Calculate padding. */
+ beq L(null) /* This branch is for the cmplwi r5,0 above */
lwz r12,0(r8) /* Load word from memory. */
+ cmplwi cr6,r6,0 /* cr6 == Do we have padding? */
cmpb r10,r12,r4 /* Check for BYTE in DWORD1. */
+ beq cr6,L(small_no_padding)
slw r10,r10,r6
srw r10,r10,r6
+L(small_no_padding):
cmplwi cr7,r10,0
bne cr7,L(done)
@@ -151,18 +155,52 @@ L(small_range):
addi r9,r8,4
cmplw r9,r7
bge L(null)
- b L(loop_small)
- .p2align 5
-L(loop_small):
+L(loop_small): /* loop_small has been unrolled. */
lwzu r12,4(r8)
cmpb r10,r12,r4
addi r9,r8,4
cmplwi cr6,r10,0
+ cmplw r9,r7
bne cr6,L(done)
+ bge L(null)
+
+ lwzu r12,4(r8)
+ cmpb r10,r12,r4
+ addi r9,r8,4
+ cmplwi cr6,r10,0
cmplw r9,r7
+ bne cr6,L(done)
bge L(null)
- b L(loop_small)
+
+ lwzu r12,4(r8)
+ cmpb r10,r12,r4
+ addi r9,r8,4
+ cmplwi cr6,r10,0
+ cmplw r9,r7
+ bne cr6,L(done)
+ bge L(null)
+
+ lwzu r12,4(r8)
+ cmpb r10,r12,r4
+ addi r9,r8,4
+ cmplwi cr6,r10,0
+ cmplw r9,r7
+ bne cr6,L(done)
+ bge L(null)
+
+ /* For most cases we will never get here. Under some combinations of
+ padding + length there is a leftover word that still needs to be
+ checked. */
+ lwzu r12,4(r8)
+ cmpb r10,r12,r4
+ addi r9,r8,4
+ cmplwi cr6,r10,0
+ bne cr6,L(done)
+
+ /* save a branch and exit directly */
+ li r3,0
+ blr
END (BP_SYM (__memchr))
weak_alias (BP_SYM (__memchr), BP_SYM(memchr))
diff --git a/sysdeps/powerpc/powerpc32/sysdep.h b/sysdeps/powerpc/powerpc32/sysdep.h
index 811ebf2aed..02917a8677 100644
--- a/sysdeps/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/powerpc/powerpc32/sysdep.h
@@ -30,15 +30,15 @@
# define CALL_MCOUNT \
mflr r0; \
stw r0,4(r1); \
- cfi_offset (lr, 4); \
+ cfi_offset (lr, 4); \
bl JUMPTARGET(_mcount);
#else /* PROF */
# define CALL_MCOUNT /* Do nothing. */
#endif /* PROF */
#define ENTRY(name) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(2); \
C_LABEL(name) \
cfi_startproc; \
@@ -46,7 +46,7 @@
/* helper macro for accessing the 32-bit powerpc GOT. */
-#define SETUP_GOT_ACCESS(regname,GOT_LABEL) \
+#define SETUP_GOT_ACCESS(regname,GOT_LABEL) \
bcl 20,31,GOT_LABEL ; \
GOT_LABEL: ; \
mflr (regname)
@@ -64,8 +64,8 @@ GOT_LABEL: ; \
past a 2^align boundary. */
#ifdef PROF
# define EALIGN(name, alignt, words) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(2); \
C_LABEL(name) \
cfi_startproc; \
@@ -76,8 +76,8 @@ GOT_LABEL: ; \
0:
#else /* PROF */
# define EALIGN(name, alignt, words) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(alignt); \
EALIGN_W_##words; \
C_LABEL(name) \
@@ -89,7 +89,7 @@ GOT_LABEL: ; \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name)
-#define DO_CALL(syscall) \
+#define DO_CALL(syscall) \
li 0,syscall; \
sc
diff --git a/sysdeps/powerpc/powerpc64/configure b/sysdeps/powerpc/powerpc64/configure
index 7cff76141b..5ddac55922 100644
--- a/sysdeps/powerpc/powerpc64/configure
+++ b/sysdeps/powerpc/powerpc64/configure
@@ -1,85 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/powerpc/powerpc64.
diff --git a/sysdeps/powerpc/powerpc64/power6/wcschr.c b/sysdeps/powerpc/powerpc64/power6/wcschr.c
new file mode 100644
index 0000000000..9136c02cb5
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power6/wcschr.c
@@ -0,0 +1 @@
+#include "../../powerpc32/power6/wcschr.c"
diff --git a/sysdeps/powerpc/powerpc64/power6/wcscpy.c b/sysdeps/powerpc/powerpc64/power6/wcscpy.c
new file mode 100644
index 0000000000..57b706ab99
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power6/wcscpy.c
@@ -0,0 +1 @@
+#include "../../powerpc32/power6/wcscpy.c"
diff --git a/sysdeps/powerpc/powerpc64/power6/wcsrchr.c b/sysdeps/powerpc/powerpc64/power6/wcsrchr.c
new file mode 100644
index 0000000000..2327c05b04
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power6/wcsrchr.c
@@ -0,0 +1 @@
+#include "../../powerpc32/power6/wcsrchr.c"
diff --git a/sysdeps/powerpc/powerpc64/power7/memchr.S b/sysdeps/powerpc/powerpc64/power7/memchr.S
index f0dbf60d0b..c125a5b354 100644
--- a/sysdeps/powerpc/powerpc64/power7/memchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memchr.S
@@ -1,5 +1,5 @@
/* Optimized memchr implementation for PowerPC64/POWER7 using cmpb insn.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
@@ -29,27 +29,32 @@ ENTRY (BP_SYM (__memchr))
clrrdi r8,r3,3
rlwimi r4,r4,8,16,23
rlwimi r4,r4,16,0,15
- insrdi r4,r4,32,0
add r7,r3,r5 /* Calculate the last acceptable address. */
cmpldi r5,32
+ insrdi r4,r4,32,0
ble L(small_range)
- cmpld cr7,r3,r7 /* Is the address equal or less than r3? If
- it's equal or less, it means size is either 0
- or a negative number. */
+ cmpld cr7,r3,r7 /* Compare the starting address (r3) with the
+ ending address (r7). If (r3 >= r7),
+ the size passed in was zero or negative. */
ble cr7,L(proceed)
- li r7,-1 /* Make r11 the biggest if r4 <= 0. */
+ li r7,-1 /* Artificially set our ending address (r7)
+ such that we will exit early. */
+
L(proceed):
rlwinm r6,r3,3,26,28 /* Calculate padding. */
+ cmpldi cr6,r6,0 /* cr6 == Do we have padding? */
ld r12,0(r8) /* Load doubleword from memory. */
- cmpb r10,r12,r4 /* Check for BYTE's in DWORD1. */
+ cmpb r10,r12,r4 /* Check for BYTEs in DWORD1. */
+ beq cr6,L(proceed_no_padding)
sld r10,r10,r6
srd r10,r10,r6
- cmpldi cr7,r10,0 /* If r10 == 0, no BYTE's's have been found. */
+L(proceed_no_padding):
+ cmpldi cr7,r10,0 /* Does r10 indicate we got a hit? */
bne cr7,L(done)
- /* Are we done already? */
+ /* See if we are at the last acceptable address yet. */
addi r9,r8,8
cmpld cr6,r9,r7
bge cr6,L(null)
@@ -74,7 +79,7 @@ L(proceed):
L(loop_setup):
sub r5,r7,r9
srdi r6,r5,4 /* Number of loop iterations. */
- mtctr r6 /* Setup the counter. */
+ mtctr r6 /* Setup the counter. */
b L(loop)
/* Main loop to look for BYTE backwards in the string. Since
it's a small loop (< 8 instructions), align it to 32-bytes. */
@@ -83,7 +88,6 @@ L(loop):
/* Load two doublewords, compare and merge in a
single register for speed. This is an attempt
to speed up the byte-checking process for bigger strings. */
-
ld r12,8(r8)
ldu r11,16(r8)
cmpb r10,r12,r4
@@ -92,11 +96,11 @@ L(loop):
cmpldi cr7,r5,0
bne cr7,L(found)
bdnz L(loop)
+
/* We're here because the counter reached 0, and that means we
- didn't have any matches for BYTE in the whole range. Just return
- the original range. */
- addi r9,r8,8
- cmpld cr6,r9,r7
+ didn't have any matches for BYTE in the whole range. */
+ subi r11,r7,8
+ cmpld cr6,r8,r11
blt cr6,L(loop_small)
b L(null)
@@ -119,8 +123,7 @@ L(found):
/* r10 has the output of the cmpb instruction, that is, it contains
0xff in the same position as BYTE in the original
doubleword from the string. Use that to calculate the pointer.
- We need to make sure BYTE is *before* the end of the
- range. */
+ We need to make sure BYTE is *before* the end of the range. */
L(done):
cntlzd r0,r10 /* Count leading zeroes before the match. */
srdi r0,r0,3 /* Convert leading zeroes to bytes. */
@@ -138,13 +141,16 @@ L(null):
.align 4
L(small_range):
cmpldi r5,0
- beq L(null)
-
rlwinm r6,r3,3,26,28 /* Calculate padding. */
+ beq L(null) /* This branch is for the cmpldi r5,0 above. */
ld r12,0(r8) /* Load word from memory. */
+ cmpldi cr6,r6,0 /* cr6 == Do we have padding? */
cmpb r10,r12,r4 /* Check for BYTE in DWORD1. */
+ /* If no padding, skip the shifts. */
+ beq cr6,L(small_no_padding)
sld r10,r10,r6
srd r10,r10,r6
+L(small_no_padding):
cmpldi cr7,r10,0
bne cr7,L(done)
@@ -152,18 +158,49 @@ L(small_range):
addi r9,r8,8
cmpld r9,r7
bge L(null)
- b L(loop_small)
+ /* If we're not done, drop through into loop_small. */
+
+L(loop_small): /* loop_small has been unrolled. */
+ ldu r12,8(r8)
+ cmpb r10,r12,r4
+ addi r9,r8,8
+ cmpldi cr6,r10,0
+ cmpld r9,r7
+ bne cr6,L(done) /* Found something. */
+ bge L(null) /* Hit end of string (length). */
- .p2align 5
-L(loop_small):
ldu r12,8(r8)
cmpb r10,r12,r4
addi r9,r8,8
cmpldi cr6,r10,0
- bne cr6,L(done)
cmpld r9,r7
+ bne cr6,L(done) /* Found something. */
bge L(null)
- b L(loop_small)
+
+ ldu r12,8(r8)
+ subi r11,r7,8
+ cmpb r10,r12,r4
+ cmpldi cr6,r10,0
+ ori r2,r2,0 /* Force a dispatch group. */
+ bne cr6,L(done)
+
+ cmpld r8,r11 /* At end of range? */
+ bge L(null)
+
+ /* For most cases we will never get here. Under some combinations of
+ padding + length there is a leftover double that still needs to be
+ checked. */
+ ldu r12,8(r8)
+ cmpb r10,r12,r4
+ addi r9,r8,8
+ cmpldi cr6,r10,0
+ cmpld r9,r7
+ bne cr6,L(done) /* Found something. */
+
+ /* Save a branch and exit directly. */
+ li r3,0
+ blr
+
END (BP_SYM (__memchr))
weak_alias (BP_SYM (__memchr), BP_SYM(memchr))
diff --git a/sysdeps/powerpc/sys/platform/ppc.h b/sysdeps/powerpc/sys/platform/ppc.h
index 165652c7cc..3780f57ba1 100644
--- a/sysdeps/powerpc/sys/platform/ppc.h
+++ b/sysdeps/powerpc/sys/platform/ppc.h
@@ -20,6 +20,7 @@
#define _SYS_PLATFORM_PPC_H 1
#include <stdint.h>
+#include <bits/ppc.h>
/* Read the Time Base Register. */
static inline uint64_t
diff --git a/sysdeps/powerpc/sysdep.h b/sysdeps/powerpc/sysdep.h
index 7682ae9188..302f559702 100644
--- a/sysdeps/powerpc/sysdep.h
+++ b/sysdeps/powerpc/sysdep.h
@@ -147,8 +147,6 @@
/* This seems to always be the case on PPC. */
#define ALIGNARG(log2) log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/pthread/Makeconfig b/sysdeps/pthread/Makeconfig
new file mode 100644
index 0000000000..2b564eae5d
--- /dev/null
+++ b/sysdeps/pthread/Makeconfig
@@ -0,0 +1,2 @@
+# Compile libc code to do internal locking.
+libc-reentrant = yes
diff --git a/sysdeps/pthread/aio_fsync.c b/sysdeps/pthread/aio_fsync.c
index 046e25c171..5b5d1863e7 100644
--- a/sysdeps/pthread/aio_fsync.c
+++ b/sysdeps/pthread/aio_fsync.c
@@ -46,7 +46,7 @@ aio_fsync (int op, struct aiocb *aiocbp)
flags = fcntl (aiocbp->aio_fildes, F_GETFL);
if (__builtin_expect (flags == -1, 0)
- || __builtin_expect ((flags & (O_RDWR | O_WRONLY)) == 0, 0))
+ || __builtin_expect ((flags & O_ACCMODE) == O_RDONLY, 0))
{
__set_errno (EBADF);
return -1;
diff --git a/sysdeps/pthread/aio_notify.c b/sysdeps/pthread/aio_notify.c
index f8c4ccc96e..a9f0648c21 100644
--- a/sysdeps/pthread/aio_notify.c
+++ b/sysdeps/pthread/aio_notify.c
@@ -95,7 +95,7 @@ __aio_notify_only (struct sigevent *sigev)
else if (sigev->sigev_notify == SIGEV_SIGNAL)
{
/* We have to send a signal. */
-#if _POSIX_REALTIME_SIGNALS
+#if _POSIX_REALTIME_SIGNALS > 0
/* Note that the standard gives us the option of using a plain
non-queuing signal here when SA_SIGINFO is not set for the signal. */
# ifdef BROKEN_THREAD_SIGNALS
diff --git a/sysdeps/pthread/configure b/sysdeps/pthread/configure
deleted file mode 100644
index e39d31138d..0000000000
--- a/sysdeps/pthread/configure
+++ /dev/null
@@ -1,3 +0,0 @@
-# Local configure fragment for sysdeps/pthread.
-
-DEFINES="$DEFINES -D_LIBC_REENTRANT"
diff --git a/sysdeps/s390/fpu/get-rounding-mode.h b/sysdeps/s390/fpu/get-rounding-mode.h
new file mode 100644
index 0000000000..3e427eca2c
--- /dev/null
+++ b/sysdeps/s390/fpu/get-rounding-mode.h
@@ -0,0 +1,37 @@
+/* Determine floating-point rounding mode within libc. S/390 version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _S390_GET_ROUNDING_MODE_H
+#define _S390_GET_ROUNDING_MODE_H 1
+
+#include <fenv.h>
+#include <fenv_libc.h>
+#include <fpu_control.h>
+
+/* Return the floating-point rounding mode. */
+
+static inline int
+get_rounding_mode (void)
+{
+ fpu_control_t fc;
+
+ _FPU_GETCW (fc);
+ return fc & FPC_RM_MASK;
+}
+
+#endif /* get-rounding-mode.h */
diff --git a/sysdeps/s390/s390-32/configure b/sysdeps/s390/s390-32/configure
index e982e817f7..669bb9be5c 100644
--- a/sysdeps/s390/s390-32/configure
+++ b/sysdeps/s390/s390-32/configure
@@ -2,3 +2,4 @@
# Local configure fragment for sysdeps/s390.
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/s390/s390-32/multiarch/Makefile b/sysdeps/s390/s390-32/multiarch/Makefile
index 5b0cd49c72..9baeecda64 100644
--- a/sysdeps/s390/s390-32/multiarch/Makefile
+++ b/sysdeps/s390/s390-32/multiarch/Makefile
@@ -1,9 +1,3 @@
-ASFLAGS-.o += -Wa,-mzarch
-ASFLAGS-.os += -Wa,-mzarch
-ASFLAGS-.op += -Wa,-mzarch
-ASFLAGS-.og += -Wa,-mzarch
-ASFLAGS-.ob += -Wa,-mzarch
-ASFLAGS-.oS += -Wa,-mzarch
ifeq ($(subdir),string)
sysdep_routines += ifunc-resolve memset memcpy memcmp
endif
diff --git a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
index fd6e367065..f1bf8a3dc4 100644
--- a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
+++ b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
@@ -32,14 +32,17 @@
".globl __GI_" #FUNC "\n\t" \
".set __GI_" #FUNC "," #FUNC "\n"); \
\
- extern void *FUNC##_z10; \
- extern void *FUNC##_z196; \
- extern void *FUNC##_g5; \
+ /* Make the declarations of the optimized functions hidden in order
+ to prevent GOT slots being generated for them. */ \
+ extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \
+ extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \
+ extern __attribute__((visibility("hidden"))) void *FUNC##_g5; \
\
void *resolve_##FUNC (unsigned long int dl_hwcap) \
{ \
if ((dl_hwcap & HWCAP_S390_STFLE) \
- && (dl_hwcap & HWCAP_S390_HIGH_GPRS)) /* Implies zarch */ \
+ && (dl_hwcap & HWCAP_S390_ZARCH) \
+ && (dl_hwcap & HWCAP_S390_HIGH_GPRS)) \
{ \
/* We want just 1 double word to be returned. */ \
register unsigned long reg0 asm("0") = 0; \
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp.S b/sysdeps/s390/s390-32/multiarch/memcmp.S
index cd8ea86b0c..9ca88911c8 100644
--- a/sysdeps/s390/s390-32/multiarch/memcmp.S
+++ b/sysdeps/s390/s390-32/multiarch/memcmp.S
@@ -31,6 +31,7 @@
ENTRY(memcmp_z196)
.machine "z196"
+ .machinemode "zarch_nohighgprs"
ltr %r4,%r4
je .L_Z196_4
ahi %r4,-1
@@ -64,6 +65,7 @@ END(memcmp_z196)
ENTRY(memcmp_z10)
.machine "z10"
+ .machinemode "zarch_nohighgprs"
ltr %r4,%r4
je .L_Z10_4
ahi %r4,-1
diff --git a/sysdeps/s390/s390-32/multiarch/memcpy.S b/sysdeps/s390/s390-32/multiarch/memcpy.S
index 40f4acfbb6..7b85602aa3 100644
--- a/sysdeps/s390/s390-32/multiarch/memcpy.S
+++ b/sysdeps/s390/s390-32/multiarch/memcpy.S
@@ -31,6 +31,7 @@
ENTRY(memcpy_z196)
.machine "z196"
+ .machinemode "zarch_nohighgprs"
llgfr %r4,%r4
ltgr %r4,%r4
je .L_Z196_4
@@ -61,6 +62,7 @@ END(memcpy_z196)
ENTRY(memcpy_z10)
.machine "z10"
+ .machinemode "zarch_nohighgprs"
llgfr %r4,%r4
cgije %r4,0,.L_Z10_4
aghi %r4,-1
diff --git a/sysdeps/s390/s390-32/multiarch/memset.S b/sysdeps/s390/s390-32/multiarch/memset.S
index 5ce7b4de83..ba43d671c2 100644
--- a/sysdeps/s390/s390-32/multiarch/memset.S
+++ b/sysdeps/s390/s390-32/multiarch/memset.S
@@ -31,6 +31,7 @@
ENTRY(memset_z196)
.machine "z196"
+ .machinemode "zarch_nohighgprs"
llgfr %r4,%r4
ltgr %r4,%r4
je .L_Z196_4
@@ -62,6 +63,7 @@ END(memset_z196)
ENTRY(memset_z10)
.machine "z10"
+ .machinemode "zarch_nohighgprs"
llgfr %r4,%r4
cgije %r4,0,.L_Z10_4
stc %r3,0(%r2)
diff --git a/sysdeps/s390/s390-32/s390-mcount.S b/sysdeps/s390/s390-32/s390-mcount.S
index 1c8c79adac..04e14ebd8f 100644
--- a/sysdeps/s390/s390-32/s390-mcount.S
+++ b/sysdeps/s390/s390-32/s390-mcount.S
@@ -48,7 +48,7 @@
*/
.globl C_SYMBOL_NAME(_mcount)
- ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+ .type C_SYMBOL_NAME(_mcount), @function
cfi_startproc
.align ALIGNARG(4)
C_LABEL(_mcount)
diff --git a/sysdeps/s390/s390-32/sysdep.h b/sysdeps/s390/s390-32/sysdep.h
index 24a07a2a90..78749ee161 100644
--- a/sysdeps/s390/s390-32/sysdep.h
+++ b/sysdeps/s390/s390-32/sysdep.h
@@ -25,15 +25,13 @@
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
/* Define an entry point visible from C. */
#define ENTRY(name) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(2); \
C_LABEL(name) \
cfi_startproc; \
diff --git a/sysdeps/s390/s390-64/configure b/sysdeps/s390/s390-64/configure
index e982e817f7..669bb9be5c 100644
--- a/sysdeps/s390/s390-64/configure
+++ b/sysdeps/s390/s390-64/configure
@@ -2,3 +2,4 @@
# Local configure fragment for sysdeps/s390.
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
index f980bc9390..5f56764909 100644
--- a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
+++ b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
@@ -32,9 +32,11 @@
".globl __GI_" #FUNC "\n\t" \
".set __GI_" #FUNC "," #FUNC "\n"); \
\
- extern void *FUNC##_z10; \
- extern void *FUNC##_z196; \
- extern void *FUNC##_z900; \
+ /* Make the declarations of the optimized functions hidden in order
+ to prevent GOT slots being generated for them. */ \
+ extern __attribute__((visibility("hidden"))) void *FUNC##_z196; \
+ extern __attribute__((visibility("hidden"))) void *FUNC##_z10; \
+ extern __attribute__((visibility("hidden"))) void *FUNC##_z900; \
\
void *resolve_##FUNC (unsigned long int dl_hwcap) \
{ \
diff --git a/sysdeps/s390/s390-64/s390x-mcount.S b/sysdeps/s390/s390-64/s390x-mcount.S
index 5d8ef91178..3d43929892 100644
--- a/sysdeps/s390/s390-64/s390x-mcount.S
+++ b/sysdeps/s390/s390-64/s390x-mcount.S
@@ -44,7 +44,7 @@
_mcount may not modify any register. */
.globl C_SYMBOL_NAME(_mcount)
- ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+ .type C_SYMBOL_NAME(_mcount), @function
cfi_startproc
.align ALIGNARG(4)
C_LABEL(_mcount)
diff --git a/sysdeps/s390/s390-64/sysdep.h b/sysdeps/s390/s390-64/sysdep.h
index b7449b6b15..e62191c2a2 100644
--- a/sysdeps/s390/s390-64/sysdep.h
+++ b/sysdeps/s390/s390-64/sysdep.h
@@ -25,15 +25,13 @@
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
/* Define an entry point visible from C. */
#define ENTRY(name) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(2); \
C_LABEL(name) \
cfi_startproc; \
diff --git a/sysdeps/sh/_mcount.S b/sysdeps/sh/_mcount.S
index 878788b599..7c9f6d132e 100644
--- a/sysdeps/sh/_mcount.S
+++ b/sysdeps/sh/_mcount.S
@@ -20,7 +20,7 @@
#include <sysdep.h>
.globl C_SYMBOL_NAME(_mcount)
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(_mcount),function)
+ .type C_SYMBOL_NAME(_mcount),@function
cfi_startproc
.align 5
C_LABEL(_mcount)
diff --git a/sysdeps/sh/configure b/sysdeps/sh/configure
index 6556685569..b0f3b2fa24 100644
--- a/sysdeps/sh/configure
+++ b/sysdeps/sh/configure
@@ -2,3 +2,4 @@
# Local configure fragment for sysdeps/sh.
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/sh/init-first.c b/sysdeps/sh/init-first.c
deleted file mode 100644
index f298724c1d..0000000000
--- a/sysdeps/sh/init-first.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Initialization code run first thing by the ELF startup code. For SH.
- Copyright (C) 1995-2012 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <ctype.h>
-#include <unistd.h>
-
-extern void __libc_init (int, char **, char **);
-#ifdef USE_NONOPTION_FLAGS
-extern void __getopt_clean_environment (char **);
-#endif
-extern void __libc_global_ctors (void);
-
-int __libc_multiple_libcs attribute_hidden = 1;
-
-static void
-init (int *data)
-{
- int argc = *data;
- char **argv = (void *) (data + 1);
- char **envp = &argv[argc + 1];
-
- __environ = envp;
- __libc_init (argc, argv, envp);
-
-#ifdef USE_NONOPTION_FLAGS
- /* This is a hack to make the special getopt in GNU libc working. */
- __getopt_clean_environment (envp);
-#endif
-
- /* Initialize ctype data. */
- __ctype_init ();
-}
-
-#ifdef SHARED
-/* This function is called to initialize the shared C library.
- It is called just before the user _start code from sh/sh[34]/start.S,
- with the stack set up as that code gets it. */
-
-/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT
- pointer in the dynamic section based solely on that. It is convention
- for this function to be in the `.init' section, but the symbol name is
- the only thing that really matters!! */
-/*void _init (int argc, ...) __attribute__ ((unused, section (".init")));*/
-
-void
-_init (int argc, ...)
-{
- init (&argc);
-
-#ifndef NO_CTORS_DTORS_SECTIONS
- __libc_global_ctors ();
-#endif
-}
-#endif
-
-
-void
-__libc_init_first (int argc __attribute__ ((unused)), ...)
-{
-#ifndef SHARED
- init (&argc);
-#endif
-}
diff --git a/sysdeps/sh/ldsodefs.h b/sysdeps/sh/ldsodefs.h
index 66d1e2fbb6..74c0f417b4 100644
--- a/sysdeps/sh/ldsodefs.h
+++ b/sysdeps/sh/ldsodefs.h
@@ -26,7 +26,7 @@ struct La_sh_retval;
#define ARCH_PLTENTER_MEMBERS \
uintptr_t (*sh_gnu_pltenter) (Elf32_Sym *, unsigned int, uintptr_t *, \
- uintptr_t *, const struct La_sh_regs *, \
+ uintptr_t *, struct La_sh_regs *, \
unsigned int *, const char *name, \
long int *framesizep)
diff --git a/sysdeps/sh/sysdep.h b/sysdeps/sh/sysdep.h
index 66a1982887..1111b8bd42 100644
--- a/sysdeps/sh/sysdep.h
+++ b/sysdeps/sh/sysdep.h
@@ -23,8 +23,6 @@
/* Syntactic details of assembler. */
#define ALIGNARG(log2) log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,@##typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
#ifdef SHARED
@@ -36,8 +34,8 @@
/* Define an entry point visible from C. */
#define ENTRY(name) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(5); \
C_LABEL(name) \
cfi_startproc; \
diff --git a/sysdeps/sh/tininess.h b/sysdeps/sh/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/sysdeps/sh/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/sysdeps/sparc/bits/hwcap.h b/sysdeps/sparc/bits/hwcap.h
index d922d7b0e8..74ca130bb1 100644
--- a/sysdeps/sparc/bits/hwcap.h
+++ b/sysdeps/sparc/bits/hwcap.h
@@ -45,3 +45,6 @@
#define HWCAP_SPARC_IMA 0x00400000
#define HWCAP_SPARC_ASI_CACHE_SPARING \
0x00800000
+#define HWCAP_SPARC_PAUSE 0x01000000
+#define HWCAP_SPARC_CBCOND 0x02000000
+#define HWCAP_SPARC_CRYPTO 0x04000000
diff --git a/sysdeps/sparc/configure b/sysdeps/sparc/configure
index 72b4622af6..3abba27501 100644
--- a/sysdeps/sparc/configure
+++ b/sysdeps/sparc/configure
@@ -1,85 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/sparc.
diff --git a/sysdeps/sparc/dl-procinfo.c b/sysdeps/sparc/dl-procinfo.c
index 6e107dd1de..8280e01792 100644
--- a/sysdeps/sparc/dl-procinfo.c
+++ b/sysdeps/sparc/dl-procinfo.c
@@ -46,13 +46,13 @@
#if !defined PROCINFO_DECL && defined SHARED
._dl_sparc_cap_flags
#else
-PROCINFO_CLASS const char _dl_sparc_cap_flags[24][11]
+PROCINFO_CLASS const char _dl_sparc_cap_flags[27][11]
#endif
#ifndef PROCINFO_DECL
= { "flush", "stbar", "swap", "muldiv", "v9", "ultra3", "v9v", "v9v2",
"mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2",
"ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau",
- "ima", "cspare" }
+ "ima", "cspare", "pause", "cbcond", "crypto" }
#endif
#if !defined SHARED || defined PROCINFO_DECL
;
diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h
index 8ceb830725..6ae8768288 100644
--- a/sysdeps/sparc/dl-procinfo.h
+++ b/sysdeps/sparc/dl-procinfo.h
@@ -24,7 +24,7 @@
#include <ldsodefs.h>
#include <sysdep.h>
-#define _DL_HWCAP_COUNT 24
+#define _DL_HWCAP_COUNT 27
static inline int
__attribute__ ((unused))
diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps
index 3d54a5901d..0f8179f6b4 100644
--- a/sysdeps/sparc/fpu/libm-test-ulps
+++ b/sysdeps/sparc/fpu/libm-test-ulps
@@ -820,6 +820,12 @@ ildouble: 1
ldouble: 1
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i":
float: 1
ifloat: 1
@@ -870,6 +876,15 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i) == 88.69109041335841930424871526389807508374 + +0 i":
float: 1
ifloat: 1
@@ -891,6 +906,9 @@ ldouble: 1
Test "Real part of: clog (0x1.fp+16383 - 0x1p-16494 i) == 11356.49165759582936919077408168801636572 - 0 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 3.2047474274603604594851472963586149973093e-29 + 1.4422922682185099608731642353544207976604 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
double: 1
idouble: 1
@@ -915,6 +933,50 @@ ldouble: 1
Test "Real part of: clog (0x1p-16494 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x298c62cb546588a7p-63 + 0x7911b1dfcc4ecdaep-63 i) == -1.1931267660846218205882675852805793644095e-36 + 1.2402109774337032400594953899784058127412 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x2ede88p-23 + 0x771c3fp-23 i) == -4.4764192352906350039050902870893173560494e-13 + 1.1959106857549200806818600493552847793381 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i) == -1.0509738482436128031927971874674370984602e-45 + 1.0509191467640012308402149909370784281448 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i) == -5.2000108498455368032511404449795741611813e-32 + 1.5288921536982513453421343495466824420259 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x659feap-24 + 0xeaf6f9p-24 i) == 3.7303493627403868207597214252239749960738e-14 + 1.1625816408046866464773042283673653469061 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6771f22c64ed551b857c128b4cp-105 + 0x1f570e7a13cc3cf2f44fd793ea1p-105 i) == -1.4281333889622737316199756373421183559948e-62 + 1.3673546561165378090903506783353927980633 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 2.4244570985709679851855191080208817099132e-37 + 1.1393074519572050614551047548718495655972 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -9.7375017988218644730510244778042114638107e-30 + 0.9790637929494922564724108399524154766631 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0x9b57bp-20 + 0xcb7b4p-20 i) == -3.9563019528687610863490232935890272740908e-11 + 0.9187593477446338910857133065497364950682 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i) == 4.6017338806965821566734340588575402712716e-67 + 1.3547418904611758959096647942223384691728 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i) == 6.6255694866654064502633121109394710807528e-66 + 1.0526409614996288387567810726095850312049 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 5.3718272201930019901317065495843842735179e-26 + 1.0503831592447830576186444373011142397404 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
float: 1
ifloat: 1
@@ -930,6 +992,22 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
double: 1
idouble: 1
@@ -1018,6 +1096,39 @@ ifloat: 1
Test "Imaginary part of: clog10 (0.75 + 1.25 i) == 0.163679467193165171449476605077428975 + 0.447486970040493067069984724340855636 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i) == 4.285899851347756186652871946325962330640e-19 + 4.611541215247321502041995872887317363241e-302 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-60 i) == 4.285899851347756188767674032946882584784e-19 + 4.285899850759344225805480528847018395861e-19 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
float: 1
ifloat: 1
@@ -1052,6 +1163,37 @@ ldouble: 1
Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i) == 4932.112944269463028900262609694408579449 + 0.2069271710841128115912940666587802677383 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1415bcaf2105940d49a636e98ae59p-115 + 0x7e6a150adfcd1b0921d44b31f40f4p-115 i) == 1.1288799405048268615023706955013387413519e-67 + 0.6137587762850841972073301550420510507903 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x15cfbd1990d1ffp-53 + 0x176a3973e09a9ap-53 i) == 4.4163015461643576961232672330852798804976e-31 + 0.3564851427422832755956993418877523303529 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i) == -1.5221162575729652613635150540947625639689e-57 + 0.5795934880811949230121092882659698986043 i":
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
double: 1
idouble: 1
@@ -1111,6 +1253,88 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i) == -4.5643214291682663316715446865040356750881e-46 + 0.4564083863660793840592614609053162690362 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4d9c37e2b5cb4533p-63 + 0x65c98be2385a042ep-63 i) == 2.7822833698845776001753149807484078521508e-37 + 0.3992725998539071066769046272515417679815 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i) == -2.2583360179249556400630343805573865814771e-32 + 0.6639894257763289307423302343317622430835 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x602fd5037c4792efp-64 + 0xed3e2086dcca80b8p-64 i) == -1.0146400362652473358437501879334790111898e-37 + 0.5149047982335273098246594109614460842099 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x6241ef0da53f539f02fad67dabp-106 + 0x3fb46641182f7efd9caa769dac0p-106 i) == 1.8804859395820231849002915747252695375405e-63 + 0.6404513901551516189871978418046651877394 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 1.0529283395205396881397407610630442563938e-37 + 0.4947949395762683446121140513971996916447 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i) == 1.9985076315737626043096596036300177494613e-67 + 0.5883569274304683249184005177865521205198 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i) == 2.8774482675253468630312378575186855052697e-66 + 0.4571561610046221605554903008571429975493 i":
+ldouble: 2
+ildouble: 2
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
double: 1
idouble: 1
@@ -1136,6 +1360,12 @@ idouble: 1
ifloat: 1
# cos
+Test "cos (0x1p+120) == -9.25879022854837867303861764107414946730833e-01":
+float: 1
+ifloat: 1
+Test "cos (0x1p+127) == 7.81914638714960072263910298466369236613162e-01":
+float: 1
+ifloat: 1
Test "cos (M_PI_6l * 2.0) == 0.5":
double: 1
idouble: 1
@@ -1303,6 +1533,8 @@ ifloat: 1
Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i) == 0.331825439177608832276067945276730566 + 0.131338600281188544930936345230903032 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i) == 0.117506293914473555420279832210420483 + 0.346552747708338676483025352060418001 i":
double: 1
float: 4
@@ -2437,6 +2669,12 @@ float: 1
ifloat: 1
# sincos
+Test "sincos (0x1p+120, &sin_res, &cos_res) puts -9.25879022854837867303861764107414946730833e-01 in cos_res":
+float: 1
+ifloat: 1
+Test "sincos (0x1p+127, &sin_res, &cos_res) puts 7.81914638714960072263910298466369236613162e-01 in cos_res":
+float: 1
+ifloat: 1
Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
double: 1
idouble: 1
@@ -2981,12 +3219,14 @@ ldouble: 1
Function: Imaginary part of "clog":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Function: Real part of "clog10":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
ildouble: 1
ldouble: 1
@@ -2995,8 +3235,8 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "cos":
double: 2
diff --git a/sysdeps/sparc/ldsodefs.h b/sysdeps/sparc/ldsodefs.h
index 2cfdc49f7b..dc68860826 100644
--- a/sysdeps/sparc/ldsodefs.h
+++ b/sysdeps/sparc/ldsodefs.h
@@ -29,12 +29,12 @@ struct La_sparc64_retval;
#define ARCH_PLTENTER_MEMBERS \
Elf32_Addr (*sparc32_gnu_pltenter) (Elf32_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_sparc32_regs *, \
+ struct La_sparc32_regs *, \
unsigned int *, const char *name, \
long int *framesizep); \
Elf64_Addr (*sparc64_gnu_pltenter) (Elf64_Sym *, unsigned int, \
uintptr_t *, uintptr_t *, \
- const struct La_sparc64_regs *, \
+ struct La_sparc64_regs *, \
unsigned int *, const char *name, \
long int *framesizep)
diff --git a/sysdeps/sparc/sparc32/dl-machine.h b/sysdeps/sparc/sparc32/dl-machine.h
index 2dfeeb27a3..04ce7854a1 100644
--- a/sysdeps/sparc/sparc32/dl-machine.h
+++ b/sysdeps/sparc/sparc32/dl-machine.h
@@ -29,11 +29,6 @@
#include <tls.h>
#include <dl-plt.h>
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-
/* Return nonzero iff ELF header is compatible with the running host. */
static inline int
elf_machine_matches_host (const Elf32_Ehdr *ehdr)
diff --git a/sysdeps/sparc/sparc32/sparcv9/addmul_1.S b/sysdeps/sparc/sparc32/sparcv9/addmul_1.S
new file mode 100644
index 0000000000..563bfb1c0a
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/addmul_1.S
@@ -0,0 +1 @@
+#include <sparcv8/addmul_1.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/mul_1.S b/sysdeps/sparc/sparc32/sparcv9/mul_1.S
new file mode 100644
index 0000000000..42284eada6
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/mul_1.S
@@ -0,0 +1 @@
+#include <sparcv8/mul_1.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
index 4d45042a95..7358bdb167 100644
--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
@@ -1,4 +1,4 @@
ifeq ($(subdir),string)
sysdep_routines += memcpy-ultra3 memcpy-niagara1 memcpy-niagara2 \
- memset-niagara1
+ memset-niagara1 memcpy-niagara4 memset-niagara4
endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c b/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c
new file mode 100644
index 0000000000..a04aa0f674
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/ifunc-impl-list.c
@@ -0,0 +1 @@
+#include <sparc64/multiarch/ifunc-impl-list.c>
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-niagara4.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-niagara4.S
new file mode 100644
index 0000000000..75ef9c017e
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-niagara4.S
@@ -0,0 +1 @@
+#include <sparc64/multiarch/memcpy-niagara4.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S
new file mode 100644
index 0000000000..6545019c46
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara4.S
@@ -0,0 +1 @@
+#include <sparc64/multiarch/memset-niagara4.S>
diff --git a/sysdeps/sparc/sparc32/sparcv9/submul_1.S b/sysdeps/sparc/sparc32/sparcv9/submul_1.S
new file mode 100644
index 0000000000..de69533f63
--- /dev/null
+++ b/sysdeps/sparc/sparc32/sparcv9/submul_1.S
@@ -0,0 +1 @@
+#include <sparcv8/submul_1.S>
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 35c24d1558..dec2fa0808 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -27,11 +27,6 @@
#include <sysdep.h>
#include <dl-plt.h>
-#ifndef VALIDX
-# define VALIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALTAGIDX (tag))
-#endif
-
#define ELF64_R_TYPE_ID(info) ((info) & 0xff)
#define ELF64_R_TYPE_DATA(info) ((info) >> 8)
@@ -458,7 +453,14 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
break;
case R_SPARC_JMP_IREL:
value = ((Elf64_Addr (*) (int)) value) (GLRO(dl_hwcap));
- /* Fall thru */
+ /* 'high' is always zero, for large PLT entries the linker
+ emits an R_SPARC_IRELATIVE. */
+#ifdef RESOLVE_CONFLICT_FIND_MAP
+ sparc64_fixup_plt (NULL, reloc, reloc_addr, value, 0, 0);
+#else
+ sparc64_fixup_plt (map, reloc, reloc_addr, value, 0, 0);
+#endif
+ break;
case R_SPARC_JMP_SLOT:
#ifdef RESOLVE_CONFLICT_FIND_MAP
/* R_SPARC_JMP_SLOT conflicts against .plt[32768+]
diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile
index 4d45042a95..7358bdb167 100644
--- a/sysdeps/sparc/sparc64/multiarch/Makefile
+++ b/sysdeps/sparc/sparc64/multiarch/Makefile
@@ -1,4 +1,4 @@
ifeq ($(subdir),string)
sysdep_routines += memcpy-ultra3 memcpy-niagara1 memcpy-niagara2 \
- memset-niagara1
+ memset-niagara1 memcpy-niagara4 memset-niagara4
endif
diff --git a/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c b/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
new file mode 100644
index 0000000000..65a8a9ae8a
--- /dev/null
+++ b/sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c
@@ -0,0 +1,75 @@
+/* Enumerate available IFUNC implementations of a function. sparc version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include <string.h>
+#include <wchar.h>
+#include <ldsodefs.h>
+#include <sysdep.h>
+#include <ifunc-impl-list.h>
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+ NAME and return the number of valid entries. */
+
+size_t
+__libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
+ size_t max)
+{
+ size_t i = 0;
+ int hwcap;
+
+ hwcap = GLRO(dl_hwcap);
+
+ IFUNC_IMPL (i, name, memcpy,
+ IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_CRYPTO,
+ __memcpy_niagara4)
+ IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_N2,
+ __memcpy_niagara2)
+ IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_BLKINIT,
+ __memcpy_niagara1)
+ IFUNC_IMPL_ADD (array, i, memcpy, hwcap & HWCAP_SPARC_ULTRA3,
+ __memcpy_ultra3)
+ IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_ultra1));
+
+ IFUNC_IMPL (i, name, mempcpy,
+ IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_CRYPTO,
+ __mempcpy_niagara4)
+ IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_N2,
+ __mempcpy_niagara2)
+ IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_BLKINIT,
+ __mempcpy_niagara1)
+ IFUNC_IMPL_ADD (array, i, mempcpy, hwcap & HWCAP_SPARC_ULTRA3,
+ __mempcpy_ultra3)
+ IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_ultra1));
+
+ IFUNC_IMPL (i, name, bzero,
+ IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_CRYPTO,
+ __bzero_niagara4)
+ IFUNC_IMPL_ADD (array, i, bzero, hwcap & HWCAP_SPARC_BLKINIT,
+ __bzero_niagara1)
+ IFUNC_IMPL_ADD (array, i, bzero, 1, __bzero_ultra1));
+
+ IFUNC_IMPL (i, name, memset,
+ IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_CRYPTO,
+ __memset_niagara4)
+ IFUNC_IMPL_ADD (array, i, memset, hwcap & HWCAP_SPARC_BLKINIT,
+ __memset_niagara1)
+ IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ultra1));
+
+ return i;
+}
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S
new file mode 100644
index 0000000000..3da98a87ab
--- /dev/null
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara4.S
@@ -0,0 +1,332 @@
+/* Copy SIZE bytes from SRC to DEST. For SUN4V Niagara-4.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David S. Miller (davem@davemloft.net)
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#define ASI_BLK_INIT_QUAD_LDD_P 0xe2
+
+#define FPRS_FEF 0x04
+
+/* On T4 it is very expensive to access ASRs like %fprs and
+ * %asi, avoiding a read or a write can save ~50 cycles.
+ */
+#define FPU_ENTER \
+ rd %fprs, %o5; \
+ andcc %o5, FPRS_FEF, %g0; \
+ be,a,pn %icc, 999f; \
+ wr %g0, FPRS_FEF, %fprs; \
+ 999:
+
+#define VISEntryHalf FPU_ENTER
+#define VISExitHalf and %o5, FPRS_FEF, %o5; wr %o5, 0x0, %fprs
+
+#define GLOBAL_SPARE %g5
+
+#define STORE_ASI ASI_BLK_INIT_QUAD_LDD_P
+#define EX_LD(x) x
+#define EX_ST(x) x
+#define EX_RETVAL(x) x
+#define LOAD(type,addr,dest) type [addr], dest
+#define STORE(type,src,addr) type src, [addr]
+#define STORE_INIT(src,addr) stxa src, [addr] STORE_ASI
+
+#if !defined NOT_IN_libc
+
+ .register %g2,#scratch
+ .register %g3,#scratch
+ .register %g6,#scratch
+
+ .text
+
+ENTRY(__mempcpy_niagara4)
+ ba,pt %icc, 101f
+ add %o0, %o2, %o3
+END(__mempcpy_niagara4)
+
+ .align 32
+ENTRY(__memcpy_niagara4)
+100: /* %o0=dst, %o1=src, %o2=len */
+ mov %o0, %o3
+101:
+#ifndef __arch64__
+ srl %o2, 0, %o2
+#endif
+ brz,pn %o2, .Lexit
+ cmp %o2, 3
+ ble,pn %icc, .Ltiny
+ cmp %o2, 19
+ ble,pn %icc, .Lsmall
+ or %o0, %o1, %g2
+ cmp %o2, 128
+ bl,pn %icc, .Lmedium
+ nop
+
+.Llarge:/* len >= 0x80 */
+ /* First get dest 8 byte aligned. */
+ sub %g0, %o0, %g1
+ and %g1, 0x7, %g1
+ brz,pt %g1, 51f
+ sub %o2, %g1, %o2
+
+1: EX_LD(LOAD(ldub, %o1 + 0x00, %g2))
+ add %o1, 1, %o1
+ subcc %g1, 1, %g1
+ add %o0, 1, %o0
+ bne,pt %icc, 1b
+ EX_ST(STORE(stb, %g2, %o0 - 0x01))
+
+51: LOAD(prefetch, %o1 + 0x040, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x080, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x0c0, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x100, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x140, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x180, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x1c0, #n_reads_strong)
+ LOAD(prefetch, %o1 + 0x200, #n_reads_strong)
+
+ /* Check if we can use the straight fully aligned
+ * loop, or we require the alignaddr/faligndata variant.
+ */
+ andcc %o1, 0x7, %o5
+ bne,pn %icc, .Llarge_src_unaligned
+ sub %g0, %o0, %g1
+
+ /* Legitimize the use of initializing stores by getting dest
+ * to be 64-byte aligned.
+ */
+ and %g1, 0x3f, %g1
+ brz,pt %g1, .Llarge_aligned
+ sub %o2, %g1, %o2
+
+1: EX_LD(LOAD(ldx, %o1 + 0x00, %g2))
+ add %o1, 8, %o1
+ subcc %g1, 8, %g1
+ add %o0, 8, %o0
+ bne,pt %icc, 1b
+ EX_ST(STORE(stx, %g2, %o0 - 0x08))
+
+.Llarge_aligned:
+ /* len >= 0x80 && src 8-byte aligned && dest 8-byte aligned */
+ andn %o2, 0x3f, %o4
+ sub %o2, %o4, %o2
+
+1: EX_LD(LOAD(ldx, %o1 + 0x00, %g1))
+ add %o1, 0x40, %o1
+ EX_LD(LOAD(ldx, %o1 - 0x38, %g2))
+ subcc %o4, 0x40, %o4
+ EX_LD(LOAD(ldx, %o1 - 0x30, %g3))
+ EX_LD(LOAD(ldx, %o1 - 0x28, GLOBAL_SPARE))
+ EX_LD(LOAD(ldx, %o1 - 0x20, %o5))
+ EX_ST(STORE_INIT(%g1, %o0))
+ add %o0, 0x08, %o0
+ EX_ST(STORE_INIT(%g2, %o0))
+ add %o0, 0x08, %o0
+ EX_LD(LOAD(ldx, %o1 - 0x18, %g2))
+ EX_ST(STORE_INIT(%g3, %o0))
+ add %o0, 0x08, %o0
+ EX_LD(LOAD(ldx, %o1 - 0x10, %g3))
+ EX_ST(STORE_INIT(GLOBAL_SPARE, %o0))
+ add %o0, 0x08, %o0
+ EX_LD(LOAD(ldx, %o1 - 0x08, GLOBAL_SPARE))
+ EX_ST(STORE_INIT(%o5, %o0))
+ add %o0, 0x08, %o0
+ EX_ST(STORE_INIT(%g2, %o0))
+ add %o0, 0x08, %o0
+ EX_ST(STORE_INIT(%g3, %o0))
+ add %o0, 0x08, %o0
+ EX_ST(STORE_INIT(GLOBAL_SPARE, %o0))
+ add %o0, 0x08, %o0
+ bne,pt %icc, 1b
+ LOAD(prefetch, %o1 + 0x200, #n_reads_strong)
+
+ membar #StoreLoad | #StoreStore
+
+ brz,pn %o2, .Lexit
+ cmp %o2, 19
+ ble,pn %icc, .Lsmall_unaligned
+ nop
+ ba,a,pt %icc, .Lmedium_noprefetch
+
+.Lexit: retl
+ mov EX_RETVAL(%o3), %o0
+
+.Llarge_src_unaligned:
+ andn %o2, 0x3f, %o4
+ sub %o2, %o4, %o2
+ VISEntryHalf
+ alignaddr %o1, %g0, %g1
+ add %o1, %o4, %o1
+ EX_LD(LOAD(ldd, %g1 + 0x00, %f0))
+1: EX_LD(LOAD(ldd, %g1 + 0x08, %f2))
+ subcc %o4, 0x40, %o4
+ EX_LD(LOAD(ldd, %g1 + 0x10, %f4))
+ EX_LD(LOAD(ldd, %g1 + 0x18, %f6))
+ EX_LD(LOAD(ldd, %g1 + 0x20, %f8))
+ EX_LD(LOAD(ldd, %g1 + 0x28, %f10))
+ EX_LD(LOAD(ldd, %g1 + 0x30, %f12))
+ EX_LD(LOAD(ldd, %g1 + 0x38, %f14))
+ faligndata %f0, %f2, %f16
+ EX_LD(LOAD(ldd, %g1 + 0x40, %f0))
+ faligndata %f2, %f4, %f18
+ add %g1, 0x40, %g1
+ faligndata %f4, %f6, %f20
+ faligndata %f6, %f8, %f22
+ faligndata %f8, %f10, %f24
+ faligndata %f10, %f12, %f26
+ faligndata %f12, %f14, %f28
+ faligndata %f14, %f0, %f30
+ EX_ST(STORE(std, %f16, %o0 + 0x00))
+ EX_ST(STORE(std, %f18, %o0 + 0x08))
+ EX_ST(STORE(std, %f20, %o0 + 0x10))
+ EX_ST(STORE(std, %f22, %o0 + 0x18))
+ EX_ST(STORE(std, %f24, %o0 + 0x20))
+ EX_ST(STORE(std, %f26, %o0 + 0x28))
+ EX_ST(STORE(std, %f28, %o0 + 0x30))
+ EX_ST(STORE(std, %f30, %o0 + 0x38))
+ add %o0, 0x40, %o0
+ bne,pt %icc, 1b
+ LOAD(prefetch, %g1 + 0x200, #n_reads_strong)
+ VISExitHalf
+
+ brz,pn %o2, .Lexit
+ cmp %o2, 19
+ ble,pn %icc, .Lsmall_unaligned
+ nop
+ ba,a,pt %icc, .Lmedium_unaligned
+
+.Lmedium:
+ LOAD(prefetch, %o1 + 0x40, #n_reads_strong)
+ andcc %g2, 0x7, %g0
+ bne,pn %icc, .Lmedium_unaligned
+ nop
+.Lmedium_noprefetch:
+ andncc %o2, 0x20 - 1, %o5
+ be,pn %icc, 2f
+ sub %o2, %o5, %o2
+1: EX_LD(LOAD(ldx, %o1 + 0x00, %g1))
+ EX_LD(LOAD(ldx, %o1 + 0x08, %g2))
+ EX_LD(LOAD(ldx, %o1 + 0x10, GLOBAL_SPARE))
+ EX_LD(LOAD(ldx, %o1 + 0x18, %o4))
+ add %o1, 0x20, %o1
+ subcc %o5, 0x20, %o5
+ EX_ST(STORE(stx, %g1, %o0 + 0x00))
+ EX_ST(STORE(stx, %g2, %o0 + 0x08))
+ EX_ST(STORE(stx, GLOBAL_SPARE, %o0 + 0x10))
+ EX_ST(STORE(stx, %o4, %o0 + 0x18))
+ bne,pt %icc, 1b
+ add %o0, 0x20, %o0
+2: andcc %o2, 0x18, %o5
+ be,pt %icc, 3f
+ sub %o2, %o5, %o2
+1: EX_LD(LOAD(ldx, %o1 + 0x00, %g1))
+ add %o1, 0x08, %o1
+ add %o0, 0x08, %o0
+ subcc %o5, 0x08, %o5
+ bne,pt %icc, 1b
+ EX_ST(STORE(stx, %g1, %o0 - 0x08))
+3: brz,pt %o2, .Lexit
+ cmp %o2, 0x04
+ bl,pn %icc, .Ltiny
+ nop
+ EX_LD(LOAD(lduw, %o1 + 0x00, %g1))
+ add %o1, 0x04, %o1
+ add %o0, 0x04, %o0
+ subcc %o2, 0x04, %o2
+ bne,pn %icc, .Ltiny
+ EX_ST(STORE(stw, %g1, %o0 - 0x04))
+ ba,a,pt %icc, .Lexit
+.Lmedium_unaligned:
+ /* First get dest 8 byte aligned. */
+ sub %g0, %o0, %g1
+ and %g1, 0x7, %g1
+ brz,pt %g1, 2f
+ sub %o2, %g1, %o2
+
+1: EX_LD(LOAD(ldub, %o1 + 0x00, %g2))
+ add %o1, 1, %o1
+ subcc %g1, 1, %g1
+ add %o0, 1, %o0
+ bne,pt %icc, 1b
+ EX_ST(STORE(stb, %g2, %o0 - 0x01))
+2:
+ and %o1, 0x7, %g1
+ brz,pn %g1, .Lmedium_noprefetch
+ sll %g1, 3, %g1
+ mov 64, %g2
+ sub %g2, %g1, %g2
+ andn %o1, 0x7, %o1
+ EX_LD(LOAD(ldx, %o1 + 0x00, %o4))
+ sllx %o4, %g1, %o4
+ andn %o2, 0x08 - 1, %o5
+ sub %o2, %o5, %o2
+1: EX_LD(LOAD(ldx, %o1 + 0x08, %g3))
+ add %o1, 0x08, %o1
+ subcc %o5, 0x08, %o5
+ srlx %g3, %g2, GLOBAL_SPARE
+ or GLOBAL_SPARE, %o4, GLOBAL_SPARE
+ EX_ST(STORE(stx, GLOBAL_SPARE, %o0 + 0x00))
+ add %o0, 0x08, %o0
+ bne,pt %icc, 1b
+ sllx %g3, %g1, %o4
+ srl %g1, 3, %g1
+ add %o1, %g1, %o1
+ brz,pn %o2, .Lexit
+ nop
+ ba,pt %icc, .Lsmall_unaligned
+
+.Ltiny:
+ EX_LD(LOAD(ldub, %o1 + 0x00, %g1))
+ subcc %o2, 1, %o2
+ be,pn %icc, .Lexit
+ EX_ST(STORE(stb, %g1, %o0 + 0x00))
+ EX_LD(LOAD(ldub, %o1 + 0x01, %g1))
+ subcc %o2, 1, %o2
+ be,pn %icc, .Lexit
+ EX_ST(STORE(stb, %g1, %o0 + 0x01))
+ EX_LD(LOAD(ldub, %o1 + 0x02, %g1))
+ ba,pt %icc, .Lexit
+ EX_ST(STORE(stb, %g1, %o0 + 0x02))
+
+.Lsmall:
+ andcc %g2, 0x3, %g0
+ bne,pn %icc, .Lsmall_unaligned
+ andn %o2, 0x4 - 1, %o5
+ sub %o2, %o5, %o2
+1:
+ EX_LD(LOAD(lduw, %o1 + 0x00, %g1))
+ add %o1, 0x04, %o1
+ subcc %o5, 0x04, %o5
+ add %o0, 0x04, %o0
+ bne,pt %icc, 1b
+ EX_ST(STORE(stw, %g1, %o0 - 0x04))
+ brz,pt %o2, .Lexit
+ nop
+ ba,a,pt %icc, .Ltiny
+
+.Lsmall_unaligned:
+1: EX_LD(LOAD(ldub, %o1 + 0x00, %g1))
+ add %o1, 1, %o1
+ add %o0, 1, %o0
+ subcc %o2, 1, %o2
+ bne,pt %icc, 1b
+ EX_ST(STORE(stb, %g1, %o0 - 0x01))
+ ba,a,pt %icc, .Lexit
+END(__memcpy_niagara4)
+
+#endif
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy.S b/sysdeps/sparc/sparc64/multiarch/memcpy.S
index 20c72d9bbd..51cb88c39d 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy.S
@@ -1,4 +1,5 @@
/* Multiple versions of memcpy
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@davemloft.net)
This file is part of the GNU C Library.
@@ -26,8 +27,19 @@ ENTRY(memcpy)
# ifdef SHARED
SETUP_PIC_REG_LEAF(o3, o5)
# endif
- andcc %o0, HWCAP_SPARC_N2, %g0
+ set HWCAP_SPARC_CRYPTO, %o1
+ andcc %o0, %o1, %g0
be 1f
+ andcc %o0, HWCAP_SPARC_N2, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__memcpy_niagara4), %o1
+ xor %o1, %gdop_lox10(__memcpy_niagara4), %o1
+# else
+ set __memcpy_niagara4, %o1
+# endif
+ ba 10f
+ nop
+1: be 1f
andcc %o0, HWCAP_SPARC_BLKINIT, %g0
# ifdef SHARED
sethi %gdop_hix22(__memcpy_niagara2), %o1
@@ -77,8 +89,19 @@ ENTRY(__mempcpy)
# ifdef SHARED
SETUP_PIC_REG_LEAF(o3, o5)
# endif
- andcc %o0, HWCAP_SPARC_N2, %g0
+ set HWCAP_SPARC_CRYPTO, %o1
+ andcc %o0, %o1, %g0
be 1f
+ andcc %o0, HWCAP_SPARC_N2, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__mempcpy_niagara4), %o1
+ xor %o1, %gdop_lox10(__mempcpy_niagara4), %o1
+# else
+ set __mempcpy_niagara4, %o1
+# endif
+ ba 10f
+ nop
+1: be 1f
andcc %o0, HWCAP_SPARC_BLKINIT, %g0
# ifdef SHARED
sethi %gdop_hix22(__mempcpy_niagara2), %o1
diff --git a/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S b/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
new file mode 100644
index 0000000000..c5a2f1befd
--- /dev/null
+++ b/sysdeps/sparc/sparc64/multiarch/memset-niagara4.S
@@ -0,0 +1,124 @@
+/* Set a block of memory to some byte value. For SUN4V Niagara-4.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David S. Miller (davem@davemloft.net)
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#define ASI_BLK_INIT_QUAD_LDD_P 0xe2
+
+#if !defined NOT_IN_libc
+
+ .register %g2, #scratch
+ .register %g3, #scratch
+
+ .text
+ .align 32
+
+ENTRY(__memset_niagara4)
+ andcc %o1, 0xff, %o4
+ be,pt %icc, 1f
+ mov %o2, %o1
+ sllx %o4, 8, %g1
+ or %g1, %o4, %o2
+ sllx %o2, 16, %g1
+ or %g1, %o2, %o2
+ sllx %o2, 32, %g1
+ ba,pt %icc, 1f
+ or %g1, %o2, %o4
+END(__memset_niagara4)
+
+ .align 32
+ENTRY(__bzero_niagara4)
+ clr %o4
+1: cmp %o1, 16
+ ble %icc, .Ltiny
+ mov %o0, %o3
+ sub %g0, %o0, %g1
+ and %g1, 0x7, %g1
+ brz,pt %g1, .Laligned8
+ sub %o1, %g1, %o1
+1: stb %o4, [%o0 + 0x00]
+ subcc %g1, 1, %g1
+ bne,pt %icc, 1b
+ add %o0, 1, %o0
+.Laligned8:
+ cmp %o1, 64 + (64 - 8)
+ ble .Lmedium
+ sub %g0, %o0, %g1
+ andcc %g1, (64 - 1), %g1
+ brz,pn %g1, .Laligned64
+ sub %o1, %g1, %o1
+1: stx %o4, [%o0 + 0x00]
+ subcc %g1, 8, %g1
+ bne,pt %icc, 1b
+ add %o0, 0x8, %o0
+.Laligned64:
+ andn %o1, 64 - 1, %g1
+ sub %o1, %g1, %o1
+ brnz,pn %o4, .Lnon_bzero_loop
+ mov 0x20, %g2
+1: stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
+ subcc %g1, 0x40, %g1
+ stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
+ bne,pt %icc, 1b
+ add %o0, 0x40, %o0
+.Lpostloop:
+ cmp %o1, 8
+ bl,pn %icc, .Ltiny
+ membar #StoreStore|#StoreLoad
+.Lmedium:
+ andn %o1, 0x7, %g1
+ sub %o1, %g1, %o1
+1: stx %o4, [%o0 + 0x00]
+ subcc %g1, 0x8, %g1
+ bne,pt %icc, 1b
+ add %o0, 0x08, %o0
+ andcc %o1, 0x4, %g1
+ be,pt %icc, .Ltiny
+ sub %o1, %g1, %o1
+ stw %o4, [%o0 + 0x00]
+ add %o0, 0x4, %o0
+.Ltiny:
+ cmp %o1, 0
+ be,pn %icc, .Lexit
+1: subcc %o1, 1, %o1
+ stb %o4, [%o0 + 0x00]
+ bne,pt %icc, 1b
+ add %o0, 1, %o0
+.Lexit:
+ retl
+ mov %o3, %o0
+.Lnon_bzero_loop:
+ mov 0x08, %g3
+ mov 0x28, %o5
+1: stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
+ subcc %g1, 0x40, %g1
+ stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
+ add %o0, 0x10, %o0
+ stxa %o4, [%o0 + %g0] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %g2] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %g3] ASI_BLK_INIT_QUAD_LDD_P
+ stxa %o4, [%o0 + %o5] ASI_BLK_INIT_QUAD_LDD_P
+ bne,pt %icc, 1b
+ add %o0, 0x30, %o0
+ ba,a,pt %icc, .Lpostloop
+END(__bzero_niagara4)
+
+#endif
diff --git a/sysdeps/sparc/sparc64/multiarch/memset.S b/sysdeps/sparc/sparc64/multiarch/memset.S
index 26cc669d6f..3a637c707b 100644
--- a/sysdeps/sparc/sparc64/multiarch/memset.S
+++ b/sysdeps/sparc/sparc64/multiarch/memset.S
@@ -1,4 +1,5 @@
/* Multiple versions of memset and bzero
+ All versions must be listed in ifunc-impl-list.c.
Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@davemloft.net)
This file is part of the GNU C Library.
@@ -26,8 +27,19 @@ ENTRY(memset)
# ifdef SHARED
SETUP_PIC_REG_LEAF(o3, o5)
# endif
- andcc %o0, HWCAP_SPARC_BLKINIT, %g0
- be 9f
+ set HWCAP_SPARC_CRYPTO, %o1
+ andcc %o0, %o1, %g0
+ be 1f
+ andcc %o0, HWCAP_SPARC_BLKINIT, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__memset_niagara4), %o1
+ xor %o1, %gdop_lox10(__memset_niagara4), %o1
+# else
+ set __memset_niagara4, %o1
+# endif
+ ba 10f
+ nop
+1: be 9f
nop
# ifdef SHARED
sethi %gdop_hix22(__memset_niagara1), %o1
@@ -57,8 +69,19 @@ ENTRY(__bzero)
# ifdef SHARED
SETUP_PIC_REG_LEAF(o3, o5)
# endif
- andcc %o0, HWCAP_SPARC_BLKINIT, %g0
- be 9f
+ set HWCAP_SPARC_CRYPTO, %o1
+ andcc %o0, %o1, %g0
+ be 1f
+ andcc %o0, HWCAP_SPARC_BLKINIT, %g0
+# ifdef SHARED
+ sethi %gdop_hix22(__bzero_niagara4), %o1
+ xor %o1, %gdop_lox10(__bzero_niagara4), %o1
+# else
+ set __bzero_niagara4, %o1
+# endif
+ ba 10f
+ nop
+1: be 9f
nop
# ifdef SHARED
sethi %gdop_hix22(__bzero_niagara1), %o1
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index 9e95b567c8..dda3a3ee02 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -37,23 +37,29 @@ $(objpfx)stub-syscalls.c: $(common-objpfx)sysd-syscalls \
$(..)sysdeps/unix/Makefile
$(make-target-directory)
(for call in $(unix-stub-syscalls); do \
+ call=$${call%%@*}; \
echo "#define $$call RENAMED_$$call"; \
done; \
echo '#include <errno.h>'; \
+ echo '#include <shlib-compat.h>'; \
for call in $(unix-stub-syscalls); do \
+ call=$${call%%@*}; \
echo "#undef $$call"; \
done; \
echo 'long int _no_syscall (void)'; \
echo '{ __set_errno (ENOSYS); return -1L; }'; \
for call in $(unix-stub-syscalls); do \
case $$call in \
- *@@*) ver=$${call##*@}; call=$${call%%*@}; \
- echo "strong_alias (_no_syscall, $${call}_$${ver})"; \
- echo "default_symbol_version \
- ($${call}_$${ver}, $$call, $$ver);" ;; \
- *@*) ver=$${call##*@}; call=$${call%%*@}; \
- echo "strong_alias (_no_syscall, $${call}_$${ver})"; \
- echo "symbol_version ($${call}_$${ver}, $$call, $$ver);" ;; \
+ *@@*) \
+ ver=$${call##*@}; call=$${call%%@*}; ver=$${ver//./_}; \
+ echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
+ echo "versioned_symbol (libc, __$${call}_$${ver}, $$call, $$ver);"\
+ ;; \
+ *@*) \
+ ver=$${call##*@}; call=$${call%%@*}; ver=$${ver//./_}; \
+ echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
+ echo "compat_symbol (libc, __$${call}_$${ver}, $$call, $$ver);" \
+ ;; \
*) echo "weak_alias (_no_syscall, $$call)"; \
echo "stub_warning ($$call)"; \
echo "weak_alias (_no_syscall, __GI_$$call)" ;; \
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/dirent.h b/sysdeps/unix/bsd/bsd4.4/bits/dirent.h
deleted file mode 100644
index 1e0f08b266..0000000000
--- a/sysdeps/unix/bsd/bsd4.4/bits/dirent.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/* Directory entry structure `struct dirent'. 4.4BSD version.
- Copyright (C) 1996,97,98,2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _DIRENT_H
-# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
-#endif
-
-struct dirent
- {
-#ifndef __USE_FILE_OFFSET64
- __ino_t d_ino; /* File serial number. */
-#else
- __ino64_t d_ino;
-#endif
- unsigned short int d_reclen; /* Length of the whole `struct dirent'. */
- unsigned char d_type; /* File type, possibly unknown. */
- unsigned char d_namlen; /* Length of the file name. */
-
- /* Only this member is in the POSIX standard. */
- char d_name[1]; /* File name (actually longer). */
- };
-
-#ifdef __USE_LARGEFILE64
-struct dirent64
- {
- __ino64_t d_ino;
- unsigned short int d_reclen;
- unsigned char d_type;
- unsigned char d_namlen;
-
- char d_name[1];
- };
-#endif
-
-#define d_fileno d_ino /* Backwards compatibility. */
-
-#define _DIRENT_HAVE_D_RECLEN 1
-#define _DIRENT_HAVE_D_NAMLEN 1
-#define _DIRENT_HAVE_D_TYPE 1
diff --git a/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h b/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h
deleted file mode 100644
index c801d81f5c..0000000000
--- a/sysdeps/unix/bsd/bsd4.4/bits/fcntl.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* O_*, F_*, FD_* bit values for 4.4 BSD.
- Copyright (C) 1991, 1992, 1997, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _FCNTL_H
-#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
-#endif
-
-
-/* File access modes for `open' and `fcntl'. */
-#define O_RDONLY 0 /* Open read-only. */
-#define O_WRONLY 1 /* Open write-only. */
-#define O_RDWR 2 /* Open read/write. */
-
-
-/* Bits OR'd into the second argument to open. */
-#define O_CREAT 0x0200 /* Create file if it doesn't exist. */
-#define O_EXCL 0x0800 /* Fail if file already exists. */
-#define O_TRUNC 0x0400 /* Truncate file to zero length. */
-/* Apparently not assigning a controlling terminal is the default
- behavior in BSD, so no bit is required to request that behavior. */
-#define O_NOCTTY 0 /* Don't assign a controlling terminal. */
-#ifdef __USE_MISC
-#define O_ASYNC 0x0040 /* Send SIGIO to owner when data is ready. */
-#define O_FSYNC 0x0080 /* Synchronous writes. */
-#define O_SYNC O_FSYNC
-#define O_SHLOCK 0x0010 /* Open with shared file lock. */
-#define O_EXLOCK 0x0020 /* Open with shared exclusive lock. */
-#endif
-
-/* File status flags for `open' and `fcntl'. */
-#define O_APPEND 0x0008 /* Writes append to the file. */
-#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
-
-#ifdef __USE_BSD
-#define O_NDELAY O_NONBLOCK
-#endif
-
-#ifdef __USE_BSD
-/* Bits in the file status flags returned by F_GETFL.
- These are all the O_* flags, plus FREAD and FWRITE, which are
- independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
- given to `open'. */
-#define FREAD 1
-#define FWRITE 2
-
-/* Traditional BSD names the O_* bits. */
-#define FASYNC O_ASYNC
-#define FCREAT O_CREAT
-#define FEXCL O_EXCL
-#define FTRUNC O_TRUNC
-#define FNOCTTY O_NOCTTY
-#define FFSYNC O_FSYNC
-#define FSYNC O_SYNC
-#define FAPPEND O_APPEND
-#define FNONBLOCK O_NONBLOCK
-#define FNDELAY O_NDELAY
-#endif
-
-/* Mask for file access modes. This is system-dependent in case
- some system ever wants to define some other flavor of access. */
-#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#if defined __USE_BSD || defined __USE_UNIX98
-#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
-#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
-#endif
-#define F_GETLK 7 /* Get record locking info. */
-#define F_SETLK 8 /* Set record locking info (non-blocking). */
-#define F_SETLKW 9 /* Set record locking info (blocking). */
-
-/* File descriptor flags used with F_GETFD and F_SETFD. */
-#define FD_CLOEXEC 1 /* Close on exec. */
-
-
-#include <bits/types.h>
-
-/* The structure describing an advisory lock. This is the type of the third
- argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */
-struct flock
- {
- short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
- short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
- __off_t l_start; /* Offset where the lock begins. */
- __off_t l_len; /* Size of the locked area; zero means until EOF. */
- short int l_pid; /* Process holding the lock. */
- };
-
-/* Values for the `l_type' field of a `struct flock'. */
-#define F_RDLCK 1 /* Read lock. */
-#define F_WRLCK 2 /* Write lock. */
-#define F_UNLCK 3 /* Remove lock. */
diff --git a/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h b/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
index 02c24e44c0..0714ed02b5 100644
--- a/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
+++ b/sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h
@@ -51,7 +51,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __S32_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE __S32_TYPE
@@ -61,6 +60,11 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+
+/* Tell the libc code that off_t and off64_t are actually the same type. */
+#define __OFF_T_MATCHES_OFF64_T 1
+
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/sysdeps/unix/bsd/confstr.h b/sysdeps/unix/bsd/confstr.h
deleted file mode 100644
index befefb6520..0000000000
--- a/sysdeps/unix/bsd/confstr.h
+++ /dev/null
@@ -1 +0,0 @@
-#define CS_PATH "/usr/ucb:/bin:/usr/bin"
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index db6643a1c4..c9a91e3376 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -1,5 +1,5 @@
/* clock_gettime -- Get the current time from a POSIX clockid_t. Unix version.
- Copyright (C) 1999-2004, 2005, 2007, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -132,4 +132,4 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
return retval;
}
-librt_hidden_def (clock_gettime)
+strong_alias (clock_gettime, __clock_gettime)
diff --git a/sysdeps/unix/clock_nanosleep.c b/sysdeps/unix/clock_nanosleep.c
index 1b43996551..c39f6a79ca 100644
--- a/sysdeps/unix/clock_nanosleep.c
+++ b/sysdeps/unix/clock_nanosleep.c
@@ -1,5 +1,5 @@
/* High-resolution sleep with the specified clock.
- Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -98,3 +98,4 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
return __builtin_expect (nanosleep (req, rem), 0) ? errno : 0;
}
+strong_alias (clock_nanosleep, __clock_nanosleep)
diff --git a/sysdeps/unix/clock_settime.c b/sysdeps/unix/clock_settime.c
index 97caa0d0fd..e09463a561 100644
--- a/sysdeps/unix/clock_settime.c
+++ b/sysdeps/unix/clock_settime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -124,3 +124,4 @@ clock_settime (clockid_t clock_id, const struct timespec *tp)
return retval;
}
+strong_alias (clock_settime, __clock_settime)
diff --git a/sysdeps/unix/inet/syscalls.list b/sysdeps/unix/inet/syscalls.list
deleted file mode 100644
index aafafd1df7..0000000000
--- a/sysdeps/unix/inet/syscalls.list
+++ /dev/null
@@ -1,23 +0,0 @@
-# File name Caller Syscall name # args Strong name Weak names
-
-accept - accept Ci:iBN __libc_accept accept
-bind - bind i:ipi __bind bind
-connect - connect Ci:ipi __libc_connect __connect connect
-gethostid - gethostid i: gethostid
-gethostname - gethostname i:bn __gethostname gethostname
-getpeername - getpeername i:ibN __getpeername getpeername
-getsockname - getsockname i:ibN __getsockname getsockname
-getsockopt - getsockopt i:iiiBN getsockopt
-listen - listen i:ii __listen listen
-recv - recv Ci:ibni __libc_recv recv
-recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
-send - send Ci:ibni __libc_send __send send
-sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
-sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
-sethostid - sethostid i:i sethostid
-sethostname - sethostname i:pi sethostname
-setsockopt - setsockopt i:iiibn setsockopt __setsockopt
-shutdown - shutdown i:ii shutdown
-socket - socket i:iii __socket socket
-socketpair - socketpair i:iiif socketpair
diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh
index 2bc7cc02a8..7e7de65f3a 100644
--- a/sysdeps/unix/make-syscalls.sh
+++ b/sysdeps/unix/make-syscalls.sh
@@ -64,18 +64,30 @@ done`
# Any calls left?
test -n "$calls" || exit 0
-# This uses variables $weak and $strong.
+# This uses variables $weak, $strong, and $any_versioned.
emit_weak_aliases()
{
# A shortcoming in the current gas is that it will only allow one
# version-alias per symbol. So we create new strong aliases as needed.
vcount=""
+ # We use the <shlib-compat.h> macros to generate the versioned aliases
+ # so that the version sets can be mapped to the configuration's
+ # minimum version set as per shlib-versions DEFAULT lines. But note
+ # we don't generate any "#if SHLIB_COMPAT (...)" conditionals. To do
+ # that we'd need to change the syscalls.list format so that it can
+ # list the "obsoleted" version set too. If it ever arises that we
+ # have a syscall entry point that is obsoleted by a newer version set,
+ # we'll have to revamp all this.
+ if [ $any_versioned = t ]; then
+ echo " echo '#include <shlib-compat.h>'; \\"
+ fi
+
for name in $weak; do
case $name in
*@@*)
base=`echo $name | sed 's/@@.*//'`
- ver=`echo $name | sed 's/.*@@//'`
+ ver=`echo $name | sed 's/.*@@//;s/\./_/g'`
echo " echo '#ifndef NOT_IN_libc'; \\"
if test -z "$vcount" ; then
source=$strong
@@ -85,14 +97,14 @@ emit_weak_aliases()
vcount=`expr $vcount + 1`
echo " echo 'strong_alias ($strong, $source)'; \\"
fi
- echo " echo 'default_symbol_version($source, $base, $ver)'; \\"
+ echo " echo 'versioned_symbol (libc, $source, $base, $ver)'; \\"
echo " echo '#else'; \\"
echo " echo 'strong_alias ($strong, $base)'; \\"
echo " echo '#endif'; \\"
;;
*@*)
base=`echo $name | sed 's/@.*//'`
- ver=`echo $name | sed 's/.*@//'`
+ ver=`echo $name | sed 's/.*@//;s/\./_/g'`
echo " echo '#ifndef NOT_IN_libc'; \\"
if test -z "$vcount" ; then
source=$strong
@@ -102,7 +114,7 @@ emit_weak_aliases()
vcount=`expr $vcount + 1`
echo " echo 'strong_alias ($strong, $source)'; \\"
fi
- echo " echo 'symbol_version ($source, $base, $ver)'; \\"
+ echo " echo 'compat_symbol (libc, $source, $base, $ver)'; \\"
echo " echo '#endif'; \\"
;;
!*)
@@ -175,10 +187,11 @@ while read file srcfile caller syscall args strong weak; do
# If there are versioned aliases the entry is only generated for the
# shared library, unless it is a default version.
+ any_versioned=f
shared_only=f
case $weak in
- *@@*) ;;
- *@*) shared_only=t;;
+ *@@*) any_versioned=t ;;
+ *@*) any_versioned=t shared_only=t ;;
esac
case x$srcfile"$callnum" in
diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list
index bd780f5695..46205825ca 100644
--- a/sysdeps/unix/syscalls.list
+++ b/sysdeps/unix/syscalls.list
@@ -1,13 +1,16 @@
# File name Caller Syscall name Args Strong name Weak names
+accept - accept Ci:iBN __libc_accept accept
access - access i:si __access access
acct - acct i:S acct
adjtime - adjtime i:pp __adjtime adjtime
+bind - bind i:ipi __bind bind
chdir - chdir i:s __chdir chdir
chmod - chmod i:si __chmod chmod
chown - chown i:sii __chown __chown_internal chown
chroot - chroot i:s chroot
close - close Ci:i __libc_close __close close
+connect - connect Ci:ipi __libc_connect __connect connect
dup - dup i:i __dup dup
dup2 - dup2 i:ii __dup2 dup2
dup3 - dup3 i:iii __dup3 dup3
@@ -21,18 +24,24 @@ ftruncate - ftruncate i:ii __ftruncate ftruncate
getdomain - getdomainname i:si getdomainname
getgid - getgid Ei: __getgid getgid
getgroups - getgroups i:ip __getgroups getgroups
+gethostid - gethostid i: gethostid
+gethostname - gethostname i:bn __gethostname gethostname
getitimer - getitimer i:ip __getitimer getitimer
+getpeername - getpeername i:ibN __getpeername getpeername
getpid - getpid Ei: __getpid getpid
getpriority - getpriority i:ii getpriority
getrlimit - getrlimit i:ip __getrlimit getrlimit
getrusage - getrusage i:ip __getrusage getrusage
+getsockname - getsockname i:ibN __getsockname getsockname
+getsockopt - getsockopt i:iiiBN getsockopt
gettimeofday - gettimeofday i:pP __gettimeofday gettimeofday
getuid - getuid Ei: __getuid getuid
ioctl - ioctl i:iiI __ioctl ioctl
kill - kill i:ii __kill kill
link - link i:ss __link link
+listen - listen i:ii __listen listen
lseek - lseek i:iii __libc_lseek __lseek lseek
-madvise - madvise i:pii madvise
+madvise - madvise i:pii __madvise madvise
mkdir - mkdir i:si __mkdir mkdir
mmap - mmap b:aniiii __mmap mmap
mprotect - mprotect i:aii __mprotect mprotect
@@ -45,14 +54,22 @@ read - read Ci:ibn __libc_read __read read
readlink - readlink i:spi __readlink readlink
readv - readv Ci:ipi __readv readv
reboot - reboot i:i reboot
+recv - recv Ci:ibni __libc_recv recv
+recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg
rename - rename i:ss rename
rmdir - rmdir i:s __rmdir rmdir
select - select Ci:iPPPP __select __libc_select select
+send - send Ci:ibni __libc_send __send send
+sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg
+sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto
setdomain - setdomainname i:si setdomainname
setegid - setegid i:i __setegid setegid
seteuid - seteuid i:i __seteuid seteuid
setgid - setgid i:i __setgid setgid
setgroups - setgroups i:ip setgroups
+sethostid - sethostid i:i sethostid
+sethostname - sethostname i:pi sethostname
setitimer - setitimer i:ipp __setitimer setitimer
setpgid - setpgrp i:ii __setpgid setpgid
setpriority - setpriority i:iii setpriority
@@ -60,10 +77,14 @@ setregid - setregid i:ii __setregid setregid
setreuid - setreuid i:ii __setreuid setreuid
setrlimit - setrlimit i:ip __setrlimit setrlimit
setsid - setsid i: __setsid setsid
+setsockopt - setsockopt i:iiibn setsockopt __setsockopt
settimeofday - settimeofday i:PP __settimeofday settimeofday
setuid - setuid i:i __setuid setuid
+shutdown - shutdown i:ii shutdown
sigaction - sigaction i:ipp __sigaction sigaction
sigsuspend - sigsuspend Ci:p sigsuspend
+socket - socket i:iii __socket socket
+socketpair - socketpair i:iiif socketpair
sstk - sstk b:i sstk
statfs - statfs i:sp __statfs statfs
swapoff - swapoff i:s swapoff
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index ddae6862bf..8e5361c49b 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -153,6 +153,7 @@ endif
ifeq ($(subdir),io)
sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
sync_file_range open_2 open64_2 fallocate fallocate64
+sysdep_headers += bits/fcntl-linux.h
endif
ifeq ($(subdir),elf)
diff --git a/sysdeps/gnu/_G_config.h b/sysdeps/unix/sysv/linux/_G_config.h
index 9d6e23bb4e..abec245606 100644
--- a/sysdeps/gnu/_G_config.h
+++ b/sysdeps/unix/sysv/linux/_G_config.h
@@ -18,7 +18,6 @@
# define __need_wint_t
#endif
#include <wchar.h>
-#define _G_size_t size_t
typedef struct
{
__off_t __pos;
@@ -29,14 +28,6 @@ typedef struct
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
-#define _G_ssize_t __ssize_t
-#define _G_off_t __off_t
-#define _G_off64_t __off64_t
-#define _G_pid_t __pid_t
-#define _G_uid_t __uid_t
-#define _G_wchar_t wchar_t
-#define _G_wint_t wint_t
-#define _G_stat64 stat64
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
typedef union
@@ -50,44 +41,18 @@ typedef union
} _G_iconv_t;
#endif
-typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
-typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
-typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
-typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
-
-#define _G_HAVE_BOOL 1
-
/* These library features are always available in the GNU C library. */
-#define _G_HAVE_ATEXIT 1
-#define _G_HAVE_SYS_WAIT 1
-#define _G_NEED_STDARG_H 1
#define _G_va_list __gnuc_va_list
-#define _G_HAVE_PRINTF_FP 1
#define _G_HAVE_MMAP 1
#define _G_HAVE_MREMAP 1
-#define _G_HAVE_LONG_DOUBLE_IO 1
-#define _G_HAVE_IO_FILE_OPEN 1
-#define _G_HAVE_IO_GETLINE_INFO 1
#define _G_IO_IO_FILE_VERSION 0x20001
-#define _G_OPEN64 __open64
-#define _G_LSEEK64 __lseek64
-#define _G_MMAP64 __mmap64
-#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
-
/* This is defined by <bits/stat.h> if `st_blksize' exists. */
#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
#define _G_BUFSIZ 8192
-/* These are the vtbl details for ELF. */
-#define _G_NAMES_HAVE_UNDERSCORE 0
-#define _G_VTABLE_LABEL_HAS_LENGTH 1
-#define _G_USING_THUNKS 1
-#define _G_VTABLE_LABEL_PREFIX "__vt_"
-#define _G_VTABLE_LABEL_PREFIX_ID __vt_
-
#endif /* _G_config.h */
diff --git a/sysdeps/unix/sysv/linux/bits/dirent.h b/sysdeps/unix/sysv/linux/bits/dirent.h
index 5728618f27..11daabe727 100644
--- a/sysdeps/unix/sysv/linux/bits/dirent.h
+++ b/sysdeps/unix/sysv/linux/bits/dirent.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,3 +50,8 @@ struct dirent64
#define _DIRENT_HAVE_D_RECLEN
#define _DIRENT_HAVE_D_OFF
#define _DIRENT_HAVE_D_TYPE
+
+#if defined __OFF_T_MATCHES_OFF64_T && defined __INO_T_MATCHES_INO64_T
+/* Inform libc code that these two types are effectively identical. */
+# define _DIRENT_MATCHES_DIRENT64 1
+#endif
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
new file mode 100644
index 0000000000..dbd76ad649
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -0,0 +1,386 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl-linux.h> directly; include <fcntl.h> instead."
+#endif
+
+/* This file contains shared definitions between Linux architectures
+ and is included by <bits/fcntl.h> to declare them. The various
+ #ifndef cases allow the architecture specific file to define those
+ values with different values.
+
+ A minimal <bits/fcntl.h> contains just:
+
+ struct flock {...}
+ #ifdef __USE_LARGEFILE64
+ struct flock64 {...}
+ #endif
+ #include <bits/fcntl-linux.h>
+*/
+
+#ifdef __USE_GNU
+# include <bits/uio.h>
+#endif
+
+/* open/fcntl. */
+#define O_ACCMODE 0003
+#define O_RDONLY 00
+#define O_WRONLY 01
+#define O_RDWR 02
+#ifndef O_CREAT
+# define O_CREAT 0100 /* Not fcntl. */
+#endif
+#ifndef O_EXCL
+# define O_EXCL 0200 /* Not fcntl. */
+#endif
+#ifndef O_NOCTTY
+# define O_NOCTTY 0400 /* Not fcntl. */
+#endif
+#ifndef O_TRUNC
+# define O_TRUNC 01000 /* Not fcntl. */
+#endif
+#ifndef O_APPEND
+# define O_APPEND 02000
+#endif
+#ifndef O_NONBLOCK
+# define O_NONBLOCK 04000
+#endif
+#ifndef O_NDELAY
+# define O_NDELAY O_NONBLOCK
+#endif
+#ifndef O_SYNC
+# define O_SYNC 04010000
+#endif
+#define O_FSYNC O_SYNC
+#ifndef O_ASYNC
+# define O_ASYNC 020000
+#endif
+#ifndef __O_LARGEFILE
+# define __O_LARGEFILE 0100000
+#endif
+
+#ifndef __O_DIRECTORY
+# define __O_DIRECTORY 0200000
+#endif
+#ifndef __O_NOFOLLOW
+# define __O_NOFOLLOW 0400000
+#endif
+#ifndef __O_CLOEXEC
+# define __O_CLOEXEC 02000000
+#endif
+#ifndef __O_DIRECT
+# define __O_DIRECT 040000
+#endif
+#ifndef __O_NOATIME
+# define __O_NOATIME 01000000
+#endif
+#ifndef __O_PATH
+# define __O_PATH 010000000
+#endif
+#ifndef __O_DSYNC
+# define __O_DSYNC 010000
+#endif
+
+#ifndef F_GETLK
+# ifndef __USE_FILE_OFFSET64
+# define F_GETLK 5 /* Get record locking info. */
+# define F_SETLK 6 /* Set record locking info (non-blocking). */
+# define F_SETLKW 7 /* Set record locking info (blocking). */
+# else
+# define F_GETLK F_GETLK64 /* Get record locking info. */
+# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
+# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
+# endif
+#endif
+#ifndef F_GETLK64
+# define F_GETLK64 12 /* Get record locking info. */
+# define F_SETLK64 13 /* Set record locking info (non-blocking). */
+# define F_SETLKW64 14 /* Set record locking info (blocking). */
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define O_LARGEFILE __O_LARGEFILE
+#endif
+
+#ifdef __USE_XOPEN2K8
+# define O_DIRECTORY __O_DIRECTORY /* Must be a directory. */
+# define O_NOFOLLOW __O_NOFOLLOW /* Do not follow links. */
+# define O_CLOEXEC __O_CLOEXEC /* Set close_on_exec. */
+#endif
+
+#ifdef __USE_GNU
+# define O_DIRECT __O_DIRECT /* Direct disk access. */
+# define O_NOATIME __O_NOATIME /* Do not set atime. */
+# define O_PATH __O_PATH /* Resolve pathname but do not open file. */
+#endif
+
+/* For now, Linux has no separate synchronicitiy options for read
+ operations. We define O_RSYNC therefore as the same as O_SYNC
+ since this is a superset. */
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC __O_DSYNC /* Synchronize data. */
+# if defined __O_RSYNC
+# define O_RSYNC __O_RSYNC /* Synchronize read operations. */
+# else
+# define O_RSYNC O_SYNC /* Synchronize read operations. */
+# endif
+#endif
+
+/* Values for the second argument to `fcntl'. */
+#define F_DUPFD 0 /* Duplicate file descriptor. */
+#define F_GETFD 1 /* Get file descriptor flags. */
+#define F_SETFD 2 /* Set file descriptor flags. */
+#define F_GETFL 3 /* Get file status flags. */
+#define F_SETFL 4 /* Set file status flags. */
+
+#ifndef __F_SETOWN
+# define __F_SETOWN 8
+# define __F_GETOWN 9
+#endif
+
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
+# define F_SETOWN __F_SETOWN /* Get owner (process receiving SIGIO). */
+# define F_GETOWN __F_GETOWN /* Set owner (process receiving SIGIO). */
+#endif
+
+#ifndef __F_SETSIG
+# define __F_SETSIG 10 /* Set number of signal to be sent. */
+# define __F_GETSIG 11 /* Get number of signal to be sent. */
+#endif
+#ifndef __F_SETOWN_EX
+# define __F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
+# define __F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETSIG __F_SETSIG /* Set number of signal to be sent. */
+# define F_GETSIG __F_GETSIG /* Get number of signal to be sent. */
+# define F_SETOWN_EX __F_SETOWN_EX /* Get owner (thread receiving SIGIO). */
+# define F_GETOWN_EX __F_GETOWN_EX /* Set owner (thread receiving SIGIO). */
+#endif
+
+#ifdef __USE_GNU
+# define F_SETLEASE 1024 /* Set a lease. */
+# define F_GETLEASE 1025 /* Enquire what lease is active. */
+# define F_NOTIFY 1026 /* Request notifications on a directory. */
+# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
+# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
+#endif
+#ifdef __USE_XOPEN2K8
+# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
+ close-on-exit set. */
+#endif
+
+/* For F_[GET|SET]FD. */
+#define FD_CLOEXEC 1 /* Actually anything with low bit set goes */
+
+#ifndef F_RDLCK
+/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
+# define F_RDLCK 0 /* Read lock. */
+# define F_WRLCK 1 /* Write lock. */
+# define F_UNLCK 2 /* Remove lock. */
+#endif
+
+
+/* For old implementation of BSD flock. */
+#ifndef F_EXLCK
+# define F_EXLCK 4 /* or 3 */
+# define F_SHLCK 8 /* or 4 */
+#endif
+
+#ifdef __USE_BSD
+/* Operations for BSD flock, also used by the kernel implementation. */
+# define LOCK_SH 1 /* Shared lock. */
+# define LOCK_EX 2 /* Exclusive lock. */
+# define LOCK_NB 4 /* Or'd with one of the above to prevent
+ blocking. */
+# define LOCK_UN 8 /* Remove lock. */
+#endif
+
+#ifdef __USE_GNU
+# define LOCK_MAND 32 /* This is a mandatory flock: */
+# define LOCK_READ 64 /* ... which allows concurrent read operations. */
+# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
+# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
+#endif
+
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY. */
+# define DN_ACCESS 0x00000001 /* File accessed. */
+# define DN_MODIFY 0x00000002 /* File modified. */
+# define DN_CREATE 0x00000004 /* File created. */
+# define DN_DELETE 0x00000008 /* File removed. */
+# define DN_RENAME 0x00000010 /* File renamed. */
+# define DN_ATTRIB 0x00000020 /* File changed attributes. */
+# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
+#endif
+
+
+#ifdef __USE_GNU
+/* Owner types. */
+enum __pid_type
+ {
+ F_OWNER_TID = 0, /* Kernel thread. */
+ F_OWNER_PID, /* Process. */
+ F_OWNER_PGRP, /* Process group. */
+ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
+ };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
+struct f_owner_ex
+ {
+ enum __pid_type type; /* Owner type of ID. */
+ __pid_t pid; /* ID of owner. */
+ };
+#endif
+
+/* Define some more compatibility macros to be backward compatible with
+ BSD systems which did not managed to hide these kernel macros. */
+#ifdef __USE_BSD
+# define FAPPEND O_APPEND
+# define FFSYNC O_FSYNC
+# define FASYNC O_ASYNC
+# define FNONBLOCK O_NONBLOCK
+# define FNDELAY O_NDELAY
+#endif /* Use BSD. */
+
+#ifndef __POSIX_FADV_DONTNEED
+# define __POSIX_FADV_DONTNEED 4
+# define __POSIX_FADV_NOREUSE 5
+#endif
+/* Advise to `posix_fadvise'. */
+#ifdef __USE_XOPEN2K
+# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_FADV_DONTNEED __POSIX_FADV_DONTNEED /* Don't need these pages. */
+# define POSIX_FADV_NOREUSE __POSIX_FADV_NOREUSE /* Data will be accessed once. */
+#endif
+
+
+#ifdef __USE_GNU
+/* Flags for SYNC_FILE_RANGE. */
+# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
+ in the range before performing the
+ write. */
+# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
+ dirty pages in the range which are
+ not presently under writeback. */
+# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
+ the range after performing the
+ write. */
+
+/* Flags for SPLICE and VMSPLICE. */
+# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
+# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
+ (but we may still block on the fd
+ we splice from/to). */
+# define SPLICE_F_MORE 4 /* Expect more data. */
+# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+
+
+/* File handle structure. */
+struct file_handle
+{
+ unsigned int handle_bytes;
+ int handle_type;
+ /* File identifier. */
+ unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now). */
+# define MAX_HANDLE_SZ 128
+#endif
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+
+/* Provide kernel hint to read ahead. */
+extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+ __THROW;
+
+
+/* Selective file content synch'ing.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
+ unsigned int __flags);
+
+
+/* Splice address range into a pipe.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+ size_t __count, unsigned int __flags);
+
+/* Splice two files together.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+ __off64_t *__offout, size_t __len,
+ unsigned int __flags);
+
+/* In-kernel implementation of tee for pipe buffers.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern ssize_t tee (int __fdin, int __fdout, size_t __len,
+ unsigned int __flags);
+
+/* Reserve storage for the data of the file associated with FD.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len),
+ fallocate64);
+# else
+# define fallocate fallocate64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+ __off64_t __len);
+# endif
+
+
+/* Map file name to file handle. */
+extern int name_to_handle_at (int __dfd, const char *__name,
+ struct file_handle *__handle, int *__mnt_id,
+ int __flags) __THROW;
+
+/* Open file using the file handle.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+ int __flags);
+
+#endif /* use GNU */
+
+__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/bits/param.h b/sysdeps/unix/sysv/linux/bits/param.h
new file mode 100644
index 0000000000..36ca088e5a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/bits/param.h
@@ -0,0 +1,42 @@
+/* Old-style Unix parameters and limits. Linux version.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PARAM_H
+# error "Never use <bits/param.h> directly; include <sys/param.h> instead."
+#endif
+
+#ifndef ARG_MAX
+# define __undef_ARG_MAX
+#endif
+
+#include <linux/limits.h>
+#include <linux/param.h>
+
+/* The kernel headers define ARG_MAX. The value is wrong, though. */
+#ifdef __undef_ARG_MAX
+# undef ARG_MAX
+# undef __undef_ARG_MAX
+#endif
+
+#define MAXSYMLINKS 20
+
+/* The following are not really correct but it is a value we used for a
+ long time and which seems to be usable. People should not use NOFILE
+ and NCARGS anyway. */
+#define NOFILE 256
+#define NCARGS 131072
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index 950498acd4..eebb3a4839 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -78,6 +78,29 @@ __bump_nl_timestamp (void)
}
#endif
+static inline uint32_t
+get_nl_timestamp (void)
+{
+#ifdef IS_IN_nscd
+ return nl_timestamp;
+#elif defined USE_NSCD
+ return __nscd_get_nl_timestamp ();
+#else
+ return 0;
+#endif
+}
+
+static inline bool
+cache_valid_p (void)
+{
+ if (cache != NULL)
+ {
+ uint32_t timestamp = get_nl_timestamp ();
+ return timestamp != 0 && cache->timestamp == timestamp;
+ }
+ return false;
+}
+
static struct cached_data *
make_request (int fd, pid_t pid)
@@ -253,11 +276,7 @@ make_request (int fd, pid_t pid)
if (result == NULL)
goto out_fail;
-#ifdef IS_IN_nscd
- result->timestamp = nl_timestamp;
-#else
- result->timestamp = __nscd_get_nl_timestamp ();
-#endif
+ result->timestamp = get_nl_timestamp ();
result->usecnt = 2;
result->seen_ipv4 = seen_ipv4;
result->seen_ipv6 = true;
@@ -302,14 +321,7 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
__libc_lock_lock (lock);
-#ifdef IS_IN_nscd
-# define cache_valid() nl_timestamp != 0 && cache->timestamp == nl_timestamp
-#else
-# define cache_valid() \
- ({ uint32_t val = __nscd_get_nl_timestamp (); \
- val != 0 && cache->timestamp == val; })
-#endif
- if (cache != NULL && cache_valid ())
+ if (cache_valid_p ())
{
data = cache;
atomic_increment (&cache->usecnt);
diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
index c6ff466712..c00f5ea064 100644
--- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
@@ -1,5 +1,5 @@
/* clock_getcpuclockid -- Get a clockid_t for process CPU time. Linux version.
- Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,74 +29,25 @@
int
clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
{
-#ifdef __NR_clock_getres
/* The clockid_t value is a simple computation from the PID.
But we do a clock_getres call to validate it. */
const clockid_t pidclock = MAKE_PROCESS_CPUCLOCK (pid, CPUCLOCK_SCHED);
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
- extern int __libc_missing_posix_cpu_timers attribute_hidden;
-# if !(__ASSUME_POSIX_TIMERS > 0)
- extern int __libc_missing_posix_timers attribute_hidden;
- if (__libc_missing_posix_timers && !__libc_missing_posix_cpu_timers)
- __libc_missing_posix_cpu_timers = 1;
-# endif
- if (!__libc_missing_posix_cpu_timers)
-# endif
+ INTERNAL_SYSCALL_DECL (err);
+ int r = INTERNAL_SYSCALL (clock_getres, err, 2, pidclock, NULL);
+ if (!INTERNAL_SYSCALL_ERROR_P (r, err))
{
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_getres, err, 2, pidclock, NULL);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- {
- *clock_id = pidclock;
- return 0;
- }
-
-# if !(__ASSUME_POSIX_TIMERS > 0)
- if (INTERNAL_SYSCALL_ERRNO (r, err) == ENOSYS)
- {
- /* The kernel doesn't support these calls at all. */
- __libc_missing_posix_timers = 1;
- __libc_missing_posix_cpu_timers = 1;
- }
- else
-# endif
- if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
- {
-# if !(__ASSUME_POSIX_CPU_TIMERS > 0)
- if (pidclock == MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED)
- || INTERNAL_SYSCALL_ERROR_P (INTERNAL_SYSCALL
- (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK
- (0, CPUCLOCK_SCHED), NULL),
- err))
- /* The kernel doesn't support these clocks at all. */
- __libc_missing_posix_cpu_timers = 1;
- else
-# endif
- /* The clock_getres system call checked the PID for us. */
- return ESRCH;
- }
- else
- return INTERNAL_SYSCALL_ERRNO (r, err);
+ *clock_id = pidclock;
+ return 0;
}
-#endif
-
- /* We don't allow any process ID but our own. */
- if (pid != 0 && pid != getpid ())
- return EPERM;
-#ifdef CLOCK_PROCESS_CPUTIME_ID
- if (HAS_CPUCLOCK)
+ if (INTERNAL_SYSCALL_ERRNO (r, err) == EINVAL)
{
- /* Store the number. */
- *clock_id = CLOCK_PROCESS_CPUTIME_ID;
-
- return 0;
+ /* The clock_getres system call checked the PID for us. */
+ return ESRCH;
}
-#endif
-
- /* We don't have a timer for that. */
- return ENOENT;
+ else
+ return INTERNAL_SYSCALL_ERRNO (r, err);
}
+strong_alias (clock_getcpuclockid, __clock_getcpuclockid)
diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c
index e7e3138543..1e87dd9a8d 100644
--- a/sysdeps/unix/sysv/linux/clock_getres.c
+++ b/sysdeps/unix/sysv/linux/clock_getres.c
@@ -1,5 +1,5 @@
/* clock_getres -- Get the resolution of a POSIX clockid_t. Linux version.
- Copyright (C) 2003,2004,2005,2006,2008,2010 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,11 +35,9 @@
retval = INLINE_VSYSCALL (clock_getres, 2, clock_id, res); \
break
-#ifdef __ASSUME_POSIX_TIMERS
-
-/* This means the REALTIME and MONOTONIC clock are definitely
- supported in the kernel. */
-# define SYSDEP_GETRES \
+/* The REALTIME and MONOTONIC clock are definitely supported in the
+ kernel. */
+#define SYSDEP_GETRES \
SYSDEP_GETRES_CPUTIME \
case CLOCK_REALTIME: \
case CLOCK_MONOTONIC: \
@@ -48,151 +46,11 @@
case CLOCK_MONOTONIC_COARSE: \
SYSCALL_GETRES
-# define __libc_missing_posix_timers 0
-#elif defined __NR_clock_getres
-/* Is the syscall known to exist? */
-extern int __libc_missing_posix_timers attribute_hidden;
-
-static inline int
-maybe_syscall_getres (clockid_t clock_id, struct timespec *res)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_VSYSCALL (clock_getres, err, 2, clock_id, res);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
- if (e == ENOSYS)
- {
- __libc_missing_posix_timers = 1;
- e = EINVAL;
- }
- }
-
- return e;
-}
-
-/* The REALTIME and MONOTONIC clock might be available. Try the
- syscall first. */
-# define SYSDEP_GETRES \
- SYSDEP_GETRES_CPUTIME \
- case CLOCK_REALTIME: \
- case CLOCK_MONOTONIC: \
- case CLOCK_MONOTONIC_RAW: \
- case CLOCK_REALTIME_COARSE: \
- case CLOCK_MONOTONIC_COARSE: \
- retval = maybe_syscall_getres (clock_id, res); \
- if (retval == 0) \
- break; \
- /* Fallback code. */ \
- if (retval == EINVAL && clock_id == CLOCK_REALTIME) \
- retval = realtime_getres (res); \
- else \
- { \
- __set_errno (retval); \
- retval = -1; \
- } \
- break;
-#endif
-
-#ifdef __NR_clock_getres
/* We handled the REALTIME clock here. */
-# define HANDLED_REALTIME 1
-# define HANDLED_CPUTIME 1
-
-# if __ASSUME_POSIX_CPU_TIMERS > 0
-
-# define SYSDEP_GETRES_CPU SYSCALL_GETRES
-# define SYSDEP_GETRES_CPUTIME /* Default catches them too. */
-
-# else
-
-extern int __libc_missing_posix_cpu_timers attribute_hidden;
-
-static int
-maybe_syscall_getres_cpu (clockid_t clock_id, struct timespec *res)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_VSYSCALL (clock_getres, err, 2, clock_id, res);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
+#define HANDLED_REALTIME 1
+#define HANDLED_CPUTIME 1
- e = INTERNAL_SYSCALL_ERRNO (r, err);
-# ifndef __ASSUME_POSIX_TIMERS
- if (e == ENOSYS)
- {
- __libc_missing_posix_timers = 1;
- __libc_missing_posix_cpu_timers = 1;
- e = EINVAL;
- }
- else
-# endif
- {
- if (e == EINVAL)
- {
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- r = INTERNAL_VSYSCALL (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- NULL);
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
- __libc_missing_posix_cpu_timers = 1;
- }
- }
- }
-
- return e;
-}
-
-# define SYSDEP_GETRES_CPU \
- retval = maybe_syscall_getres_cpu (clock_id, res); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = -1 /* Otherwise continue on to the HP_TIMING version. */;
-
-static inline int
-maybe_syscall_getres_cputime (clockid_t clock_id, struct timespec *res)
-{
- return maybe_syscall_getres_cpu
- (clock_id == CLOCK_THREAD_CPUTIME_ID
- ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED)
- : MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- res);
-}
-
-# define SYSDEP_GETRES_CPUTIME \
- case CLOCK_PROCESS_CPUTIME_ID: \
- case CLOCK_THREAD_CPUTIME_ID: \
- retval = maybe_syscall_getres_cputime (clock_id, res); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = hp_timing_getres (res); \
- break;
-# if !HP_TIMING_AVAIL
-# define hp_timing_getres(res) (__set_errno (EINVAL), -1)
-# endif
-
-# endif
-#endif
+#define SYSDEP_GETRES_CPU SYSCALL_GETRES
+#define SYSDEP_GETRES_CPUTIME /* Default catches them too. */
#include <sysdeps/posix/clock_getres.c>
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
index 446fbb66f6..05dfb9d099 100644
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
@@ -1,5 +1,5 @@
/* clock_gettime -- Get current time from a POSIX clockid_t. Linux version.
- Copyright (C) 2003,2004,2005,2006,2007,2010,2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,172 +40,22 @@
INTERNAL_VSYSCALL (clock_gettime, err, 2, id, tp)
#endif
-#ifdef __ASSUME_POSIX_TIMERS
-
-/* This means the REALTIME and MONOTONIC clock are definitely
- supported in the kernel. */
-# define SYSDEP_GETTIME \
+/* The REALTIME and MONOTONIC clock are definitely supported in the
+ kernel. */
+#define SYSDEP_GETTIME \
SYSDEP_GETTIME_CPUTIME; \
case CLOCK_REALTIME: \
case CLOCK_MONOTONIC: \
retval = SYSCALL_GETTIME (clock_id, tp); \
break
-# define __libc_missing_posix_timers 0
-#elif defined __NR_clock_gettime
-/* Is the syscall known to exist? */
-int __libc_missing_posix_timers attribute_hidden;
-
-static inline int
-maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_GETTIME (clock_id, tp);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
- if (e == ENOSYS)
- {
- __libc_missing_posix_timers = 1;
- e = EINVAL;
- }
- }
-
- return e;
-}
-
-/* The REALTIME and MONOTONIC clock might be available. Try the
- syscall first. */
-# define SYSDEP_GETTIME \
- SYSDEP_GETTIME_CPUTIME; \
- case CLOCK_REALTIME: \
- case CLOCK_MONOTONIC: \
- case CLOCK_MONOTONIC_RAW: \
- case CLOCK_REALTIME_COARSE: \
- case CLOCK_MONOTONIC_COARSE: \
- retval = maybe_syscall_gettime (clock_id, tp); \
- if (retval == 0) \
- break; \
- /* Fallback code. */ \
- if (retval == EINVAL && clock_id == CLOCK_REALTIME) \
- retval = realtime_gettime (tp); \
- else \
- { \
- __set_errno (retval); \
- retval = -1; \
- } \
- break
-#endif
-
-#ifdef __NR_clock_gettime
/* We handled the REALTIME clock here. */
-# define HANDLED_REALTIME 1
-# define HANDLED_CPUTIME 1
+#define HANDLED_REALTIME 1
+#define HANDLED_CPUTIME 1
-# if __ASSUME_POSIX_CPU_TIMERS > 0
-
-# define SYSDEP_GETTIME_CPU(clock_id, tp) \
+#define SYSDEP_GETTIME_CPU(clock_id, tp) \
retval = SYSCALL_GETTIME (clock_id, tp); \
break
-# define SYSDEP_GETTIME_CPUTIME /* Default catches them too. */
-
-# else
-
-int __libc_missing_posix_cpu_timers attribute_hidden;
-
-static int
-maybe_syscall_gettime_cpu (clockid_t clock_id, struct timespec *tp)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_GETTIME (clock_id, tp);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
-# ifndef __ASSUME_POSIX_TIMERS
- if (e == ENOSYS)
- {
- __libc_missing_posix_timers = 1;
- __libc_missing_posix_cpu_timers = 1;
- e = EINVAL;
- }
- else
-# endif
- {
- if (e == EINVAL)
- {
-# ifdef HAVE_CLOCK_GETRES_VSYSCALL
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- r = INTERNAL_VSYSCALL (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- NULL);
-# else
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- r = INTERNAL_SYSCALL (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- NULL);
-# endif
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
- __libc_missing_posix_cpu_timers = 1;
- }
- }
- }
-
- return e;
-}
-
-# define SYSDEP_GETTIME_CPU(clock_id, tp) \
- retval = maybe_syscall_gettime_cpu (clock_id, tp); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = -1 /* Otherwise continue on to the HP_TIMING version. */;
-
-static inline int
-maybe_syscall_gettime_cputime (clockid_t clock_id, struct timespec *tp)
-{
- return maybe_syscall_gettime_cpu
- (clock_id == CLOCK_THREAD_CPUTIME_ID
- ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED)
- : MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- tp);
-}
-
-# define SYSDEP_GETTIME_CPUTIME \
- case CLOCK_PROCESS_CPUTIME_ID: \
- case CLOCK_THREAD_CPUTIME_ID: \
- retval = maybe_syscall_gettime_cputime (clock_id, tp); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- retval = hp_timing_gettime (clock_id, tp); \
- break
-# if !HP_TIMING_AVAIL
-# define hp_timing_gettime(clock_id, tp) (__set_errno (EINVAL), -1)
-# endif
-
-# endif
-#endif
+#define SYSDEP_GETTIME_CPUTIME /* Default catches them too. */
#include <sysdeps/unix/clock_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
index e003ba21e6..b12bd868f2 100644
--- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
+++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,6 @@
#include "kernel-posix-cpu-timers.h"
-#ifdef __ASSUME_POSIX_TIMERS
/* We can simply use the syscall. The CPU clocks are not supported
with this function. */
int
@@ -53,43 +52,4 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
return (INTERNAL_SYSCALL_ERROR_P (r, err)
? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
}
-
-#else
-# ifdef __NR_clock_nanosleep
-/* Is the syscall known to exist? */
-extern int __libc_missing_posix_timers attribute_hidden;
-
-/* The REALTIME and MONOTONIC clock might be available. Try the
- syscall first. */
-# define SYSDEP_NANOSLEEP \
- if (!__libc_missing_posix_timers) \
- { \
- clockid_t syscall_clockid; \
- INTERNAL_SYSCALL_DECL (err); \
- \
- if (clock_id == CLOCK_THREAD_CPUTIME_ID) \
- return EINVAL; \
- if (clock_id == CLOCK_PROCESS_CPUTIME_ID) \
- syscall_clockid = MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED); \
- else \
- syscall_clockid = clock_id; \
- \
- int oldstate = LIBC_CANCEL_ASYNC (); \
- \
- int r = INTERNAL_SYSCALL (clock_nanosleep, err, 4, \
- syscall_clockid, flags, req, rem); \
- \
- LIBC_CANCEL_RESET (oldstate); \
- \
- if (!INTERNAL_SYSCALL_ERROR_P (r, err)) \
- return 0; \
- \
- if (INTERNAL_SYSCALL_ERRNO (r, err) != ENOSYS) \
- return INTERNAL_SYSCALL_ERRNO (r, err); \
- \
- __libc_missing_posix_timers = 1; \
- }
-# endif
-
-# include <sysdeps/unix/clock_nanosleep.c>
-#endif
+strong_alias (clock_nanosleep, __clock_nanosleep)
diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c
index 8cf3209803..fde662177b 100644
--- a/sysdeps/unix/sysv/linux/clock_settime.c
+++ b/sysdeps/unix/sysv/linux/clock_settime.c
@@ -31,120 +31,18 @@
# include <bits/libc-vdso.h>
#endif
-#if __ASSUME_POSIX_CPU_TIMERS <= 0 && defined __NR_clock_settime
-extern int __libc_missing_posix_timers attribute_hidden;
-extern int __libc_missing_posix_cpu_timers attribute_hidden;
-static int
-maybe_syscall_settime_cpu (clockid_t clock_id, const struct timespec *tp)
-{
- int e = EINVAL;
-
- if (!__libc_missing_posix_cpu_timers)
- {
- INTERNAL_SYSCALL_DECL (err);
- int r = INTERNAL_SYSCALL (clock_settime, err, 2, clock_id, tp);
- if (!INTERNAL_SYSCALL_ERROR_P (r, err))
- return 0;
-
- e = INTERNAL_SYSCALL_ERRNO (r, err);
-# ifndef __ASSUME_POSIX_TIMERS
- if (e == ENOSYS)
- {
- __libc_missing_posix_timers = 1;
- __libc_missing_posix_cpu_timers = 1;
- e = EINVAL;
- }
- else
-# endif
- {
- if (e == EINVAL)
- {
- /* Check whether the kernel supports CPU clocks at all.
- If not, record it for the future. */
- r = INTERNAL_VSYSCALL (clock_getres, err, 2,
- MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED),
- NULL);
- if (INTERNAL_SYSCALL_ERROR_P (r, err))
- __libc_missing_posix_cpu_timers = 1;
- }
- }
- }
-
- return e;
-}
-#endif
-
-
-#ifdef __ASSUME_POSIX_TIMERS
-/* This means the REALTIME clock is definitely supported in the
- kernel. */
-# define SYSDEP_SETTIME \
+/* The REALTIME clock is definitely supported in the kernel. */
+#define SYSDEP_SETTIME \
case CLOCK_REALTIME: \
retval = INLINE_SYSCALL (clock_settime, 2, clock_id, tp); \
break
-#elif defined __NR_clock_settime
-/* Is the syscall known to exist? */
-extern int __libc_missing_posix_timers attribute_hidden;
-/* The REALTIME clock might be available. Try the syscall first. */
-# define SYSDEP_SETTIME \
- case CLOCK_REALTIME: \
- case CLOCK_REALTIME_COARSE: \
- { \
- int e = EINVAL; \
- \
- if (!__libc_missing_posix_timers) \
- { \
- INTERNAL_SYSCALL_DECL (err); \
- int r = INTERNAL_SYSCALL (clock_settime, err, 2, clock_id, tp); \
- if (!INTERNAL_SYSCALL_ERROR_P (r, err)) \
- { \
- retval = 0; \
- break; \
- } \
- \
- e = INTERNAL_SYSCALL_ERRNO (r, err); \
- if (e == ENOSYS) \
- { \
- __libc_missing_posix_timers = 1; \
- e = EINVAL; \
- } \
- } \
- \
- /* Fallback code. */ \
- if (e == EINVAL && clock_id == CLOCK_REALTIME) \
- HANDLE_REALTIME; \
- else \
- { \
- __set_errno (e); \
- retval = -1; \
- } \
- } \
- break
-#endif
-
-#ifdef __NR_clock_settime
/* We handled the REALTIME clock here. */
-# define HANDLED_REALTIME 1
-#endif
+#define HANDLED_REALTIME 1
-#if __ASSUME_POSIX_CPU_TIMERS > 0
-# define HANDLED_CPUTIME 1
-# define SYSDEP_SETTIME_CPU \
+#define HANDLED_CPUTIME 1
+#define SYSDEP_SETTIME_CPU \
retval = INLINE_SYSCALL (clock_settime, 2, clock_id, tp)
-#elif defined __NR_clock_settime
-# define SYSDEP_SETTIME_CPU \
- retval = maybe_syscall_settime_cpu (clock_id, tp); \
- if (retval == 0) \
- break; \
- if (retval != EINVAL || !__libc_missing_posix_cpu_timers) \
- { \
- __set_errno (retval); \
- retval = -1; \
- break; \
- } \
- do { } while (0)
-#endif
#include <sysdeps/unix/clock_settime.c>
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 0650067e47..76cfea1dc9 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -1,102 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux.
@@ -284,34 +185,34 @@ test -n "$arch_minimum_kernel" ||
case "$machine" in
i386*)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
s390/s390-32)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
s390/s390-64)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
sh*)
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=yes
;;
sparc/sparc64*)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
sparc*)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
*)
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
esac
if test -n "$minimum_kernel"; then
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index fc514fbf4a..e55d9fdb0f 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -41,34 +41,34 @@ test -n "$arch_minimum_kernel" ||
case "$machine" in
i386*)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
powerpc/powerpc32)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
s390/s390-32)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
s390/s390-64)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
sh*)
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
libc_cv_gcc_unwind_find_fde=yes
;;
sparc/sparc64*)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
sparc*)
libc_cv_gcc_unwind_find_fde=yes
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
*)
- arch_minimum_kernel=2.4.21
+ arch_minimum_kernel=2.6.16
;;
esac
if test -n "$minimum_kernel"; then
diff --git a/sysdeps/unix/sysv/linux/dl-execstack.c b/sysdeps/unix/sysv/linux/dl-execstack.c
index 6408adcc9f..9aadb90891 100644
--- a/sysdeps/unix/sysv/linux/dl-execstack.c
+++ b/sysdeps/unix/sysv/linux/dl-execstack.c
@@ -1,5 +1,5 @@
/* Stack executability handling for GNU dynamic linker. Linux version.
- Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,95 +46,11 @@ _dl_make_stack_executable (void **stack_endp)
|| __builtin_expect (*stack_endp != __libc_stack_end, 0))
return EPERM;
- /* Newer Linux kernels support a flag to make our job easy. */
-#if defined PROT_GROWSDOWN || defined PROT_GROWSUP
-# if __ASSUME_PROT_GROWSUPDOWN == 0
- static bool no_growsupdown;
- if (! no_growsupdown)
-# endif
- {
- if (__builtin_expect (__mprotect ((void *) page, GLRO(dl_pagesize),
- __stack_prot) == 0, 1))
- goto return_success;
-# if __ASSUME_PROT_GROWSUPDOWN == 0
- if (errno == EINVAL)
- no_growsupdown = true;
- else
-# endif
- {
- result = errno;
- goto out;
- }
- }
-#endif
-
- /* There is always a hole in the address space below the bottom of the
- stack. So when we make an mprotect call that starts below the bottom
- of the stack, it will include the hole and fail with ENOMEM.
-
- We start with a random guess at how deep the stack might have gotten
- so as to have extended the GROWSDOWN mapping to lower pages. */
-
-#if __ASSUME_PROT_GROWSUPDOWN == 0
- size_t size = GLRO(dl_pagesize) * 8;
-
-# if _STACK_GROWS_DOWN
- page = page + GLRO(dl_pagesize) - size;
- while (1)
- {
- if (__mprotect ((void *) page, size,
- __stack_prot & ~PROT_GROWSDOWN) == 0)
- /* We got this chunk changed; loop to do another chunk below. */
- page -= size;
- else
- {
- if (errno != ENOMEM) /* Unexpected failure mode. */
- {
- result = errno;
- goto out;
- }
-
- if (size == GLRO(dl_pagesize))
- /* We just tried to mprotect the top hole page and failed.
- We are done. */
- break;
-
- /* Our mprotect call failed because it started below the lowest
- stack page. Try again on just the top half of that region. */
- size /= 2;
- page += size;
- }
- }
-
-# elif _STACK_GROWS_UP
- while (1)
- {
- if (__mprotect ((void *) page, size, __stack_prot & ~PROT_GROWSUP) == 0)
- /* We got this chunk changed; loop to do another chunk below. */
- page += size;
- else
- {
- if (errno != ENOMEM) /* Unexpected failure mode. */
- {
- result = errno;
- goto out;
- }
-
- if (size == GLRO(dl_pagesize))
- /* We just tried to mprotect the lowest hole page and failed.
- We are done. */
- break;
-
- /* Our mprotect call failed because it extended past the highest
- stack page. Try again on just the bottom half of that region. */
- size /= 2;
- }
- }
-
-# else
-# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
-# endif
-#endif
+ if (__builtin_expect (__mprotect ((void *) page, GLRO(dl_pagesize),
+ __stack_prot) == 0, 1))
+ goto return_success;
+ result = errno;
+ goto out;
return_success:
/* Clear the address. */
diff --git a/sysdeps/unix/sysv/linux/dl-fxstatat64.c b/sysdeps/unix/sysv/linux/dl-fxstatat64.c
index 9a17a9b739..1f8c2e6415 100644
--- a/sysdeps/unix/sysv/linux/dl-fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/dl-fxstatat64.c
@@ -3,4 +3,4 @@
function in this case. */
#undef __ASSUME_ATFCTS
#define __ASSUME_ATFCTS 1
-#include "fxstatat64.c"
+#include <fxstatat64.c>
diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c
index 42c63d2df4..da3686a360 100644
--- a/sysdeps/unix/sysv/linux/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/dl-sysdep.c
@@ -1,5 +1,5 @@
/* Dynamic linker system dependencies for Linux.
- Copyright (C) 1995,1997,2001,2004,2005,2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,27 +33,6 @@ static inline void
frob_brk (void)
{
__brk (0); /* Initialize the break. */
-
-#if ! __ASSUME_BRK_PAGE_ROUNDED
- /* If the dynamic linker was executed as a program, then the break may
- start immediately after our data segment. However, dl-minimal.c has
- already stolen the remainder of the page for internal allocations.
- If we don't adjust the break location recorded by the kernel, the
- normal program startup will inquire, find the value at our &_end,
- and start allocating its own data there, clobbering dynamic linker
- data structures allocated there during startup.
-
- Later Linux kernels have changed this behavior so that the initial
- break value is rounded up to the page boundary before we start. */
-
- extern char *__curbrk attribute_hidden;
- extern char _end[] attribute_hidden;
- char *const endpage = (void *) 0 + (((__curbrk - (char *) 0)
- + GLRO(dl_pagesize) - 1)
- & -GLRO(dl_pagesize));
- if (__builtin_expect (__curbrk >= _end && __curbrk < endpage, 0))
- __brk (endpage);
-#endif
}
# include <elf/dl-sysdep.c>
diff --git a/sysdeps/unix/sysv/linux/fips-private.h b/sysdeps/unix/sysv/linux/fips-private.h
new file mode 100644
index 0000000000..81d1b617f4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/fips-private.h
@@ -0,0 +1,74 @@
+/* FIPS compliance status test for GNU/Linux systems.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _FIPS_PRIVATE_H
+#define _FIPS_PRIVATE_H
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <not-cancel.h>
+#include <stdbool.h>
+
+/* Return true if FIPS mode is enabled. See
+ sysdeps/generic/fips-private.h for more information. */
+
+static inline bool
+fips_enabled_p (void)
+{
+ static enum
+ {
+ FIPS_UNTESTED = 0,
+ FIPS_ENABLED = 1,
+ FIPS_DISABLED = -1,
+ FIPS_TEST_FAILED = -2
+ } checked;
+
+ if (checked == FIPS_UNTESTED)
+ {
+ int fd = open_not_cancel_2 ("/proc/sys/crypto/fips_enabled", O_RDONLY);
+
+ if (fd != -1)
+ {
+ /* This is more than enough, the file contains a single integer. */
+ char buf[32];
+ ssize_t n;
+ n = TEMP_FAILURE_RETRY (read_not_cancel (fd, buf, sizeof (buf) - 1));
+ close_not_cancel_no_status (fd);
+
+ if (n > 0)
+ {
+ /* Terminate the string. */
+ buf[n] = '\0';
+
+ char *endp;
+ long int res = strtol (buf, &endp, 10);
+ if (endp != buf && (*endp == '\0' || *endp == '\n'))
+ checked = (res > 0) ? FIPS_ENABLED : FIPS_DISABLED;
+ }
+ }
+
+ if (checked == FIPS_UNTESTED)
+ checked = FIPS_TEST_FAILED;
+ }
+
+ return checked == FIPS_ENABLED;
+}
+
+#endif /* _FIPS_PRIVATE_H */
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index dc78647920..b2ad48bdb7 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -1,5 +1,5 @@
-/* fxstat64 using old-style Unix fstat system call.
- Copyright (C) 1997-2002, 2003, 2006 Free Software Foundation, Inc.
+/* fxstat64 using Linux fstat64 system call.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,57 +27,18 @@
#include <kernel-features.h>
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_fstat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file FD in BUF. */
int
___fxstat64 (int vers, int fd, struct stat64 *buf)
{
int result;
-#if __ASSUME_STAT64_SYSCALL > 0
result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (buf));
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+#if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
-# endif
- return result;
-#else
- struct kernel_stat kbuf;
-# if defined __NR_fstat64
- if (! __have_no_stat64)
- {
- int saved_errno = errno;
- result = INLINE_SYSCALL (fstat64, 2, fd, CHECK_1 (buf));
-
- if (result != -1 || errno != ENOSYS)
- {
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (!result && buf->__st_ino != (__ino_t)buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
- }
-
- __set_errno (saved_errno);
- __have_no_stat64 = 1;
- }
-# endif
- result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat64_conv (vers, &kbuf, buf);
-
- return result;
#endif
+ return result;
}
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c
index fff9444f0a..4aa60df7ab 100644
--- a/sysdeps/unix/sysv/linux/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/fxstatat64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,18 +29,6 @@
#include <kernel-features.h>
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls.
- This is the definition. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file NAME in BUF. */
int
@@ -110,7 +98,6 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
file = buf;
}
-# if __ASSUME_STAT64_SYSCALL > 0
if (flag & AT_SYMLINK_NOFOLLOW)
result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file),
CHECK_1 (st));
@@ -119,51 +106,12 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
CHECK_1 (st));
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
{
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
if (st->__st_ino != (__ino_t) st->st_ino)
st->st_ino = st->__st_ino;
-# endif
+# endif
return result;
}
-# else
- struct kernel_stat kst;
-# ifdef __NR_stat64
- if (! __have_no_stat64)
- {
- if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file),
- CHECK_1 (st));
- else
- result = INTERNAL_SYSCALL (stat64, err, 2, CHECK_STRING (file),
- CHECK_1 (st));
-
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- {
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (st->__st_ino != (__ino_t) st->st_ino)
- st->st_ino = st->__st_ino;
-# endif
- return result;
- }
- if (INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
- goto fail;
-
- __have_no_stat64 = 1;
- }
-# endif
-
- if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file),
- __ptrvalue (&kst));
- else
- result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file),
- __ptrvalue (&kst));
-
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return __xstat64_conv (vers, &kst, st);
-
- fail:
-# endif
__atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf);
return -1;
diff --git a/sysdeps/unix/sysv/linux/getdents.c b/sysdeps/unix/sysv/linux/getdents.c
index ac4979efb2..babfbd0a43 100644
--- a/sysdeps/unix/sysv/linux/getdents.c
+++ b/sysdeps/unix/sysv/linux/getdents.c
@@ -97,7 +97,6 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
{
ssize_t retval;
-#ifdef __ASSUME_GETDENTS32_D_TYPE
/* The d_ino and d_off fields in kernel_dirent and dirent must have
the same sizes and alignments. */
if (sizeof (DIRENT_TYPE) == sizeof (struct dirent)
@@ -135,7 +134,6 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
return retval;
}
-#endif
off64_t last_offset = -1;
@@ -293,11 +291,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
DIRENT_SET_DP_INO(dp, kdp->d_ino);
dp->d_off = kdp->d_off;
dp->d_reclen = new_reclen;
-#ifdef __ASSUME_GETDENTS32_D_TYPE
dp->d_type = *((char *) kdp + kdp->d_reclen - 1);
-#else
- dp->d_type = DT_UNKNOWN;
-#endif
memcpy (dp->d_name, kdp->d_name,
kdp->d_reclen - offsetof (struct kernel_dirent, d_name));
diff --git a/sysdeps/unix/sysv/linux/i386/fcntl.c b/sysdeps/unix/sysv/linux/i386/fcntl.c
index c68a06b45b..a0f25449e0 100644
--- a/sysdeps/unix/sysv/linux/i386/fcntl.c
+++ b/sysdeps/unix/sysv/linux/i386/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000,2002-2004,2006,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,25 +22,8 @@
#include <stdarg.h>
#include <sys/syscall.h>
-#include <kernel-features.h>
-#ifndef __ASSUME_FCNTL64
-/* This variable is shared with all files that check for fcntl64. */
-int __have_no_fcntl64;
-#endif
-
-#ifdef __ASSUME_F_GETOWN_EX
-# define miss_F_GETOWN_EX 0
-#elif !defined __ASSUME_FCNTL64
-static int miss_F_GETOWN_EX;
-#endif
-
-
-#if defined NO_CANCELLATION && !defined __ASSUME_FCNTL64
-# define __fcntl_nocancel __libc_fcntl
-#endif
-
-#if !defined NO_CANCELLATION || !defined __ASSUME_FCNTL64
+#ifndef NO_CANCELLATION
int
__fcntl_nocancel (int fd, int cmd, ...)
{
@@ -51,112 +34,11 @@ __fcntl_nocancel (int fd, int cmd, ...)
arg = va_arg (ap, void *);
va_end (ap);
-#ifndef __ASSUME_FCNTL64
-# ifdef __NR_fcntl64
- if (! __have_no_fcntl64)
- {
- int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
- if (result >= 0 || errno != ENOSYS)
- return result;
-
- __have_no_fcntl64 = 1;
- }
-# endif
- switch (cmd)
- {
- case F_GETLK64:
- /* Convert arg from flock64 to flock and back. */
- {
- struct flock fl;
- struct flock64 *fl64 = arg;
- int res;
-
- fl.l_start = (off_t)fl64->l_start;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_start != fl64->l_start)
- {
- eoverflow:
- __set_errno (EOVERFLOW);
- return -1;
- }
- fl.l_len = (off_t) fl64->l_len;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_len != fl64->l_len)
- goto eoverflow;
-
- fl.l_type = fl64->l_type;
- fl.l_whence = fl64->l_whence;
- fl.l_pid = fl64->l_pid;
-
- res = INLINE_SYSCALL (fcntl, 3, fd, F_GETLK, &fl);
- if (res != 0)
- return res;
- /* Everything ok, convert back. */
- fl64->l_type = fl.l_type;
- fl64->l_whence = fl.l_whence;
- fl64->l_start = fl.l_start;
- fl64->l_len = fl.l_len;
- fl64->l_pid = fl.l_pid;
-
- return 0;
- }
- case F_SETLK64:
- case F_SETLKW64:
- /* Try to convert arg from flock64 to flock. */
- {
- struct flock fl;
- struct flock64 *fl64 = arg;
-
- fl.l_start = (off_t) fl64->l_start;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_start != fl64->l_start)
- goto eoverflow;
-
- fl.l_len = (off_t)fl64->l_len;
- /* Check if we can represent the values with the smaller type. */
- if ((off64_t) fl.l_len != fl64->l_len)
- {
- __set_errno (EOVERFLOW);
- return -1;
- }
- fl.l_type = fl64->l_type;
- fl.l_whence = fl64->l_whence;
- fl.l_pid = fl64->l_pid;
- assert (F_SETLK - F_SETLKW == F_SETLK64 - F_SETLKW64);
- return INLINE_SYSCALL (fcntl, 3, fd, cmd + F_SETLK - F_SETLK64, &fl);
- }
- case F_GETOWN:
- if (! miss_F_GETOWN_EX)
- {
- INTERNAL_SYSCALL_DECL (err);
- struct f_owner_ex fex;
- int res = INTERNAL_SYSCALL (fcntl, err, 3, fd, F_GETOWN_EX, &fex);
- if (!INTERNAL_SYSCALL_ERROR_P (res, err))
- return fex.type == F_OWNER_GID ? -fex.pid : fex.pid;
-
-# ifndef __ASSUME_F_GETOWN_EX
- if (INTERNAL_SYSCALL_ERRNO (res, err) == EINVAL)
- miss_F_GETOWN_EX = 1;
- else
-# endif
- {
- __set_errno (INTERNAL_SYSCALL_ERRNO (res, err));
- return -1;
- }
- }
- /* FALLTHROUGH */
- default:
- return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
- }
- return -1;
-#else
return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
-#endif /* !__ASSUME_FCNTL64 */
}
-#endif /* NO_CANCELLATION || !__ASSUME_FCNTL64 */
+#endif /* NO_CANCELLATION */
-#ifndef __fcntl_nocancel
int
__libc_fcntl (int fd, int cmd, ...)
{
@@ -167,27 +49,17 @@ __libc_fcntl (int fd, int cmd, ...)
arg = va_arg (ap, void *);
va_end (ap);
-# ifdef __ASSUME_FCNTL64
if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
int oldtype = LIBC_CANCEL_ASYNC ();
int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
-# else
- if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
- return __fcntl_nocancel (fd, cmd, arg);
-
- int oldtype = LIBC_CANCEL_ASYNC ();
-
- int result = __fcntl_nocancel (fd, cmd, arg);
-# endif
LIBC_CANCEL_RESET (oldtype);
return result;
}
-#endif
libc_hidden_def (__libc_fcntl)
weak_alias (__libc_fcntl, __fcntl)
diff --git a/sysdeps/unix/sysv/linux/i386/fxstat.c b/sysdeps/unix/sysv/linux/i386/fxstat.c
index 5077780f0c..a1a950ee7a 100644
--- a/sysdeps/unix/sysv/linux/i386/fxstat.c
+++ b/sysdeps/unix/sysv/linux/i386/fxstat.c
@@ -1,6 +1,5 @@
/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991,1995-1998,2000,2002,2003,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,26 +33,15 @@
#include <xstatconv.h>
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file FD in BUF. */
int
__fxstat (int vers, int fd, struct stat *buf)
{
-#if __ASSUME_STAT64_SYSCALL == 0
- struct kernel_stat kbuf;
-#endif
int result;
if (vers == _STAT_VER_KERNEL)
return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 ((struct kernel_stat *) buf));
-#if __ASSUME_STAT64_SYSCALL > 0
{
struct stat64 buf64;
@@ -62,33 +50,6 @@ __fxstat (int vers, int fd, struct stat *buf)
result = __xstat32_conv (vers, &buf64, buf);
return result;
}
-#else
-
-# if defined __NR_stat64
- /* To support 32 bit UIDs, we have to use stat64. The normal stat call only returns
- 16 bit UIDs. */
- if (! __have_no_stat64)
- {
- struct stat64 buf64;
-
- result = INLINE_SYSCALL (fstat64, 2, fd, __ptrvalue (&buf64));
-
- if (result == 0)
- result = __xstat32_conv (vers, &buf64, buf);
-
- if (result != -1 || errno != ENOSYS)
- return result;
-
- __have_no_stat64 = 1;
- }
-# endif
-
- result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat_conv (vers, &kbuf, buf);
-
- return result;
-#endif /* __ASSUME_STAT64_SYSCALL */
}
hidden_def (__fxstat)
diff --git a/sysdeps/unix/sysv/linux/i386/fxstatat.c b/sysdeps/unix/sysv/linux/i386/fxstatat.c
index 7aae336e0e..d1e81e081b 100644
--- a/sysdeps/unix/sysv/linux/i386/fxstatat.c
+++ b/sysdeps/unix/sysv/linux/i386/fxstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,13 +35,6 @@
#include <xstatconv.h>
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file NAME relative to FD in ST. */
int
@@ -106,9 +99,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
file = buf;
}
-# if __ASSUME_STAT64_SYSCALL == 0
- struct kernel_stat kst;
-# endif
if (vers == _STAT_VER_KERNEL)
{
if (flag & AT_SYMLINK_NOFOLLOW)
@@ -120,8 +110,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
goto out;
}
-# if __ASSUME_STAT64_SYSCALL > 0
-
if (flag & AT_SYMLINK_NOFOLLOW)
result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file),
__ptrvalue (&st64));
@@ -130,38 +118,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
__ptrvalue (&st64));
if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
return __xstat32_conv (vers, &st64, st);
-# else
-# if defined __NR_stat64
- /* To support 32 bit UIDs, we have to use stat64. The normal stat
- call only returns 16 bit UIDs. */
- if (! __have_no_stat64)
- {
- if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat64, err, 2, CHECK_STRING (file),
- __ptrvalue (&st64));
- else
- result = INTERNAL_SYSCALL (stat64, err, 2, CHECK_STRING (file),
- __ptrvalue (&st64));
-
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- result = __xstat32_conv (vers, &st64, st);
-
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1)
- || INTERNAL_SYSCALL_ERRNO (result, err) != ENOSYS)
- goto out;
-
- __have_no_stat64 = 1;
- }
-# endif
- if (flag & AT_SYMLINK_NOFOLLOW)
- result = INTERNAL_SYSCALL (lstat, err, 2, CHECK_STRING (file),
- __ptrvalue (&kst));
- else
- result = INTERNAL_SYSCALL (stat, err, 2, CHECK_STRING (file),
- __ptrvalue (&kst));
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return __xstat_conv (vers, &kst, st);
-# endif /* __ASSUME_STAT64_SYSCALL */
out:
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0))
diff --git a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
index 821e35e4c2..920b0d553e 100644
--- a/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/i386/get_clockfreq.c
@@ -1,5 +1,5 @@
/* Get frequency of the system processor. i386/Linux version.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@ __get_clockfreq (void)
if (result != 0)
return result;
- fd = open ("/proc/cpuinfo", O_RDONLY);
+ fd = __open ("/proc/cpuinfo", O_RDONLY);
if (__builtin_expect (fd != -1, 1))
{
/* XXX AFAIK the /proc filesystem can generate "files" only up
@@ -47,7 +47,7 @@ __get_clockfreq (void)
char buf[4096];
ssize_t n;
- n = read (fd, buf, sizeof buf);
+ n = __read (fd, buf, sizeof buf);
if (__builtin_expect (n, 1) > 0)
{
char *mhz = memmem (buf, n, "cpu MHz", 7);
@@ -83,7 +83,7 @@ __get_clockfreq (void)
}
}
- close (fd);
+ __close (fd);
}
return result;
diff --git a/sysdeps/unix/sysv/linux/i386/lockf64.c b/sysdeps/unix/sysv/linux/i386/lockf64.c
index 6e7603e529..1caf9778e8 100644
--- a/sysdeps/unix/sysv/linux/i386/lockf64.c
+++ b/sysdeps/unix/sysv/linux/i386/lockf64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1994,1996,1997,1998,1999,2000,2003,2006
- Free Software Foundation, Inc.
+/* Copyright (C) 1994-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,66 +22,24 @@
#include <string.h>
#include <sysdep.h>
-#include <kernel-features.h>
-
/* lockf is a simplified interface to fcntl's locking facilities. */
-#ifdef __NR_fcntl64
-# if __ASSUME_FCNTL64 == 0
-/* This variable is shared with all files that check for fcntl64. The
- declaration is in fcntl.c. */
-extern int __have_no_fcntl64;
-# endif
-#endif
-
int
lockf64 (int fd, int cmd, off64_t len64)
{
-#if __ASSUME_FCNTL64 == 0
- struct flock fl;
- off_t len = (off_t) len64;
-#endif
-#ifdef __NR_fcntl64
struct flock64 fl64;
int cmd64;
-#endif
-
-#if __ASSUME_FCNTL64 == 0
- memset ((char *) &fl, '\0', sizeof (fl));
- /* lockf is always relative to the current file position. */
- fl.l_whence = SEEK_CUR;
- fl.l_start = 0;
- fl.l_len = len;
-#endif
-#ifdef __NR_fcntl64
-# if __ASSUME_FCNTL64 == 0
- if (!__have_no_fcntl64)
- {
-# endif
- memset ((char *) &fl64, '\0', sizeof (fl64));
- fl64.l_whence = SEEK_CUR;
- fl64.l_start = 0;
- fl64.l_len = len64;
-# if __ASSUME_FCNTL64 == 0
- }
-# endif
-#endif
+ memset ((char *) &fl64, '\0', sizeof (fl64));
+ fl64.l_whence = SEEK_CUR;
+ fl64.l_start = 0;
+ fl64.l_len = len64;
-#if __ASSUME_FCNTL64 == 0 && !defined __NR_fcntl64
- if (len64 != (off64_t) len)
- {
- /* We can't represent the length. */
- __set_errno (EOVERFLOW);
- return -1;
- }
-#endif
switch (cmd)
{
case F_TEST:
/* Test the lock: return 0 if FD is unlocked or locked by this process;
return -1, set errno to EACCES, if another process holds the lock. */
-#if __ASSUME_FCNTL64 > 0
fl64.l_type = F_RDLCK;
if (INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64) < 0)
return -1;
@@ -90,104 +47,22 @@ lockf64 (int fd, int cmd, off64_t len64)
return 0;
__set_errno (EACCES);
return -1;
-#else
-# ifdef __NR_fcntl64
- if (!__have_no_fcntl64)
- {
- int res;
-
- fl64.l_type = F_RDLCK;
- res = INLINE_SYSCALL (fcntl64, 3, fd, F_GETLK64, &fl64);
- /* If errno == ENOSYS try the 32bit interface if len64 can
- be represented with 32 bits. */
-
- if (res == 0)
- {
- if (fl64.l_type == F_UNLCK || fl64.l_pid == __getpid ())
- return 0;
- __set_errno (EACCES);
- return -1;
- }
- else if (errno == ENOSYS)
- __have_no_fcntl64 = 1;
- else
- /* res < 0 && errno != ENOSYS. */
- return -1;
- if (len64 != (off64_t) len)
- {
- /* We can't represent the length. */
- __set_errno (EOVERFLOW);
- return -1;
- }
- }
-# endif
- fl.l_type = F_RDLCK;
- if (__fcntl (fd, F_GETLK, &fl) < 0)
- return -1;
- if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())
- return 0;
- __set_errno (EACCES);
- return -1;
-#endif
case F_ULOCK:
-#if __ASSUME_FCNTL64 == 0
- fl.l_type = F_UNLCK;
- cmd = F_SETLK;
-#endif
-#ifdef __NR_fcntl64
fl64.l_type = F_UNLCK;
cmd64 = F_SETLK64;
-#endif
break;
case F_LOCK:
-#if __ASSUME_FCNTL64 == 0
- fl.l_type = F_WRLCK;
- cmd = F_SETLKW;
-#endif
-#ifdef __NR_fcntl64
fl64.l_type = F_WRLCK;
cmd64 = F_SETLKW64;
-#endif
break;
case F_TLOCK:
-#if __ASSUME_FCNTL64 == 0
- fl.l_type = F_WRLCK;
- cmd = F_SETLK;
-#endif
-#ifdef __NR_fcntl64
fl64.l_type = F_WRLCK;
cmd64 = F_SETLK64;
-#endif
break;
default:
__set_errno (EINVAL);
return -1;
}
-#if __ASSUME_FCNTL64 > 0
return INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64);
-#else
-# ifdef __NR_fcntl64
-
- if (!__have_no_fcntl64)
- {
- int res = INLINE_SYSCALL (fcntl64, 3, fd, cmd64, &fl64);
-
- /* If errno == ENOSYS try the 32bit interface if len64 can
- be represented with 32 bits. */
- if (res == 0 || errno != ENOSYS)
- return res;
-
- __have_no_fcntl64 = 1;
-
- if (len64 != (off64_t) len)
- {
- /* We can't represent the length. */
- __set_errno (EOVERFLOW);
- return -1;
- }
- }
-# endif
- return __fcntl (fd, cmd, &fl);
-#endif
}
diff --git a/sysdeps/unix/sysv/linux/i386/lxstat.c b/sysdeps/unix/sysv/linux/i386/lxstat.c
index 8994e1700a..2b1ecaa0d9 100644
--- a/sysdeps/unix/sysv/linux/i386/lxstat.c
+++ b/sysdeps/unix/sysv/linux/i386/lxstat.c
@@ -1,6 +1,5 @@
/* lxstat using old-style Unix lstat system call.
- Copyright (C) 1991,1995,1996,1997,1998,2000,2002,2003,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,27 +33,16 @@
#include <xstatconv.h>
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file NAME in BUF. */
int
__lxstat (int vers, const char *name, struct stat *buf)
{
-#if __ASSUME_STAT64_SYSCALL == 0
- struct kernel_stat kbuf;
-#endif
int result;
if (vers == _STAT_VER_KERNEL)
return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), CHECK_1 ((struct kernel_stat *) buf));
-#if __ASSUME_STAT64_SYSCALL > 0
{
struct stat64 buf64;
@@ -63,32 +51,6 @@ __lxstat (int vers, const char *name, struct stat *buf)
result = __xstat32_conv (vers, &buf64, buf);
return result;
}
-#else
-
-# if defined __NR_stat64
- /* To support 32 bit UIDs, we have to use stat64. The normal stat call only returns
- 16 bit UIDs. */
- if (! __have_no_stat64)
- {
- struct stat64 buf64;
- result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), __ptrvalue (&buf64));
-
- if (result == 0)
- result = __xstat32_conv (vers, &buf64, buf);
-
- if (result != -1 || errno != ENOSYS)
- return result;
-
- __have_no_stat64 = 1;
- }
-# endif
-
- result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat_conv (vers, &kbuf, buf);
-
- return result;
-#endif
}
hidden_def (__lxstat)
diff --git a/sysdeps/unix/sysv/linux/i386/mmap.S b/sysdeps/unix/sysv/linux/i386/mmap.S
index c8bf3e1087..1f79bde285 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap.S
@@ -25,10 +25,6 @@
ENTRY (__mmap)
-/* I don't think it is worthwhile trying to use mmap2 whenever it
- is available. Only use it when we are sure the syscall exists. */
-#ifdef __ASSUME_MMAP2_SYSCALL
-
/* Save registers. */
pushl %ebp
cfi_adjust_cfa_offset (4)
@@ -73,25 +69,6 @@ L(skip):
cfi_adjust_cfa_offset (-4)
cfi_restore (ebp)
-#else
-
- /* Save registers. */
- movl %ebx, %edx
- cfi_register (ebx, edx)
-
- movl $SYS_ify(mmap), %eax /* System call number in %eax. */
-
- lea 4(%esp), %ebx /* Address of args is 1st arg. */
-
- /* Do the system call trap. */
- int $0x80
-
- /* Restore registers. */
- movl %edx, %ebx
- cfi_restore (ebx)
-
-#endif
-
/* If 0 > %eax > -4096 there was an error. */
cmpl $-4096, %eax
ja SYSCALL_ERROR_LABEL
diff --git a/sysdeps/unix/sysv/linux/i386/mmap64.S b/sysdeps/unix/sysv/linux/i386/mmap64.S
index 7599b85443..8855109ff9 100644
--- a/sysdeps/unix/sysv/linux/i386/mmap64.S
+++ b/sysdeps/unix/sysv/linux/i386/mmap64.S
@@ -37,8 +37,6 @@
.text
ENTRY (BP_SYM (__mmap64))
-#ifdef __NR_mmap2
-
/* Save registers. */
pushl %ebp
cfi_adjust_cfa_offset (4)
@@ -88,12 +86,6 @@ L(do_syscall):
cfi_adjust_cfa_offset (-4)
cfi_restore (ebp)
-#ifndef __ASSUME_MMAP2_SYSCALL
-2:
- cmp $-ENOSYS, %eax
- je 3f
-#endif
-
/* If 0 > %eax > -4096 there was an error. */
cmpl $-4096, %eax
ja SYSCALL_ERROR_LABEL
@@ -122,42 +114,6 @@ L(einval):
cfi_restore (ebp)
movl $-EINVAL, %eax
jmp SYSCALL_ERROR_LABEL
-#endif
-
-#if !defined __ASSUME_MMAP2_SYSCALL || !defined __NR_mmap2
-3:
- /* Save registers. */
- movl %ebx, %edx
- cfi_register (ebx, edx)
-
- cmpl $0, OFFHI-SVRSP(%esp)
- jne L(einval2)
-
- movl $SYS_ify(mmap), %eax /* System call number in %eax. */
-
- lea ADDR-SVRSP(%esp), %ebx /* Address of args is 1st arg. */
-
- /* Do the system call trap. */
- ENTER_KERNEL
-
- /* Restore registers. */
- movl %edx, %ebx
- cfi_restore (ebx)
-
- /* If 0 > %eax > -4096 there was an error. */
- cmpl $-4096, %eax
- ja SYSCALL_ERROR_LABEL
-
- /* Successful; return the syscall's value. */
- ret
-
- cfi_register (ebx, edx)
-L(einval2):
- movl %edx, %ebx
- cfi_restore (ebx)
- movl $-EINVAL, %eax
- jmp SYSCALL_ERROR_LABEL
-#endif
PSEUDO_END (BP_SYM (__mmap64))
diff --git a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
index 0e8576fdd5..67d592959b 100644
--- a/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/nptl/libc.abilist
@@ -1813,6 +1813,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S b/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S
index 79fc071d2b..00e6a4194d 100644
--- a/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S
+++ b/sysdeps/unix/sysv/linux/i386/posix_fadvise64.S
@@ -1,5 +1,4 @@
-/* Copyright (C) 1995-2000,2002,2003,2004,2005,2006
- Free Software Foundation, Inc.
+/* Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +19,6 @@
#include <bp-sym.h>
#include <bp-asm.h>
-#include <kernel-features.h>
-
#define EINVAL 22
#define ENOSYS 38
#define EOVERFLOW 75
@@ -38,8 +35,6 @@
.text
ENTRY (BP_SYM (__posix_fadvise64_l64))
-#ifdef __NR_fadvise64_64
-
/* Save registers. */
pushl %ebp
cfi_adjust_cfa_offset (4)
@@ -78,11 +73,6 @@ ENTRY (BP_SYM (__posix_fadvise64_l64))
cfi_adjust_cfa_offset (-4)
cfi_restore (ebp)
-#ifndef __ASSUME_FADVISE64_64_SYSCALL
- cmpl $-ENOSYS, %eax
- je 1f
-#endif
-
/* The function returns zero, or the error number. So all we
have to do is negate the value passed back from the kernel. */
/* If 0 > %eax > -4096 there was an error. */
@@ -90,72 +80,15 @@ ENTRY (BP_SYM (__posix_fadvise64_l64))
/* Successful; return the syscall's value. */
ret
-#endif
-
-#if defined __NR_fadvise64 \
- && (!defined __ASSUME_FADVISE64_64_SYSCALL || !defined __NR_fadvise64_64)
-1: /* Save registers. */
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- pushl %esi
- cfi_adjust_cfa_offset (4)
- pushl %edi
- cfi_adjust_cfa_offset (4)
-
- /* Overflow check. */
- cmpl $0, LENHI(%esp)
- movl $-EOVERFLOW, %eax
- jne L(overflow)
-
- movl FD(%esp), %ebx
- cfi_rel_offset (ebx, 8)
- movl OFFLO(%esp), %ecx
- movl OFFHI(%esp), %edx
- movl LENLO(%esp), %esi
- cfi_rel_offset (esi, 4)
- movl FLAGS(%esp), %edi
- cfi_rel_offset (edi, 0)
-
- movl $SYS_ify(fadvise64), %eax
- ENTER_KERNEL
-
- /* Restore registers. */
-L(overflow):
- popl %edi
- cfi_adjust_cfa_offset (-4)
- cfi_restore (edi)
- popl %esi
- cfi_adjust_cfa_offset (-4)
- cfi_restore (esi)
- popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
-
- /* If 0 > %eax > -4096 there was an error. */
- negl %eax
-
- /* Successful; return the syscall's value. */
- ret
-#else
- movl $ENOSYS, %eax
- ret
-#endif
END (BP_SYM (__posix_fadvise64_l64))
-#ifdef __NR_fadvise64
.section .text.compat, "ax"
ENTRY (__posix_fadvise64_l32)
DO_CALL (fadvise64, 5)
negl %eax
ret
PSEUDO_END_ERRVAL (__posix_fadvise64_l32)
-#else
-ENTRY (BP_SYM (__posix_fadvise64_l32))
- movl $ENOSYS, %eax
- ret
-END (BP_SYM (__posix_fadvise64_l32))
-#endif
default_symbol_version (__posix_fadvise64_l64, posix_fadvise64, GLIBC_2.3.3)
symbol_version (__posix_fadvise64_l32, posix_fadvise64, GLIBC_2.2)
diff --git a/sysdeps/unix/sysv/linux/i386/readdir64.c b/sysdeps/unix/sysv/linux/i386/readdir64.c
index 570c74161c..2023fa5c5e 100644
--- a/sysdeps/unix/sysv/linux/i386/readdir64.c
+++ b/sysdeps/unix/sysv/linux/i386/readdir64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#define __GETDENTS __getdents64
#define DIRENT_TYPE struct dirent64
-#include <sysdeps/unix/readdir.c>
+#include <sysdeps/posix/readdir.c>
#include <shlib-compat.h>
@@ -37,7 +37,7 @@ versioned_symbol (libc, __readdir64, readdir64, GLIBC_2_2);
#define __GETDENTS __old_getdents64
#define DIRENT_TYPE struct __old_dirent64
-#include <sysdeps/unix/readdir.c>
+#include <sysdeps/posix/readdir.c>
compat_symbol (libc, __old_readdir64, readdir64, GLIBC_2_1);
#endif
diff --git a/sysdeps/unix/sysv/linux/i386/readdir64_r.c b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
index 3b3116c01e..8471f03dcf 100644
--- a/sysdeps/unix/sysv/linux/i386/readdir64_r.c
+++ b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2004, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,7 +20,7 @@
#define DIRENT_TYPE struct dirent64
#define GETDENTS_64BIT_ALIGNED 1
-#include <sysdeps/unix/readdir_r.c>
+#include <sysdeps/posix/readdir_r.c>
#undef __READDIR_R
#undef __GETDENTS
@@ -38,7 +38,7 @@ versioned_symbol (libc, __readdir64_r, readdir64_r, GLIBC_2_2);
#define __GETDENTS __old_getdents64
#define DIRENT_TYPE struct __old_dirent64
-#include <sysdeps/unix/readdir_r.c>
+#include <sysdeps/posix/readdir_r.c>
compat_symbol (libc, __old_readdir64_r, readdir64_r, GLIBC_2_1);
#endif
diff --git a/sysdeps/unix/sysv/linux/i386/vfork.S b/sysdeps/unix/sysv/linux/i386/vfork.S
index a8a7e45670..11c530de5f 100644
--- a/sysdeps/unix/sysv/linux/i386/vfork.S
+++ b/sysdeps/unix/sysv/linux/i386/vfork.S
@@ -28,8 +28,6 @@
ENTRY (__vfork)
-#ifdef __NR_vfork
-
/* Pop the return PC value into ECX. */
popl %ecx
cfi_adjust_cfa_offset (-4)
@@ -55,31 +53,10 @@ ENTRY (__vfork)
cmpl $-4095, %eax
/* Branch forward if it failed. */
-# ifdef __ASSUME_VFORK_SYSCALL
jae SYSCALL_ERROR_LABEL
-# else
- jae .Lerror
-# endif
ret
-# ifndef __ASSUME_VFORK_SYSCALL
-.Lerror:
- /* Check if vfork syscall is known at all. */
- cmpl $-ENOSYS, %eax
- jne SYSCALL_ERROR_LABEL
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
- /* If we don't have vfork, fork is close enough. */
-
- movl $SYS_ify (fork), %eax
- int $0x80
- cmpl $-4095, %eax
- jae SYSCALL_ERROR_LABEL
- ret
-#endif
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/i386/xstat.c b/sysdeps/unix/sysv/linux/i386/xstat.c
index 236ec748f0..0fe7a9dcdf 100644
--- a/sysdeps/unix/sysv/linux/i386/xstat.c
+++ b/sysdeps/unix/sysv/linux/i386/xstat.c
@@ -1,6 +1,5 @@
/* xstat using old-style Unix stat system call.
- Copyright (C) 1991,95,96,97,98,2000,2002,2003,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,27 +33,16 @@
#include <xstatconv.h>
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file NAME in BUF. */
int
__xstat (int vers, const char *name, struct stat *buf)
{
-#if __ASSUME_STAT64_SYSCALL == 0
- struct kernel_stat kbuf;
-#endif
int result;
if (vers == _STAT_VER_KERNEL)
return INLINE_SYSCALL (stat, 2, CHECK_STRING (name), CHECK_1 ((struct kernel_stat *) buf));
-#if __ASSUME_STAT64_SYSCALL > 0
{
struct stat64 buf64;
@@ -63,31 +51,6 @@ __xstat (int vers, const char *name, struct stat *buf)
result = __xstat32_conv (vers, &buf64, buf);
return result;
}
-#else
-# if defined __NR_stat64
- /* To support 32 bit UIDs, we have to use stat64. The normal stat call only returns
- 16 bit UIDs. */
- if (! __have_no_stat64)
- {
- struct stat64 buf64;
-
- result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), __ptrvalue (&buf64));
-
- if (result == 0)
- result = __xstat32_conv (vers, &buf64, buf);
-
- if (result != -1 || errno != ENOSYS)
- return result;
-
- __have_no_stat64 = 1;
- }
-# endif
- result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat_conv (vers, &kbuf, buf);
-
- return result;
-#endif /* __ASSUME_STAT64_SYSCALL */
}
hidden_def (__xstat)
weak_alias (__xstat, _xstat);
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
deleted file mode 100644
index 00234e6898..0000000000
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Initialization code run first thing by the ELF startup code. Linux version.
- Copyright (C) 1995-2004, 2005, 2007, 2011 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sysdep.h>
-#include <fpu_control.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <libc-internal.h>
-
-#include <ldsodefs.h>
-
-/* Set nonzero if we have to be prepared for more then one libc being
- used in the process. Safe assumption if initializer never runs. */
-int __libc_multiple_libcs attribute_hidden = 1;
-
-/* Remember the command line argument and enviroment contents for
- later calls of initializers for dynamic libraries. */
-int __libc_argc attribute_hidden;
-char **__libc_argv attribute_hidden;
-
-
-void
-__libc_init_first (int argc, char **argv, char **envp)
-{
-#ifdef SHARED
- /* For DSOs we do not need __libc_init_first but instead _init. */
-}
-
-void
-attribute_hidden
-_init (int argc, char **argv, char **envp)
-{
-#endif
-#ifdef USE_NONOPTION_FLAGS
- extern void __getopt_clean_environment (char **);
-#endif
-
- __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;
-
- /* Make sure we don't initialize twice. */
- if (!__libc_multiple_libcs)
- {
- /* Set the FPU control word to the proper default value if the
- kernel would use a different value. (In a static program we
- don't have this information.) */
-#ifdef SHARED
- if (__fpu_control != GLRO(dl_fpu_control))
-#endif
- __setfpucw (__fpu_control);
- }
-
- /* Save the command-line arguments. */
- __libc_argc = argc;
- __libc_argv = argv;
- __environ = envp;
-
-#ifndef SHARED
- __libc_init_secure ();
-
- /* First the initialization which normally would be done by the
- dynamic linker. */
- _dl_non_dynamic_init ();
-#endif
-
-#ifdef VDSO_SETUP
- VDSO_SETUP ();
-#endif
-
- __init_misc (argc, argv, envp);
-
-#ifdef USE_NONOPTION_FLAGS
- /* This is a hack to make the special getopt in GNU libc working. */
- __getopt_clean_environment (envp);
-#endif
-
- /* Initialize ctype data. */
- __ctype_init ();
-
-#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
- __libc_global_ctors ();
-#endif
-}
-
-/* This function is defined here so that if this file ever gets into
- ld.so we will get a link error. Having this file silently included
- in ld.so causes disaster, because the _init definition above will
- cause ld.so to gain an init function, which is not a cool thing. */
-
-extern void _dl_start (void) __attribute__ ((noreturn));
-
-void
-_dl_start (void)
-{
- abort ();
-}
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index cfe335d0bd..61bf32d1b2 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -40,29 +40,6 @@
/* The sendfile syscall was introduced in 2.2.0. */
#define __ASSUME_SENDFILE 1
-/* On x86 the mmap2 syscall was introduced in 2.3.31. */
-#ifdef __i386__
-# define __ASSUME_MMAP2_SYSCALL 1
-#endif
-
-/* On x86 the stat64/lstat64/fstat64 syscalls were introduced in 2.3.34. */
-#ifdef __i386__
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* On sparc the mmap2/stat64/lstat64/fstat64 syscalls were introduced
- in 2.3.35. */
-#if defined __sparc__ && !defined __arch64__
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* I know for sure that these are in 2.3.35 on powerpc. But PowerPC64 does not
- support separate 64-bit syscalls, already 64-bit. */
-#if defined __powerpc__ && !defined __powerpc64__
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
/* Linux 2.3.39 introduced IPC64. Except for powerpc. Linux 2.4.0 on
PPC introduced a correct IPC64. But PowerPC64 does not support a
separate 64-bit syscall, already 64-bit. */
@@ -70,199 +47,32 @@
# define __ASSUME_IPC64 1
#endif
-/* SH kernels got stat64 and mmap2 during 2.4.0-test. */
-#ifdef __sh__
-# define __ASSUME_MMAP2_SYSCALL 1
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
/* The changed st_ino field appeared in 2.4.0-test6. However, SH is lame,
and still does not have a 64-bit inode field. */
#ifndef __sh__
# define __ASSUME_ST_INO_64_BIT 1
#endif
-/* To support locking of large files a new fcntl() syscall was introduced
- in 2.4.0-test7. */
-#if defined __i386__ || defined __sparc__
-# define __ASSUME_FCNTL64 1
-#endif
-
-/* Arm got fcntl64 in 2.4.4, PowerPC and SH have it also in 2.4.4 (I
- don't know when it got introduced). But PowerPC64 does not support
- separate FCNTL64 call, FCNTL is already 64-bit */
-#if (defined __powerpc__ || defined __sh__) \
- && !defined __powerpc64__
-# define __ASSUME_FCNTL64 1
-#endif
-
/* The getdents64 syscall was introduced in 2.4.0-test7 (but later for
MIPS n32). */
#define __ASSUME_GETDENTS64_SYSCALL 1
-/* Starting with 2.4.5 kernels the vfork syscall made it into the
- official kernel for PPC. */
-#ifdef __powerpc__
-# define __ASSUME_VFORK_SYSCALL 1
-#endif
-
-/* Starting with 2.4.5 kernels the mmap2 syscall made it into the official
- kernel. But PowerPC64 does not support a separate MMAP2 call. */
-#if defined __powerpc__ && !defined __powerpc64__
-# define __ASSUME_MMAP2_SYSCALL 1
-#endif
-
-/* On x86, the set_thread_area syscall was introduced in 2.5.29, but its
- semantics was changed in 2.5.30, and again after 2.5.31. */
-#if __LINUX_KERNEL_VERSION >= 132384 && defined __i386__
-# define __ASSUME_SET_THREAD_AREA_SYSCALL 1
-#endif
-
-/* The vfork syscall on x86 and arm was definitely available in 2.4. */
-#ifdef __i386__
-# define __ASSUME_VFORK_SYSCALL 1
-#endif
-
-/* The late 2.5 kernels saw a lot of new CLONE_* flags. Summarize
- their availability with one define. The changes were made first
- for i386 and the have to be done separately for the other archs.
- For i386 we pick 2.5.50 as the first version with support.
- For s390*, SPARC, PPC, x86-64, and SH we pick 2.5.64 as the first
- version with support. */
-#if ((__LINUX_KERNEL_VERSION >= 132402 && defined __i386__) \
- || (__LINUX_KERNEL_VERSION >= 132416 \
- && (defined __s390__ || defined __sparc__ \
- || defined __powerpc__ || defined __x86_64__ || defined __sh__)))
-# define __ASSUME_CLONE_THREAD_FLAGS 1
-#endif
-
-/* Beginning with 2.5.63 support for realtime and monotonic clocks and
- timers based on them is available. */
-#if __LINUX_KERNEL_VERSION >= 132415
-# define __ASSUME_POSIX_TIMERS 1
-#endif
-
-/* Beginning with 2.6.12 the clock and timer supports CPU clocks. */
-#if __LINUX_KERNEL_VERSION >= 0x2060c
-# define __ASSUME_POSIX_CPU_TIMERS 1
-#endif
-
-/* The requeue futex functionality was introduced in 2.5.70. */
-#if __LINUX_KERNEL_VERSION >= 132422
-# define __ASSUME_FUTEX_REQUEUE 1
-#endif
-
-/* The statfs64 syscalls are available in 2.5.74. */
-#if __LINUX_KERNEL_VERSION >= 132426
-# define __ASSUME_STATFS64 1
-#endif
-
-/* Starting with at least 2.5.74 the kernel passes the setuid-like exec
- flag unconditionally up to the child. */
-#if __LINUX_KERNEL_VERSION >= 132426
-# define __ASSUME_AT_SECURE 1
-#endif
-
-/* Starting with the 2.5.75 kernel the kernel fills in the correct value
- in the si_pid field passed as part of the siginfo_t struct to signal
- handlers. */
-#if __LINUX_KERNEL_VERSION >= 132427
-# define __ASSUME_CORRECT_SI_PID 1
-#endif
-
-/* The tgkill syscall was instroduced for i386 in 2.5.75. On x86-64,
- sparc, SH, ppc, and ppc64 it was introduced in 2.6.0-test3. */
-#if (__LINUX_KERNEL_VERSION >= 132427 && defined __i386__) \
- || (__LINUX_KERNEL_VERSION >= 132609 \
- && (defined __x86_64__ || defined __powerpc__ \
- || defined __sh__ || defined __sparc__))
-# define __ASSUME_TGKILL 1
-#endif
+/* The statfs64 syscalls are available in 2.5.74 (but not for alpha). */
+#define __ASSUME_STATFS64 1
/* The utimes syscall has been available for some architectures
forever. For x86 it was introduced after 2.5.75, for x86-64,
- ppc, and ppc64 it was introduced in 2.6.0-test3. */
+ ppc, and ppc64 it was introduced in 2.6.0-test3, for s390 it was
+ introduced in 2.6.21-rc5. */
#if defined __sparc__ \
- || (__LINUX_KERNEL_VERSION > 132427 && defined __i386__) \
- || (__LINUX_KERNEL_VERSION > 132609 && defined __x86_64__) \
- || (__LINUX_KERNEL_VERSION >= 132609 && defined __powerpc__) \
- || (__LINUX_KERNEL_VERSION >= 132609 && defined __sh__)
+ || defined __i386__ \
+ || defined __x86_64__ \
+ || defined __powerpc__ \
+ || defined __sh__ \
+ || (defined __s390__ && __LINUX_KERNEL_VERSION >= 0x020616)
# define __ASSUME_UTIMES 1
#endif
-// XXX Disabled for now since the semantics we want is not achieved.
-#if 0
-/* The CLONE_STOPPED flag was introduced in the 2.6.0-test1 series. */
-#if __LINUX_KERNEL_VERSION >= 132609
-# define __ASSUME_CLONE_STOPPED 1
-#endif
-#endif
-
-/* The fixed version of the posix_fadvise64 syscall appeared in
- 2.6.0-test3. At least for x86 and sparc. Powerpc support appeared
- in 2.6.2, but for 32-bit userspace only. */
-#if (__LINUX_KERNEL_VERSION >= 132609 \
- && (defined __i386__ || defined __sparc__)) \
- || (__LINUX_KERNEL_VERSION >= 132610 && defined __powerpc__ \
- && !defined __powerpc64__)
-# define __ASSUME_FADVISE64_64_SYSCALL 1
-#endif
-
-/* The PROT_GROWSDOWN/PROT_GROWSUP flags were introduced in the 2.6.0-test
- series. */
-#if __LINUX_KERNEL_VERSION >= 132609
-# define __ASSUME_PROT_GROWSUPDOWN 1
-#endif
-
-/* Starting with 2.6.0 PowerPC adds signal/swapcontext support for Vector
- SIMD (AKA Altivec, VMX) instructions and register state. This changes
- the overall size of the sigcontext and adds the swapcontext syscall. */
-#if __LINUX_KERNEL_VERSION >= 132608 && defined __powerpc__
-# define __ASSUME_SWAPCONTEXT_SYSCALL 1
-#endif
-
-/* The CLONE_DETACHED flag is not necessary in 2.6.2 kernels, it is
- implied. */
-#if __LINUX_KERNEL_VERSION >= 132610
-# define __ASSUME_NO_CLONE_DETACHED 1
-#endif
-
-/* Starting with version 2.6.4-rc1 the getdents syscall returns d_type
- information as well and in between 2.6.5 and 2.6.8 most compat wrappers
- were fixed too. Except s390{,x} which was fixed in 2.6.11. */
-#if (__LINUX_KERNEL_VERSION >= 0x020608 && !defined __s390__) \
- || (__LINUX_KERNEL_VERSION >= 0x02060b && defined __s390__)
-# define __ASSUME_GETDENTS32_D_TYPE 1
-#endif
-
-/* Starting with version 2.5.3, the initial location returned by `brk'
- after exec is always rounded up to the next page. */
-#if __LINUX_KERNEL_VERSION >= 132355
-# define __ASSUME_BRK_PAGE_ROUNDED 1
-#endif
-
-/* Starting with version 2.6.9, the waitid system call is available.
- Except for powerpc{,64} and s390{,x}, where it is available in 2.6.12. */
-#if (__LINUX_KERNEL_VERSION >= 0x020609 \
- && !defined __powerpc__ && !defined __s390__) \
- || (__LINUX_KERNEL_VERSION >= 0x02060c \
- && (defined __powerpc__ || defined __s390__))
-# define __ASSUME_WAITID_SYSCALL 1
-#endif
-
-/* On sparc64 stat64/lstat64/fstat64 syscalls were introduced in 2.6.12. */
-#if __LINUX_KERNEL_VERSION >= 0x02060c && defined __sparc__ \
- && defined __arch64__
-# define __ASSUME_STAT64_SYSCALL 1
-#endif
-
-/* Early kernel used "shm" as the filesystem name for the filesystem used
- for shm_open etc. Later it is "tmpfs". 2.4.20 is a safe bet for the
- cutover. */
-#if __LINUX_KERNEL_VERSION >= 0x02041a
-# define __ASSUME_TMPFS_NAME 1
-#endif
-
/* pselect/ppoll were introduced just after 2.6.16-rc1. Due to the way
the kernel versions are advertised we can only rely on 2.6.17 to have
the code. On x86_64 and SH this appeared first in 2.6.19-rc1,
@@ -329,6 +139,13 @@
# define __ASSUME_O_CLOEXEC 1
#endif
+/* From 2.6.23 onwards the value of ARG_MAX depends on the stack
+ size. */
+#define __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL 0x020617
+#if __LINUX_KERNEL_VERSION >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL
+# define __ASSUME_ARG_MAX_STACK_BASED 1
+#endif
+
/* Support for ADJ_OFFSET_SS_READ was added in 2.6.24. */
#if __LINUX_KERNEL_VERSION >= 0x020618
# define __ASSUME_ADJ_OFFSET_SS_READ 1
diff --git a/sysdeps/unix/sysv/linux/ldsodefs.h b/sysdeps/unix/sysv/linux/ldsodefs.h
index 50f3e2b644..cf7ace7a96 100644
--- a/sysdeps/unix/sysv/linux/ldsodefs.h
+++ b/sysdeps/unix/sysv/linux/ldsodefs.h
@@ -41,9 +41,7 @@ extern void _dl_non_dynamic_init (void) internal_function;
/* We can assume that the kernel always provides the AT_SECURE value
in the auxiliary vector from 2.5.74 or so on. */
-#if __ASSUME_AT_SECURE
-# define HAVE_AUX_SECURE
-#endif
+#define HAVE_AUX_SECURE
/* Starting with one of the 2.4.0 pre-releases the Linux kernel passes
up the page size information. */
diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c
index c6920b47cc..765b195c6c 100644
--- a/sysdeps/unix/sysv/linux/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/lxstat64.c
@@ -1,5 +1,5 @@
-/* lxstat64 using old-style Unix lstat system call.
- Copyright (C) 1997-2002,2003,2006 Free Software Foundation, Inc.
+/* lxstat64 using Linux lstat64 system call.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,56 +27,17 @@
#include <kernel-features.h>
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_lstat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls. */
-extern int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file NAME in BUF. */
int
___lxstat64 (int vers, const char *name, struct stat64 *buf)
{
int result;
-#ifdef __ASSUME_STAT64_SYSCALL
result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (buf));
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+#if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
-# endif
- return result;
-#else
- struct kernel_stat kbuf;
-# ifdef __NR_lstat64
- if (! __have_no_stat64)
- {
- int saved_errno = errno;
- result = INLINE_SYSCALL (lstat64, 2, CHECK_STRING (name), CHECK_1 (buf));
-
- if (result != -1 || errno != ENOSYS)
- {
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
- }
-
- __set_errno (saved_errno);
- __have_no_stat64 = 1;
- }
-# endif
- result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat64_conv (vers, &kbuf, buf);
-
- return result;
#endif
+ return result;
}
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/malloc-sysdep.h b/sysdeps/unix/sysv/linux/malloc-sysdep.h
new file mode 100644
index 0000000000..f926aeafff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/malloc-sysdep.h
@@ -0,0 +1,57 @@
+/* System-specific malloc support functions. Linux version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <fcntl.h>
+#include <not-cancel.h>
+
+/* The Linux kernel overcommits address space by default and if there is not
+ enough memory available, it uses various parameters to decide the process to
+ kill. It is however possible to disable or curb this overcommit behavior
+ by setting the proc sysctl vm.overcommit_memory to the value '2' and with
+ that, a process is only allowed to use the maximum of a pre-determined
+ fraction of the total address space. In such a case, we want to make sure
+ that we are judicious with our heap usage as well, and explicitly give away
+ the freed top of the heap to reduce our commit charge. See the proc(5) man
+ page to know more about overcommit behavior.
+
+ Other than that, we also force an unmap in a secure exec. */
+static inline bool
+check_may_shrink_heap (void)
+{
+ static int may_shrink_heap = -1;
+
+ if (__builtin_expect (may_shrink_heap >= 0, 1))
+ return may_shrink_heap;
+
+ may_shrink_heap = __libc_enable_secure;
+
+ if (__builtin_expect (may_shrink_heap == 0, 1))
+ {
+ int fd = open_not_cancel_2 ("/proc/sys/vm/overcommit_memory",
+ O_RDONLY | O_CLOEXEC);
+ if (fd >= 0)
+ {
+ char val;
+ ssize_t n = read_not_cancel (fd, &val, 1);
+ may_shrink_heap = n > 0 && val == '2';
+ close_not_cancel_no_status (fd);
+ }
+ }
+
+ return may_shrink_heap;
+}
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index 495d77768e..bca15f9c5d 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999,2000,2001,2002,2006,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -26,76 +26,42 @@
#include <kernel-features.h>
-#ifdef __NR_mmap2
-
/* This is always 12, even on architectures where PAGE_SHIFT != 12. */
-# if MMAP2_PAGE_SHIFT == -1
+#if MMAP2_PAGE_SHIFT == -1
static int page_shift;
-# else
-# ifndef MMAP2_PAGE_SHIFT
-# define MMAP2_PAGE_SHIFT 12
-# endif
-# define page_shift MMAP2_PAGE_SHIFT
-# endif
-
-# ifndef __ASSUME_MMAP2_SYSCALL
-static int have_no_mmap2;
+#else
+# ifndef MMAP2_PAGE_SHIFT
+# define MMAP2_PAGE_SHIFT 12
# endif
+#define page_shift MMAP2_PAGE_SHIFT
#endif
void *
__mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
{
-#ifdef __NR_mmap2
-# if MMAP2_PAGE_SHIFT == -1
+#if MMAP2_PAGE_SHIFT == -1
if (page_shift == 0)
{
int page_size = getpagesize ();
while ((1 << ++page_shift) != page_size)
;
}
-# endif
- if (offset & ((1 << page_shift) - 1))
- {
- __set_errno (EINVAL);
- return MAP_FAILED;
- }
-# ifndef __ASSUME_MMAP2_SYSCALL
- if (! have_no_mmap2)
-# endif
- {
-# ifndef __ASSUME_MMAP2_SYSCALL
- int saved_errno = errno;
-# endif
- void *result;
- __ptrvalue (result) = (void *__unbounded)
- INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr),
- len, prot, flags, fd,
- (off_t) (offset >> MMAP2_PAGE_SHIFT));
-# if __BOUNDED_POINTERS__
- __ptrlow (result) = __ptrvalue (result);
- __ptrhigh (result) = __ptrvalue (result) + len;
-# endif
-# ifndef __ASSUME_MMAP2_SYSCALL
- if (result != MAP_FAILED || errno != ENOSYS)
-# endif
- return result;
-
-# ifndef __ASSUME_MMAP2_SYSCALL
- __set_errno (saved_errno);
- have_no_mmap2 = 1;
-# endif
- }
#endif
-#ifndef __ASSUME_MMAP2_SYSCALL
- if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len))
+ if (offset & ((1 << page_shift) - 1))
{
__set_errno (EINVAL);
return MAP_FAILED;
}
-
- return __mmap (addr, len, prot, flags, fd, (off_t) offset);
+ void *result;
+ __ptrvalue (result) = (void *__unbounded)
+ INLINE_SYSCALL (mmap2, 6, __ptrvalue (addr),
+ len, prot, flags, fd,
+ (off_t) (offset >> MMAP2_PAGE_SHIFT));
+#if __BOUNDED_POINTERS__
+ __ptrlow (result) = __ptrvalue (result);
+ __ptrhigh (result) = __ptrvalue (result) + len;
#endif
+ return result;
}
weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/unix/sysv/linux/nice.c b/sysdeps/unix/sysv/linux/nice.c
index 46a6da80c7..3bcbb1e89a 100644
--- a/sysdeps/unix/sysv/linux/nice.c
+++ b/sysdeps/unix/sysv/linux/nice.c
@@ -1 +1 @@
-#include <sysdeps/unix/nice.c>
+#include <sysdeps/posix/nice.c>
diff --git a/sysdeps/unix/sysv/linux/opendir.c b/sysdeps/unix/sysv/linux/opendir.c
index b0bb80d397..614cba101d 100644
--- a/sysdeps/unix/sysv/linux/opendir.c
+++ b/sysdeps/unix/sysv/linux/opendir.c
@@ -17,4 +17,4 @@
#define O_DIRECTORY_WORKS 1
-#include <sysdeps/unix/opendir.c>
+#include <sysdeps/posix/opendir.c>
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise64.c b/sysdeps/unix/sysv/linux/posix_fadvise64.c
index 5d51cf2430..3eea6deac8 100644
--- a/sysdeps/unix/sysv/linux/posix_fadvise64.c
+++ b/sysdeps/unix/sysv/linux/posix_fadvise64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
-#include <kernel-features.h>
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
@@ -29,7 +28,6 @@ int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
-#ifdef __NR_fadvise64_64
INTERNAL_SYSCALL_DECL (err);
int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
__LONG_LONG_PAIR ((long) (offset >> 32),
@@ -39,28 +37,7 @@ __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
advise);
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
-# ifndef __ASSUME_FADVISE64_64_SYSCALL
- if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
-# endif
- return INTERNAL_SYSCALL_ERRNO (ret, err);
-#endif
-#ifndef __ASSUME_FADVISE64_64_SYSCALL
-# ifdef __NR_fadvise64
- if (len != (off_t) len)
- return EOVERFLOW;
-
- INTERNAL_SYSCALL_DECL (err2);
- int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 5, fd,
- __LONG_LONG_PAIR ((long) (offset >> 32),
- (long) offset),
- (off_t) len, advise);
- if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
- return 0;
- return INTERNAL_SYSCALL_ERRNO (ret2, err2);
-# else
- return ENOSYS;
-# endif
-#endif
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
}
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index f6dccd9a3f..4ff7e849c3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -16,3 +16,9 @@ endif
ifeq ($(subdir),elf)
sysdep_routines += dl-vdso
endif
+
+ifeq ($(subdir),misc)
+sysdep_headers += bits/ppc.h
+sysdep_routines += get_timebase_freq
+tests += test-gettimebasefreq
+endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index c984e2bbb0..91797b74c2 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/PowerPC.
- Copyright (C) 1995-1998, 2000, 2003, 2004, 2006, 2007, 2009, 2010, 2011
+ Copyright (C) 1995-2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -232,6 +232,19 @@ struct f_owner_ex
we splice from/to). */
# define SPLICE_F_MORE 4 /* Expect more data. */
# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
+
+
+/* File handle structure. */
+struct file_handle
+{
+ unsigned int handle_bytes;
+ int handle_type;
+ /* File identifier. */
+ unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now). */
+# define MAX_HANDLE_SZ 128
#endif
__BEGIN_DECLS
@@ -278,6 +291,19 @@ extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
__off64_t __len);
# endif
+
+/* Map file name to file handle. */
+extern int name_to_handle_at (int __dfd, const char *__name,
+ struct file_handle *__handle, int *__mnt_id,
+ int __flags) __THROW;
+
+/* Open file using the file handle.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+ int __flags);
+
#endif
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h
new file mode 100644
index 0000000000..76542d9d86
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h
@@ -0,0 +1,33 @@
+/* Facilities specific to the PowerPC architecture on Linux
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_PPC_H
+#define _BITS_PPC_H
+
+#ifndef _SYS_PLATFORM_PPC_H
+# error "Never include this file directly; use <sys/platform/ppc.h> instead."
+#endif
+
+__BEGIN_DECLS
+
+/* Read the time base frequency. */
+extern uint64_t __ppc_get_timebase_freq (void);
+
+__END_DECLS
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure
index 802b371601..7df7e481f0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/configure
@@ -1,123 +1,3 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/.
diff --git a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c
index d1e65a85ee..a863a27b32 100644
--- a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c
@@ -1,5 +1,5 @@
/* Get frequency of the system processor. powerpc/Linux version.
- Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,7 +46,7 @@ __get_clockfreq (void)
&& INTERNAL_SYSCALL_ERRNO (timebase_freq, err) == ENOSYS)
#endif
{
- int fd = open ("/proc/cpuinfo", O_RDONLY);
+ int fd = __open ("/proc/cpuinfo", O_RDONLY);
if (__builtin_expect (fd != -1, 1))
{
@@ -58,7 +58,7 @@ __get_clockfreq (void)
char buf[1024];
ssize_t n;
- n = read (fd, buf, sizeof (buf));
+ n = __read (fd, buf, sizeof (buf));
if (n == sizeof (buf))
{
/* We are here because the 1st read returned exactly sizeof
@@ -76,7 +76,7 @@ __get_clockfreq (void)
while (n >= half_buf)
{
memcpy (buf, buf + half_buf, half_buf);
- n = read (fd, buf + half_buf, half_buf);
+ n = __read (fd, buf + half_buf, half_buf);
}
if (n >= 0)
n += half_buf;
@@ -108,7 +108,7 @@ __get_clockfreq (void)
}
timebase_freq = result;
}
- close (fd);
+ __close (fd);
}
}
diff --git a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
new file mode 100644
index 0000000000..5559dd5c0c
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c
@@ -0,0 +1,27 @@
+/* Get the frequency of the time base.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdint.h>
+#include <libc-internal.h>
+
+uint64_t
+__get_timebase_freq (void)
+{
+ return (uint64_t) __get_clockfreq ();
+}
+weak_alias (__get_timebase_freq, __ppc_get_timebase_freq)
diff --git a/sysdeps/unix/sysv/linux/powerpc/getrlimit.c b/sysdeps/unix/sysv/linux/powerpc/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/powerpc/init-first.c b/sysdeps/unix/sysv/linux/powerpc/init-first.c
index 57b36afc40..ba7ae294b5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/init-first.c
+++ b/sysdeps/unix/sysv/linux/powerpc/init-first.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Initialization code run first thing by the ELF startup code. Linux/PowerPC.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -45,4 +46,4 @@ _libc_vdso_platform_setup (void)
# define VDSO_SETUP _libc_vdso_platform_setup
#endif
-#include "../init-first.c"
+#include <csu/init-first.c>
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions
index 6fa0119e95..8d1c3a59de 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions
@@ -30,4 +30,7 @@ libc {
GLIBC_2.11 {
fallocate64;
}
+ GLIBC_2.17 {
+ __ppc_get_timebase_freq;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
index 75123b9f3a..8e4595825b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
@@ -1774,6 +1774,12 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ __ppc_get_timebase_freq F
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
index 2d36df458d..27f2348da0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
@@ -32,7 +32,6 @@
/* Size of ucontext in GLIBC_2.3.4 and later. */
#define _UC_SIZE_2_3_4 1184
-#ifdef __ASSUME_SWAPCONTEXT_SYSCALL
.section ".text";
ENTRY (__getcontext)
li r4,0
@@ -45,9 +44,6 @@ ENTRY (__getcontext)
1:
b __syscall_error@local
END(__getcontext)
-#else
-# include "getcontext-common.S"
-#endif
versioned_symbol (libc, __getcontext, getcontext, GLIBC_2_3_4)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c
index 2ffaec6751..5b11e28ba8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
-#include <kernel-features.h>
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
@@ -29,34 +28,13 @@ int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
-#ifdef __NR_fadvise64_64
INTERNAL_SYSCALL_DECL (err);
int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advise,
__LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
__LONG_LONG_PAIR ((long)(len >> 32), (long)len));
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
-# ifndef __ASSUME_FADVISE64_64_SYSCALL
- if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
-# endif
- return INTERNAL_SYSCALL_ERRNO (ret, err);
-#endif
-#ifndef __ASSUME_FADVISE64_64_SYSCALL
-# ifdef __NR_fadvise64
- if (len != (off_t) len)
- return EOVERFLOW;
-
- INTERNAL_SYSCALL_DECL (err2);
- int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 6, fd, 0,
- __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
- (off_t) len, advise);
- if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
- return 0;
- return INTERNAL_SYSCALL_ERRNO (ret2, err2);
-# else
- return ENOSYS;
-# endif
-#endif
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
}
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
index fa7d05f70b..b96b040408 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
@@ -1,5 +1,5 @@
/* Jump to a new context.
- Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,6 @@
/* Size of ucontext in GLIBC_2.3.4 and later. */
#define _UC_SIZE_2_3_4 1184
-#ifdef __ASSUME_SWAPCONTEXT_SYSCALL
.section ".text";
ENTRY (__setcontext)
mr r4,r3
@@ -46,9 +45,6 @@ ENTRY (__setcontext)
1:
b __syscall_error@local
END(__setcontext)
-#else
-# include "setcontext-common.S"
-#endif
versioned_symbol (libc, __setcontext, setcontext, GLIBC_2_3_4)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
index 0189af8e25..556c8020de 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
@@ -1,5 +1,5 @@
/* Save current context and jump to a new context.
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,6 @@
/* Size of ucontext in GLIBC_2.3.4 and later. */
#define _UC_SIZE_2_3_4 1184
-#ifdef __ASSUME_SWAPCONTEXT_SYSCALL
.section ".text";
ENTRY (__swapcontext)
li r5,_UC_SIZE_2_3_4;
@@ -44,9 +43,6 @@ ENTRY (__swapcontext)
1:
b __syscall_error@local
END(__swapcontext)
-#else
-# include "swapcontext-common.S"
-#endif
versioned_symbol (libc, __swapcontext, swapcontext, GLIBC_2_3_4)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
index 6625e207a9..ca20f7bebd 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -26,32 +26,8 @@
and the process ID of the new process to the old process. */
ENTRY (__vfork)
-
-#ifdef __NR_vfork
-
DO_CALL (SYS_ify (vfork))
-
-# ifdef __ASSUME_VFORK_SYSCALL
PSEUDO_RET
-# else
- bnslr+
- /* Check if vfork syscall is known at all. */
- cmpwi r3,ENOSYS
- bne- .Lsyscall_error
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
- /* If we don't have vfork, fork is close enough. */
-
- DO_CALL (SYS_ify (fork))
- bnslr+
-
-.Lsyscall_error:
- b __syscall_error@local
-#endif
-
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
index 8334741aec..3ff01d1c14 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
@@ -19,4 +19,7 @@ libc {
setcontext;
swapcontext;
}
+ GLIBC_2.17 {
+ __ppc_get_timebase_freq;
+ }
}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
index e2484d3f22..8eaaccdfc7 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
@@ -80,6 +80,12 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ __ppc_get_timebase_freq F
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.3
GLIBC_2.3 A
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index 0f4fe53343..9b0693a195 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -58,8 +58,6 @@
/* This seems to always be the case on PPC. */
# define ALIGNARG(log2) log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-# define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
index 7baefd0c16..3ce38be884 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,29 +27,8 @@
ENTRY (__vfork)
CALL_MCOUNT 0
-
-#ifdef __NR_vfork
-
DO_CALL (SYS_ify (vfork))
-
-# ifdef __ASSUME_VFORK_SYSCALL
- PSEUDO_RET
-# else
- bnslr+
- /* Check if vfork syscall is known at all. */
- cmpdi r3,ENOSYS
- bne .Local_syscall_error
-
-# endif
-#endif
-
-#ifndef __ASSUME_VFORK_SYSCALL
- /* If we don't have vfork, fork is close enough. */
-
- DO_CALL (SYS_ify (fork))
PSEUDO_RET
-#endif
-
PSEUDO_END (__vfork)
libc_hidden_def (__vfork)
diff --git a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c
new file mode 100644
index 0000000000..a3f3bd6f55
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c
@@ -0,0 +1,62 @@
+/* Check __ppc_get_timebase_freq() for architecture changes
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Test if __ppc_get_timebase_freq() works and is different from zero. A read
+ failure might indicate a Linux Kernel change.
+ This test also use the frequency to compute the real elapsed time. */
+
+#include <inttypes.h>
+#include <stdio.h>
+
+#include <sys/platform/ppc.h>
+
+/* Maximum value of the Time Base Register: 2^60 - 1. */
+#define MAX_TB 0xFFFFFFFFFFFFFFF
+
+static int
+do_test (void)
+{
+ uint64_t t1, t2, f, diff;
+
+ t1 = __ppc_get_timebase ();
+ printf ("t1 = %"PRIu64"\n", t1);
+
+ f = __ppc_get_timebase_freq ();
+ printf ("Time Base frequency = %"PRIu64" Hz\n", f);
+
+ if (f == 0) {
+ printf ("Fail: The time base frequency can't be zero.");
+ return 1;
+ }
+
+ t2 = __ppc_get_timebase ();
+ printf ("t2 = %"PRIu64"\n", t2);
+
+ if (t2 > t1) {
+ diff = t2 - t1;
+ } else {
+ diff = (MAX_TB - t2) + t1;
+ }
+
+ printf ("Elapsed time = %1.2f usecs\n", (double) diff * 1000000 / f );
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/sysdeps/unix/sysv/linux/readdir64.c b/sysdeps/unix/sysv/linux/readdir64.c
index e2c5002390..224f53db88 100644
--- a/sysdeps/unix/sysv/linux/readdir64.c
+++ b/sysdeps/unix/sysv/linux/readdir64.c
@@ -2,6 +2,6 @@
#define __GETDENTS __getdents64
#define DIRENT_TYPE struct dirent64
-#include <sysdeps/unix/readdir.c>
+#include <sysdeps/posix/readdir.c>
weak_alias (__readdir64, readdir64)
diff --git a/sysdeps/unix/sysv/linux/readdir64_r.c b/sysdeps/unix/sysv/linux/readdir64_r.c
index bce56124ef..3dfbf4fd2c 100644
--- a/sysdeps/unix/sysv/linux/readdir64_r.c
+++ b/sysdeps/unix/sysv/linux/readdir64_r.c
@@ -2,6 +2,6 @@
#define __GETDENTS __getdents64
#define DIRENT_TYPE struct dirent64
-#include <sysdeps/unix/readdir_r.c>
+#include <sysdeps/posix/readdir_r.c>
weak_alias (__readdir64_r, readdir64_r)
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index e1479e584d..5b95878ccf 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux.
- Copyright (C) 2000-2002,2004,2006,2007,2009,2010,2011
- Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,148 +20,18 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
#include <bits/wordsize.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* Must be a directory. */
-# define O_NOFOLLOW 0400000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# if __WORDSIZE == 64
+#if __WORDSIZE == 64
/* Not necessary, files are always with 64bit off_t. */
-# define O_LARGEFILE 0
-# else
-# define O_LARGEFILE 0100000
-# endif
+# define __O_LARGEFILE 0
#endif
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
#if __WORDSIZE == 64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
/* Not necessary, we always have 64-bit offsets. */
# define F_GETLK64 5 /* Get record locking info. */
# define F_SETLK64 6 /* Set record locking info (non-blocking). */
# define F_SETLKW64 7 /* Set record locking info (blocking). */
-#else
-# ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-# else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-# endif
-# define F_GETLK64 12 /* Get record locking info. */
-# define F_SETLK64 13 /* Set record locking info (non-blocking). */
-# define F_SETLKW64 14 /* Set record locking info (blocking). */
-#endif
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* for old implementation of bsd flock () */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
#endif
struct flock
@@ -190,156 +59,13 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# if __WORDSIZE == 64
-# define POSIX_FADV_DONTNEED 6 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */
-# else
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-# endif
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
+#if __WORDSIZE == 64
+# define __POSIX_FADV_DONTNEED 6 /* Don't need these pages. */
+# define __POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */
+#else
+# define __POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
+# define __POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
#endif
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
index def84cc790..ee7e22b635 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
@@ -51,7 +51,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
@@ -67,6 +66,16 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#ifdef __s390x__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/sysdeps/unix/sysv/linux/s390/init-first.c b/sysdeps/unix/sysv/linux/s390/init-first.c
index c971382704..a066daefdf 100644
--- a/sysdeps/unix/sysv/linux/s390/init-first.c
+++ b/sysdeps/unix/sysv/linux/s390/init-first.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Initialization code run first thing by the ELF startup code. Linux/s390.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -46,4 +47,4 @@ _libc_vdso_platform_setup (void)
# define VDSO_SETUP _libc_vdso_platform_setup
#endif
-#include "../init-first.c"
+#include <csu/init-first.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c b/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-32/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S b/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
index 6e5ba94c1a..0357ab4617 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -40,8 +40,8 @@ ENTRY(__mmap)
cfi_adjust_cfa_offset (120)
st %r1,0(%r15) /* store back chain */
- /* Store parameters on stack, because old_mmap/mmap2
- * take only one parameter: a pointer to the parameter area
+ /* Store parameters on stack, because mmap2
+ * takes only one parameter: a pointer to the parameter area
*/
st %r6,0x70(%r15) /* Store 'fd'. */
st %r5,0x6C(%r15) /* Store 'flags'. */
@@ -50,10 +50,6 @@ ENTRY(__mmap)
st %r2,0x60(%r15) /* Store 'start'. */
l %r1,216(%r15) /* Load offset. */
-#ifdef __ASSUME_MMAP2_SYSCALL
- /* I don't think it is worthwhile trying to use mmap2 whenever
- * it is available. Only use it when we are sure the syscall
- * exists. */
tml %r1,0x0fff /* Offset page aligned ? */
lhi %r2,-EINVAL
jnz 1f /* No -> EINVAL. */
@@ -61,11 +57,6 @@ ENTRY(__mmap)
st %r1,0x74(%r15) /* Store page offset. */
la %r2,0x60(%r15) /* Load address of parameter list. */
svc SYS_ify(mmap2) /* Do the system call trap. */
-#else
- st %r1,0x74(%r15) /* Store offset unmodified. */
- la %r2,0x60(%r15) /* Load address of parameter list. */
- svc SYS_ify(mmap) /* Do the system call trap. */
-#endif
1: l %r15,0(%r15) /* Load back chain. */
cfi_adjust_cfa_offset (-120)
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S b/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
index ad6d254db1..8b4bd4556f 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -41,15 +41,14 @@ ENTRY(__mmap64)
cfi_adjust_cfa_offset (120)
st %r1,0(%r15) /* Store back chain. */
- /* Store parameters on stack, because mmap2 and old_mmap
- * take only one parameter: a pointer to the parameter area. */
+ /* Store parameters on stack, because mmap2
+ * takes only one parameter: a pointer to the parameter area. */
st %r6,0x70(%r15) /* Store 'fd'. */
st %r5,0x6C(%r15) /* Store 'flags'. */
st %r4,0x68(%r15) /* Store 'prot'. */
st %r3,0x64(%r15) /* Store 'length'. */
st %r2,0x60(%r15) /* Store 'start'. */
-#ifdef __NR_mmap2
lm %r0,%r1,216(%r15) /* Load 64 bit offset. */
tml %r1,0x0fff /* Offset page aligned ? */
jnz 2f /* No -> EINVAL. */
@@ -61,11 +60,6 @@ ENTRY(__mmap64)
la %r2,0x60(%r15) /* Load address of parameter list. */
svc SYS_ify(mmap2) /* Do the system call trap. */
-#ifndef __ASSUME_MMAP2_SYSCALL
- chi %r2,-ENOSYS
- je 1f
-#endif
-
l %r15,0(%r15) /* Load back chain. */
cfi_adjust_cfa_offset (-120)
lm %r6,%r15,24(%r15) /* Load registers. */
@@ -78,31 +72,6 @@ ENTRY(__mmap64)
/* Successful; return the syscall's value. */
br %r14
-#endif
-
-#if !defined __ASSUME_MMAP2_SYSCALL || !defined __NR_mmap2
-1: lm %r0,%r1,216(%r15) /* Load 64 bit offset. */
- st %r1,0x74(%r15) /* Store lower word of offset. */
- ltr %r0,%r0 /* Offset > 2^32 ? */
- jnz 2f
- alr %r1,%r3 /* Add length to offset. */
- brc 3,2f /* Carry -> EINVAL. */
-
- la %r2,0x60(%r15) /* Load address of parameter list. */
- svc SYS_ify(mmap) /* Do the system call trap. */
-
- l %r15,0(%r15) /* Load back chain. */
- lm %r6,%r15,24(%r15) /* Load registers. */
-
- /* Check gpr 2 for error. */
- lhi %r0,-4096
- clr %r2,%r0
- jnl SYSCALL_ERROR_LABEL
-
- /* Successful; return the syscall's value. */
- br %r14
-#endif
-
2: lhi %r2,-EINVAL
l %r15,0(%r15) /* Load back chain. */
lm %r6,%r15,24(%r15) /* Load registers. */
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
index ff0b82f51f..d9914ff53f 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist
@@ -1765,6 +1765,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c
index 05b81ecbcb..480b92fcbe 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,7 +18,6 @@
#include <errno.h>
#include <fcntl.h>
#include <sysdep.h>
-#include <kernel-features.h>
int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
@@ -37,7 +36,6 @@ struct fadvise64_64_layout
int
__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
{
-#ifdef __NR_fadvise64_64
struct fadvise64_64_layout parameters;
INTERNAL_SYSCALL_DECL (err);
@@ -48,28 +46,7 @@ __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
int ret = INTERNAL_SYSCALL (fadvise64_64, err, 1, &parameters);
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
-# ifndef __ASSUME_FADVISE64_64_SYSCALL
- if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
-# endif
- return INTERNAL_SYSCALL_ERRNO (ret, err);
-#endif
-#ifndef __ASSUME_FADVISE64_64_SYSCALL
-# ifdef __NR_fadvise64
- if (len != (off_t) len)
- return EOVERFLOW;
-
- INTERNAL_SYSCALL_DECL (err2);
- int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 5, fd,
- __LONG_LONG_PAIR ((long) (offset >> 32),
- (long) offset),
- (off_t) len, advise);
- if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
- return 0;
- return INTERNAL_SYSCALL_ERRNO (ret2, err2);
-# else
- return ENOSYS;
-# endif
-#endif
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
}
#include <shlib-compat.h>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
index 2fb0786942..ef1ead3069 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libc.abilist
@@ -86,6 +86,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/s390/system.c b/sysdeps/unix/sysv/linux/s390/system.c
index f63584c26b..66f96617eb 100644
--- a/sysdeps/unix/sysv/linux/s390/system.c
+++ b/sysdeps/unix/sysv/linux/s390/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,9 +25,7 @@
return. It might still be in the kernel when the cancellation
request comes. Therefore we have to use the clone() calls ability
to have the kernel write the PID into the user-level variable. */
-#ifdef __ASSUME_CLONE_THREAD_FLAGS
-# define FORK() \
+#define FORK() \
INLINE_SYSCALL (clone, 3, 0, CLONE_PARENT_SETTID | SIGCHLD, &pid)
-#endif
#include "../system.c"
diff --git a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
index a9d8931df1..fd96914246 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/SH.
- Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,134 +20,6 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* Must be a directory. */
-# define O_NOFOLLOW 0400000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# define O_LARGEFILE 0100000
-#endif
-
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-#endif
-#define F_GETLK64 12 /* Get record locking info. */
-#define F_SETLK64 13 /* Set record locking info (non-blocking). */
-#define F_SETLKW64 14 /* Set record locking info (blocking). */
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
struct flock
{
@@ -175,151 +46,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/sysdeps/unix/sysv/linux/sh/getrlimit.c b/sysdeps/unix/sysv/linux/sh/getrlimit.c
deleted file mode 100644
index fc06dbd641..0000000000
--- a/sysdeps/unix/sysv/linux/sh/getrlimit.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/i386/getrlimit.c>
diff --git a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
index 3fd150e7e5..733b550fee 100644
--- a/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
@@ -86,6 +86,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/shm_open.c b/sysdeps/unix/sysv/linux/shm_open.c
index 763b087466..82332a30e3 100644
--- a/sysdeps/unix/sysv/linux/shm_open.c
+++ b/sysdeps/unix/sysv/linux/shm_open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2004,2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -86,11 +86,7 @@ where_is_shmfs (void)
while ((mp = __getmntent_r (fp, &resmem, buf, sizeof buf)) != NULL)
/* The original name is "shm" but this got changed in early Linux
2.4.x to "tmpfs". */
- if (strcmp (mp->mnt_type, "tmpfs") == 0
-#ifndef __ASSUME_TMPFS_NAME
- || strcmp (mp->mnt_type, "shm") == 0
-#endif
- )
+ if (strcmp (mp->mnt_type, "tmpfs") == 0)
{
/* Found it. There might be more than one place where the
filesystem is mounted but one is enough for us. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index 7ce09da56c..22e71fcd7e 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -1,6 +1,5 @@
/* O_*, F_*, FD_* bit values for Linux/SPARC.
- Copyright (C) 1995-1998, 2000, 2003, 2004, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,144 +20,55 @@
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
#include <bits/wordsize.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_RDONLY 0x0000
-#define O_WRONLY 0x0001
-#define O_RDWR 0x0002
-#define O_ACCMODE 0x0003
#define O_APPEND 0x0008
#define O_ASYNC 0x0040
#define O_CREAT 0x0200 /* not fcntl */
#define O_TRUNC 0x0400 /* not fcntl */
#define O_EXCL 0x0800 /* not fcntl */
#define O_SYNC 0x802000
-#define O_FSYNC O_SYNC
#define O_NONBLOCK 0x4000
#define O_NDELAY (0x0004 | O_NONBLOCK)
-#define O_NOCTTY 0x8000 /* not fcntl */
+#define O_NOCTTY 0x8000 /* not fcntl */
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0x10000 /* must be a directory */
-# define O_NOFOLLOW 0x20000 /* don't follow links */
-# define O_CLOEXEC 0x400000 /* Set close_on_exit. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 0x100000 /* direct disk access hint */
-# define O_NOATIME 0x200000 /* Do not set atime. */
-# define O_PATH 0x1000000 /* Resolve pathname but do not open file. */
-#endif
+#define __O_DIRECTORY 0x10000 /* must be a directory */
+#define __O_NOFOLLOW 0x20000 /* don't follow links */
+#define __O_CLOEXEC 0x400000 /* Set close_on_exit. */
-#ifdef __USE_LARGEFILE64
-# if __WORDSIZE == 64
-# define O_LARGEFILE 0
-# else
-# define O_LARGEFILE 0x40000
-# endif
-#endif
+#define __O_DIRECT 0x100000 /* direct disk access hint */
+#define __O_NOATIME 0x200000 /* Do not set atime. */
+#define __O_PATH 0x1000000 /* Resolve pathname but do not open file. */
-/* For now Linux has no synchronisity options for data and read
- operations. We define the symbols here but let them do the same as
- O_SYNC since this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 0x2000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
+#if __WORDSIZE == 64
+# define __O_LARGEFILE 0
+#else
+# define __O_LARGEFILE 0x40000
#endif
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_GETOWN 5 /* Get owner (process receiving SIGIO). */
-# define F_SETOWN 6 /* Set owner (process receiving SIGIO). */
-#endif
+#define __O_DSYNC 0x2000 /* Synchronize data. */
+
+
+#define __F_GETOWN 5 /* Get owner (process receiving SIGIO). */
+#define __F_SETOWN 6 /* Set owner (process receiving SIGIO). */
+
#ifndef __USE_FILE_OFFSET64
# define F_GETLK 7 /* Get record locking info. */
# define F_SETLK 8 /* Set record locking info (non-blocking). */
# define F_SETLKW 9 /* Set record locking info (blocking). */
-#else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Set owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Get owner (thread receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
#endif
#if __WORDSIZE == 64
# define F_GETLK64 7 /* Get record locking info. */
# define F_SETLK64 8 /* Set record locking info (non-blocking). */
# define F_SETLKW64 9 /* Set record locking info (blocking). */
-#else
-# define F_GETLK64 12 /* Get record locking info. */
-# define F_SETLK64 13 /* Set record locking info (non-blocking). */
-# define F_SETLKW64 14 /* Set record locking info (blocking). */
#endif
-/* for F_[GET|SET]FD */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
#define F_RDLCK 1 /* Read lock. */
#define F_WRLCK 2 /* Write lock. */
#define F_UNLCK 3 /* Remove lock. */
-/* for old implementation of bsd flock () */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
-
struct flock
{
short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
@@ -186,148 +96,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
index b65a1a5cdb..8be55a8d7c 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
@@ -51,7 +51,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __S32_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SLONGWORD_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
@@ -61,6 +60,16 @@
#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
+#if defined __arch64__ || defined __sparcv9
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
index 7d5a3429fd..3a96ea883b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libc.abilist
@@ -1770,6 +1770,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
index cbb817952e..cb31e5ca2e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
@@ -34,13 +34,13 @@ __get_clockfreq_via_cpuinfo (void)
result = 0;
- fd = open ("/proc/cpuinfo", O_RDONLY);
+ fd = __open ("/proc/cpuinfo", O_RDONLY);
if (fd != -1)
{
char buf[8192];
ssize_t n;
- n = read (fd, buf, sizeof buf);
+ n = __read (fd, buf, sizeof buf);
if (n > 0)
{
char *mhz = memmem (buf, n, "Cpu0ClkTck", 7);
@@ -72,7 +72,7 @@ __get_clockfreq_via_cpuinfo (void)
}
}
- close (fd);
+ __close (fd);
}
return result;
@@ -86,16 +86,14 @@ __get_clockfreq_via_proc_openprom (void)
result = 0;
- obp_fd = open ("/proc/openprom", O_RDONLY);
+ obp_fd = __open ("/proc/openprom", O_RDONLY);
if (obp_fd != -1)
{
unsigned long int buf[4096 / sizeof (unsigned long int)];
struct dirent *dirp = (struct dirent *) buf;
- off_t dbase = (off_t) 0;
ssize_t len;
- while ((len = getdirentries (obp_fd, (char *) dirp,
- sizeof (buf), &dbase)) > 0)
+ while ((len = __getdents (obp_fd, (char *) dirp, sizeof (buf))) > 0)
{
struct dirent *this_dirp = dirp;
@@ -113,13 +111,13 @@ __get_clockfreq_via_proc_openprom (void)
__stpcpy (prop = __stpcpy (__stpcpy (node, "/proc/openprom/"),
this_dirp->d_name),
"/device_type");
- fd = open (node, O_RDONLY);
+ fd = __open (node, O_RDONLY);
if (fd != -1)
{
char type_string[128];
int ret;
- ret = read (fd, type_string, sizeof (type_string));
+ ret = __read (fd, type_string, sizeof (type_string));
if (ret > 0 && strncmp (type_string, "'cpu'", 5) == 0)
{
int clkfreq_fd;
@@ -131,11 +129,11 @@ __get_clockfreq_via_proc_openprom (void)
if (read (clkfreq_fd, type_string,
sizeof (type_string)) > 0)
result = (hp_timing_t)
- strtoull (type_string, NULL, 16);
+ strtoumax (type_string, NULL, 16);
close (clkfreq_fd);
}
}
- close (fd);
+ __close (fd);
}
if (result != 0)
@@ -148,7 +146,7 @@ __get_clockfreq_via_proc_openprom (void)
if (result != 0)
break;
}
- close (obp_fd);
+ __close (obp_fd);
}
return result;
@@ -178,7 +176,7 @@ __get_clockfreq_via_dev_openprom (void)
result = 0;
- obp_dev_fd = open ("/dev/openprom", O_RDONLY);
+ obp_dev_fd = __open ("/dev/openprom", O_RDONLY);
if (obp_dev_fd != -1)
{
char obp_buf[8192];
@@ -188,7 +186,7 @@ __get_clockfreq_via_dev_openprom (void)
obp_cmd->oprom_size =
sizeof (obp_buf) - sizeof (unsigned int);
set_obp_int (obp_cmd, 0);
- ret = ioctl (obp_dev_fd, OPROMCHILD, (char *) obp_cmd);
+ ret = __ioctl (obp_dev_fd, OPROMCHILD, (char *) obp_cmd);
if (ret == 0)
{
int cur_node = get_obp_int (obp_cmd);
@@ -197,20 +195,20 @@ __get_clockfreq_via_dev_openprom (void)
{
obp_cmd->oprom_size = sizeof (obp_buf) - sizeof (unsigned int);
strcpy (obp_cmd->oprom_array, "device_type");
- ret = ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
+ ret = __ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
if (ret == 0
&& strncmp (obp_cmd->oprom_array, "cpu", 3) == 0)
{
obp_cmd->oprom_size = (sizeof (obp_buf)
- sizeof (unsigned int));
strcpy (obp_cmd->oprom_array, "clock-frequency");
- ret = ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
+ ret = __ioctl (obp_dev_fd, OPROMGETPROP, (char *) obp_cmd);
if (ret == 0)
result = (hp_timing_t) get_obp_int (obp_cmd);
}
obp_cmd->oprom_size = sizeof (obp_buf) - sizeof (unsigned int);
set_obp_int (obp_cmd, cur_node);
- ret = ioctl (obp_dev_fd, OPROMNEXT, (char *) obp_cmd);
+ ret = __ioctl (obp_dev_fd, OPROMNEXT, (char *) obp_cmd);
if (ret < 0)
break;
cur_node = get_obp_int (obp_cmd);
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
index 6d6e57c114..aa892b8b8b 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libc.abilist
@@ -91,6 +91,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2
GLIBC_2.2 A
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/time.c b/sysdeps/unix/sysv/linux/sparc/sparc64/time.c
index 3a64ef1958..509b580c55 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/time.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/time.c
@@ -1 +1 @@
-#include <sysdeps/unix/time.c>
+#include <sysdeps/posix/time.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c b/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c
index 71a51ccd8a..c3b00cb1d4 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c
@@ -1,10 +1 @@
-#include <kernel-features.h>
-
#include "../../i386/xstat.c"
-
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat{,64} calls. */
-int __have_no_stat64;
-# endif
-#endif
diff --git a/sysdeps/unix/sysv/linux/sparc/system.c b/sysdeps/unix/sysv/linux/sparc/system.c
index 3149091995..a5e34dcdd5 100644
--- a/sysdeps/unix/sysv/linux/sparc/system.c
+++ b/sysdeps/unix/sysv/linux/sparc/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,9 +25,7 @@
return. It might still be in the kernel when the cancellation
request comes. Therefore we have to use the clone() calls ability
to have the kernel write the PID into the user-level variable. */
-#ifdef __ASSUME_CLONE_THREAD_FLAGS
-# define FORK() \
+#define FORK() \
INLINE_CLONE_SYSCALL (CLONE_PARENT_SETTID | SIGCHLD, 0, &pid, NULL, NULL)
-#endif
#include "../system.c"
diff --git a/sysdeps/unix/sysv/linux/sys/fsuid.h b/sysdeps/unix/sysv/linux/sys/fsuid.h
index 2fd512e742..4494baf98b 100644
--- a/sysdeps/unix/sysv/linux/sys/fsuid.h
+++ b/sysdeps/unix/sysv/linux/sys/fsuid.h
@@ -25,10 +25,10 @@ __BEGIN_DECLS
/* Change uid used for file access control to UID, without affecting
other privileges (such as who can send signals at the process). */
-extern int setfsuid (__uid_t __uid) __THROW;
+extern int setfsuid (__uid_t __uid) __THROW __wur;
/* Ditto for group id. */
-extern int setfsgid (__gid_t __gid) __THROW;
+extern int setfsgid (__gid_t __gid) __THROW __wur;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/sys/param.h b/sysdeps/unix/sysv/linux/sys/param.h
deleted file mode 100644
index c419b86408..0000000000
--- a/sysdeps/unix/sysv/linux/sys/param.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* Copyright (C) 1995-1997,2000,2001,2003,2008,2011
- Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_PARAM_H
-#define _SYS_PARAM_H 1
-
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-#include <limits.h>
-#include <linux/limits.h>
-#include <linux/param.h>
-
-/* The kernel headers defines ARG_MAX. The value is wrong, though. */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* BSD names for some <limits.h> values. */
-
-#define NBBY CHAR_BIT
-#ifndef NGROUPS
-# define NGROUPS NGROUPS_MAX
-#endif
-#define MAXSYMLINKS 20
-#define CANBSIZ MAX_CANON
-#define MAXPATHLEN PATH_MAX
-/* The following are not really correct but it is a value we used for a
- long time and which seems to be usable. People should not use NOFILE
- and NCARGS anyway. */
-#define NOFILE 256
-#define NCARGS 131072
-
-
-#include <sys/types.h>
-
-/* Bit map related macros. */
-#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
-#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
-#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
-#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
-
-/* Macros for counting and rounding. */
-#ifndef howmany
-# define howmany(x, y) (((x) + ((y) - 1)) / (y))
-#endif
-#ifdef __GNUC__
-# define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \
- ? (((x) + (y) - 1) & ~((y) - 1)) \
- : ((((x) + ((y) - 1)) / (y)) * (y)))
-#else
-# define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
-#endif
-#define powerof2(x) ((((x) - 1) & (x)) == 0)
-
-/* Macros for min/max. */
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
-
-/* Unit of `st_blocks'. */
-#define DEV_BSIZE 512
-
-
-#endif /* sys/param.h */
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 9ec0028e65..2e6cf9c60d 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -25,6 +25,7 @@ getpmsg - getpmsg i:ipppp getpmsg
getppid - getppid Ei: __getppid getppid
getresuid - getresuid i:ppp getresuid
getresgid - getresgid i:ppp getresgid
+getrlimit - ugetrlimit i:ip __new_getrlimit __getrlimit getrlimit@@GLIBC_2.2
getsid - getsid i:i getsid
init_module EXTRA init_module 5 init_module
inotify_add_watch EXTRA inotify_add_watch i:isi inotify_add_watch
@@ -35,11 +36,9 @@ ioperm - ioperm i:iii ioperm
iopl - iopl i:i iopl
klogctl EXTRA syslog i:isi klogctl
lchown - lchown i:sii __lchown lchown
-madvise - madvise i:pii madvise
mincore - mincore i:anV mincore
mlock - mlock i:bn mlock
mlockall - mlockall i:i mlockall
-mmap - mmap b:aniiii __mmap mmap
mount EXTRA mount i:sssip __mount mount
mremap EXTRA mremap b:ainip __mremap mremap
munlock - munlock i:ai munlock
diff --git a/sysdeps/unix/sysv/linux/sysconf.c b/sysdeps/unix/sysv/linux/sysconf.c
index 5c8f45d784..47ce5ef07c 100644
--- a/sysdeps/unix/sysv/linux/sysconf.c
+++ b/sysdeps/unix/sysv/linux/sysconf.c
@@ -1,5 +1,5 @@
/* Get file-specific information about a file. Linux version.
- Copyright (C) 2003,2004,2006 2008,2009,2011 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -88,11 +88,11 @@ __sysconf (int name)
return HAS_CPUCLOCK (name);
case _SC_ARG_MAX:
-#if __LINUX_KERNEL_VERSION < 0x020617
- /* Determine whether this is a kernel 2.6.23 or later. Only
- then do we have an argument limit determined by the stack
- size. */
- if (GLRO(dl_discover_osversion) () >= 0x020617)
+#if !__ASSUME_ARG_MAX_STACK_BASED
+ /* Determine whether this is a kernel with an argument limit
+ determined by the stack size. */
+ if (GLRO(dl_discover_osversion) ()
+ >= __LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL)
#endif
/* Use getrlimit to get the stack limit. */
if (__getrlimit (RLIMIT_STACK, &rlimit) == 0)
diff --git a/sysdeps/unix/sysv/linux/system.c b/sysdeps/unix/sysv/linux/system.c
index 4604544e64..29ab63ec53 100644
--- a/sysdeps/unix/sysv/linux/system.c
+++ b/sysdeps/unix/sysv/linux/system.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@
return. It might still be in the kernel when the cancellation
request comes. Therefore we have to use the clone() calls ability
to have the kernel write the PID into the user-level variable. */
-#if defined __ASSUME_CLONE_THREAD_FLAGS && !defined FORK
+#ifndef FORK
# define FORK() \
INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid)
#endif
diff --git a/sysdeps/unix/sysv/linux/time.c b/sysdeps/unix/sysv/linux/time.c
index f01d5753fc..a73783e362 100644
--- a/sysdeps/unix/sysv/linux/time.c
+++ b/sysdeps/unix/sysv/linux/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,6 +37,6 @@ libc_hidden_def (time)
#else
-# include <sysdeps/unix/time.c>
+# include <sysdeps/posix/time.c>
#endif
diff --git a/sysdeps/unix/sysv/linux/ttyname.c b/sysdeps/unix/sysv/linux/ttyname.c
index 3dacd40c23..d3070c3ba8 100644
--- a/sysdeps/unix/sysv/linux/ttyname.c
+++ b/sysdeps/unix/sysv/linux/ttyname.c
@@ -148,12 +148,6 @@ ttyname (int fd)
}
ssize_t len = __readlink (procname, ttyname_buf, buflen);
- if (__builtin_expect (len == -1 && errno == ENOENT, 0))
- {
- __set_errno (EBADF);
- return NULL;
- }
-
if (__builtin_expect (len != -1, 1))
{
if ((size_t) len >= buflen)
diff --git a/sysdeps/unix/sysv/linux/ttyname_r.c b/sysdeps/unix/sysv/linux/ttyname_r.c
index 2dd6781348..211ed189bb 100644
--- a/sysdeps/unix/sysv/linux/ttyname_r.c
+++ b/sysdeps/unix/sysv/linux/ttyname_r.c
@@ -128,12 +128,6 @@ __ttyname_r (int fd, char *buf, size_t buflen)
*_fitoa_word (fd, __stpcpy (procname, "/proc/self/fd/"), 10, 0) = '\0';
ssize_t ret = __readlink (procname, buf, buflen - 1);
- if (__builtin_expect (ret == -1 && errno == ENOENT, 0))
- {
- __set_errno (EBADF);
- return EBADF;
- }
-
if (__builtin_expect (ret == -1 && errno == ENAMETOOLONG, 0))
{
__set_errno (ERANGE);
diff --git a/sysdeps/unix/sysv/linux/waitid.c b/sysdeps/unix/sysv/linux/waitid.c
index 7a8b6eb8b2..0fe6330392 100644
--- a/sysdeps/unix/sysv/linux/waitid.c
+++ b/sysdeps/unix/sysv/linux/waitid.c
@@ -1,5 +1,5 @@
/* Linux implementation of waitid.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,14 +19,8 @@
#include <stddef.h>
#include <errno.h>
#include <sys/wait.h>
-#include <kernel-features.h>
#include <sysdep.h>
-
-#ifdef __NR_waitid
-
-# if __ASSUME_WAITID_SYSCALL > 0
-
static inline int
do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
{
@@ -34,37 +28,6 @@ do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
pass if we were using waitid to simulate wait3/wait4. */
return INLINE_SYSCALL (waitid, 5, idtype, id, infop, options, NULL);
}
-# define NO_DO_WAITID
-
-# else
-
-static int do_compat_waitid (idtype_t idtype, id_t id,
- siginfo_t *infop, int options);
-# define DO_WAITID do_compat_waitid
-
-static int
-do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
-{
- static int waitid_works;
- if (waitid_works > 0)
- return INLINE_SYSCALL (waitid, 5, idtype, id, infop, options, NULL);
- if (waitid_works == 0)
- {
- int result = INLINE_SYSCALL (waitid, 5,
- idtype, id, infop, options, NULL);
- if (result < 0 && errno == ENOSYS)
- waitid_works = -1;
- else
- {
- waitid_works = 1;
- return result;
- }
- }
- return do_compat_waitid (idtype, id, infop, options);
-}
-
-# endif
-
-#endif
+#define NO_DO_WAITID
#include "sysdeps/posix/waitid.c"
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/readdir.c b/sysdeps/unix/sysv/linux/wordsize-64/readdir.c
index 300ebb2629..e197d93b00 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/readdir.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir.c
@@ -1,6 +1,6 @@
#define readdir64 __no_readdir64_decl
#define __readdir64 __no___readdir64_decl
-#include <sysdeps/unix/readdir.c>
+#include <sysdeps/posix/readdir.c>
#undef __readdir64
strong_alias (__readdir, __readdir64)
#undef readdir64
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
index 12ca1a1ef7..5ed8e955e2 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
@@ -1,5 +1,5 @@
#define readdir64_r __no_readdir64_r_decl
#define GETDENTS_64BIT_ALIGNED 1
-#include <sysdeps/unix/readdir_r.c>
+#include <sysdeps/posix/readdir_r.c>
#undef readdir64_r
weak_alias (__readdir_r, readdir64_r)
diff --git a/sysdeps/unix/sysv/linux/x86/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
index 9fa5ecb725..2bcded5bf3 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
@@ -1,4 +1,4 @@
-/* O_*, F_*, FD_* bit values for Linux/x86-64.
+/* O_*, F_*, FD_* bit values for Linux/x86.
Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,151 +16,21 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _FCNTL_H
+#ifndef _FCNTL_H
# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
#endif
-#include <sys/types.h>
-#ifdef __USE_GNU
-# include <bits/uio.h>
-#endif
-
-
-/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
- located on a few file systems. */
-#define O_ACCMODE 0003
-#define O_RDONLY 00
-#define O_WRONLY 01
-#define O_RDWR 02
-#define O_CREAT 0100 /* not fcntl */
-#define O_EXCL 0200 /* not fcntl */
-#define O_NOCTTY 0400 /* not fcntl */
-#define O_TRUNC 01000 /* not fcntl */
-#define O_APPEND 02000
-#define O_NONBLOCK 04000
-#define O_NDELAY O_NONBLOCK
-#define O_SYNC 04010000
-#define O_FSYNC O_SYNC
-#define O_ASYNC 020000
-
-#ifdef __USE_XOPEN2K8
-# define O_DIRECTORY 0200000 /* Must be a directory. */
-# define O_NOFOLLOW 0400000 /* Do not follow links. */
-# define O_CLOEXEC 02000000 /* Set close_on_exec. */
-#endif
-#ifdef __USE_GNU
-# define O_DIRECT 040000 /* Direct disk access. */
-# define O_NOATIME 01000000 /* Do not set atime. */
-# define O_PATH 010000000 /* Resolve pathname but do not open file. */
-#endif
-
-/* For now Linux has synchronisity options for data and read operations.
- We define the symbols here but let them do the same as O_SYNC since
- this is a superset. */
-#if defined __USE_POSIX199309 || defined __USE_UNIX98
-# define O_DSYNC 010000 /* Synchronize data. */
-# define O_RSYNC O_SYNC /* Synchronize read operations. */
-#endif
-
-#ifdef __USE_LARGEFILE64
-# ifdef __x86_64__
-# define O_LARGEFILE 0
-# else
-# define O_LARGEFILE 0100000
-# endif
+#ifdef __x86_64__
+# define __O_LARGEFILE 0
#endif
-/* Values for the second argument to `fcntl'. */
-#define F_DUPFD 0 /* Duplicate file descriptor. */
-#define F_GETFD 1 /* Get file descriptor flags. */
-#define F_SETFD 2 /* Set file descriptor flags. */
-#define F_GETFL 3 /* Get file status flags. */
-#define F_SETFL 4 /* Set file status flags. */
#ifdef __x86_64__
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
/* Not necessary, we always have 64-bit offsets. */
# define F_GETLK64 5 /* Get record locking info. */
# define F_SETLK64 6 /* Set record locking info (non-blocking). */
# define F_SETLKW64 7 /* Set record locking info (blocking). */
-#else
-# ifndef __USE_FILE_OFFSET64
-# define F_GETLK 5 /* Get record locking info. */
-# define F_SETLK 6 /* Set record locking info (non-blocking). */
-# define F_SETLKW 7 /* Set record locking info (blocking). */
-# else
-# define F_GETLK F_GETLK64 /* Get record locking info. */
-# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
-# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
-# endif
-# define F_GETLK64 12 /* Get record locking info. */
-# define F_SETLK64 13 /* Set record locking info (non-blocking). */
-# define F_SETLKW64 14 /* Set record locking info (blocking). */
-#endif
-
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
-# define F_SETOWN 8 /* Get owner (process receiving SIGIO). */
-# define F_GETOWN 9 /* Set owner (process receiving SIGIO). */
-#endif
-
-#ifdef __USE_GNU
-# define F_SETSIG 10 /* Set number of signal to be sent. */
-# define F_GETSIG 11 /* Get number of signal to be sent. */
-# define F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */
-# define F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */
#endif
-#ifdef __USE_GNU
-# define F_SETLEASE 1024 /* Set a lease. */
-# define F_GETLEASE 1025 /* Enquire what lease is active. */
-# define F_NOTIFY 1026 /* Request notfications on a directory. */
-# define F_SETPIPE_SZ 1031 /* Set pipe page size array. */
-# define F_GETPIPE_SZ 1032 /* Set pipe page size array. */
-#endif
-#ifdef __USE_XOPEN2K8
-# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
- close-on-exit set. */
-#endif
-
-/* For F_[GET|SET]FD. */
-#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
-
-/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
-#define F_RDLCK 0 /* Read lock. */
-#define F_WRLCK 1 /* Write lock. */
-#define F_UNLCK 2 /* Remove lock. */
-
-/* For old implementation of bsd flock(). */
-#define F_EXLCK 4 /* or 3 */
-#define F_SHLCK 8 /* or 4 */
-
-#ifdef __USE_BSD
-/* Operations for bsd flock(), also used by the kernel implementation. */
-# define LOCK_SH 1 /* shared lock */
-# define LOCK_EX 2 /* exclusive lock */
-# define LOCK_NB 4 /* or'd with one of the above to prevent
- blocking */
-# define LOCK_UN 8 /* remove lock */
-#endif
-
-#ifdef __USE_GNU
-# define LOCK_MAND 32 /* This is a mandatory flock: */
-# define LOCK_READ 64 /* ... which allows concurrent read operations. */
-# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
-# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
-#endif
-
-#ifdef __USE_GNU
-/* Types of directory notifications that may be requested with F_NOTIFY. */
-# define DN_ACCESS 0x00000001 /* File accessed. */
-# define DN_MODIFY 0x00000002 /* File modified. */
-# define DN_CREATE 0x00000004 /* File created. */
-# define DN_DELETE 0x00000008 /* File removed. */
-# define DN_RENAME 0x00000010 /* File renamed. */
-# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
-# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
-#endif
struct flock
{
@@ -187,151 +57,5 @@ struct flock64
};
#endif
-#ifdef __USE_GNU
-/* Owner types. */
-enum __pid_type
- {
- F_OWNER_TID = 0, /* Kernel thread. */
- F_OWNER_PID, /* Process. */
- F_OWNER_PGRP, /* Process group. */
- F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */
- };
-
-/* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */
-struct f_owner_ex
- {
- enum __pid_type type; /* Owner type of ID. */
- __pid_t pid; /* ID of owner. */
- };
-#endif
-
-/* Define some more compatibility macros to be backward compatible with
- BSD systems which did not managed to hide these kernel macros. */
-#ifdef __USE_BSD
-# define FAPPEND O_APPEND
-# define FFSYNC O_FSYNC
-# define FASYNC O_ASYNC
-# define FNONBLOCK O_NONBLOCK
-# define FNDELAY O_NDELAY
-#endif /* Use BSD. */
-
-/* Advise to `posix_fadvise'. */
-#ifdef __USE_XOPEN2K
-# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
-# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
-#endif
-
-
-#ifdef __USE_GNU
-/* Flags for SYNC_FILE_RANGE. */
-# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
- in the range before performing the
- write. */
-# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
- dirty pages in the range which are
- not presently under writeback. */
-# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
- the range after performing the
- write. */
-
-/* Flags for SPLICE and VMSPLICE. */
-# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
-# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
- (but we may still block on the fd
- we splice from/to). */
-# define SPLICE_F_MORE 4 /* Expect more data. */
-# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
-
-
-/* File handle structure. */
-struct file_handle
-{
- unsigned int handle_bytes;
- int handle_type;
- /* File identifier. */
- unsigned char f_handle[0];
-};
-
-/* Maximum handle size (for now). */
-# define MAX_HANDLE_SZ 128
-#endif
-
-__BEGIN_DECLS
-
-#ifdef __USE_GNU
-
-/* Provide kernel hint to read ahead. */
-extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
- __THROW;
-
-
-/* Selective file content synch'ing.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
- unsigned int __flags);
-
-
-/* Splice address range into a pipe.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
- size_t __count, unsigned int __flags);
-
-/* Splice two files together.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
- __off64_t *__offout, size_t __len,
- unsigned int __flags);
-
-/* In-kernel implementation of tee for pipe buffers.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern ssize_t tee (int __fdin, int __fdout, size_t __len,
- unsigned int __flags);
-
-/* Reserve storage for the data of the file associated with FD.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-# ifndef __USE_FILE_OFFSET64
-extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
- __off64_t __len),
- fallocate64);
-# else
-# define fallocate fallocate64
-# endif
-# endif
-# ifdef __USE_LARGEFILE64
-extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
- __off64_t __len);
-# endif
-
-
-/* Map file name to file handle. */
-extern int name_to_handle_at (int __dfd, const char *__name,
- struct file_handle *__handle, int *__mnt_id,
- int __flags) __THROW;
-
-/* Open file using the file handle.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
- int __flags);
-
-#endif /* use GNU */
-
-__END_DECLS
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h>
diff --git a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
index be8985b4c6..ebb5bbb645 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/typesizes.h
@@ -65,7 +65,6 @@
#define __USECONDS_T_TYPE __U32_TYPE
#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
#define __DADDR_T_TYPE __S32_TYPE
-#define __SWBLK_T_TYPE __SYSCALL_SLONG_TYPE
#define __KEY_T_TYPE __S32_TYPE
#define __CLOCKID_T_TYPE __S32_TYPE
#define __TIMER_T_TYPE void *
@@ -73,6 +72,16 @@
#define __FSID_T_TYPE struct { int __val[2]; }
#define __SSIZE_T_TYPE __SWORD_TYPE
+#ifdef __x86_64__
+/* Tell the libc code that off_t and off64_t are actually the same type
+ for all ABI purposes, even if possibly expressed as different base types
+ for C type-checking purposes. */
+# define __OFF_T_MATCHES_OFF64_T 1
+
+/* Same for ino_t and ino64_t. */
+# define __INO_T_MATCHES_INO64_T 1
+#endif
+
/* Number of descriptors that can fit in an `fd_set'. */
#define __FD_SETSIZE 1024
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
index d6ab153e19..a42d424cde 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/nptl/libc.abilist
@@ -82,6 +82,11 @@ GLIBC_2.16
timespec_get F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
GLIBC_2.2.5
GLIBC_2.2.5 A
diff --git a/sysdeps/unix/sysv/linux/x86_64/init-first.c b/sysdeps/unix/sysv/linux/x86_64/init-first.c
index e8b52eacb0..dd41f0f7aa 100644
--- a/sysdeps/unix/sysv/linux/x86_64/init-first.c
+++ b/sysdeps/unix/sysv/linux/x86_64/init-first.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+/* Initialization code run first thing by the ELF startup code. Linux/x86-64.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -54,4 +55,4 @@ _libc_vdso_platform_setup (void)
# define VDSO_SETUP _libc_vdso_platform_setup
#endif
-#include "../init-first.c"
+#include <csu/init-first.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c
index 0e05ddd523..65703cab90 100644
--- a/sysdeps/unix/sysv/linux/x86_64/time.c
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
@@ -16,11 +16,20 @@
<http://www.gnu.org/licenses/>. */
#ifdef SHARED
+/* Redefine time so that the compiler won't complain about the type
+ mismatch with the IFUNC selector in strong_alias, below. */
+#undef time
+#define time __redirect_time
+#include <time.h>
+
#include <dl-vdso.h>
#define VSYSCALL_ADDR_vtime 0xffffffffff600400
-void *time_ifunc (void) __asm__ ("time");
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+ ifunc symbol properly. */
+extern __typeof (__redirect_time) __libc_time;
+void *time_ifunc (void) __asm__ ("__libc_time");
void *
time_ifunc (void)
@@ -30,7 +39,11 @@ time_ifunc (void)
/* If the vDSO is not available we fall back on the old vsyscall. */
return _dl_vdso_vsym ("__vdso_time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime;
}
-__asm (".type time, %gnu_indirect_function");
+__asm (".type __libc_time, %gnu_indirect_function");
+
+#undef time
+strong_alias (__libc_time, time)
+libc_hidden_ver (__libc_time, time)
#else
@@ -45,5 +58,3 @@ time (time_t *t)
}
#endif
-
-strong_alias (time, __GI_time)
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/alphasort.c b/sysdeps/unix/sysv/linux/x86_64/x32/alphasort.c
deleted file mode 100644
index 69ec42721f..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/alphasort.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/alphasort.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/alphasort64.c b/sysdeps/unix/sysv/linux/x86_64/x32/alphasort64.c
deleted file mode 100644
index 6c5b2a1e05..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/alphasort64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/alphasort64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/fseeko.c b/sysdeps/unix/sysv/linux/x86_64/x32/fseeko.c
deleted file mode 100644
index dc47698f23..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/fseeko.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/fseeko.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/fseeko64.c b/sysdeps/unix/sysv/linux/x86_64/x32/fseeko64.c
deleted file mode 100644
index 3e554ec1ea..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/fseeko64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/fseeko64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/ftello.c b/sysdeps/unix/sysv/linux/x86_64/x32/ftello.c
deleted file mode 100644
index 735e3e16b3..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/ftello.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/ftello.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/ftello64.c b/sysdeps/unix/sysv/linux/x86_64/x32/ftello64.c
deleted file mode 100644
index eb155ed57b..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/ftello64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/ftello64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/init-first.c b/sysdeps/unix/sysv/linux/x86_64/x32/init-first.c
index c2aea9d4e5..5fe472ea21 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/init-first.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/init-first.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2012 Free Software Foundation, Inc.
+/* Initialization code run first thing by the ELF startup code. Linux/x32.
+ Copyright (C) 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,4 +38,4 @@ _libc_vdso_platform_setup (void)
# define VDSO_SETUP _libc_vdso_platform_setup
#endif
-#include "../../init-first.c"
+#include <csu/init-first.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos.c b/sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos.c
deleted file mode 100644
index de2ff015da..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/iofgetpos.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos64.c b/sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos64.c
deleted file mode 100644
index 34aabfc6be..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/iofgetpos64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/iofgetpos64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/iofopen.c b/sysdeps/unix/sysv/linux/x86_64/x32/iofopen.c
deleted file mode 100644
index e39bb55188..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/iofopen.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/iofopen.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/iofopen64.c b/sysdeps/unix/sysv/linux/x86_64/x32/iofopen64.c
deleted file mode 100644
index af0c6ae499..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/iofopen64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/iofopen64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos.c b/sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos.c
deleted file mode 100644
index a4c99c93cf..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/iofsetpos.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos64.c b/sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos64.c
deleted file mode 100644
index e83fbba194..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/iofsetpos64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/iofsetpos64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/lockf.c b/sysdeps/unix/sysv/linux/x86_64/x32/lockf.c
deleted file mode 100644
index 42306a08aa..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/lockf.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/lockf.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/lockf64.c b/sysdeps/unix/sysv/linux/x86_64/x32/lockf64.c
deleted file mode 100644
index 3b4b55abc8..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/lockf64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/lockf64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c
deleted file mode 100644
index 177f68a550..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkostemp.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c
deleted file mode 100644
index 68455a84c0..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkostemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkostemp64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c
deleted file mode 100644
index 4bc129bac1..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkstemp.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c b/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c
deleted file mode 100644
index 76a836372e..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/mkstemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/mkstemp64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
index 65bcead8bc..108b80fb43 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist
@@ -2080,4 +2080,9 @@ GLIBC_2.16
xprt_unregister F
GLIBC_2.17
GLIBC_2.17 A
+ clock_getcpuclockid F
+ clock_getres F
+ clock_gettime F
+ clock_nanosleep F
+ clock_settime F
secure_getenv F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/scandir.c b/sysdeps/unix/sysv/linux/x86_64/x32/scandir.c
deleted file mode 100644
index 9288ca2588..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/scandir.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/scandir.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/scandir64.c b/sysdeps/unix/sysv/linux/x86_64/x32/scandir64.c
deleted file mode 100644
index 6d22057590..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/scandir64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/scandir64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/scandirat.c b/sysdeps/unix/sysv/linux/x86_64/x32/scandirat.c
deleted file mode 100644
index 5b8899367d..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/scandirat.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/scandirat.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/scandirat64.c b/sysdeps/unix/sysv/linux/x86_64/x32/scandirat64.c
deleted file mode 100644
index 0d7893d29a..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/scandirat64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/scandirat64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c b/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c
deleted file mode 100644
index f24f361bb6..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/tmpfile.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c b/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c
deleted file mode 100644
index 55feef2a64..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/tmpfile64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/tmpfile64.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/versionsort.c b/sysdeps/unix/sysv/linux/x86_64/x32/versionsort.c
deleted file mode 100644
index af5a668c24..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/versionsort.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/versionsort.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/versionsort64.c b/sysdeps/unix/sysv/linux/x86_64/x32/versionsort64.c
deleted file mode 100644
index fe220c90e3..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/versionsort64.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/wordsize-64/versionsort64.c>
diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c
index c83d2b77e8..dd0f996760 100644
--- a/sysdeps/unix/sysv/linux/xstat64.c
+++ b/sysdeps/unix/sysv/linux/xstat64.c
@@ -1,5 +1,5 @@
-/* xstat64 using old-style Unix stat system call.
- Copyright (C) 1991,1995-2002,2003,2006 Free Software Foundation, Inc.
+/* xstat64 using Linux stat64 system call.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,59 +27,18 @@
#include <kernel-features.h>
-#if __ASSUME_STAT64_SYSCALL == 0
-# include <xstatconv.h>
-#endif
-
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-/* The variable is shared between all wrappers around *stat64 calls.
- This is the definition. */
-int __have_no_stat64;
-# endif
-#endif
-
/* Get information about the file NAME in BUF. */
int
___xstat64 (int vers, const char *name, struct stat64 *buf)
{
int result;
-#if __ASSUME_STAT64_SYSCALL > 0
result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (buf));
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
+#if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
if (__builtin_expect (!result, 1) && buf->__st_ino != (__ino_t) buf->st_ino)
buf->st_ino = buf->__st_ino;
-# endif
- return result;
-#else
- struct kernel_stat kbuf;
-# if defined __NR_stat64
- if (! __have_no_stat64)
- {
- int saved_errno = errno;
- result = INLINE_SYSCALL (stat64, 2, CHECK_STRING (name), CHECK_1 (buf));
-
- if (result != -1 || errno != ENOSYS)
- {
-# if defined _HAVE_STAT64___ST_INO && __ASSUME_ST_INO_64_BIT == 0
- if (!result && buf->__st_ino != (__ino_t) buf->st_ino)
- buf->st_ino = buf->__st_ino;
-# endif
- return result;
- }
-
- __set_errno (saved_errno);
- __have_no_stat64 = 1;
- }
-# endif
-
- result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
- if (result == 0)
- result = __xstat64_conv (vers, &kbuf, buf);
-
- return result;
#endif
+ return result;
}
diff --git a/sysdeps/unix/sysv/linux/xstatconv.c b/sysdeps/unix/sysv/linux/xstatconv.c
index bf1dae08ce..2e5a1a1516 100644
--- a/sysdeps/unix/sysv/linux/xstatconv.c
+++ b/sysdeps/unix/sysv/linux/xstatconv.c
@@ -1,6 +1,5 @@
/* Convert between the kernel's `struct stat' format, and libc's.
- Copyright (C) 1991,1995-1997,2000,2002,2003,2007
- Free Software Foundation, Inc.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +31,7 @@ struct kernel_stat;
#include <string.h>
-#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
+#ifdef XSTAT_IS_XSTAT64
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
diff --git a/sysdeps/wordsize-64/Makefile b/sysdeps/wordsize-64/Makefile
index 9903f51f9a..2fa934751f 100644
--- a/sysdeps/wordsize-64/Makefile
+++ b/sysdeps/wordsize-64/Makefile
@@ -1,6 +1,3 @@
ifeq ($(subdir),misc)
tests += tst-writev
-
-# Time enough for a large writev syscall to complete.
-tst-writev-ENV = TIMEOUTFACTOR="10"
endif
diff --git a/sysdeps/wordsize-64/alphasort.c b/sysdeps/wordsize-64/alphasort.c
deleted file mode 100644
index edc410129d..0000000000
--- a/sysdeps/wordsize-64/alphasort.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#define alphasort64 rename_alphasort64
-
-#include "../../dirent/alphasort.c"
-
-#undef alphasort64
-
-weak_alias (alphasort, alphasort64)
diff --git a/sysdeps/wordsize-64/alphasort64.c b/sysdeps/wordsize-64/alphasort64.c
deleted file mode 100644
index 08509131b6..0000000000
--- a/sysdeps/wordsize-64/alphasort64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in alphasort.c. */
diff --git a/sysdeps/wordsize-64/fseeko.c b/sysdeps/wordsize-64/fseeko.c
deleted file mode 100644
index 692885a8be..0000000000
--- a/sysdeps/wordsize-64/fseeko.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../libio/fseeko.c"
-
-weak_alias (fseeko, fseeko64)
diff --git a/sysdeps/wordsize-64/fseeko64.c b/sysdeps/wordsize-64/fseeko64.c
deleted file mode 100644
index 73e011afbb..0000000000
--- a/sysdeps/wordsize-64/fseeko64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in fseeko.c. */
diff --git a/sysdeps/wordsize-64/ftello.c b/sysdeps/wordsize-64/ftello.c
deleted file mode 100644
index fa05cfcf02..0000000000
--- a/sysdeps/wordsize-64/ftello.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../libio/ftello.c"
-
-weak_alias (ftello, ftello64)
diff --git a/sysdeps/wordsize-64/ftello64.c b/sysdeps/wordsize-64/ftello64.c
deleted file mode 100644
index 2cbbe6320a..0000000000
--- a/sysdeps/wordsize-64/ftello64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in ftello.c. */
diff --git a/sysdeps/wordsize-64/iofgetpos.c b/sysdeps/wordsize-64/iofgetpos.c
deleted file mode 100644
index ba8df67c9b..0000000000
--- a/sysdeps/wordsize-64/iofgetpos.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#define _IO_new_fgetpos64 __renamed__IO_new_fgetpos64
-#define _IO_fgetpos64 __renamed__IO_fgetpos64
-
-#include "../../libio/iofgetpos.c"
-
-#undef _IO_new_fgetpos64
-#undef _IO_fgetpos64
-
-strong_alias (_IO_new_fgetpos, _IO_new_fgetpos64)
-strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
-versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
-versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
diff --git a/sysdeps/wordsize-64/iofgetpos64.c b/sysdeps/wordsize-64/iofgetpos64.c
deleted file mode 100644
index 1748b810fb..0000000000
--- a/sysdeps/wordsize-64/iofgetpos64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in iofgetpos.c. */
diff --git a/sysdeps/wordsize-64/iofopen.c b/sysdeps/wordsize-64/iofopen.c
deleted file mode 100644
index d8d92ca5ec..0000000000
--- a/sysdeps/wordsize-64/iofopen.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "../../libio/iofopen.c"
-
-weak_alias (_IO_new_fopen, _IO_fopen64)
-weak_alias (_IO_new_fopen, fopen64)
diff --git a/sysdeps/wordsize-64/iofopen64.c b/sysdeps/wordsize-64/iofopen64.c
deleted file mode 100644
index 68315d857d..0000000000
--- a/sysdeps/wordsize-64/iofopen64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in iofopen.c. */
diff --git a/sysdeps/wordsize-64/iofsetpos.c b/sysdeps/wordsize-64/iofsetpos.c
deleted file mode 100644
index f2bb8aec55..0000000000
--- a/sysdeps/wordsize-64/iofsetpos.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#define _IO_new_fsetpos64 __renamed__IO_new_fsetpos64
-#define _IO_fsetpos64 __renamed__IO_fsetpos64
-
-#include "../../libio/iofsetpos.c"
-
-#undef _IO_new_fsetpos64
-#undef _IO_fsetpos64
-
-strong_alias (_IO_new_fsetpos, _IO_new_fsetpos64)
-strong_alias (_IO_new_fsetpos64, __new_fsetpos64)
-versioned_symbol (libc, __new_fsetpos64, fsetpos64, GLIBC_2_2);
-versioned_symbol (libc, _IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2_2);
diff --git a/sysdeps/wordsize-64/iofsetpos64.c b/sysdeps/wordsize-64/iofsetpos64.c
deleted file mode 100644
index 5fbc7328b5..0000000000
--- a/sysdeps/wordsize-64/iofsetpos64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in iofsetpos.c. */
diff --git a/sysdeps/wordsize-64/lockf.c b/sysdeps/wordsize-64/lockf.c
deleted file mode 100644
index 502472d98b..0000000000
--- a/sysdeps/wordsize-64/lockf.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../io/lockf.c"
-
-weak_alias (lockf, lockf64)
diff --git a/sysdeps/wordsize-64/lockf64.c b/sysdeps/wordsize-64/lockf64.c
deleted file mode 100644
index 8ef5fc6b46..0000000000
--- a/sysdeps/wordsize-64/lockf64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in lockf.c. */
diff --git a/sysdeps/wordsize-64/mkostemp.c b/sysdeps/wordsize-64/mkostemp.c
deleted file mode 100644
index 4f81fdf544..0000000000
--- a/sysdeps/wordsize-64/mkostemp.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../misc/mkostemp.c"
-
-weak_alias (mkostemp, mkostemp64)
diff --git a/sysdeps/wordsize-64/mkostemp64.c b/sysdeps/wordsize-64/mkostemp64.c
deleted file mode 100644
index 14bb25023e..0000000000
--- a/sysdeps/wordsize-64/mkostemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in mkostemp.c. */
diff --git a/sysdeps/wordsize-64/mkstemp.c b/sysdeps/wordsize-64/mkstemp.c
deleted file mode 100644
index bf6df18485..0000000000
--- a/sysdeps/wordsize-64/mkstemp.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../misc/mkstemp.c"
-
-weak_alias (mkstemp, mkstemp64)
diff --git a/sysdeps/wordsize-64/mkstemp64.c b/sysdeps/wordsize-64/mkstemp64.c
deleted file mode 100644
index e72bb46433..0000000000
--- a/sysdeps/wordsize-64/mkstemp64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in mkstemp.c. */
diff --git a/sysdeps/wordsize-64/scandir.c b/sysdeps/wordsize-64/scandir.c
deleted file mode 100644
index 9af7e9b386..0000000000
--- a/sysdeps/wordsize-64/scandir.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define scandir64 scandir64_renamed
-
-#include "../../dirent/scandir.c"
-
-#undef scandir64
-weak_alias (scandir, scandir64)
diff --git a/sysdeps/wordsize-64/scandir64.c b/sysdeps/wordsize-64/scandir64.c
deleted file mode 100644
index 3c2c4a1590..0000000000
--- a/sysdeps/wordsize-64/scandir64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in scandir.c. */
diff --git a/sysdeps/wordsize-64/scandirat.c b/sysdeps/wordsize-64/scandirat.c
deleted file mode 100644
index 02b8fdee0f..0000000000
--- a/sysdeps/wordsize-64/scandirat.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#define scandirat64 scandirat64_renamed
-
-#include "../../dirent/scandirat.c"
-
-#undef scandirat64
-weak_alias (scandirat, scandirat64)
diff --git a/sysdeps/wordsize-64/scandirat64.c b/sysdeps/wordsize-64/scandirat64.c
deleted file mode 100644
index fb938654a4..0000000000
--- a/sysdeps/wordsize-64/scandirat64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in scandirat.c. */
diff --git a/sysdeps/wordsize-64/tmpfile.c b/sysdeps/wordsize-64/tmpfile.c
deleted file mode 100644
index 449a222d98..0000000000
--- a/sysdeps/wordsize-64/tmpfile.c
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "../../stdio-common/tmpfile.c"
-
-weak_alias (__new_tmpfile, tmpfile64)
diff --git a/sysdeps/wordsize-64/tmpfile64.c b/sysdeps/wordsize-64/tmpfile64.c
deleted file mode 100644
index 5c124c249b..0000000000
--- a/sysdeps/wordsize-64/tmpfile64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in tmpfile.c. */
diff --git a/sysdeps/wordsize-64/tst-writev.c b/sysdeps/wordsize-64/tst-writev.c
index 49a809cfa6..0bc2f70b64 100644
--- a/sysdeps/wordsize-64/tst-writev.c
+++ b/sysdeps/wordsize-64/tst-writev.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ryan S. Arnold <rsa@us.ibm.com>, 2011.
@@ -108,5 +108,8 @@ do_test (void)
return 0;
}
+/* Time enough for a large writev syscall to complete. */
+#define TIMEOUT 20
+
#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"
diff --git a/sysdeps/wordsize-64/versionsort.c b/sysdeps/wordsize-64/versionsort.c
deleted file mode 100644
index bb25550d3d..0000000000
--- a/sysdeps/wordsize-64/versionsort.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#define versionsort64 rename_versionsort64
-
-#include "../../dirent/versionsort.c"
-
-#undef versionsort64
-
-weak_alias (versionsort, versionsort64)
diff --git a/sysdeps/wordsize-64/versionsort64.c b/sysdeps/wordsize-64/versionsort64.c
deleted file mode 100644
index ac6c3c702a..0000000000
--- a/sysdeps/wordsize-64/versionsort64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in versionsort.c. */
diff --git a/sysdeps/x86/bits/byteswap.h b/sysdeps/x86/bits/byteswap.h
index 4178439334..babe567432 100644
--- a/sysdeps/x86/bits/byteswap.h
+++ b/sysdeps/x86/bits/byteswap.h
@@ -24,6 +24,7 @@
#define _BITS_BYTESWAP_H 1
#include <features.h>
+#include <bits/types.h>
#include <bits/wordsize.h>
/* Swap bytes in 16 bit value. */
@@ -104,15 +105,15 @@ __bswap_32 (unsigned int __bsx)
| (((x) & 0x00000000000000ffull) << 56)))
# if __GNUC_PREREQ (4, 2)
-static __inline unsigned long long int
-__bswap_64 (unsigned long long int __bsx)
+static __inline __uint64_t
+__bswap_64 (__uint64_t __bsx)
{
return __builtin_bswap64 (__bsx);
}
# elif __WORDSIZE == 64
# define __bswap_64(x) \
(__extension__ \
- ({ register unsigned long __v, __x = (x); \
+ ({ register __uint64_t __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_64 (__x); \
else \
@@ -121,7 +122,7 @@ __bswap_64 (unsigned long long int __bsx)
# else
# define __bswap_64(x) \
(__extension__ \
- ({ union { __extension__ unsigned long long int __ll; \
+ ({ union { __extension__ __uint64_t __ll; \
unsigned int __l[2]; } __w, __r; \
if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
@@ -144,8 +145,8 @@ __bswap_64 (unsigned long long int __bsx)
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56))
-static __inline unsigned long long int
-__bswap_64 (unsigned long long int __bsx)
+static __inline __uint64_t
+__bswap_64 (__uint64_t __bsx)
{
return __bswap_constant_64 (__bsx);
}
diff --git a/sysdeps/x86/tininess.h b/sysdeps/x86/tininess.h
new file mode 100644
index 0000000000..1db37790f8
--- /dev/null
+++ b/sysdeps/x86/tininess.h
@@ -0,0 +1 @@
+#define TININESS_AFTER_ROUNDING 1
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index d4525bc7c0..0acb69a17f 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -41,7 +41,7 @@ $(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o
tests: $(objpfx)tst-xmmymm.out
$(objpfx)tst-xmmymm.out: ../sysdeps/x86_64/tst-xmmymm.sh $(objpfx)ld.so
@echo "Checking ld.so for SSE register use. This will take a few seconds..."
- $(SHELL) -e $< $(objpfx) > $@
+ $(SHELL) $< $(objpfx) > $@
endif
ifeq ($(subdir),csu)
diff --git a/sysdeps/x86_64/_mcount.S b/sysdeps/x86_64/_mcount.S
index c919865b4d..3adfe031ff 100644
--- a/sysdeps/x86_64/_mcount.S
+++ b/sysdeps/x86_64/_mcount.S
@@ -25,7 +25,7 @@
#include <sysdep.h>
.globl C_SYMBOL_NAME(_mcount)
- ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(_mcount), @function)
+ .type C_SYMBOL_NAME(_mcount), @function
.align ALIGNARG(4)
C_LABEL(_mcount)
/* Allocate space for 7 registers. */
@@ -66,7 +66,7 @@ C_LABEL(_mcount)
weak_alias (_mcount, mcount)
.globl C_SYMBOL_NAME(__fentry__)
- ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__fentry__), @function)
+ .type C_SYMBOL_NAME(__fentry__), @function
.align ALIGNARG(4)
C_LABEL(__fentry__)
/* Allocate space for 7 registers. */
diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure
index b87c0b14b6..0fa0e1ecfa 100644
--- a/sysdeps/x86_64/configure
+++ b/sysdeps/x86_64/configure
@@ -1,124 +1,4 @@
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext
- if { { ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -163,56 +43,6 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
-$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } && {
- ac_pattern='conftest\.S'
- { ac_try='readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
-$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
if ${libc_cv_cc_sse4+:} false; then :
diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in
index a95dc8d8c1..94bcd19f3c 100644
--- a/sysdeps/x86_64/configure.in
+++ b/sysdeps/x86_64/configure.in
@@ -5,39 +5,6 @@ AC_CHECK_HEADER([cpuid.h], ,
[AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
[/* No default includes. */])
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
- ac_pattern='conftest\.S'
- AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
-
dnl Check if -msse4 works.
AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no])
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 9c27ecffd8..d2654aa04b 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -41,13 +41,9 @@ elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
static inline ElfW(Addr) __attribute__ ((unused))
elf_machine_dynamic (void)
{
- ElfW(Addr) addr;
-
- /* This works because we have our GOT address available in the small PIC
- model. */
- addr = (ElfW(Addr)) &_DYNAMIC;
-
- return addr;
+ /* This produces an IP-relative reloc which is resolved at link time. */
+ extern const ElfW(Addr) _GLOBAL_OFFSET_TABLE_[] attribute_hidden;
+ return _GLOBAL_OFFSET_TABLE_[0];
}
@@ -55,31 +51,11 @@ elf_machine_dynamic (void)
static inline ElfW(Addr) __attribute__ ((unused))
elf_machine_load_address (void)
{
- ElfW(Addr) addr;
-
- /* The easy way is just the same as on x86:
- leaq _dl_start, %0
- leaq _dl_start(%%rip), %1
- subq %0, %1
- but this does not work with binutils since we then have
- a R_X86_64_32S relocation in a shared lib.
-
- Instead we store the address of _dl_start in the data section
- and compare it with the current value that we can get via
- an RIP relative addressing mode. Note that this is the address
- of _dl_start before any relocation performed at runtime. In case
- the binary is prelinked the resulting "address" is actually a
- load offset which is zero if the binary was loaded at the address
- it is prelinked for. */
-
- asm ("lea _dl_start(%%rip), %0\n\t"
- "sub 1f(%%rip), %0\n\t"
- ".section\t.data.rel.ro\n"
- "1:\t" ASM_ADDR " _dl_start\n\t"
- ".previous\n\t"
- : "=r" (addr) : : "cc");
-
- return addr;
+ /* Compute the difference between the runtime address of _DYNAMIC as seen
+ by an IP-relative reference, and the link-time address found in the
+ special unrelocated first GOT entry. */
+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden;
+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic ();
}
/* Set up the loaded object described by L so its unrelocated PLT
diff --git a/sysdeps/x86_64/dl-tlsdesc.h b/sysdeps/x86_64/dl-tlsdesc.h
index 06ede02148..ec750904fc 100644
--- a/sysdeps/x86_64/dl-tlsdesc.h
+++ b/sysdeps/x86_64/dl-tlsdesc.h
@@ -20,12 +20,6 @@
#ifndef _X86_64_DL_TLSDESC_H
# define _X86_64_DL_TLSDESC_H 1
-/* Use this to access DT_TLSDESC_PLT and DT_TLSDESC_GOT. */
-#ifndef ADDRIDX
-# define ADDRIDX(tag) (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGNUM \
- + DT_EXTRANUM + DT_VALNUM + DT_ADDRTAGIDX (tag))
-#endif
-
/* Type used to represent a TLS descriptor in the GOT. */
struct tlsdesc
{
diff --git a/sysdeps/x86_64/fpu/e_expf.S b/sysdeps/x86_64/fpu/e_expf.S
index 340a1c2f07..9b13304358 100644
--- a/sysdeps/x86_64/fpu/e_expf.S
+++ b/sysdeps/x86_64/fpu/e_expf.S
@@ -251,89 +251,89 @@ L(DP_T): /* table of double precision values 2^(j/K) for j=[0..K-1] */
.long 0xee615a27, 0x3ffefa1b
.long 0x5b6e4540, 0x3fff5076
.long 0x819e90d8, 0x3fffa7c1
- ASM_TYPE_DIRECTIVE(L(DP_T), @object)
+ .type L(DP_T), @object
ASM_SIZE_DIRECTIVE(L(DP_T))
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
L(DP_KLN2): /* double precision K/log(2) */
.long 0x652b82fe, 0x40571547
- ASM_TYPE_DIRECTIVE(L(DP_KLN2), @object)
+ .type L(DP_KLN2), @object
ASM_SIZE_DIRECTIVE(L(DP_KLN2))
.p2align 3
L(DP_NLN2K): /* double precision -log(2)/K */
.long 0xfefa39ef, 0xbf862e42
- ASM_TYPE_DIRECTIVE(L(DP_NLN2K), @object)
+ .type L(DP_NLN2K), @object
ASM_SIZE_DIRECTIVE(L(DP_NLN2K))
.p2align 3
L(DP_RS): /* double precision 2^23+2^22 */
.long 0x00000000, 0x41680000
- ASM_TYPE_DIRECTIVE(L(DP_RS), @object)
+ .type L(DP_RS), @object
ASM_SIZE_DIRECTIVE(L(DP_RS))
.p2align 3
L(DP_P3): /* double precision polynomial coefficient P3 */
.long 0xeb78fa85, 0x3fa56420
- ASM_TYPE_DIRECTIVE(L(DP_P3), @object)
+ .type L(DP_P3), @object
ASM_SIZE_DIRECTIVE(L(DP_P3))
.p2align 3
L(DP_P1): /* double precision polynomial coefficient P1 */
.long 0x008d6118, 0x3fe00000
- ASM_TYPE_DIRECTIVE(L(DP_P1), @object)
+ .type L(DP_P1), @object
ASM_SIZE_DIRECTIVE(L(DP_P1))
.p2align 3
L(DP_P2): /* double precision polynomial coefficient P2 */
.long 0xda752d4f, 0x3fc55550
- ASM_TYPE_DIRECTIVE(L(DP_P2), @object)
+ .type L(DP_P2), @object
ASM_SIZE_DIRECTIVE(L(DP_P2))
.p2align 3
L(DP_P0): /* double precision polynomial coefficient P0 */
.long 0xffffe7c6, 0x3fefffff
- ASM_TYPE_DIRECTIVE(L(DP_P0), @object)
+ .type L(DP_P0), @object
ASM_SIZE_DIRECTIVE(L(DP_P0))
.p2align 2
L(SP_RANGE): /* single precision overflow/underflow bounds */
.long 0x42b17217 /* if x>this bound, then result overflows */
.long 0x42cff1b4 /* if x<this bound, then result underflows */
- ASM_TYPE_DIRECTIVE(L(SP_RANGE), @object)
+ .type L(SP_RANGE), @object
ASM_SIZE_DIRECTIVE(L(SP_RANGE))
.p2align 2
L(SP_INF_0):
.long 0x7f800000 /* single precision Inf */
.long 0 /* single precision zero */
- ASM_TYPE_DIRECTIVE(L(SP_INF_0), @object)
+ .type L(SP_INF_0), @object
ASM_SIZE_DIRECTIVE(L(SP_INF_0))
.section .rodata.cst4,"aM",@progbits,4
.p2align 2
L(SP_RS): /* single precision 2^23+2^22 */
.long 0x4b400000
- ASM_TYPE_DIRECTIVE(L(SP_RS), @object)
+ .type L(SP_RS), @object
ASM_SIZE_DIRECTIVE(L(SP_RS))
.p2align 2
L(SP_SMALL): /* single precision small value 2^(-100) */
.long 0x0d800000
- ASM_TYPE_DIRECTIVE(L(SP_SMALL), @object)
+ .type L(SP_SMALL), @object
ASM_SIZE_DIRECTIVE(L(SP_SMALL))
.p2align 2
L(SP_LARGE): /* single precision large value 2^100 */
.long 0x71800000
- ASM_TYPE_DIRECTIVE(L(SP_LARGE), @object)
+ .type L(SP_LARGE), @object
ASM_SIZE_DIRECTIVE(L(SP_LARGE))
.p2align 2
L(SP_ONE): /* single precision 1.0 */
.long 0x3f800000
- ASM_TYPE_DIRECTIVE(L(SP_ONE), @object)
+ .type L(SP_ONE), @object
ASM_SIZE_DIRECTIVE(L(SP_ONE))
strong_alias (__ieee754_expf, __expf_finite)
diff --git a/sysdeps/x86_64/fpu/e_expl.S b/sysdeps/x86_64/fpu/e_expl.S
index 1c37c86f7f..a919780390 100644
--- a/sysdeps/x86_64/fpu/e_expl.S
+++ b/sysdeps/x86_64/fpu/e_expl.S
@@ -42,26 +42,26 @@
.p2align 4
#ifdef USE_AS_EXP10L
- ASM_TYPE_DIRECTIVE(c0,@object)
+ .type c0,@object
c0: .byte 0, 0, 0, 0, 0, 0, 0x9a, 0xd4, 0x00, 0x40
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c0)
- ASM_TYPE_DIRECTIVE(c1,@object)
+ .type c1,@object
c1: .byte 0x58, 0x92, 0xfc, 0x15, 0x37, 0x9a, 0x97, 0xf0, 0xef, 0x3f
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c1)
#else
- ASM_TYPE_DIRECTIVE(c0,@object)
+ .type c0,@object
c0: .byte 0, 0, 0, 0, 0, 0, 0xaa, 0xb8, 0xff, 0x3f
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c0)
- ASM_TYPE_DIRECTIVE(c1,@object)
+ .type c1,@object
c1: .byte 0x20, 0xfa, 0xee, 0xc2, 0x5f, 0x70, 0xa5, 0xec, 0xed, 0x3f
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(c1)
#endif
#ifndef USE_AS_EXPM1L
- ASM_TYPE_DIRECTIVE(csat,@object)
+ .type csat,@object
csat: .byte 0, 0, 0, 0, 0, 0, 0, 0x80, 0x0e, 0x40
.byte 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(csat)
diff --git a/sysdeps/x86_64/fpu/e_log10l.S b/sysdeps/x86_64/fpu/e_log10l.S
index ebc809e831..6c07024c19 100644
--- a/sysdeps/x86_64/fpu/e_log10l.S
+++ b/sysdeps/x86_64/fpu/e_log10l.S
@@ -13,13 +13,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/x86_64/fpu/e_log2l.S b/sysdeps/x86_64/fpu/e_log2l.S
index 140b93d101..956489fc3e 100644
--- a/sysdeps/x86_64/fpu/e_log2l.S
+++ b/sysdeps/x86_64/fpu/e_log2l.S
@@ -12,13 +12,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/x86_64/fpu/e_logl.S b/sysdeps/x86_64/fpu/e_logl.S
index 8876dc2189..a8e31084ba 100644
--- a/sysdeps/x86_64/fpu/e_logl.S
+++ b/sysdeps/x86_64/fpu/e_logl.S
@@ -12,13 +12,13 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
/* It is not important that this constant is precise. It is only
a value which is known to be on the safe side for using the
fyl2xp1 instruction. */
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
diff --git a/sysdeps/x86_64/fpu/e_powl.S b/sysdeps/x86_64/fpu/e_powl.S
index 10ede22648..4fe23c06af 100644
--- a/sysdeps/x86_64/fpu/e_powl.S
+++ b/sysdeps/x86_64/fpu/e_powl.S
@@ -23,34 +23,34 @@
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
- ASM_TYPE_DIRECTIVE(one,@object)
+ .type one,@object
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
+ .type limit,@object
limit: .double 0.29
ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p63,@object)
+ .type p63,@object
p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
ASM_SIZE_DIRECTIVE(p63)
- ASM_TYPE_DIRECTIVE(p64,@object)
+ .type p64,@object
p64: .byte 0, 0, 0, 0, 0, 0, 0xf0, 0x43
ASM_SIZE_DIRECTIVE(p64)
- ASM_TYPE_DIRECTIVE(p78,@object)
+ .type p78,@object
p78: .byte 0, 0, 0, 0, 0, 0, 0xd0, 0x44
ASM_SIZE_DIRECTIVE(p78)
.section .rodata.cst16,"aM",@progbits,16
.p2align 3
- ASM_TYPE_DIRECTIVE(infinity,@object)
+ .type infinity,@object
inf_zero:
infinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0x7f
ASM_SIZE_DIRECTIVE(infinity)
- ASM_TYPE_DIRECTIVE(zero,@object)
+ .type zero,@object
zero: .double 0.0
ASM_SIZE_DIRECTIVE(zero)
- ASM_TYPE_DIRECTIVE(minf_mzero,@object)
+ .type minf_mzero,@object
minf_mzero:
minfinity:
.byte 0, 0, 0, 0, 0, 0, 0xf0, 0xff
diff --git a/sysdeps/x86_64/fpu/e_scalbl.S b/sysdeps/x86_64/fpu/e_scalbl.S
index 8394310c97..c422d53b1c 100644
--- a/sysdeps/x86_64/fpu/e_scalbl.S
+++ b/sysdeps/x86_64/fpu/e_scalbl.S
@@ -13,7 +13,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(zero_nan,@object)
+ .type zero_nan,@object
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index dba153b61e..9c5157ff7e 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -197,6 +197,8 @@ ifloat: 1
Test "Imaginary part of: cacos (+0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (+0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -225,6 +227,8 @@ ifloat: 1
Test "Imaginary part of: cacos (-0 - 0.5 i) == pi/2 + 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (-0 - 1.0 i) == pi/2 + 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -269,6 +273,8 @@ ldouble: 1
Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (+0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -280,6 +286,8 @@ idouble: 1
Test "Real part of: cacosh (+0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (+0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -291,6 +299,8 @@ idouble: 1
Test "Real part of: cacosh (-0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-0 + 1.0 i) == 0.8813735870195430252326093249797923090282 + pi/2 i":
double: 1
float: 1
@@ -302,6 +312,8 @@ idouble: 1
Test "Real part of: cacosh (-0 - 0.5 i) == 0.4812118250596034474977589134243684231352 - pi/2 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-0 - 1.0 i) == 0.8813735870195430252326093249797923090282 - pi/2 i":
double: 1
float: 1
@@ -319,9 +331,13 @@ idouble: 1
Test "Real part of: cacosh (-1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + pi i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - pi i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
double: 1
float: 7
@@ -342,9 +358,13 @@ ldouble: 1
Test "Real part of: cacosh (1.5 + +0 i) == 0.9624236501192068949955178268487368462704 + +0 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: cacosh (1.5 - 0 i) == 0.9624236501192068949955178268487368462704 - 0 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
# casin
Test "Imaginary part of: casin (+0 + 0.5 i) == +0 + 0.4812118250596034474977589134243684231352 i":
@@ -367,6 +387,8 @@ ifloat: 1
Test "Imaginary part of: casin (+0 - 0.5 i) == +0 - 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (+0 - 1.0 i) == +0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -395,6 +417,8 @@ ifloat: 1
Test "Imaginary part of: casin (-0 - 0.5 i) == -0 - 0.4812118250596034474977589134243684231352 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: casin (-0 - 1.0 i) == -0 - 0.8813735870195430252326093249797923090282 i":
double: 1
float: 1
@@ -500,9 +524,13 @@ ldouble: 5
Test "Real part of: casinh (0.5 + +0 i) == 0.4812118250596034474977589134243684231352 + +0 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.5 - 0 i) == 0.4812118250596034474977589134243684231352 - 0 i":
float: 1
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "Real part of: casinh (0.75 + 1.25 i) == 1.03171853444778027336364058631006594 + 0.911738290968487636358489564316731207 i":
float: 1
ifloat: 1
@@ -729,6 +757,12 @@ ildouble: 1
ldouble: 1
# clog
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 2.649094276923003995420209214900915462737e-10 + 3.141592653589793238462643383279502884197 i":
+double: 1
+idouble: 1
+Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 2.649094282537168795982991778475646793277e-10 + 3.141592652530155111500161671113150737892 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i) == 5.354083939753840089583620652120903838944e-25 - 1.570796326795931422008642456283782656359 i":
float: 1
ifloat: 1
@@ -778,6 +812,20 @@ float: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog (0x0.ffffffffffffffffp0 + 0x0.ffffffffffffffffp-15000 i) == -5.421010862427522170184200798202494495630e-20 + 3.548665303440282824232502561095699343814e-4516 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -5.960464655174753498633255797994360530379e-8 + 7.888609052210118054117285652827862296732e-31 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i) == 8.298731898331237038231468223024422855654e-5 + 1.110938609507128729312743251313024793990e-3 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog (0x1.234566p-30 + 1.0 i) == 5.614163921211322622623353961365728040115e-19 + 1.570796325735258575254858696548386439740 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1.fffffep+127 + 0x1.fffffep+127 i) == 89.06941264234832570836679262104313101776 + pi/4 i":
ildouble: 1
ldouble: 1
@@ -799,6 +847,9 @@ ldouble: 1
Test "Real part of: clog (0x1.fp+16383 - 0x1p-16445 i) == 11356.49165759582936919077408168801636572 - 0 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 5.0844550531823026520677817684239496041087e-32 + 1.2627468605458094918919206628466016525397 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i) == -744.0934983311012896593986823853525458290 + pi/4 i":
double: 1
idouble: 1
@@ -826,6 +877,12 @@ ldouble: 1
Test "Real part of: clog (0x1p-16445 - 0x1.fp+16383 i) == 11356.49165759582936919077408168801636572 - pi/2 i":
ildouble: 1
ldouble: 1
+Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i) == 1.5366822245016167178749091974664853785194e-08 + 1.2522014929038946066987318471922169174157 i":
+float: 1
+ifloat: 1
+Test "Real part of: clog (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 4.4469229730850767799109418892826021157328e-20 + 1.2046235979300843056806465045930070146351 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog (1.0 + 0x1.234566p-10 i) == 6.172834701221959432440126967147726538097e-7 + 1.111110564353742042376451655136933182201e-3 i":
float: 1
ifloat: 1
@@ -841,6 +898,20 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i) == 1.150487026509145544402795327729455391948e-10 + 1.364376353841841347485783625431355770210 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 2
+idouble: 2
+Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i) == 1.150487028947346337782682105935961875822e-10 + 1.364376353381646356131680448946397884147 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i) == 308.2409272754311106024666378243768099991 + 1.364376353841841347485783625431355770210 i":
double: 1
idouble: 1
@@ -953,6 +1024,35 @@ idouble: 1
ifloat: 1
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -4.821637332766435821255375046554377090472e-17 + 4.053112396770095089737411317782466262176e-302 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.ffffffffffffffffp0 + 0x0.ffffffffffffffffp-15000 i) == -2.354315103889861110220423157644627849164e-20 + 1.541165759405643564697852372112893034397e-4516 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i) == -2.588596909321764128428416045209904492216e-8 + 3.425979381266895667295625489912064603415e-31 i":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i) == 3.604093470239754109961125085078190708674e-5 + 4.824745078422174667425851670822596859720e-4 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+float: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i) == 3.577293486783822178310971763308187385546e-5 + 3.897399639875661463735636919790792140598e-31 i":
+ildouble: 1
+ldouble: 1
Test "Real part of: clog10 (0x1.234566p-30 + 1.0 i) == 2.438200411482400072282924063740535840474e-19 + 6.821881764607257184291586401763604544928e-1 i":
ildouble: 1
ldouble: 1
@@ -998,6 +1098,29 @@ ldouble: 1
Test "Real part of: clog10 (0x1.fp+16383 - 0x1p-16445 i) == 4932.061660674182269085496060792589701158 - 0 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i) == 1.3918041236396763648388478552321724382899e-29 + 0.6263795733790237053262025311642907438291 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x11682p-23 + 0x7ffed1p-23 i) == 5.0916490233953865181284669870035717560498e-13 + 0.6784968969384861816694467029319146542069 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i) == 2.2081507730821788480616336165447731164865e-32 + 0.5484039935757001196548030312819898864760 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i) == -1.3155760824064879362415202279780039150764e-26 + 0.3473590599762514228227328130640352044313 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i) == -6.2126412844802358329771948751248003038444e-07 + 0.4977135139537443711784513409096950995985 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i) == -322.8546703496198318667349645920187712089 + pi/4*log10(e) i":
double: 1
idouble: 1
@@ -1081,6 +1204,75 @@ ifloat: 1
Test "Real part of: clog10 (0x1p-8190 + 1.0 i) == 2.920285685286322365786846845062520925172e-4932 + 6.821881769209206737428918127156778851051e-1 i":
ildouble: 1
ldouble: 1
+Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i) == 6.6737261053986614395049481326819059203910e-09 + 0.5438241985991753781478398141908629586460 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i) == 1.9312741086596516918394613098872836703188e-20 + 0.5231613813514771042838490538484014771862 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i) == -1.9440841725722970687903291200493082253766e-13 + 0.5193774116724956222518530053006822210323 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i) == -6.4375803621988389731799033530075237868110e-21 + 0.4378257977686804492768642780897650927167 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i) == -7.0781945783414996953799915941870192015212e-09 + 0.4005747524909781155537088181659175147564 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 3.6079845358966994996207055940336690133424e-30 + 0.5243112258263349992771652393178033846555 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659b70ab7971bp-53 + 0x1f5d111e08abecp-53 i) == -1.0893543813872082317104059174982092534059e-30 + 0.5954257879188711495921161433751775633232 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i) == 1.6200701438094619117335617123525612051457e-14 + 0.5049027913635038013499728086604870749732 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i) == 1.0529283395205396881397407610630442563938e-37 + 0.4947949395762683446121140513971996916447 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x81b7efa81fc35ad1p-65 + 0x1ef4b835f1c79d812p-65 i) == -4.3074341162203896332989394770760901408798e-39 + 0.5709443672155660428417571212549720987784 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: clog10 (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i) == -4.2289432987513243393180377141513840878196e-30 + 0.4252020027092323591068799049905597805296 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i) == -1.7182001068739620267773842120965071561416e-11 + 0.3990121149225253562859800593935899629087 i":
+double: 1
+idouble: 1
+Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i) == 2.6921240173351112953324592659528481616879e-06 + 0.5785726025799636431142862788413361783862 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i) == 2.3329549194675052736016290082882121135546e-26 + 0.4561756099441139182878993697611751382976 i":
+double: 1
+idouble: 1
Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i) == 2.680828048441605163181684680300513080769e-7 + 4.825491868832381486767558728169977751564e-4 i":
double: 1
idouble: 1
@@ -1138,6 +1330,8 @@ ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_downward (10) == -0.8390715290764524522588639478240648345199":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_downward (2) == -0.4161468365471423869975682295007621897660":
@@ -1169,6 +1363,8 @@ ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_downward (9) == -0.9111302618846769883682947111811653112463":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -1215,15 +1411,22 @@ ildouble: 1
ldouble: 1
# cos_upward
+Test "cos_upward (1) == 0.5403023058681397174009366074429766037323":
+float: 1
+ifloat: 1
Test "cos_upward (10) == -0.8390715290764524522588639478240648345199":
float: 1
ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_upward (2) == -0.4161468365471423869975682295007621897660":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_upward (3) == -0.9899924966004454572715727947312613023937":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_upward (4) == -0.6536436208636119146391681830977503814241":
@@ -1241,6 +1444,8 @@ Test "cos_upward (7) == 0.7539022543433046381411975217191820122183":
float: 1
ifloat: 1
Test "cos_upward (8) == -0.1455000338086135258688413818311946826093":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "cos_upward (9) == -0.9111302618846769883682947111811653112463":
@@ -1528,9 +1733,14 @@ ldouble: 1
Test "Imaginary part of: ctan (0x1p1023 + 1 i) == -0.2254627924997545057926782581695274244229 + 0.8786063118883068695462540226219865087189 i":
ildouble: 1
ldouble: 1
+Test "Real part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: ctan (0x1p127 + 1 i) == 0.2446359391192790896381501310437708987204 + 0.9101334047676183761532873794426475906201 i":
double: 1
+float: 2
idouble: 1
+ifloat: 2
Test "Real part of: ctan (0x3.243f6cp-1 + 0 i) == -2.287733242885645987394874673945769518150e7 + 0.0 i":
float: 1
ifloat: 1
@@ -1675,7 +1885,12 @@ ildouble: 1
ldouble: 1
Test "Real part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
double: 1
+float: 2
idouble: 1
+ifloat: 2
+Test "Imaginary part of: ctanh (1 + 0x1p127 i) == 0.9101334047676183761532873794426475906201 + 0.2446359391192790896381501310437708987204 i":
+float: 1
+ifloat: 1
Test "Imaginary part of: ctanh (45 + 1 i) == 1.000000000000000000000000000000000000001 + 1.490158918874345552942703234806348520895e-39 i":
ildouble: 1
ldouble: 1
@@ -2249,6 +2464,8 @@ Test "sin_downward (8) == 0.9893582466233817778081235982452886721164":
ildouble: 1
ldouble: 1
Test "sin_downward (9) == 0.4121184852417565697562725663524351793439":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -2304,6 +2521,8 @@ Test "sin_upward (1) == 0.8414709848078965066525023216302989996226":
float: 1
ifloat: 1
Test "sin_upward (10) == -0.5440211108893698134047476618513772816836":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "sin_upward (2) == 0.9092974268256816953960198659117448427023":
@@ -2312,6 +2531,8 @@ ifloat: 2
ildouble: 1
ldouble: 1
Test "sin_upward (3) == 0.1411200080598672221007448028081102798469":
+float: 2
+ifloat: 2
ildouble: 1
ldouble: 1
Test "sin_upward (4) == -0.7568024953079282513726390945118290941359":
@@ -2320,11 +2541,19 @@ ifloat: 1
ildouble: 1
ldouble: 1
Test "sin_upward (5) == -0.9589242746631384688931544061559939733525":
+float: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "sin_upward (6) == -0.2794154981989258728115554466118947596280":
ildouble: 1
ldouble: 1
+Test "sin_upward (7) == 0.6569865987187890903969990915936351779369":
+float: 1
+ifloat: 1
+Test "sin_upward (8) == 0.9893582466233817778081235982452886721164":
+float: 1
+ifloat: 1
Test "sin_upward (9) == 0.4121184852417565697562725663524351793439":
float: 1
ifloat: 1
@@ -2603,7 +2832,9 @@ ildouble: 2
ldouble: 2
Test "y1 (0x1.27e204p+99) == -8.881610148467797208469612080785210013461e-16":
double: 1
+float: 1
idouble: 1
+ifloat: 1
ildouble: 1
ldouble: 1
Test "y1 (1.5) == -0.412308626973911295952829820633445323":
@@ -2938,20 +3169,22 @@ ldouble: 1
Function: Imaginary part of "clog":
float: 3
ifloat: 3
+ildouble: 1
+ldouble: 1
Function: Real part of "clog10":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
ildouble: 1
ldouble: 1
Function: Imaginary part of "clog10":
double: 1
-float: 5
+float: 1
idouble: 1
-ifloat: 5
+ifloat: 1
ildouble: 1
ldouble: 1
@@ -3071,17 +3304,17 @@ ldouble: 1
Function: Real part of "ctan":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 2
ldouble: 2
Function: Imaginary part of "ctan":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 1
ldouble: 1
@@ -3139,9 +3372,9 @@ ldouble: 4
Function: Real part of "ctanh":
double: 1
-float: 1
+float: 2
idouble: 1
-ifloat: 1
+ifloat: 2
ildouble: 1
ldouble: 1
diff --git a/sysdeps/x86_64/fpu/s_copysign.S b/sysdeps/x86_64/fpu/s_copysign.S
index d96c3bd959..07ca075843 100644
--- a/sysdeps/x86_64/fpu/s_copysign.S
+++ b/sysdeps/x86_64/fpu/s_copysign.S
@@ -22,12 +22,12 @@
.section .rodata.cst16,"aM",@progbits,16
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(signmask,@object)
+ .type signmask,@object
signmask:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
.byte 0, 0, 0, 0, 0, 0, 0, 0
ASM_SIZE_DIRECTIVE(signmask)
- ASM_TYPE_DIRECTIVE(othermask,@object)
+ .type othermask,@object
othermask:
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f
.byte 0, 0, 0, 0, 0, 0, 0, 0
diff --git a/sysdeps/x86_64/fpu/s_copysignf.S b/sysdeps/x86_64/fpu/s_copysignf.S
index 9dd3101c25..99c16e080e 100644
--- a/sysdeps/x86_64/fpu/s_copysignf.S
+++ b/sysdeps/x86_64/fpu/s_copysignf.S
@@ -22,7 +22,7 @@
.section .rodata
.align ALIGNARG(4)
- ASM_TYPE_DIRECTIVE(mask,@object)
+ .type mask,@object
mask:
.byte 0xff, 0xff, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(mask)
diff --git a/sysdeps/x86_64/fpu/s_cosf.S b/sysdeps/x86_64/fpu/s_cosf.S
new file mode 100644
index 0000000000..dc8c76a131
--- /dev/null
+++ b/sysdeps/x86_64/fpu/s_cosf.S
@@ -0,0 +1,527 @@
+/* Optimized cosf function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#define __need_Emath
+#include <bits/errno.h>
+
+/* Short algorithm description:
+ *
+ * 1) if |x| == 0: return 1.0-|x|.
+ * 2) if |x| < 2^-27: return 1.0-|x|.
+ * 3) if |x| < 2^-5 : return 1.0+x^2*DP_COS2_0+x^5*DP_COS2_1.
+ * 4) if |x| < Pi/4: return 1.0+x^2*(C0+x^2*(C1+x^2*(C2+x^2*(C3+x^2*C4)))).
+ * 5) if |x| < 9*Pi/4:
+ * 5.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+3,
+ * t=|x|-j*Pi/4.
+ * 5.2) Reconstruction:
+ * s = (-1.0)^((n>>2)&1)
+ * if(n&2 != 0) {
+ * using cos(t) polynomial for |t|<Pi/4, result is
+ * s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4))))).
+ * } else {
+ * using sin(t) polynomial for |t|<Pi/4, result is
+ * s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4))))).
+ * }
+ * 6) if |x| < 2^23, large args:
+ * 6.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+3,
+ * t=|x|-j*Pi/4.
+ * 6.2) Reconstruction same as (5.2).
+ * 7) if |x| >= 2^23, very large args:
+ * 7.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+3,
+ * t=|x|-j*Pi/4.
+ * 7.2) Reconstruction same as (5.2).
+ * 8) if x is Inf, return x-x, and set errno=EDOM.
+ * 9) if x is NaN, return x-x.
+ *
+ * Special cases:
+ * cos(+-0) = 1 not raising inexact,
+ * cos(subnormal) raises inexact,
+ * cos(min_normalized) raises inexact,
+ * cos(normalized) raises inexact,
+ * cos(Inf) = NaN, raises invalid, sets errno to EDOM,
+ * cos(NaN) = NaN.
+ */
+
+ .text
+ENTRY(__cosf)
+ /* Input: single precision x in %xmm0 */
+
+ movd %xmm0, %eax /* Bits of x */
+ movaps %xmm0, %xmm7 /* Copy of x */
+ cvtss2sd %xmm0, %xmm0 /* DP x */
+ movss L(SP_ABS_MASK)(%rip), %xmm3
+ andl $0x7fffffff, %eax /* |x| */
+
+ cmpl $0x3f490fdb, %eax /* |x|<Pi/4? */
+ jb L(arg_less_pio4)
+
+ /* Here if |x|>=Pi/4 */
+ andps %xmm7, %xmm3 /* SP |x| */
+ andpd L(DP_ABS_MASK)(%rip), %xmm0 /* DP |x| */
+ movss L(SP_INVPIO4)(%rip), %xmm2 /* SP 1/(Pi/4) */
+
+ cmpl $0x40e231d6, %eax /* |x|<9*Pi/4? */
+ jae L(large_args)
+
+ /* Here if Pi/4<=|x|<9*Pi/4 */
+ mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+ cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+ lea L(PIO4J)(%rip), %rsi
+ addl $1, %eax /* k+1 */
+ movl $0x0e, %edx
+ andl %eax, %edx /* j = (k+1)&0x0e */
+ addl $2, %eax /* n */
+ subsd (%rsi,%rdx,8), %xmm0 /* t = |x| - j * Pi/4 */
+
+L(reconstruction):
+ /* Input: %eax=n, %xmm0=t */
+ testl $2, %eax /* n&2 != 0? */
+ jz L(sin_poly)
+
+/*L(cos_poly):*/
+ /* Here if cos(x) calculated using cos(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))))
+ */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd L(DP_C4)(%rip), %xmm4 /* C4 */
+ mulsd %xmm0, %xmm4 /* z*C4 */
+ movsd L(DP_C3)(%rip), %xmm3 /* C3 */
+ mulsd %xmm0, %xmm3 /* z*C3 */
+ lea L(DP_ONES)(%rip), %rsi
+ addsd L(DP_C2)(%rip), %xmm4 /* C2+z*C4 */
+ mulsd %xmm0, %xmm4 /* z*(C2+z*C4) */
+ addsd L(DP_C1)(%rip), %xmm3 /* C1+z*C3 */
+ mulsd %xmm0, %xmm3 /* z*(C1+z*C3) */
+ addsd L(DP_C0)(%rip), %xmm4 /* C0+z*(C2+z*C4) */
+ mulsd %xmm1, %xmm4 /* y*(C0+z*(C2+z*C4)) */
+
+ addsd %xmm4, %xmm3 /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ /* 1.0+y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd L(DP_ONES)(%rip), %xmm3
+
+ mulsd (%rsi,%rax,8), %xmm3 /* DP result */
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(sin_poly):
+ /* Here if cos(x) calculated using sin(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))))
+ */
+
+ movaps %xmm0, %xmm4 /* t */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd L(DP_S4)(%rip), %xmm2 /* S4 */
+ mulsd %xmm0, %xmm2 /* z*S4 */
+ movsd L(DP_S3)(%rip), %xmm3 /* S3 */
+ mulsd %xmm0, %xmm3 /* z*S3 */
+ lea L(DP_ONES)(%rip), %rsi
+ addsd L(DP_S2)(%rip), %xmm2 /* S2+z*S4 */
+ mulsd %xmm0, %xmm2 /* z*(S2+z*S4) */
+ addsd L(DP_S1)(%rip), %xmm3 /* S1+z*S3 */
+ mulsd %xmm0, %xmm3 /* z*(S1+z*S3) */
+ addsd L(DP_S0)(%rip), %xmm2 /* S0+z*(S2+z*S4) */
+ mulsd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+ /* t*s, where s = sign(x) * (-1.0)^((n>>2)&1) */
+ mulsd (%rsi,%rax,8), %xmm4
+ /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm2, %xmm3
+ /* t*s*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ mulsd %xmm4, %xmm3
+ /* t*s*(1.0+y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm4, %xmm3
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(large_args):
+ /* Here if |x|>=9*Pi/4 */
+ cmpl $0x7f800000, %eax /* x is Inf or NaN? */
+ jae L(arg_inf_or_nan)
+
+ /* Here if finite |x|>=9*Pi/4 */
+ cmpl $0x4b000000, %eax /* |x|<2^23? */
+ jae L(very_large_args)
+
+ /* Here if 9*Pi/4<=|x|<2^23 */
+ movsd L(DP_INVPIO4)(%rip), %xmm1 /* 1/(Pi/4) */
+ mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+ cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+ addl $1, %eax /* k+1 */
+ movl %eax, %edx
+ andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+ cvtsi2sdl %edx, %xmm4 /* DP j */
+ movsd L(DP_PIO4HI)(%rip), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+ mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+ movsd L(DP_PIO4LO)(%rip), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+ addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+ addl $2, %eax /* n */
+ mulsd %xmm3, %xmm4 /* j*PIO4LO */
+ addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+ jmp L(reconstruction)
+
+ .p2align 4
+L(very_large_args):
+ /* Here if finite |x|>=2^23 */
+
+ /* bitpos = (ix>>23) - BIAS_32 + 59; */
+ shrl $23, %eax /* eb = biased exponent of x */
+ /* bitpos = eb - 0x7f + 59, where 0x7f is exponent bias */
+ subl $68, %eax
+ movl $28, %ecx /* %cl=28 */
+ movl %eax, %edx /* bitpos copy */
+
+ /* j = bitpos/28; */
+ div %cl /* j in register %al=%ax/%cl */
+ movapd %xmm0, %xmm3 /* |x| */
+ /* clear unneeded remainder from %ah */
+ andl $0xff, %eax
+
+ imull $28, %eax, %ecx /* j*28 */
+ lea L(_FPI)(%rip), %rsi
+ movsd L(DP_HI_MASK)(%rip), %xmm4 /* DP_HI_MASK */
+ movapd %xmm0, %xmm5 /* |x| */
+ mulsd -16(%rsi,%rax,8), %xmm3 /* tmp3 = FPI[j-2]*|x| */
+ movapd %xmm0, %xmm1 /* |x| */
+ mulsd -8(%rsi,%rax,8), %xmm5 /* tmp2 = FPI[j-1]*|x| */
+ mulsd (%rsi,%rax,8), %xmm0 /* tmp0 = FPI[j]*|x| */
+ addl $19, %ecx /* j*28+19 */
+ mulsd 8(%rsi,%rax,8), %xmm1 /* tmp1 = FPI[j+1]*|x| */
+ cmpl %ecx, %edx /* bitpos>=j*28+19? */
+ jl L(very_large_skip1)
+
+ /* Here if bitpos>=j*28+19 */
+ andpd %xmm3, %xmm4 /* HI(tmp3) */
+ subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+L(very_large_skip1):
+
+ movsd L(DP_2POW52)(%rip), %xmm6
+ movapd %xmm5, %xmm2 /* tmp2 copy */
+ addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+ movl $1, %edx
+ addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+ movsd 8+L(DP_2POW52)(%rip), %xmm4
+ movd %xmm6, %eax /* k = I64_LO(tmp6); */
+ addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+ comisd %xmm5, %xmm4 /* tmp4 > tmp5? */
+ jbe L(very_large_skip2)
+
+ /* Here if tmp4 > tmp5 */
+ subl $1, %eax /* k-- */
+ addsd 8+L(DP_ONES)(%rip), %xmm4 /* tmp4 -= 1.0 */
+L(very_large_skip2):
+
+ andl %eax, %edx /* k&1 */
+ lea L(DP_ZERONE)(%rip), %rsi
+ subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+ addsd (%rsi,%rdx,8), %xmm3 /* t = DP_ZERONE[k&1] + tmp3 */
+ addsd %xmm2, %xmm3 /* t += tmp2 */
+ addsd %xmm3, %xmm0 /* t += tmp0 */
+ addl $3, %eax /* n=k+3 */
+ addsd %xmm1, %xmm0 /* t += tmp1 */
+ mulsd L(DP_PIO4)(%rip), %xmm0 /* t *= PI04 */
+
+ jmp L(reconstruction) /* end of very_large_args peth */
+
+ .p2align 4
+L(arg_less_pio4):
+ /* Here if |x|<Pi/4 */
+ cmpl $0x3d000000, %eax /* |x|<2^-5? */
+ jl L(arg_less_2pn5)
+
+ /* Here if 2^-5<=|x|<Pi/4 */
+ mulsd %xmm0, %xmm0 /* y=x^2 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=x^4 */
+ movsd L(DP_C4)(%rip), %xmm3 /* C4 */
+ mulsd %xmm0, %xmm3 /* z*C4 */
+ movsd L(DP_C3)(%rip), %xmm5 /* C3 */
+ mulsd %xmm0, %xmm5 /* z*C3 */
+ addsd L(DP_C2)(%rip), %xmm3 /* C2+z*C4 */
+ mulsd %xmm0, %xmm3 /* z*(C2+z*C4) */
+ addsd L(DP_C1)(%rip), %xmm5 /* C1+z*C3 */
+ mulsd %xmm0, %xmm5 /* z*(C1+z*C3) */
+ addsd L(DP_C0)(%rip), %xmm3 /* C0+z*(C2+z*C4) */
+ mulsd %xmm1, %xmm3 /* y*(C0+z*(C2+z*C4)) */
+ /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd %xmm5, %xmm3
+ /* 1.0 + y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd L(DP_ONES)(%rip), %xmm3
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(arg_less_2pn5):
+ /* Here if |x|<2^-5 */
+ cmpl $0x32000000, %eax /* |x|<2^-27? */
+ jl L(arg_less_2pn27)
+
+ /* Here if 2^-27<=|x|<2^-5 */
+ mulsd %xmm0, %xmm0 /* DP x^2 */
+ movsd L(DP_COS2_1)(%rip), %xmm3 /* DP DP_COS2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_COS2_1 */
+ addsd L(DP_COS2_0)(%rip), %xmm3 /* DP DP_COS2_0+x^2*DP_COS2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_COS2_0+x^4*DP_COS2_1 */
+ /* DP 1.0+x^2*DP_COS2_0+x^4*DP_COS2_1 */
+ addsd L(DP_ONES)(%rip), %xmm3
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(arg_less_2pn27):
+ /* Here if |x|<2^-27 */
+ andps L(SP_ABS_MASK)(%rip),%xmm7 /* |x| */
+ movss L(SP_ONE)(%rip), %xmm0 /* 1.0 */
+ subss %xmm7, %xmm0 /* result is 1.0-|x| */
+ ret
+
+ .p2align 4
+L(arg_inf_or_nan):
+ /* Here if |x| is Inf or NAN */
+ jne L(skip_errno_setting) /* in case of x is NaN */
+
+ /* Here if x is Inf. Set errno to EDOM. */
+ call JUMPTARGET(__errno_location)
+ movl $EDOM, (%rax)
+
+ .p2align 4
+L(skip_errno_setting):
+ /* Here if |x| is Inf or NAN. Continued. */
+ movaps %xmm7, %xmm0 /* load x */
+ subss %xmm0, %xmm0 /* Result is NaN */
+ ret
+END(__cosf)
+
+ .section .rodata, "a"
+ .p2align 3
+L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+ .long 0x00000000,0x00000000
+ .long 0x54442d18,0x3fe921fb
+ .long 0x54442d18,0x3ff921fb
+ .long 0x7f3321d2,0x4002d97c
+ .long 0x54442d18,0x400921fb
+ .long 0x2955385e,0x400f6a7a
+ .long 0x7f3321d2,0x4012d97c
+ .long 0xe9bba775,0x4015fdbb
+ .long 0x54442d18,0x401921fb
+ .long 0xbeccb2bb,0x401c463a
+ .long 0x2955385e,0x401f6a7a
+ .type L(PIO4J), @object
+ ASM_SIZE_DIRECTIVE(L(PIO4J))
+
+ .p2align 3
+L(_FPI): /* 4/Pi broken into sum of positive DP values */
+ .long 0x00000000,0x00000000
+ .long 0x6c000000,0x3ff45f30
+ .long 0x2a000000,0x3e3c9c88
+ .long 0xa8000000,0x3c54fe13
+ .long 0xd0000000,0x3aaf47d4
+ .long 0x6c000000,0x38fbb81b
+ .long 0xe0000000,0x3714acc9
+ .long 0x7c000000,0x3560e410
+ .long 0x56000000,0x33bca2c7
+ .long 0xac000000,0x31fbd778
+ .long 0xe0000000,0x300b7246
+ .long 0xe8000000,0x2e5d2126
+ .long 0x48000000,0x2c970032
+ .long 0xe8000000,0x2ad77504
+ .long 0xe0000000,0x290921cf
+ .long 0xb0000000,0x274deb1c
+ .long 0xe0000000,0x25829a73
+ .long 0xbe000000,0x23fd1046
+ .long 0x10000000,0x2224baed
+ .long 0x8e000000,0x20709d33
+ .long 0x80000000,0x1e535a2f
+ .long 0x64000000,0x1cef904e
+ .long 0x30000000,0x1b0d6398
+ .long 0x24000000,0x1964ce7d
+ .long 0x16000000,0x17b908bf
+ .type L(_FPI), @object
+ ASM_SIZE_DIRECTIVE(L(_FPI))
+
+/* Coefficients of polynomial
+ for cos(x)~=1.0+x^2*DP_COS2_0+x^4*DP_COS2_1, |x|<2^-5. */
+ .p2align 3
+L(DP_COS2_0):
+ .long 0xff5cc6fd,0xbfdfffff
+ .type L(DP_COS2_0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_COS2_0))
+
+ .p2align 3
+L(DP_COS2_1):
+ .long 0xb178dac5,0x3fa55514
+ .type L(DP_COS2_1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_COS2_1))
+
+ .p2align 3
+L(DP_ZERONE):
+ .long 0x00000000,0x00000000 /* 0.0 */
+ .long 0x00000000,0xbff00000 /* 1.0 */
+ .type L(DP_ZERONE), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+
+ .p2align 3
+L(DP_ONES):
+ .long 0x00000000,0x3ff00000 /* +1.0 */
+ .long 0x00000000,0xbff00000 /* -1.0 */
+ .type L(DP_ONES), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ONES))
+
+/* Coefficients of polynomial
+ for sin(t)~=t+t^3*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_S3):
+ .long 0x64e6b5b4,0x3ec71d72
+ .type L(DP_S3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S3))
+
+ .p2align 3
+L(DP_S1):
+ .long 0x10c2688b,0x3f811111
+ .type L(DP_S1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S1))
+
+ .p2align 3
+L(DP_S4):
+ .long 0x1674b58a,0xbe5a947e
+ .type L(DP_S4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S4))
+
+ .p2align 3
+L(DP_S2):
+ .long 0x8b4bd1f9,0xbf2a019f
+ .type L(DP_S2),@object
+ ASM_SIZE_DIRECTIVE(L(DP_S2))
+
+ .p2align 3
+L(DP_S0):
+ .long 0x55551cd9,0xbfc55555
+ .type L(DP_S0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S0))
+
+/* Coefficients of polynomial
+ for cos(t)~=1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_C3):
+ .long 0x9ac43cc0,0x3efa00eb
+ .type L(DP_C3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C3))
+
+ .p2align 3
+L(DP_C1):
+ .long 0x545c50c7,0x3fa55555
+ .type L(DP_C1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C1))
+
+ .p2align 3
+L(DP_C4):
+ .long 0xdd8844d7,0xbe923c97
+ .type L(DP_C4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C4))
+
+ .p2align 3
+L(DP_C2):
+ .long 0x348b6874,0xbf56c16b
+ .type L(DP_C2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C2))
+
+ .p2align 3
+L(DP_C0):
+ .long 0xfffe98ae,0xbfdfffff
+ .type L(DP_C0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C0))
+
+ .p2align 3
+L(DP_PIO4):
+ .long 0x54442d18,0x3fe921fb /* Pi/4 */
+ .type L(DP_PIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+
+ .p2align 3
+L(DP_2POW52):
+ .long 0x00000000,0x43300000 /* +2^52 */
+ .long 0x00000000,0xc3300000 /* -2^52 */
+ .type L(DP_2POW52), @object
+ ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+
+ .p2align 3
+L(DP_INVPIO4):
+ .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+ .type L(DP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+
+ .p2align 3
+L(DP_PIO4HI):
+ .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+ .type L(DP_PIO4HI), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+
+ .p2align 3
+L(DP_PIO4LO):
+ .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+ .type L(DP_PIO4LO), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+
+ .p2align 2
+L(SP_INVPIO4):
+ .long 0x3fa2f983 /* 4/Pi */
+ .type L(SP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+
+ .p2align 4
+L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+ .long 0xffffffff,0x7fffffff
+ .long 0xffffffff,0x7fffffff
+ .type L(DP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+
+ .p2align 3
+L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+ .long 0x00000000,0xffffffff
+ .type L(DP_HI_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+
+ .p2align 4
+L(SP_ABS_MASK): /* Mask for getting SP absolute value */
+ .long 0x7fffffff,0x7fffffff
+ .long 0x7fffffff,0x7fffffff
+ .type L(SP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ABS_MASK))
+
+ .p2align 2
+L(SP_ONE):
+ .long 0x3f800000 /* 1.0 */
+ .type L(SP_ONE), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ONE))
+
+weak_alias(__cosf, cosf)
diff --git a/sysdeps/x86_64/fpu/s_sincosf.S b/sysdeps/x86_64/fpu/s_sincosf.S
new file mode 100644
index 0000000000..3334a3a78f
--- /dev/null
+++ b/sysdeps/x86_64/fpu/s_sincosf.S
@@ -0,0 +1,558 @@
+/* Optimized sincosf function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#define __need_Emath
+#include <bits/errno.h>
+
+/* Short algorithm description:
+ *
+ * 1) if |x|==0: sin(x)=x,
+ * cos(x)=1.
+ * 2) if |x|<2^-27: sin(x)=x-x*DP_SMALL, raising underflow only when needed,
+ * cos(x)=1-|x|.
+ * 3) if |x|<2^-5 : sin(x)=x+x*x^2*DP_SIN2_0+x^5*DP_SIN2_1,
+ * cos(x)=1+1*x^2*DP_COS2_0+x^5*DP_COS2_1
+ * 4) if |x|< Pi/4: sin(x)=x+x*x^2*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))),
+ * cos(x)=1+1*x^2*(C0+x^2*(C1+x^2*(C2+x^2*(C3+x^2*C4)))).
+ * 5) if |x| < 9*Pi/4:
+ * 5.1) Range reduction:
+ * k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+1, t=|x|-j*Pi/4.
+ * 5.2) Reconstruction:
+ * sign_sin = sign(x) * (-1.0)^(( n >>2)&1)
+ * sign_cos = (-1.0)^(((n+2)>>2)&1)
+ * poly_sin = ((((S4*t^2 + S3)*t^2 + S2)*t^2 + S1)*t^2 + S0)*t^2*t+t
+ * poly_cos = ((((C4*t^2 + C3)*t^2 + C2)*t^2 + C1)*t^2 + C0)*t^2*s+s
+ * if(n&2 != 0) {
+ * using cos(t) and sin(t) polynomials for |t|<Pi/4, results are
+ * cos(x) = poly_sin * sign_cos
+ * sin(x) = poly_cos * sign_sin
+ * } else {
+ * sin(x) = poly_sin * sign_sin
+ * cos(x) = poly_cos * sign_cos
+ * }
+ * 6) if |x| < 2^23, large args:
+ * 6.1) Range reduction:
+ * k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1, t=|x|-j*Pi/4
+ * 6.2) Reconstruction same as (5.2).
+ * 7) if |x| >= 2^23, very large args:
+ * 7.1) Range reduction:
+ * k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1, t=|x|-j*Pi/4.
+ * 7.2) Reconstruction same as (5.2).
+ * 8) if x is Inf, return x-x, and set errno=EDOM.
+ * 9) if x is NaN, return x-x.
+ *
+ * Special cases:
+ * sin/cos(+-0) = +-0/1 not raising inexact/underflow,
+ * sin/cos(subnormal) raises inexact/underflow,
+ * sin/cos(min_normalized) raises inexact/underflow,
+ * sin/cos(normalized) raises inexact,
+ * sin/cos(Inf) = NaN, raises invalid, sets errno to EDOM,
+ * sin/cos(NaN) = NaN.
+ */
+
+# define ARG_SIN_PTR %rdi
+# define ARG_COS_PTR %rsi
+
+ .text
+ENTRY(__sincosf)
+ /* Input: %xmm0 contains single precision argument x */
+ /* %rdi points to sin result */
+ /* %rsi points to cos result */
+
+ movd %xmm0, %eax /* Bits of x */
+ movaps %xmm0, %xmm7 /* Copy of x */
+ cvtss2sd %xmm0, %xmm0 /* DP x */
+ movss L(SP_ABS_MASK)(%rip), %xmm3
+ movl %eax, %r8d /* Copy of x bits */
+ andl $0x7fffffff, %eax /* |x| */
+
+ cmpl $0x3f490fdb, %eax /* |x|<Pi/4 ? */
+ jb L(arg_less_pio4)
+
+ /* Here if |x|>=Pi/4 */
+ andps %xmm7, %xmm3 /* SP |x| */
+ andpd L(DP_ABS_MASK)(%rip),%xmm0 /* DP |x| */
+ movss L(SP_INVPIO4)(%rip), %xmm2 /* SP 1/(Pi/4) */
+
+ cmpl $0x40e231d6, %eax /* |x|<9*Pi/4 ? */
+ jae L(large_args)
+
+ /* Here if Pi/4<=|x|<9*Pi/4 */
+ mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+ movl %r8d, %ecx /* Load x */
+ cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+ lea L(PIO4J)(%rip), %r9
+ shrl $29, %ecx /* (sign of x) << 2 */
+ addl $1, %eax /* k+1 */
+ movl $0x0e, %edx
+ andl %eax, %edx /* j = (k+1)&0x0e */
+ subsd (%r9,%rdx,8), %xmm0 /* t = |x| - j * Pi/4 */
+
+L(reconstruction):
+ /* Input: %eax=n, %xmm0=t, %ecx=sign(x) */
+
+ movaps %xmm0, %xmm4 /* t */
+ movhpd L(DP_ONES)(%rip), %xmm4 /* 1|t */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ movl $2, %edx
+ unpcklpd %xmm0, %xmm0 /* y|y */
+ addl %eax, %edx /* k+2 */
+ movaps %xmm0, %xmm1 /* y|y */
+ mulpd %xmm0, %xmm0 /* z=t^4|z=t^4 */
+
+ movaps L(DP_SC4)(%rip), %xmm2 /* S4 */
+ mulpd %xmm0, %xmm2 /* z*S4 */
+ movaps L(DP_SC3)(%rip), %xmm3 /* S3 */
+ mulpd %xmm0, %xmm3 /* z*S3 */
+ xorl %eax, %ecx /* (sign_x ^ (k>>2))<<2 */
+ addpd L(DP_SC2)(%rip), %xmm2 /* S2+z*S4 */
+ mulpd %xmm0, %xmm2 /* z*(S2+z*S4) */
+ shrl $2, %edx /* (k+2)>>2 */
+ addpd L(DP_SC1)(%rip), %xmm3 /* S1+z*S3 */
+ mulpd %xmm0, %xmm3 /* z*(S1+z*S3) */
+ shrl $2, %ecx /* sign_x ^ k>>2 */
+ addpd L(DP_SC0)(%rip), %xmm2 /* S0+z*(S2+z*S4) */
+ andl $1, %edx /* sign_cos = ((k+2)>>2)&1 */
+ mulpd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+ andl $1, %ecx /* sign_sin = sign_x ^ ((k>>2)&1) */
+ addpd %xmm2, %xmm3 /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ lea L(DP_ONES)(%rip), %r9
+ mulpd %xmm4, %xmm3 /*t*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))))*/
+ testl $2, %eax /* n&2 != 0 ? */
+ addpd %xmm4, %xmm3 /*t+t*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))*/
+ jnz L(sin_result_sin_poly)
+
+/*L(sin_result_cos_poly):*/
+ /*
+ * Here if
+ * cos(x) = poly_sin * sign_cos
+ * sin(x) = poly_cos * sign_sin
+ */
+ movsd (%r9,%rcx,8), %xmm4 /* 0|sign_sin */
+ movhpd (%r9,%rdx,8), %xmm4 /* sign_cos|sign_sin */
+ mulpd %xmm4, %xmm3 /* result_cos|result_sin */
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movss %xmm0, (ARG_SIN_PTR) /* store sin(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move cos(x) to xmm0[0] */
+ movss %xmm0, (ARG_COS_PTR) /* store cos(x) */
+ ret
+
+ .p2align 4
+L(sin_result_sin_poly):
+ /*
+ * Here if
+ * sin(x) = poly_sin * sign_sin
+ * cos(x) = poly_cos * sign_cos
+ */
+ movsd (%r9,%rdx,8), %xmm4 /* 0|sign_cos */
+ movhpd (%r9,%rcx,8), %xmm4 /* sign_sin|sign_cos */
+ mulpd %xmm4, %xmm3 /* result_sin|result_cos */
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movss %xmm0, (ARG_COS_PTR) /* store cos(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move sin(x) to xmm0[0] */
+ movss %xmm0, (ARG_SIN_PTR) /* store sin(x) */
+ ret
+
+ .p2align 4
+L(large_args):
+ /* Here if |x|>=9*Pi/4 */
+ cmpl $0x7f800000, %eax /* x is Inf or NaN ? */
+ jae L(arg_inf_or_nan)
+
+ /* Here if finite |x|>=9*Pi/4 */
+ cmpl $0x4b000000, %eax /* |x|<2^23 ? */
+ jae L(very_large_args)
+
+ /* Here if 9*Pi/4<=|x|<2^23 */
+ movsd L(DP_INVPIO4)(%rip), %xmm1 /* 1/(Pi/4) */
+ mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+ cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+ addl $1, %eax /* k+1 */
+ movl %eax, %edx
+ andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+ cvtsi2sdl %edx, %xmm4 /* DP j */
+ movl %r8d, %ecx /* Load x */
+ movsd L(DP_PIO4HI)(%rip), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+ shrl $29, %ecx /* (sign of x) << 2 */
+ mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+ movsd L(DP_PIO4LO)(%rip), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+ addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+ mulsd %xmm3, %xmm4 /* j*PIO4LO */
+ addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+ jmp L(reconstruction)
+
+ .p2align 4
+L(very_large_args):
+ /* Here if finite |x|>=2^23 */
+
+ /* bitpos = (ix>>23) - BIAS_32 + 59; */
+ shrl $23, %eax /* eb = biased exponent of x */
+ subl $68, %eax /* bitpos=eb-0x7f+59, where 0x7f */
+ /*is exponent bias */
+ movl $28, %ecx /* %cl=28 */
+ movl %eax, %edx /* bitpos copy */
+
+ /* j = bitpos/28; */
+ div %cl /* j in register %al=%ax/%cl */
+ movapd %xmm0, %xmm3 /* |x| */
+ andl $0xff, %eax /* clear unneeded remainder from %ah*/
+
+ imull $28, %eax, %ecx /* j*28 */
+ lea L(_FPI)(%rip), %r9
+ movsd L(DP_HI_MASK)(%rip), %xmm4 /* DP_HI_MASK */
+ movapd %xmm0, %xmm5 /* |x| */
+ mulsd -16(%r9,%rax,8), %xmm3 /* tmp3 = FPI[j-2]*|x| */
+ movapd %xmm0, %xmm1 /* |x| */
+ mulsd -8(%r9,%rax,8), %xmm5 /* tmp2 = FPI[j-1]*|x| */
+ mulsd (%r9,%rax,8), %xmm0 /* tmp0 = FPI[j]*|x| */
+ addl $19, %ecx /* j*28+19 */
+ mulsd 8(%r9,%rax,8), %xmm1 /* tmp1 = FPI[j+1]*|x| */
+ cmpl %ecx, %edx /* bitpos>=j*28+19 ? */
+ jl L(very_large_skip1)
+
+ /* Here if bitpos>=j*28+19 */
+ andpd %xmm3, %xmm4 /* HI(tmp3) */
+ subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+L(very_large_skip1):
+
+ movsd L(DP_2POW52)(%rip), %xmm6
+ movapd %xmm5, %xmm2 /* tmp2 copy */
+ addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+ movl $1, %edx
+ addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+ movsd 8+L(DP_2POW52)(%rip), %xmm4
+ movd %xmm6, %eax /* k = I64_LO(tmp6); */
+ addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+ movl %r8d, %ecx /* Load x */
+ comisd %xmm5, %xmm4 /* tmp4 > tmp5 ? */
+ jbe L(very_large_skip2)
+
+ /* Here if tmp4 > tmp5 */
+ subl $1, %eax /* k-- */
+ addsd 8+L(DP_ONES)(%rip), %xmm4 /* tmp4 -= 1.0 */
+L(very_large_skip2):
+
+ andl %eax, %edx /* k&1 */
+ lea L(DP_ZERONE)(%rip), %r9
+ subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+ addsd (%r9,%rdx,8), %xmm3 /* t = DP_ZERONE[k&1] + tmp3 */
+ addsd %xmm2, %xmm3 /* t += tmp2 */
+ shrl $29, %ecx /* (sign of x) << 2 */
+ addsd %xmm3, %xmm0 /* t += tmp0 */
+ addl $1, %eax /* n=k+1 */
+ addsd %xmm1, %xmm0 /* t += tmp1 */
+ mulsd L(DP_PIO4)(%rip), %xmm0 /* t *= PI04 */
+
+ jmp L(reconstruction) /* end of very_large_args peth */
+
+ .p2align 4
+L(arg_less_pio4):
+ /* Here if |x|<Pi/4 */
+ cmpl $0x3d000000, %eax /* |x|<2^-5 ? */
+ jl L(arg_less_2pn5)
+
+ /* Here if 2^-5<=|x|<Pi/4 */
+ movaps %xmm0, %xmm3 /* DP x */
+ movhpd L(DP_ONES)(%rip), %xmm3 /* DP 1|x */
+ mulsd %xmm0, %xmm0 /* DP y=x^2 */
+ unpcklpd %xmm0, %xmm0 /* DP y|y */
+ movaps %xmm0, %xmm1 /* y|y */
+ mulpd %xmm0, %xmm0 /* z=x^4|z=x^4 */
+
+ movapd L(DP_SC4)(%rip), %xmm4 /* S4 */
+ mulpd %xmm0, %xmm4 /* z*S4 */
+ movapd L(DP_SC3)(%rip), %xmm5 /* S3 */
+ mulpd %xmm0, %xmm5 /* z*S3 */
+ addpd L(DP_SC2)(%rip), %xmm4 /* S2+z*S4 */
+ mulpd %xmm0, %xmm4 /* z*(S2+z*S4) */
+ addpd L(DP_SC1)(%rip), %xmm5 /* S1+z*S3 */
+ mulpd %xmm0, %xmm5 /* z*(S1+z*S3) */
+ addpd L(DP_SC0)(%rip), %xmm4 /* S0+z*(S2+z*S4) */
+ mulpd %xmm1, %xmm4 /* y*(S0+z*(S2+z*S4)) */
+ mulpd %xmm3, %xmm5 /* x*z*(S1+z*S3) */
+ mulpd %xmm3, %xmm4 /* x*y*(S0+z*(S2+z*S4)) */
+ addpd %xmm5, %xmm4 /*x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))))*/
+ addpd %xmm4, %xmm3 /*x+x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4))*/
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movss %xmm0, (ARG_SIN_PTR) /* store sin(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move cos(x) to xmm0[0] */
+ movss %xmm0, (ARG_COS_PTR) /* store cos(x) */
+ ret
+
+ .p2align 4
+L(arg_less_2pn5):
+ /* Here if |x|<2^-5 */
+ cmpl $0x32000000, %eax /* |x|<2^-27 ? */
+ jl L(arg_less_2pn27)
+
+ /* Here if 2^-27<=|x|<2^-5 */
+ movaps %xmm0, %xmm1 /* DP x */
+ movhpd L(DP_ONES)(%rip), %xmm1 /* DP 1|x */
+ mulsd %xmm0, %xmm0 /* DP x^2 */
+ unpcklpd %xmm0, %xmm0 /* DP x^2|x^2 */
+
+ movaps L(DP_SINCOS2_1)(%rip), %xmm3 /* DP DP_SIN2_1 */
+ mulpd %xmm0, %xmm3 /* DP x^2*DP_SIN2_1 */
+ addpd L(DP_SINCOS2_0)(%rip), %xmm3 /* DP DP_SIN2_0+x^2*DP_SIN2_1 */
+ mulpd %xmm0, %xmm3 /* DP x^2*DP_SIN2_0+x^4*DP_SIN2_1 */
+ mulpd %xmm1, %xmm3 /* DP x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ addpd %xmm1, %xmm3 /* DP x+x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ cvtpd2ps %xmm3, %xmm0 /* SP results */
+ movss %xmm0, (ARG_SIN_PTR) /* store sin(x) from xmm0[0] */
+ shufps $1, %xmm0, %xmm0 /* move cos(x) to xmm0[0] */
+ movss %xmm0, (ARG_COS_PTR) /* store cos(x) */
+ ret
+
+ .p2align 4
+L(arg_less_2pn27):
+ cmpl $0, %eax /* x=0 ? */
+ je L(arg_zero) /* in case x=0 return sin(+-0)==+-0 */
+ /* Here if |x|<2^-27 */
+ /*
+ * Special cases here:
+ * sin(subnormal) raises inexact/underflow
+ * sin(min_normalized) raises inexact/underflow
+ * sin(normalized) raises inexact
+ * cos(here)=1-|x| (raising inexact)
+ */
+ movaps %xmm0, %xmm3 /* DP x */
+ mulsd L(DP_SMALL)(%rip), %xmm0/* DP x*DP_SMALL */
+ subsd %xmm0, %xmm3 /* DP sin result is x-x*DP_SMALL */
+ andps L(SP_ABS_MASK)(%rip), %xmm7/* SP |x| */
+ cvtsd2ss %xmm3, %xmm0 /* sin(x) */
+ movss L(SP_ONE)(%rip), %xmm1 /* SP 1.0 */
+ movss %xmm0, (ARG_SIN_PTR) /* sin(x) store */
+ subss %xmm7, %xmm1 /* cos(x) */
+ movss %xmm1, (ARG_COS_PTR) /* cos(x) store */
+ ret
+
+ .p2align 4
+L(arg_zero):
+ movss L(SP_ONE)(%rip), %xmm0 /* 1.0 */
+ movss %xmm7, (ARG_SIN_PTR) /* sin(+-0)==x */
+ movss %xmm0, (ARG_COS_PTR) /* cos(+-0)==1 */
+ ret
+
+ .p2align 4
+L(arg_inf_or_nan):
+ /* Here if |x| is Inf or NAN */
+ jne L(skip_errno_setting) /* in case of x is NaN */
+
+ /* Here if x is Inf. Set errno to EDOM. */
+ call JUMPTARGET(__errno_location)
+ movl $EDOM, (%rax)
+
+ .p2align 4
+L(skip_errno_setting):
+ /* Here if |x| is Inf or NAN. Continued. */
+ subss %xmm7, %xmm7 /* x-x, result is NaN */
+ movss %xmm7, (ARG_SIN_PTR)
+ movss %xmm7, (ARG_COS_PTR)
+ ret
+END(__sincosf)
+
+ .section .rodata, "a"
+ .p2align 3
+L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+ .long 0x00000000,0x00000000
+ .long 0x54442d18,0x3fe921fb
+ .long 0x54442d18,0x3ff921fb
+ .long 0x7f3321d2,0x4002d97c
+ .long 0x54442d18,0x400921fb
+ .long 0x2955385e,0x400f6a7a
+ .long 0x7f3321d2,0x4012d97c
+ .long 0xe9bba775,0x4015fdbb
+ .long 0x54442d18,0x401921fb
+ .long 0xbeccb2bb,0x401c463a
+ .long 0x2955385e,0x401f6a7a
+ .type L(PIO4J), @object
+ ASM_SIZE_DIRECTIVE(L(PIO4J))
+
+ .p2align 3
+L(_FPI): /* 4/Pi broken into sum of positive DP values */
+ .long 0x00000000,0x00000000
+ .long 0x6c000000,0x3ff45f30
+ .long 0x2a000000,0x3e3c9c88
+ .long 0xa8000000,0x3c54fe13
+ .long 0xd0000000,0x3aaf47d4
+ .long 0x6c000000,0x38fbb81b
+ .long 0xe0000000,0x3714acc9
+ .long 0x7c000000,0x3560e410
+ .long 0x56000000,0x33bca2c7
+ .long 0xac000000,0x31fbd778
+ .long 0xe0000000,0x300b7246
+ .long 0xe8000000,0x2e5d2126
+ .long 0x48000000,0x2c970032
+ .long 0xe8000000,0x2ad77504
+ .long 0xe0000000,0x290921cf
+ .long 0xb0000000,0x274deb1c
+ .long 0xe0000000,0x25829a73
+ .long 0xbe000000,0x23fd1046
+ .long 0x10000000,0x2224baed
+ .long 0x8e000000,0x20709d33
+ .long 0x80000000,0x1e535a2f
+ .long 0x64000000,0x1cef904e
+ .long 0x30000000,0x1b0d6398
+ .long 0x24000000,0x1964ce7d
+ .long 0x16000000,0x17b908bf
+ .type L(_FPI), @object
+ ASM_SIZE_DIRECTIVE(L(_FPI))
+
+/* Coefficients of polynomials for */
+/* sin(x)~=x+x*x^2*(DP_SIN2_0+x^2*DP_SIN2_1) in low DP part, */
+/* cos(x)~=1+1*x^2*(DP_COS2_0+x^2*DP_COS2_1) in high DP part, */
+/* for |x|<2^-5. */
+ .p2align 4
+L(DP_SINCOS2_0):
+ .long 0x5543d49d,0xbfc55555
+ .long 0xff5cc6fd,0xbfdfffff
+ .type L(DP_SINCOS2_0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SINCOS2_0))
+
+ .p2align 4
+L(DP_SINCOS2_1):
+ .long 0x75cec8c5,0x3f8110f4
+ .long 0xb178dac5,0x3fa55514
+ .type L(DP_SINCOS2_1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SINCOS2_1))
+
+
+ .p2align 3
+L(DP_ZERONE):
+ .long 0x00000000,0x00000000 /* 0.0 */
+ .long 0x00000000,0xbff00000 /* 1.0 */
+ .type L(DP_ZERONE), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+
+ .p2align 3
+L(DP_ONES):
+ .long 0x00000000,0x3ff00000 /* +1.0 */
+ .long 0x00000000,0xbff00000 /* -1.0 */
+ .type L(DP_ONES), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ONES))
+
+/* Coefficients of polynomials for */
+/* sin(t)~=t+t*t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))) in low DP part, */
+/* cos(t)~=1+1*t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))) in high DP part, */
+/* for |t|<Pi/4. */
+ .p2align 4
+L(DP_SC4):
+ .long 0x1674b58a,0xbe5a947e
+ .long 0xdd8844d7,0xbe923c97
+ .type L(DP_SC4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC4))
+
+ .p2align 4
+L(DP_SC3):
+ .long 0x64e6b5b4,0x3ec71d72
+ .long 0x9ac43cc0,0x3efa00eb
+ .type L(DP_SC3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC3))
+
+ .p2align 4
+L(DP_SC2):
+ .long 0x8b4bd1f9,0xbf2a019f
+ .long 0x348b6874,0xbf56c16b
+ .type L(DP_SC2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC2))
+
+ .p2align 4
+L(DP_SC1):
+ .long 0x10c2688b,0x3f811111
+ .long 0x545c50c7,0x3fa55555
+ .type L(DP_SC1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC1))
+
+ .p2align 4
+L(DP_SC0):
+ .long 0x55551cd9,0xbfc55555
+ .long 0xfffe98ae,0xbfdfffff
+ .type L(DP_SC0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SC0))
+
+ .p2align 3
+L(DP_SMALL):
+ .long 0x00000000,0x3cd00000 /* 2^(-50) */
+ .type L(DP_SMALL), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SMALL))
+
+ .p2align 3
+L(DP_PIO4):
+ .long 0x54442d18,0x3fe921fb /* Pi/4 */
+ .type L(DP_PIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+
+ .p2align 3
+L(DP_2POW52):
+ .long 0x00000000,0x43300000 /* +2^52 */
+ .long 0x00000000,0xc3300000 /* -2^52 */
+ .type L(DP_2POW52), @object
+ ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+
+ .p2align 3
+L(DP_INVPIO4):
+ .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+ .type L(DP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+
+ .p2align 3
+L(DP_PIO4HI):
+ .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+ .type L(DP_PIO4HI), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+
+ .p2align 3
+L(DP_PIO4LO):
+ .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+ .type L(DP_PIO4LO), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+
+ .p2align 2
+L(SP_INVPIO4):
+ .long 0x3fa2f983 /* 4/Pi */
+ .type L(SP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+
+ .p2align 4
+L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+ .long 0xffffffff,0x7fffffff
+ .long 0xffffffff,0x7fffffff
+ .type L(DP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+
+ .p2align 3
+L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+ .long 0x00000000,0xffffffff
+ .type L(DP_HI_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+
+ .p2align 4
+L(SP_ABS_MASK): /* Mask for getting SP absolute value */
+ .long 0x7fffffff,0x7fffffff
+ .long 0x7fffffff,0x7fffffff
+ .type L(SP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ABS_MASK))
+
+ .p2align 2
+L(SP_ONE):
+ .long 0x3f800000 /* 1.0 */
+ .type L(SP_ONE), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ONE))
+
+weak_alias(__sincosf, sincosf)
diff --git a/sysdeps/x86_64/fpu/s_sinf.S b/sysdeps/x86_64/fpu/s_sinf.S
new file mode 100644
index 0000000000..9a6c87ff79
--- /dev/null
+++ b/sysdeps/x86_64/fpu/s_sinf.S
@@ -0,0 +1,553 @@
+/* Optimized sinf function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+#define __need_Emath
+#include <bits/errno.h>
+
+/* Short algorithm description:
+ *
+ * 1) if |x| == 0: return x.
+ * 2) if |x| < 2^-27: return x-x*DP_SMALL, raise underflow only when needed.
+ * 3) if |x| < 2^-5 : return x+x^3*DP_SIN2_0+x^5*DP_SIN2_1.
+ * 4) if |x| < Pi/4: return x+x^3*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))).
+ * 5) if |x| < 9*Pi/4:
+ * 5.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0x0e, n=k+1,
+ * t=|x|-j*Pi/4.
+ * 5.2) Reconstruction:
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * if(n&2 != 0) {
+ * using cos(t) polynomial for |t|<Pi/4, result is
+ * s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4))))).
+ * } else {
+ * using sin(t) polynomial for |t|<Pi/4, result is
+ * s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4))))).
+ * }
+ * 6) if |x| < 2^23, large args:
+ * 6.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
+ * t=|x|-j*Pi/4.
+ * 6.2) Reconstruction same as (5.2).
+ * 7) if |x| >= 2^23, very large args:
+ * 7.1) Range reduction: k=trunc(|x|/(Pi/4)), j=(k+1)&0xfffffffe, n=k+1,
+ * t=|x|-j*Pi/4.
+ * 7.2) Reconstruction same as (5.2).
+ * 8) if x is Inf, return x-x, and set errno=EDOM.
+ * 9) if x is NaN, return x-x.
+ *
+ * Special cases:
+ * sin(+-0) = +-0 not raising inexact/underflow,
+ * sin(subnormal) raises inexact/underflow,
+ * sin(min_normalized) raises inexact/underflow,
+ * sin(normalized) raises inexact,
+ * sin(Inf) = NaN, raises invalid, sets errno to EDOM,
+ * sin(NaN) = NaN.
+ */
+
+ .text
+ENTRY(__sinf)
+ /* Input: single precision x in %xmm0 */
+
+ movd %xmm0, %eax /* Bits of x */
+ movaps %xmm0, %xmm7 /* Copy of x */
+ cvtss2sd %xmm0, %xmm0 /* DP x */
+ movss L(SP_ABS_MASK)(%rip), %xmm3
+ movl %eax, %edi /* Copy of x bits */
+ andl $0x7fffffff, %eax /* |x| */
+
+ cmpl $0x3f490fdb, %eax /* |x|<Pi/4? */
+ jb L(arg_less_pio4)
+
+ /* Here if |x|>=Pi/4 */
+ andps %xmm7, %xmm3 /* SP |x| */
+ andpd L(DP_ABS_MASK)(%rip),%xmm0 /* DP |x| */
+ movss L(SP_INVPIO4)(%rip), %xmm2 /* SP 1/(Pi/4) */
+
+ cmpl $0x40e231d6, %eax /* |x|<9*Pi/4? */
+ jae L(large_args)
+
+ /* Here if Pi/4<=|x|<9*Pi/4 */
+ mulss %xmm3, %xmm2 /* SP |x|/(Pi/4) */
+ movl %edi, %ecx /* Load x */
+ cvttss2si %xmm2, %eax /* k, number of Pi/4 in x */
+ lea L(PIO4J)(%rip), %rsi
+ shrl $31, %ecx /* sign of x */
+ addl $1, %eax /* k+1 */
+ movl $0x0e, %edx
+ andl %eax, %edx /* j = (k+1)&0x0e */
+ subsd (%rsi,%rdx,8), %xmm0 /* t = |x| - j * Pi/4 */
+
+L(reconstruction):
+ /* Input: %eax=n, %xmm0=t, %ecx=sign(x) */
+ testl $2, %eax /* n&2 != 0? */
+ jz L(sin_poly)
+
+/*L(cos_poly):*/
+ /* Here if sin(x) calculated using cos(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * (1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))))
+ */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd L(DP_C4)(%rip), %xmm4 /* C4 */
+ mulsd %xmm0, %xmm4 /* z*C4 */
+ xorl %eax, %ecx /* (-1.0)^((n>>2)&1) XOR sign(x) */
+ movsd L(DP_C3)(%rip), %xmm3 /* C3 */
+ mulsd %xmm0, %xmm3 /* z*C3 */
+ lea L(DP_ONES)(%rip), %rsi
+ addsd L(DP_C2)(%rip), %xmm4 /* C2+z*C4 */
+ mulsd %xmm0, %xmm4 /* z*(C2+z*C4) */
+ addsd L(DP_C1)(%rip), %xmm3 /* C1+z*C3 */
+ mulsd %xmm0, %xmm3 /* z*(C1+z*C3) */
+ addsd L(DP_C0)(%rip), %xmm4 /* C0+z*(C2+z*C4) */
+ mulsd %xmm1, %xmm4 /* y*(C0+z*(C2+z*C4)) */
+
+ /* y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd %xmm4, %xmm3
+ /* 1.0+y*(C0+y*(C1+y*(C2+y*(C3+y*C4)))) */
+ addsd L(DP_ONES)(%rip), %xmm3
+
+ mulsd (%rsi,%rcx,8), %xmm3 /* DP result */
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(sin_poly):
+ /* Here if sin(x) calculated using sin(t) polynomial for |t|<Pi/4:
+ * y = t*t; z = y*y;
+ * s = sign(x) * (-1.0)^((n>>2)&1)
+ * result = s * t * (1.0+t^2*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))))
+ */
+
+ movaps %xmm0, %xmm4 /* t */
+ shrl $2, %eax /* n>>2 */
+ mulsd %xmm0, %xmm0 /* y=t^2 */
+ andl $1, %eax /* (n>>2)&1 */
+ movaps %xmm0, %xmm1 /* y */
+ xorl %eax, %ecx /* (-1.0)^((n>>2)&1) XOR sign(x) */
+ mulsd %xmm0, %xmm0 /* z=t^4 */
+
+ movsd L(DP_S4)(%rip), %xmm2 /* S4 */
+ mulsd %xmm0, %xmm2 /* z*S4 */
+ movsd L(DP_S3)(%rip), %xmm3 /* S3 */
+ mulsd %xmm0, %xmm3 /* z*S3 */
+ lea L(DP_ONES)(%rip), %rsi
+ addsd L(DP_S2)(%rip), %xmm2 /* S2+z*S4 */
+ mulsd %xmm0, %xmm2 /* z*(S2+z*S4) */
+ addsd L(DP_S1)(%rip), %xmm3 /* S1+z*S3 */
+ mulsd %xmm0, %xmm3 /* z*(S1+z*S3) */
+ addsd L(DP_S0)(%rip), %xmm2 /* S0+z*(S2+z*S4) */
+ mulsd %xmm1, %xmm2 /* y*(S0+z*(S2+z*S4)) */
+ /* t*s, where s = sign(x) * (-1.0)^((n>>2)&1) */
+ mulsd (%rsi,%rcx,8), %xmm4
+ /* y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm2, %xmm3
+ /* t*s*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ mulsd %xmm4, %xmm3
+ /* t*s*(1.0+y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm4, %xmm3
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(large_args):
+ /* Here if |x|>=9*Pi/4 */
+ cmpl $0x7f800000, %eax /* x is Inf or NaN? */
+ jae L(arg_inf_or_nan)
+
+ /* Here if finite |x|>=9*Pi/4 */
+ cmpl $0x4b000000, %eax /* |x|<2^23? */
+ jae L(very_large_args)
+
+ /* Here if 9*Pi/4<=|x|<2^23 */
+ movsd L(DP_INVPIO4)(%rip), %xmm1 /* 1/(Pi/4) */
+ mulsd %xmm0, %xmm1 /* |x|/(Pi/4) */
+ cvttsd2si %xmm1, %eax /* k=trunc(|x|/(Pi/4)) */
+ addl $1, %eax /* k+1 */
+ movl %eax, %edx
+ andl $0xfffffffe, %edx /* j=(k+1)&0xfffffffe */
+ cvtsi2sdl %edx, %xmm4 /* DP j */
+ movl %edi, %ecx /* Load x */
+ movsd L(DP_PIO4HI)(%rip), %xmm2 /* -PIO4HI = high part of -Pi/4 */
+ shrl $31, %ecx /* sign bit of x */
+ mulsd %xmm4, %xmm2 /* -j*PIO4HI */
+ movsd L(DP_PIO4LO)(%rip), %xmm3 /* -PIO4LO = low part of -Pi/4 */
+ addsd %xmm2, %xmm0 /* |x| - j*PIO4HI */
+ mulsd %xmm3, %xmm4 /* j*PIO4LO */
+ addsd %xmm4, %xmm0 /* t = |x| - j*PIO4HI - j*PIO4LO */
+ jmp L(reconstruction)
+
+ .p2align 4
+L(very_large_args):
+ /* Here if finite |x|>=2^23 */
+
+ /* bitpos = (ix>>23) - BIAS_32 + 59; */
+ shrl $23, %eax /* eb = biased exponent of x */
+ /* bitpos = eb - 0x7f + 59, where 0x7f is exponent bias */
+ subl $68, %eax
+ movl $28, %ecx /* %cl=28 */
+ movl %eax, %edx /* bitpos copy */
+
+ /* j = bitpos/28; */
+ div %cl /* j in register %al=%ax/%cl */
+ movapd %xmm0, %xmm3 /* |x| */
+ /* clear unneeded remainder from %ah */
+ andl $0xff, %eax
+
+ imull $28, %eax, %ecx /* j*28 */
+ lea L(_FPI)(%rip), %rsi
+ movsd L(DP_HI_MASK)(%rip), %xmm4 /* DP_HI_MASK */
+ movapd %xmm0, %xmm5 /* |x| */
+ mulsd -16(%rsi,%rax,8), %xmm3 /* tmp3 = FPI[j-2]*|x| */
+ movapd %xmm0, %xmm1 /* |x| */
+ mulsd -8(%rsi,%rax,8), %xmm5 /* tmp2 = FPI[j-1]*|x| */
+ mulsd (%rsi,%rax,8), %xmm0 /* tmp0 = FPI[j]*|x| */
+ addl $19, %ecx /* j*28+19 */
+ mulsd 8(%rsi,%rax,8), %xmm1 /* tmp1 = FPI[j+1]*|x| */
+ cmpl %ecx, %edx /* bitpos>=j*28+19? */
+ jl L(very_large_skip1)
+
+ /* Here if bitpos>=j*28+19 */
+ andpd %xmm3, %xmm4 /* HI(tmp3) */
+ subsd %xmm4, %xmm3 /* tmp3 = tmp3 - HI(tmp3) */
+L(very_large_skip1):
+
+ movsd L(DP_2POW52)(%rip), %xmm6
+ movapd %xmm5, %xmm2 /* tmp2 copy */
+ addsd %xmm3, %xmm5 /* tmp5 = tmp3 + tmp2 */
+ movl $1, %edx
+ addsd %xmm5, %xmm6 /* tmp6 = tmp5 + 2^52 */
+ movsd 8+L(DP_2POW52)(%rip), %xmm4
+ movd %xmm6, %eax /* k = I64_LO(tmp6); */
+ addsd %xmm6, %xmm4 /* tmp4 = tmp6 - 2^52 */
+ movl %edi, %ecx /* Load x */
+ comisd %xmm5, %xmm4 /* tmp4 > tmp5? */
+ jbe L(very_large_skip2)
+
+ /* Here if tmp4 > tmp5 */
+ subl $1, %eax /* k-- */
+ addsd 8+L(DP_ONES)(%rip), %xmm4 /* tmp4 -= 1.0 */
+L(very_large_skip2):
+
+ andl %eax, %edx /* k&1 */
+ lea L(DP_ZERONE)(%rip), %rsi
+ subsd %xmm4, %xmm3 /* tmp3 -= tmp4 */
+ addsd (%rsi,%rdx,8), %xmm3 /* t = DP_ZERONE[k&1] + tmp3 */
+ addsd %xmm2, %xmm3 /* t += tmp2 */
+ shrl $31, %ecx /* sign of x */
+ addsd %xmm3, %xmm0 /* t += tmp0 */
+ addl $1, %eax /* n=k+1 */
+ addsd %xmm1, %xmm0 /* t += tmp1 */
+ mulsd L(DP_PIO4)(%rip), %xmm0 /* t *= PI04 */
+
+ jmp L(reconstruction) /* end of very_large_args peth */
+
+ .p2align 4
+L(arg_less_pio4):
+ /* Here if |x|<Pi/4 */
+ cmpl $0x3d000000, %eax /* |x|<2^-5? */
+ jl L(arg_less_2pn5)
+
+ /* Here if 2^-5<=|x|<Pi/4 */
+ movaps %xmm0, %xmm3 /* x */
+ mulsd %xmm0, %xmm0 /* y=x^2 */
+ movaps %xmm0, %xmm1 /* y */
+ mulsd %xmm0, %xmm0 /* z=x^4 */
+ movsd L(DP_S4)(%rip), %xmm4 /* S4 */
+ mulsd %xmm0, %xmm4 /* z*S4 */
+ movsd L(DP_S3)(%rip), %xmm5 /* S3 */
+ mulsd %xmm0, %xmm5 /* z*S3 */
+ addsd L(DP_S2)(%rip), %xmm4 /* S2+z*S4 */
+ mulsd %xmm0, %xmm4 /* z*(S2+z*S4) */
+ addsd L(DP_S1)(%rip), %xmm5 /* S1+z*S3 */
+ mulsd %xmm0, %xmm5 /* z*(S1+z*S3) */
+ addsd L(DP_S0)(%rip), %xmm4 /* S0+z*(S2+z*S4) */
+ mulsd %xmm1, %xmm4 /* y*(S0+z*(S2+z*S4)) */
+ mulsd %xmm3, %xmm5 /* x*z*(S1+z*S3) */
+ mulsd %xmm3, %xmm4 /* x*y*(S0+z*(S2+z*S4)) */
+ /* x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm5, %xmm4
+ /* x + x*y*(S0+y*(S1+y*(S2+y*(S3+y*S4)))) */
+ addsd %xmm4, %xmm3
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(arg_less_2pn5):
+ /* Here if |x|<2^-5 */
+ cmpl $0x32000000, %eax /* |x|<2^-27? */
+ jl L(arg_less_2pn27)
+
+ /* Here if 2^-27<=|x|<2^-5 */
+ movaps %xmm0, %xmm1 /* DP x */
+ mulsd %xmm0, %xmm0 /* DP x^2 */
+ movsd L(DP_SIN2_1)(%rip), %xmm3 /* DP DP_SIN2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_SIN2_1 */
+ addsd L(DP_SIN2_0)(%rip), %xmm3 /* DP DP_SIN2_0+x^2*DP_SIN2_1 */
+ mulsd %xmm0, %xmm3 /* DP x^2*DP_SIN2_0+x^4*DP_SIN2_1 */
+ mulsd %xmm1, %xmm3 /* DP x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ addsd %xmm1, %xmm3 /* DP x+x^3*DP_SIN2_0+x^5*DP_SIN2_1 */
+ cvtsd2ss %xmm3, %xmm0 /* SP result */
+ ret
+
+ .p2align 4
+L(arg_less_2pn27):
+ cmpl $0, %eax /* x=0? */
+ je L(arg_zero) /* in case x=0 return sin(+-0)==+-0 */
+ /* Here if |x|<2^-27 */
+ /*
+ * Special cases here:
+ * sin(subnormal) raises inexact/underflow
+ * sin(min_normalized) raises inexact/underflow
+ * sin(normalized) raises inexact
+ */
+ movaps %xmm0, %xmm3 /* Copy of DP x */
+ mulsd L(DP_SMALL)(%rip), %xmm0 /* x*DP_SMALL */
+ subsd %xmm0, %xmm3 /* Result is x-x*DP_SMALL */
+ cvtsd2ss %xmm3, %xmm0 /* Result converted to SP */
+ ret
+
+ .p2align 4
+L(arg_zero):
+ movaps %xmm7, %xmm0 /* SP x */
+ ret
+
+ .p2align 4
+L(arg_inf_or_nan):
+ /* Here if |x| is Inf or NAN */
+ jne L(skip_errno_setting) /* in case of x is NaN */
+
+ /* Here if x is Inf. Set errno to EDOM. */
+ call JUMPTARGET(__errno_location)
+ movl $EDOM, (%rax)
+
+ .p2align 4
+L(skip_errno_setting):
+ /* Here if |x| is Inf or NAN. Continued. */
+ movaps %xmm7, %xmm0 /* load x */
+ subss %xmm0, %xmm0 /* Result is NaN */
+ ret
+END(__sinf)
+
+ .section .rodata, "a"
+ .p2align 3
+L(PIO4J): /* Table of j*Pi/4, for j=0,1,..,10 */
+ .long 0x00000000,0x00000000
+ .long 0x54442d18,0x3fe921fb
+ .long 0x54442d18,0x3ff921fb
+ .long 0x7f3321d2,0x4002d97c
+ .long 0x54442d18,0x400921fb
+ .long 0x2955385e,0x400f6a7a
+ .long 0x7f3321d2,0x4012d97c
+ .long 0xe9bba775,0x4015fdbb
+ .long 0x54442d18,0x401921fb
+ .long 0xbeccb2bb,0x401c463a
+ .long 0x2955385e,0x401f6a7a
+ .type L(PIO4J), @object
+ ASM_SIZE_DIRECTIVE(L(PIO4J))
+
+ .p2align 3
+L(_FPI): /* 4/Pi broken into sum of positive DP values */
+ .long 0x00000000,0x00000000
+ .long 0x6c000000,0x3ff45f30
+ .long 0x2a000000,0x3e3c9c88
+ .long 0xa8000000,0x3c54fe13
+ .long 0xd0000000,0x3aaf47d4
+ .long 0x6c000000,0x38fbb81b
+ .long 0xe0000000,0x3714acc9
+ .long 0x7c000000,0x3560e410
+ .long 0x56000000,0x33bca2c7
+ .long 0xac000000,0x31fbd778
+ .long 0xe0000000,0x300b7246
+ .long 0xe8000000,0x2e5d2126
+ .long 0x48000000,0x2c970032
+ .long 0xe8000000,0x2ad77504
+ .long 0xe0000000,0x290921cf
+ .long 0xb0000000,0x274deb1c
+ .long 0xe0000000,0x25829a73
+ .long 0xbe000000,0x23fd1046
+ .long 0x10000000,0x2224baed
+ .long 0x8e000000,0x20709d33
+ .long 0x80000000,0x1e535a2f
+ .long 0x64000000,0x1cef904e
+ .long 0x30000000,0x1b0d6398
+ .long 0x24000000,0x1964ce7d
+ .long 0x16000000,0x17b908bf
+ .type L(_FPI), @object
+ ASM_SIZE_DIRECTIVE(L(_FPI))
+
+/* Coefficients of polynomial
+ for sin(x)~=x+x^3*DP_SIN2_0+x^5*DP_SIN2_1, |x|<2^-5. */
+ .p2align 3
+L(DP_SIN2_0):
+ .long 0x5543d49d,0xbfc55555
+ .type L(DP_SIN2_0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SIN2_0))
+
+ .p2align 3
+L(DP_SIN2_1):
+ .long 0x75cec8c5,0x3f8110f4
+ .type L(DP_SIN2_1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SIN2_1))
+
+ .p2align 3
+L(DP_ZERONE):
+ .long 0x00000000,0x00000000 /* 0.0 */
+ .long 0x00000000,0xbff00000 /* 1.0 */
+ .type L(DP_ZERONE), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ZERONE))
+
+ .p2align 3
+L(DP_ONES):
+ .long 0x00000000,0x3ff00000 /* +1.0 */
+ .long 0x00000000,0xbff00000 /* -1.0 */
+ .type L(DP_ONES), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ONES))
+
+/* Coefficients of polynomial
+ for sin(t)~=t+t^3*(S0+t^2*(S1+t^2*(S2+t^2*(S3+t^2*S4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_S3):
+ .long 0x64e6b5b4,0x3ec71d72
+ .type L(DP_S3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S3))
+
+ .p2align 3
+L(DP_S1):
+ .long 0x10c2688b,0x3f811111
+ .type L(DP_S1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S1))
+
+ .p2align 3
+L(DP_S4):
+ .long 0x1674b58a,0xbe5a947e
+ .type L(DP_S4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S4))
+
+ .p2align 3
+L(DP_S2):
+ .long 0x8b4bd1f9,0xbf2a019f
+ .type L(DP_S2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S2))
+
+ .p2align 3
+L(DP_S0):
+ .long 0x55551cd9,0xbfc55555
+ .type L(DP_S0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_S0))
+
+ .p2align 3
+L(DP_SMALL):
+ .long 0x00000000,0x3cd00000 /* 2^(-50) */
+ .type L(DP_SMALL), @object
+ ASM_SIZE_DIRECTIVE(L(DP_SMALL))
+
+/* Coefficients of polynomial
+ for cos(t)~=1.0+t^2*(C0+t^2*(C1+t^2*(C2+t^2*(C3+t^2*C4)))), |t|<Pi/4. */
+ .p2align 3
+L(DP_C3):
+ .long 0x9ac43cc0,0x3efa00eb
+ .type L(DP_C3), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C3))
+
+ .p2align 3
+L(DP_C1):
+ .long 0x545c50c7,0x3fa55555
+ .type L(DP_C1), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C1))
+
+ .p2align 3
+L(DP_C4):
+ .long 0xdd8844d7,0xbe923c97
+ .type L(DP_C4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C4))
+
+ .p2align 3
+L(DP_C2):
+ .long 0x348b6874,0xbf56c16b
+ .type L(DP_C2), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C2))
+
+ .p2align 3
+L(DP_C0):
+ .long 0xfffe98ae,0xbfdfffff
+ .type L(DP_C0), @object
+ ASM_SIZE_DIRECTIVE(L(DP_C0))
+
+ .p2align 3
+L(DP_PIO4):
+ .long 0x54442d18,0x3fe921fb /* Pi/4 */
+ .type L(DP_PIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4))
+
+ .p2align 3
+L(DP_2POW52):
+ .long 0x00000000,0x43300000 /* +2^52 */
+ .long 0x00000000,0xc3300000 /* -2^52 */
+ .type L(DP_2POW52), @object
+ ASM_SIZE_DIRECTIVE(L(DP_2POW52))
+
+ .p2align 3
+L(DP_INVPIO4):
+ .long 0x6dc9c883,0x3ff45f30 /* 4/Pi */
+ .type L(DP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(DP_INVPIO4))
+
+ .p2align 3
+L(DP_PIO4HI):
+ .long 0x54000000,0xbfe921fb /* High part of Pi/4 */
+ .type L(DP_PIO4HI), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4HI))
+
+ .p2align 3
+L(DP_PIO4LO):
+ .long 0x11A62633,0xbe010b46 /* Low part of Pi/4 */
+ .type L(DP_PIO4LO), @object
+ ASM_SIZE_DIRECTIVE(L(DP_PIO4LO))
+
+ .p2align 2
+L(SP_INVPIO4):
+ .long 0x3fa2f983 /* 4/Pi */
+ .type L(SP_INVPIO4), @object
+ ASM_SIZE_DIRECTIVE(L(SP_INVPIO4))
+
+ .p2align 4
+L(DP_ABS_MASK): /* Mask for getting DP absolute value */
+ .long 0xffffffff,0x7fffffff
+ .long 0xffffffff,0x7fffffff
+ .type L(DP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(DP_ABS_MASK))
+
+ .p2align 3
+L(DP_HI_MASK): /* Mask for getting high 21 bits of DP value */
+ .long 0x00000000,0xffffffff
+ .type L(DP_HI_MASK),@object
+ ASM_SIZE_DIRECTIVE(L(DP_HI_MASK))
+
+ .p2align 4
+L(SP_ABS_MASK): /* Mask for getting SP absolute value */
+ .long 0x7fffffff,0x7fffffff
+ .long 0x7fffffff,0x7fffffff
+ .type L(SP_ABS_MASK), @object
+ ASM_SIZE_DIRECTIVE(L(SP_ABS_MASK))
+
+weak_alias(__sinf, sinf)
diff --git a/sysdeps/x86_64/multiarch/bcopy.S b/sysdeps/x86_64/multiarch/bcopy.S
index 11e250f1cb..639f02bde3 100644
--- a/sysdeps/x86_64/multiarch/bcopy.S
+++ b/sysdeps/x86_64/multiarch/bcopy.S
@@ -3,5 +3,5 @@
.text
ENTRY(bcopy)
xchg %rdi, %rsi
- jmp HIDDEN_BUILTIN_JUMPTARGET(memmove)
+ jmp __libc_memmove /* Branch to IFUNC memmove. */
END(bcopy)
diff --git a/sysdeps/x86_64/multiarch/bzero.S b/sysdeps/x86_64/multiarch/bzero.S
index 92e9fcfc76..23beab7a39 100644
--- a/sysdeps/x86_64/multiarch/bzero.S
+++ b/sysdeps/x86_64/multiarch/bzero.S
@@ -1,5 +1,5 @@
-/* Multiple versions of bzero
- Copyright (C) 2010 Free Software Foundation, Inc.
+/* bzero. x86-64 version.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,35 +21,8 @@
.text
ENTRY(__bzero)
- .type __bzero, @gnu_indirect_function
- cmpl $0, __cpu_features+KIND_OFFSET(%rip)
- jne 1f
- call __init_cpu_features
-1: leaq __bzero_x86_64(%rip), %rax
- testl $bit_Prefer_SSE_for_memop, __cpu_features+FEATURE_OFFSET+index_Prefer_SSE_for_memop(%rip)
- jz 2f
- leaq __bzero_sse2(%rip), %rax
-2: ret
-END(__bzero)
-
- .type __bzero_sse2, @function
-__bzero_sse2:
- cfi_startproc
- CALL_MCOUNT
mov %rsi,%rdx /* Adjust parameter. */
xorl %esi,%esi /* Fill with 0s. */
- jmp __memset_sse2
- cfi_endproc
- .size __bzero_sse2, .-__bzero_sse2
-
- .type __bzero_x86_64, @function
-__bzero_x86_64:
- cfi_startproc
- CALL_MCOUNT
- mov %rsi,%rdx /* Adjust parameter. */
- xorl %esi,%esi /* Fill with 0s. */
- jmp __memset_x86_64
- cfi_endproc
- .size __bzero_x86_64, .-__bzero_x86_64
-
+ jmp __libc_memset /* Branch to IFUNC memset. */
+END(__bzero)
weak_alias (__bzero, bzero)
diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
new file mode 100644
index 0000000000..332a60d9c5
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
@@ -0,0 +1,283 @@
+/* Enumerate available IFUNC implementations of a function. x86-64 version.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <assert.h>
+#include <string.h>
+#include <wchar.h>
+#include <ifunc-impl-list.h>
+#include "init-arch.h"
+
+/* Maximum number of IFUNC implementations. */
+#define MAX_IFUNC 4
+
+/* Fill ARRAY of MAX elements with IFUNC implementations for function
+ NAME supported on target machine and return the number of valid
+ entries. */
+
+size_t
+__libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
+ size_t max)
+{
+ assert (max >= MAX_IFUNC);
+
+ size_t i = 0;
+
+ /* Support sysdeps/x86_64/multiarch/memcmp.S. */
+ IFUNC_IMPL (i, name, memcmp,
+ IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSE4_1,
+ __memcmp_sse4_1)
+ IFUNC_IMPL_ADD (array, i, memcmp, HAS_SSSE3, __memcmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/memmove_chk.S. */
+ IFUNC_IMPL (i, name, __memmove_chk,
+ IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3,
+ __memmove_chk_ssse3_back)
+ IFUNC_IMPL_ADD (array, i, __memmove_chk, HAS_SSSE3,
+ __memmove_chk_ssse3)
+ IFUNC_IMPL_ADD (array, i, __memmove_chk, 1,
+ __memmove_chk_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/memmove.S. */
+ IFUNC_IMPL (i, name, memmove,
+ IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3,
+ __memmove_ssse3_back)
+ IFUNC_IMPL_ADD (array, i, memmove, HAS_SSSE3,
+ __memmove_ssse3)
+ IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/memset_chk.S. */
+ IFUNC_IMPL (i, name, __memset_chk,
+ IFUNC_IMPL_ADD (array, i, __memset_chk, 1, __memset_chk_sse2)
+ IFUNC_IMPL_ADD (array, i, __memset_chk, 1,
+ __memset_chk_x86_64))
+
+ /* Support sysdeps/x86_64/multiarch/memset.S. */
+ IFUNC_IMPL (i, name, memset,
+ IFUNC_IMPL_ADD (array, i, memset, 1, __memset_sse2)
+ IFUNC_IMPL_ADD (array, i, memset, 1, __memset_x86_64))
+
+ /* Support sysdeps/x86_64/multiarch/rawmemchr.S. */
+ IFUNC_IMPL (i, name, rawmemchr,
+ IFUNC_IMPL_ADD (array, i, rawmemchr, HAS_SSE4_2,
+ __rawmemchr_sse42)
+ IFUNC_IMPL_ADD (array, i, rawmemchr, 1, __rawmemchr_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/stpncpy.S. */
+ IFUNC_IMPL (i, name, stpncpy,
+ IFUNC_IMPL_ADD (array, i, stpncpy, HAS_SSSE3,
+ __stpncpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, stpncpy, 1,
+ __stpncpy_sse2_unaligned)
+ IFUNC_IMPL_ADD (array, i, stpncpy, 1, __stpncpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/stpcpy.S. */
+ IFUNC_IMPL (i, name, stpcpy,
+ IFUNC_IMPL_ADD (array, i, stpcpy, HAS_SSSE3, __stpcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2_unaligned)
+ IFUNC_IMPL_ADD (array, i, stpcpy, 1, __stpcpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcasecmp_l.S. */
+ IFUNC_IMPL (i, name, strcasecmp,
+ IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_AVX,
+ __strcasecmp_avx)
+ IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSE4_2,
+ __strcasecmp_sse42)
+ IFUNC_IMPL_ADD (array, i, strcasecmp, HAS_SSSE3,
+ __strcasecmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcasecmp, 1, __strcasecmp_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcasecmp_l.S. */
+ IFUNC_IMPL (i, name, strcasecmp_l,
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_AVX,
+ __strcasecmp_l_avx)
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSE4_2,
+ __strcasecmp_l_sse42)
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, HAS_SSSE3,
+ __strcasecmp_l_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcasecmp_l, 1,
+ __strcasecmp_l_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcasestr.c. */
+ IFUNC_IMPL (i, name, strcasestr,
+ IFUNC_IMPL_ADD (array, i, strcasestr, HAS_SSE4_2,
+ __strcasestr_sse42)
+ IFUNC_IMPL_ADD (array, i, strcasestr, 1, __strcasestr_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcat.S. */
+ IFUNC_IMPL (i, name, strcat,
+ IFUNC_IMPL_ADD (array, i, strcat, HAS_SSSE3, __strcat_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2_unaligned)
+ IFUNC_IMPL_ADD (array, i, strcat, 1, __strcat_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strchr.S. */
+ IFUNC_IMPL (i, name, strchr,
+ IFUNC_IMPL_ADD (array, i, strchr, HAS_SSE4_2, __strchr_sse42)
+ IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_sse2_no_bsf)
+ IFUNC_IMPL_ADD (array, i, strchr, 1, __strchr_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcmp.S. */
+ IFUNC_IMPL (i, name, strcmp,
+ IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSE4_2, __strcmp_sse42)
+ IFUNC_IMPL_ADD (array, i, strcmp, HAS_SSSE3, __strcmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcmp, 1, __strcmp_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcpy.S. */
+ IFUNC_IMPL (i, name, strcpy,
+ IFUNC_IMPL_ADD (array, i, strcpy, HAS_SSSE3, __strcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2_unaligned)
+ IFUNC_IMPL_ADD (array, i, strcpy, 1, __strcpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strcspn.S. */
+ IFUNC_IMPL (i, name, strcspn,
+ IFUNC_IMPL_ADD (array, i, strcspn, HAS_SSE4_2,
+ __strcspn_sse42)
+ IFUNC_IMPL_ADD (array, i, strcspn, 1, __strcspn_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strncase_l.S. */
+ IFUNC_IMPL (i, name, strncasecmp,
+ IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_AVX,
+ __strncasecmp_avx)
+ IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSE4_2,
+ __strncasecmp_sse42)
+ IFUNC_IMPL_ADD (array, i, strncasecmp, HAS_SSSE3,
+ __strncasecmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncasecmp, 1,
+ __strncasecmp_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strncase_l.S. */
+ IFUNC_IMPL (i, name, strncasecmp_l,
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l, HAS_AVX,
+ __strncasecmp_l_avx)
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l, HAS_SSE4_2,
+ __strncasecmp_l_sse42)
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l, HAS_SSSE3,
+ __strncasecmp_l_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncasecmp_l, 1,
+ __strncasecmp_l_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strncat.S. */
+ IFUNC_IMPL (i, name, strncat,
+ IFUNC_IMPL_ADD (array, i, strncat, HAS_SSSE3,
+ __strncat_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncat, 1,
+ __strncat_sse2_unaligned)
+ IFUNC_IMPL_ADD (array, i, strncat, 1, __strncat_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strncpy.S. */
+ IFUNC_IMPL (i, name, strncpy,
+ IFUNC_IMPL_ADD (array, i, strncpy, HAS_SSSE3,
+ __strncpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncpy, 1,
+ __strncpy_sse2_unaligned)
+ IFUNC_IMPL_ADD (array, i, strncpy, 1, __strncpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strnlen.S. */
+ IFUNC_IMPL (i, name, strnlen,
+ IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2_no_bsf)
+ IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strpbrk.S. */
+ IFUNC_IMPL (i, name, strpbrk,
+ IFUNC_IMPL_ADD (array, i, strpbrk, HAS_SSE4_2,
+ __strpbrk_sse42)
+ IFUNC_IMPL_ADD (array, i, strpbrk, 1, __strpbrk_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strrchr.S. */
+ IFUNC_IMPL (i, name, strrchr,
+ IFUNC_IMPL_ADD (array, i, strrchr, HAS_SSE4_2,
+ __strrchr_sse42)
+ IFUNC_IMPL_ADD (array, i, strrchr, 1, __strrchr_sse2_no_bsf)
+ IFUNC_IMPL_ADD (array, i, strrchr, 1, __strrchr_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strspn.S. */
+ IFUNC_IMPL (i, name, strspn,
+ IFUNC_IMPL_ADD (array, i, strspn, HAS_SSE4_2, __strspn_sse42)
+ IFUNC_IMPL_ADD (array, i, strspn, 1, __strspn_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strstr-c.c. */
+ IFUNC_IMPL (i, name, strstr,
+ IFUNC_IMPL_ADD (array, i, strstr, HAS_SSE4_2, __strstr_sse42)
+ IFUNC_IMPL_ADD (array, i, strstr, 1, __strstr_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/wcscpy.S. */
+ IFUNC_IMPL (i, name, wcscpy,
+ IFUNC_IMPL_ADD (array, i, wcscpy, HAS_SSSE3, __wcscpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, wcscpy, 1, __wcscpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/wmemcmp.S. */
+ IFUNC_IMPL (i, name, wmemcmp,
+ IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSE4_1,
+ __wmemcmp_sse4_1)
+ IFUNC_IMPL_ADD (array, i, wmemcmp, HAS_SSSE3,
+ __wmemcmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, wmemcmp, 1, __wmemcmp_sse2))
+
+#ifdef SHARED
+ /* Support sysdeps/x86_64/multiarch/memcpy_chk.S. */
+ IFUNC_IMPL (i, name, __memcpy_chk,
+ IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3,
+ __memcpy_chk_ssse3_back)
+ IFUNC_IMPL_ADD (array, i, __memcpy_chk, HAS_SSSE3,
+ __memcpy_chk_ssse3)
+ IFUNC_IMPL_ADD (array, i, __memcpy_chk, 1,
+ __memcpy_chk_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/memcpy.S. */
+ IFUNC_IMPL (i, name, memcpy,
+ IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3,
+ __memcpy_ssse3_back)
+ IFUNC_IMPL_ADD (array, i, memcpy, HAS_SSSE3, __memcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/mempcpy_chk.S. */
+ IFUNC_IMPL (i, name, __mempcpy_chk,
+ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3,
+ __mempcpy_chk_ssse3_back)
+ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, HAS_SSSE3,
+ __mempcpy_chk_ssse3)
+ IFUNC_IMPL_ADD (array, i, __mempcpy_chk, 1,
+ __mempcpy_chk_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/mempcpy.S. */
+ IFUNC_IMPL (i, name, mempcpy,
+ IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3,
+ __mempcpy_ssse3_back)
+ IFUNC_IMPL_ADD (array, i, mempcpy, HAS_SSSE3,
+ __mempcpy_ssse3)
+ IFUNC_IMPL_ADD (array, i, mempcpy, 1, __mempcpy_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strlen.S. */
+ IFUNC_IMPL (i, name, strlen,
+ IFUNC_IMPL_ADD (array, i, strlen, HAS_SSE4_2, __strlen_sse42)
+ IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2_pminub)
+ IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2_no_bsf)
+ IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2)
+ IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2))
+
+ /* Support sysdeps/x86_64/multiarch/strncmp.S. */
+ IFUNC_IMPL (i, name, strncmp,
+ IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSE4_2,
+ __strncmp_sse42)
+ IFUNC_IMPL_ADD (array, i, strncmp, HAS_SSSE3,
+ __strncmp_ssse3)
+ IFUNC_IMPL_ADD (array, i, strncmp, 1, __strncmp_sse2))
+#endif
+
+ return i;
+}
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index fb44dcfcf6..fed5ab8982 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -156,6 +156,9 @@ __init_cpu_features (void)
/* Determine if AVX is usable. */
if (CPUID_AVX)
__cpu_features.feature[index_AVX_Usable] |= bit_AVX_Usable;
+ /* Determine if FMA is usable. */
+ if (CPUID_FMA)
+ __cpu_features.feature[index_FMA_Usable] |= bit_FMA_Usable;
/* Determine if FMA4 is usable. */
if (CPUID_FMA4)
__cpu_features.feature[index_FMA4_Usable] |= bit_FMA4_Usable;
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
index 45e2651678..f33f1c81e5 100644
--- a/sysdeps/x86_64/multiarch/init-arch.h
+++ b/sysdeps/x86_64/multiarch/init-arch.h
@@ -22,7 +22,8 @@
#define bit_Fast_Unaligned_Load (1 << 4)
#define bit_Prefer_PMINUB_for_stringop (1 << 5)
#define bit_AVX_Usable (1 << 6)
-#define bit_FMA4_Usable (1 << 7)
+#define bit_FMA_Usable (1 << 7)
+#define bit_FMA4_Usable (1 << 8)
/* CPUID Feature flags. */
#define bit_SSE2 (1 << 26)
@@ -56,6 +57,7 @@
# define index_Fast_Unaligned_Load FEATURE_INDEX_1*FEATURE_SIZE
# define index_Prefer_PMINUB_for_stringop FEATURE_INDEX_1*FEATURE_SIZE
# define index_AVX_Usable FEATURE_INDEX_1*FEATURE_SIZE
+# define index_FMA_Usable FEATURE_INDEX_1*FEATURE_SIZE
# define index_FMA4_Usable FEATURE_INDEX_1*FEATURE_SIZE
#else /* __ASSEMBLER__ */
@@ -131,6 +133,8 @@ extern const struct cpu_features *__get_cpu_features (void)
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_OSXSAVE)
# define CPUID_AVX \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_AVX)
+# define CPUID_FMA \
+ HAS_CPUID_FLAG (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
# define CPUID_FMA4 \
HAS_CPUID_FLAG (COMMON_CPUID_INDEX_80000001, ecx, bit_FMA4)
@@ -140,7 +144,6 @@ extern const struct cpu_features *__get_cpu_features (void)
# define HAS_SSSE3 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSSE3)
# define HAS_SSE4_1 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_1)
# define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_2)
-# define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
# define index_Fast_Rep_String FEATURE_INDEX_1
# define index_Fast_Copy_Backward FEATURE_INDEX_1
@@ -148,6 +151,7 @@ extern const struct cpu_features *__get_cpu_features (void)
# define index_Prefer_SSE_for_memop FEATURE_INDEX_1
# define index_Fast_Unaligned_Load FEATURE_INDEX_1
# define index_AVX_Usable FEATURE_INDEX_1
+# define index_FMA_Usable FEATURE_INDEX_1
# define index_FMA4_Usable FEATURE_INDEX_1
# define HAS_ARCH_FEATURE(name) \
@@ -159,6 +163,7 @@ extern const struct cpu_features *__get_cpu_features (void)
# define HAS_PREFER_SSE_FOR_MEMOP HAS_ARCH_FEATURE (Prefer_SSE_for_memop)
# define HAS_FAST_UNALIGNED_LOAD HAS_ARCH_FEATURE (Fast_Unaligned_Load)
# define HAS_AVX HAS_ARCH_FEATURE (AVX_Usable)
+# define HAS_FMA HAS_ARCH_FEATURE (FMA_Usable)
# define HAS_FMA4 HAS_ARCH_FEATURE (FMA4_Usable)
#endif /* __ASSEMBLER__ */
diff --git a/sysdeps/x86_64/multiarch/memcmp.S b/sysdeps/x86_64/multiarch/memcmp.S
index b2bc4d797b..a3f6a38f65 100644
--- a/sysdeps/x86_64/multiarch/memcmp.S
+++ b/sysdeps/x86_64/multiarch/memcmp.S
@@ -1,5 +1,6 @@
/* Multiple versions of memcmp
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -48,6 +49,8 @@ END(memcmp)
# define ENTRY(name) \
.type __memcmp_sse2, @function; \
.p2align 4; \
+ .globl __memcmp_sse2; \
+ .hidden __memcmp_sse2; \
__memcmp_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/memcpy.S b/sysdeps/x86_64/multiarch/memcpy.S
index a77cdfb656..c7a193f64b 100644
--- a/sysdeps/x86_64/multiarch/memcpy.S
+++ b/sysdeps/x86_64/multiarch/memcpy.S
@@ -1,6 +1,6 @@
/* Multiple versions of memcpy
- Copyright (C) 2010, 2011
- Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -45,6 +45,8 @@ END(__new_memcpy)
# undef ENTRY
# define ENTRY(name) \
.type __memcpy_sse2, @function; \
+ .globl __memcpy_sse2; \
+ .hidden __memcpy_sse2; \
.p2align 4; \
__memcpy_sse2: cfi_startproc; \
CALL_MCOUNT
diff --git a/sysdeps/x86_64/multiarch/memcpy_chk.S b/sysdeps/x86_64/multiarch/memcpy_chk.S
index 5d0059e3de..2283cf6886 100644
--- a/sysdeps/x86_64/multiarch/memcpy_chk.S
+++ b/sysdeps/x86_64/multiarch/memcpy_chk.S
@@ -1,5 +1,6 @@
/* Multiple versions of __memcpy_chk
- Copyright (C) 2010 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/x86_64/multiarch/memmove.c b/sysdeps/x86_64/multiarch/memmove.c
index ca16263a17..af870d49b5 100644
--- a/sysdeps/x86_64/multiarch/memmove.c
+++ b/sysdeps/x86_64/multiarch/memmove.c
@@ -1,6 +1,6 @@
/* Multiple versions of memmove.
- Copyright (C) 2010, 2011
- Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,34 +17,44 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <string.h>
-
#ifndef NOT_IN_libc
-#include <shlib-compat.h>
-#include "init-arch.h"
-
-#define MEMMOVE __memmove_sse2
-#ifdef SHARED
-# undef libc_hidden_builtin_def
-# define libc_hidden_builtin_def(name) \
+# define MEMMOVE __memmove_sse2
+# ifdef SHARED
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name) \
__hidden_ver1 (__memmove_sse2, __GI_memmove, __memmove_sse2);
+# endif
+
+/* Redefine memmove so that the compiler won't complain about the type
+ mismatch with the IFUNC selector in strong_alias, below. */
+# undef memmove
+# define memmove __redirect_memmove
+# include <string.h>
+# undef memmove
+
+extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden;
#endif
-#endif
-
-extern __typeof (memmove) __memmove_sse2 attribute_hidden;
-extern __typeof (memmove) __memmove_ssse3 attribute_hidden;
-extern __typeof (memmove) __memmove_ssse3_back attribute_hidden;
#include "string/memmove.c"
#ifndef NOT_IN_libc
-libc_ifunc (memmove,
+# include <shlib-compat.h>
+# include "init-arch.h"
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+ ifunc symbol properly. */
+extern __typeof (__redirect_memmove) __libc_memmove;
+libc_ifunc (__libc_memmove,
HAS_SSSE3
? (HAS_FAST_COPY_BACKWARD
? __memmove_ssse3_back : __memmove_ssse3)
- : __memmove_sse2);
+ : __memmove_sse2)
+
+strong_alias (__libc_memmove, memmove)
-#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
+# if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5);
-#endif
+# endif
#endif
diff --git a/sysdeps/x86_64/multiarch/memmove_chk.c b/sysdeps/x86_64/multiarch/memmove_chk.c
index f1f99d99c6..da8160d4ac 100644
--- a/sysdeps/x86_64/multiarch/memmove_chk.c
+++ b/sysdeps/x86_64/multiarch/memmove_chk.c
@@ -1,5 +1,6 @@
/* Multiple versions of __memmove_chk.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/x86_64/multiarch/mempcpy.S b/sysdeps/x86_64/multiarch/mempcpy.S
index caa435b743..b5a5d6d68d 100644
--- a/sysdeps/x86_64/multiarch/mempcpy.S
+++ b/sysdeps/x86_64/multiarch/mempcpy.S
@@ -1,5 +1,6 @@
/* Multiple versions of mempcpy
- Copyright (C) 2010 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -43,6 +44,8 @@ END(__mempcpy)
# define ENTRY(name) \
.type __mempcpy_sse2, @function; \
.p2align 4; \
+ .globl __mempcpy_sse2; \
+ .hidden __mempcpy_sse2; \
__mempcpy_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/mempcpy_chk.S b/sysdeps/x86_64/multiarch/mempcpy_chk.S
index 604a721087..a3d3a59cb9 100644
--- a/sysdeps/x86_64/multiarch/mempcpy_chk.S
+++ b/sysdeps/x86_64/multiarch/mempcpy_chk.S
@@ -1,5 +1,6 @@
/* Multiple versions of __mempcpy_chk
- Copyright (C) 2010 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/x86_64/multiarch/memset.S b/sysdeps/x86_64/multiarch/memset.S
index 1a7fa2dc79..f7c6a9f11a 100644
--- a/sysdeps/x86_64/multiarch/memset.S
+++ b/sysdeps/x86_64/multiarch/memset.S
@@ -1,5 +1,6 @@
/* Multiple versions of memset
- Copyright (C) 2010 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +34,11 @@ ENTRY(memset)
2: ret
END(memset)
+/* Define internal IFUNC memset for bzero. */
+ .globl __libc_memset
+ .hidden __libc_memset
+ __libc_memset = memset
+
# define USE_SSE2 1
# undef ENTRY
diff --git a/sysdeps/x86_64/multiarch/memset_chk.S b/sysdeps/x86_64/multiarch/memset_chk.S
index 47d884114b..5a10f17965 100644
--- a/sysdeps/x86_64/multiarch/memset_chk.S
+++ b/sysdeps/x86_64/multiarch/memset_chk.S
@@ -1,5 +1,6 @@
/* Multiple versions of __memset_chk
- Copyright (C) 2010 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/x86_64/multiarch/rawmemchr.S b/sysdeps/x86_64/multiarch/rawmemchr.S
index c4157add81..be6ce84c07 100644
--- a/sysdeps/x86_64/multiarch/rawmemchr.S
+++ b/sysdeps/x86_64/multiarch/rawmemchr.S
@@ -1,4 +1,6 @@
-/* Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+/* Multiple versions of rawmemchr
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@redhat.com>.
This file is part of the GNU C Library.
@@ -44,6 +46,8 @@ strong_alias (rawmemchr, __rawmemchr)
.section .text.sse4.2,"ax",@progbits
.align 16
.type __rawmemchr_sse42, @function
+ .globl __rawmemchr_sse42
+ .hidden __rawmemchr_sse42
__rawmemchr_sse42:
cfi_startproc
CALL_MCOUNT
@@ -81,6 +85,8 @@ __rawmemchr_sse42:
# define ENTRY(name) \
.type __rawmemchr_sse2, @function; \
.align 16; \
+ .globl __rawmemchr_sse2; \
+ .hidden __rawmemchr_sse2; \
__rawmemchr_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/stpcpy.S b/sysdeps/x86_64/multiarch/stpcpy.S
index b63d308edc..ee81ab6ae3 100644
--- a/sysdeps/x86_64/multiarch/stpcpy.S
+++ b/sysdeps/x86_64/multiarch/stpcpy.S
@@ -1,3 +1,5 @@
+/* Multiple versions of stpcpy
+ All versions must be listed in ifunc-impl-list.c. */
#define USE_AS_STPCPY
#define STRCPY __stpcpy
#include "strcpy.S"
diff --git a/sysdeps/x86_64/multiarch/stpncpy.S b/sysdeps/x86_64/multiarch/stpncpy.S
index ff89a89491..2698ca6a8c 100644
--- a/sysdeps/x86_64/multiarch/stpncpy.S
+++ b/sysdeps/x86_64/multiarch/stpncpy.S
@@ -1,3 +1,5 @@
+/* Multiple versions of stpncpy
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCPY __stpncpy
#define USE_AS_STPCPY
#define USE_AS_STRNCPY
diff --git a/sysdeps/x86_64/multiarch/strcasecmp_l.S b/sysdeps/x86_64/multiarch/strcasecmp_l.S
index 5456b3a49e..49f5b9fd95 100644
--- a/sysdeps/x86_64/multiarch/strcasecmp_l.S
+++ b/sysdeps/x86_64/multiarch/strcasecmp_l.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strcasecmp and strcasecmp_l
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCMP __strcasecmp_l
#define USE_AS_STRCASECMP_L
#include "strcmp.S"
diff --git a/sysdeps/x86_64/multiarch/strcasestr-c.c b/sysdeps/x86_64/multiarch/strcasestr-c.c
index 551492d8f5..c13a4c44f3 100644
--- a/sysdeps/x86_64/multiarch/strcasestr-c.c
+++ b/sysdeps/x86_64/multiarch/strcasestr-c.c
@@ -1,3 +1,6 @@
+/* Multiple versions of strcasestr
+ All versions must be listed in ifunc-impl-list.c. */
+
#include "init-arch.h"
#define STRCASESTR __strcasestr_sse2
diff --git a/sysdeps/x86_64/multiarch/strcat.S b/sysdeps/x86_64/multiarch/strcat.S
index 0c256dee37..ec486680ec 100644
--- a/sysdeps/x86_64/multiarch/strcat.S
+++ b/sysdeps/x86_64/multiarch/strcat.S
@@ -1,5 +1,6 @@
/* Multiple versions of strcat
- Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -63,6 +64,8 @@ END(STRCAT)
# define ENTRY(name) \
.type STRCAT_SSE2, @function; \
.align 16; \
+ .globl STRCAT_SSE2; \
+ .hidden STRCAT_SSE2; \
STRCAT_SSE2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/strchr.S b/sysdeps/x86_64/multiarch/strchr.S
index b9f88e4bd3..5b589bab6d 100644
--- a/sysdeps/x86_64/multiarch/strchr.S
+++ b/sysdeps/x86_64/multiarch/strchr.S
@@ -1,5 +1,5 @@
-/* strchr with SSE4.2
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+/* Multiple versions of strchr
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -82,6 +82,8 @@ END(strchr)
.section .text.sse4.2,"ax",@progbits
.align 16
.type __strchr_sse42, @function
+ .globl __strchr_sse42
+ .hidden __strchr_sse42
__strchr_sse42:
cfi_startproc
CALL_MCOUNT
@@ -164,6 +166,8 @@ L(loop_exit):
# define ENTRY(name) \
.type __strchr_sse2, @function; \
.align 16; \
+ .globl __strchr_sse2; \
+ .hidden __strchr_sse2; \
__strchr_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/strcmp-sse42.S b/sysdeps/x86_64/multiarch/strcmp-sse42.S
index 9d00bbc5ad..e13b8adb74 100644
--- a/sysdeps/x86_64/multiarch/strcmp-sse42.S
+++ b/sysdeps/x86_64/multiarch/strcmp-sse42.S
@@ -1,5 +1,5 @@
/* strcmp with SSE4.2
- Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -48,6 +48,8 @@
.section .text.SECTION,"ax",@progbits
.align 16
.type STRCMP_SSE42, @function
+ .globl STRCMP_SSE42
+ .hidden STRCMP_SSE42
#ifdef USE_AS_STRCASECMP_L
ENTRY (GLABEL(__strcasecmp))
movq __libc_tsd_LOCALE@gottpoff(%rip),%rax
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
index d366d09690..f64ff46c7a 100644
--- a/sysdeps/x86_64/multiarch/strcmp.S
+++ b/sysdeps/x86_64/multiarch/strcmp.S
@@ -1,4 +1,4 @@
-/* strcmp with SSE4.2
+/* Multiple versions of strcmp
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -171,6 +171,8 @@ weak_alias (__strncasecmp, strncasecmp)
# define ENTRY(name) \
.type STRCMP_SSE2, @function; \
.align 16; \
+ .globl STRCMP_SSE2; \
+ .hidden STRCMP_SSE2; \
STRCMP_SSE2: cfi_startproc; \
CALL_MCOUNT
# undef END
@@ -181,6 +183,8 @@ weak_alias (__strncasecmp, strncasecmp)
# define ENTRY2(name) \
.type __strcasecmp_sse2, @function; \
.align 16; \
+ .globl __strcasecmp_sse2; \
+ .hidden __strcasecmp_sse2; \
__strcasecmp_sse2: cfi_startproc; \
CALL_MCOUNT
# define END2(name) \
@@ -191,6 +195,8 @@ weak_alias (__strncasecmp, strncasecmp)
# define ENTRY2(name) \
.type __strncasecmp_sse2, @function; \
.align 16; \
+ .globl __strncasecmp_sse2; \
+ .hidden __strncasecmp_sse2; \
__strncasecmp_sse2: cfi_startproc; \
CALL_MCOUNT
# define END2(name) \
diff --git a/sysdeps/x86_64/multiarch/strcpy.S b/sysdeps/x86_64/multiarch/strcpy.S
index 7be1b8be70..082d03e9fa 100644
--- a/sysdeps/x86_64/multiarch/strcpy.S
+++ b/sysdeps/x86_64/multiarch/strcpy.S
@@ -1,5 +1,6 @@
/* Multiple versions of strcpy
- Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -77,6 +78,8 @@ END(STRCPY)
# define ENTRY(name) \
.type STRCPY_SSE2, @function; \
.align 16; \
+ .globl STRCPY_SSE2; \
+ .hidden STRCPY_SSE2; \
STRCPY_SSE2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/strcspn.S b/sysdeps/x86_64/multiarch/strcspn.S
index 715a1c45c3..2d35ea6f8d 100644
--- a/sysdeps/x86_64/multiarch/strcspn.S
+++ b/sysdeps/x86_64/multiarch/strcspn.S
@@ -1,5 +1,6 @@
/* Multiple versions of strcspn
- Copyright (C) 2009 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/x86_64/multiarch/strlen.S b/sysdeps/x86_64/multiarch/strlen.S
index 0c46b4f40c..f93432e12a 100644
--- a/sysdeps/x86_64/multiarch/strlen.S
+++ b/sysdeps/x86_64/multiarch/strlen.S
@@ -1,5 +1,6 @@
-/* strlen(str) -- determine the length of the string STR.
- Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Multiple versions of strlen(str) -- determine the length of the string STR.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@redhat.com>.
This file is part of the GNU C Library.
@@ -49,6 +50,8 @@ END(strlen)
# define ENTRY(name) \
.type __strlen_sse2, @function; \
.align 16; \
+ .globl __strlen_sse2; \
+ .hidden __strlen_sse2; \
__strlen_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/strncase_l.S b/sysdeps/x86_64/multiarch/strncase_l.S
index c725cd85b3..9c0149788e 100644
--- a/sysdeps/x86_64/multiarch/strncase_l.S
+++ b/sysdeps/x86_64/multiarch/strncase_l.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncasecmp and strncasecmp_l
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCMP __strncasecmp_l
#define USE_AS_STRNCASECMP_L
#include "strcmp.S"
diff --git a/sysdeps/x86_64/multiarch/strncat.S b/sysdeps/x86_64/multiarch/strncat.S
index fd569c2234..5c1bf41453 100644
--- a/sysdeps/x86_64/multiarch/strncat.S
+++ b/sysdeps/x86_64/multiarch/strncat.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncat
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCAT strncat
#define USE_AS_STRNCAT
#include "strcat.S"
diff --git a/sysdeps/x86_64/multiarch/strncmp-ssse3.S b/sysdeps/x86_64/multiarch/strncmp-ssse3.S
index a320a3e949..96380a46be 100644
--- a/sysdeps/x86_64/multiarch/strncmp-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strncmp-ssse3.S
@@ -1,4 +1,6 @@
-#define USE_SSSE3 1
-#define STRCMP __strncmp_ssse3
-#define USE_AS_STRNCMP
-#include "../strcmp.S"
+#ifdef SHARED
+# define USE_SSSE3 1
+# define STRCMP __strncmp_ssse3
+# define USE_AS_STRNCMP
+# include "../strcmp.S"
+#endif
diff --git a/sysdeps/x86_64/multiarch/strncmp.S b/sysdeps/x86_64/multiarch/strncmp.S
index 0af34e7f15..fd5eb1397c 100644
--- a/sysdeps/x86_64/multiarch/strncmp.S
+++ b/sysdeps/x86_64/multiarch/strncmp.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncmp
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCMP strncmp
#define USE_AS_STRNCMP
#include "strcmp.S"
diff --git a/sysdeps/x86_64/multiarch/strncpy.S b/sysdeps/x86_64/multiarch/strncpy.S
index 327a4ce447..6d87a0ba35 100644
--- a/sysdeps/x86_64/multiarch/strncpy.S
+++ b/sysdeps/x86_64/multiarch/strncpy.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strncpy
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCPY strncpy
#define USE_AS_STRNCPY
#include "strcpy.S"
diff --git a/sysdeps/x86_64/multiarch/strnlen.S b/sysdeps/x86_64/multiarch/strnlen.S
index 044b910c6e..4df05fc7da 100644
--- a/sysdeps/x86_64/multiarch/strnlen.S
+++ b/sysdeps/x86_64/multiarch/strnlen.S
@@ -1,5 +1,6 @@
/* multiple version of strnlen
- Copyright (C) 2011 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -40,6 +41,8 @@ END(__strnlen)
# define ENTRY(name) \
.type __strnlen_sse2, @function; \
.align 16; \
+ .globl __strnlen_sse2; \
+ .hidden __strnlen_sse2; \
__strnlen_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/strpbrk.S b/sysdeps/x86_64/multiarch/strpbrk.S
index ed5bca6a94..7201d6376f 100644
--- a/sysdeps/x86_64/multiarch/strpbrk.S
+++ b/sysdeps/x86_64/multiarch/strpbrk.S
@@ -1,3 +1,5 @@
+/* Multiple versions of strpbrk
+ All versions must be listed in ifunc-impl-list.c. */
#define STRCSPN strpbrk
#define USE_AS_STRPBRK
#include "strcspn.S"
diff --git a/sysdeps/x86_64/multiarch/strrchr.S b/sysdeps/x86_64/multiarch/strrchr.S
index c87d8fae08..6e548e5046 100644
--- a/sysdeps/x86_64/multiarch/strrchr.S
+++ b/sysdeps/x86_64/multiarch/strrchr.S
@@ -1,5 +1,6 @@
-/* strrchr with SSE4.2
- Copyright (C) 2009 Free Software Foundation, Inc.
+/* Multiple versions of strrchr
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -87,6 +88,8 @@ END(strrchr)
.section .text.sse4.2,"ax",@progbits
.align 16
.type __strrchr_sse42, @function
+ .globl __strrchr_sse42
+ .hidden __strrchr_sse42
__strrchr_sse42:
cfi_startproc
CALL_MCOUNT
@@ -265,6 +268,8 @@ L(psrldq_table):
# define ENTRY(name) \
.type __strrchr_sse2, @function; \
.align 16; \
+ .globl __strrchr_sse2; \
+ .hidden __strrchr_sse2; \
__strrchr_sse2: cfi_startproc; \
CALL_MCOUNT
# undef END
diff --git a/sysdeps/x86_64/multiarch/strspn.S b/sysdeps/x86_64/multiarch/strspn.S
index 2d72888093..b4ee900c89 100644
--- a/sysdeps/x86_64/multiarch/strspn.S
+++ b/sysdeps/x86_64/multiarch/strspn.S
@@ -1,5 +1,6 @@
/* Multiple versions of strspn
- Copyright (C) 2009 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2009-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/x86_64/multiarch/strstr-c.c b/sysdeps/x86_64/multiarch/strstr-c.c
index b8ed3161d5..bb1f8c915a 100644
--- a/sysdeps/x86_64/multiarch/strstr-c.c
+++ b/sysdeps/x86_64/multiarch/strstr-c.c
@@ -1,4 +1,28 @@
-#include "init-arch.h"
+/* Multiple versions of strstr.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Redefine strstr so that the compiler won't complain about the type
+ mismatch with the IFUNC selector in strong_alias, below. */
+#undef strstr
+#define strstr __redirect_strstr
+#include <string.h>
+#undef strstr
#define STRSTR __strstr_sse2
#ifdef SHARED
@@ -9,7 +33,15 @@
#include "string/strstr.c"
-extern char *__strstr_sse42 (const char *, const char *) attribute_hidden;
-extern __typeof (__strstr_sse2) __strstr_sse2 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden;
+extern __typeof (__redirect_strstr) __strstr_sse2 attribute_hidden;
+
+#include "init-arch.h"
+
+/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
+ ifunc symbol properly. */
+extern __typeof (__redirect_strstr) __libc_strstr;
+libc_ifunc (__libc_strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2)
-libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2);
+#undef strstr
+strong_alias (__libc_strstr, strstr)
diff --git a/sysdeps/x86_64/multiarch/wcscpy.S b/sysdeps/x86_64/multiarch/wcscpy.S
index 194df007c0..29261aae6a 100644
--- a/sysdeps/x86_64/multiarch/wcscpy.S
+++ b/sysdeps/x86_64/multiarch/wcscpy.S
@@ -1,5 +1,6 @@
/* Multiple versions of wcscpy
- Copyright (C) 2011 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/x86_64/multiarch/wmemcmp.S b/sysdeps/x86_64/multiarch/wmemcmp.S
index 1bb529f04e..98a187dc2e 100644
--- a/sysdeps/x86_64/multiarch/wmemcmp.S
+++ b/sysdeps/x86_64/multiarch/wmemcmp.S
@@ -1,5 +1,6 @@
/* Multiple versions of wmemcmp
- Copyright (C) 2011 Free Software Foundation, Inc.
+ All versions must be listed in ifunc-impl-list.c.
+ Copyright (C) 2011-2012 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
diff --git a/sysdeps/x86_64/strtok.S b/sysdeps/x86_64/strtok.S
index fe4a9475b3..4028a47f24 100644
--- a/sysdeps/x86_64/strtok.S
+++ b/sysdeps/x86_64/strtok.S
@@ -44,7 +44,7 @@
#else
.bss
.local save_ptr
- ASM_TYPE_DIRECTIVE (save_ptr, @object)
+ .type save_ptr, @object
.size save_ptr, LP_SIZE
save_ptr:
.space LP_SIZE
diff --git a/sysdeps/x86_64/sysdep.h b/sysdeps/x86_64/sysdep.h
index 258781d096..41c3eb2d31 100644
--- a/sysdeps/x86_64/sysdep.h
+++ b/sysdeps/x86_64/sysdep.h
@@ -27,15 +27,13 @@
/* ELF uses byte-counts for .align, most others use log2 of count of bytes. */
#define ALIGNARG(log2) 1<<log2
-/* For ELF we need the `.type' directive to make shared libs work right. */
-#define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
/* Define an entry point visible from C. */
#define ENTRY(name) \
- .globl C_SYMBOL_NAME(name); \
- ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(4); \
C_LABEL(name) \
cfi_startproc; \
diff --git a/sysdeps/x86_64/tst-xmmymm.sh b/sysdeps/x86_64/tst-xmmymm.sh
index da8af7e686..64efc6e021 100755
--- a/sysdeps/x86_64/tst-xmmymm.sh
+++ b/sysdeps/x86_64/tst-xmmymm.sh
@@ -1,4 +1,24 @@
#! /bin/bash
+# Make sure no code in ld.so uses xmm/ymm registers on x86-64.
+# Copyright (C) 2009-2012 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+
+# The GNU C Library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# The GNU C Library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with the GNU C Library; if not, see
+# <http://www.gnu.org/licenses/>.
+
+set -e
+
objpfx="$1"
tmp=$(mktemp ${objpfx}tst-xmmymm.XXXXXX)
diff --git a/time/time.h b/time/time.h
index 17e580e595..dc350f77da 100644
--- a/time/time.h
+++ b/time/time.h
@@ -367,12 +367,12 @@ extern int timer_create (clockid_t __clock_id,
/* Delete timer TIMERID. */
extern int timer_delete (timer_t __timerid) __THROW;
-/* Set timer TIMERID to VALUE, returning old value in OVLAUE. */
+/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
extern int timer_settime (timer_t __timerid, int __flags,
const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) __THROW;
-/* Get current value of timer TIMERID and store it in VLAUE. */
+/* Get current value of timer TIMERID and store it in VALUE. */
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
__THROW;
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 983fd76f61..37e379c279 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -45,6 +45,8 @@ strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests))
+tests-ifunc := $(strop-tests:%=test-%-ifunc)
+tests += $(tests-ifunc)
include ../Rules
@@ -72,9 +74,8 @@ CFLAGS-isoc99_wscanf.c += $(exceptions)
CFLAGS-isoc99_fwscanf.c += $(exceptions)
CFLAGS-isoc99_vwscanf.c += $(exceptions)
CFLAGS-isoc99_vfwscanf.c += $(exceptions)
-ifneq (,$(filter %REENTRANT, $(defines)))
-CPPFLAGS += -D_IO_MTSAFE_IO
-endif
+
+CPPFLAGS += $(libio-mtsafe)
# We need to find the default version of strtold_l in stdlib.
CPPFLAGS-wcstold_l.c = -I../stdlib
diff --git a/wcsmbs/test-wcschr-ifunc.c b/wcsmbs/test-wcschr-ifunc.c
new file mode 100644
index 0000000000..f550d51851
--- /dev/null
+++ b/wcsmbs/test-wcschr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcschr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-wcschr.c"
diff --git a/wcsmbs/test-wcscmp-ifunc.c b/wcsmbs/test-wcscmp-ifunc.c
new file mode 100644
index 0000000000..bef97d9a32
--- /dev/null
+++ b/wcsmbs/test-wcscmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcscmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-wcscmp.c"
diff --git a/wcsmbs/test-wcscpy-ifunc.c b/wcsmbs/test-wcscpy-ifunc.c
new file mode 100644
index 0000000000..0e38971e36
--- /dev/null
+++ b/wcsmbs/test-wcscpy-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcscpy function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-wcscpy.c"
diff --git a/wcsmbs/test-wcslen-ifunc.c b/wcsmbs/test-wcslen-ifunc.c
new file mode 100644
index 0000000000..baac78fa47
--- /dev/null
+++ b/wcsmbs/test-wcslen-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcslen function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-wcslen.c"
diff --git a/wcsmbs/test-wcsrchr-ifunc.c b/wcsmbs/test-wcsrchr-ifunc.c
new file mode 100644
index 0000000000..28a5106c4f
--- /dev/null
+++ b/wcsmbs/test-wcsrchr-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcsrchr function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-wcsrchr.c"
diff --git a/wcsmbs/test-wmemcmp-ifunc.c b/wcsmbs/test-wmemcmp-ifunc.c
new file mode 100644
index 0000000000..a6110b4f9d
--- /dev/null
+++ b/wcsmbs/test-wmemcmp-ifunc.c
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wmemcmp function.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define TEST_IFUNC 1
+#include "test-wmemcmp.c"